Linux内核版本号:linux 2.6.39
交叉编译工具:arm-linux-gcc 4.5.1
Linux内核下载:www.kernel.org
开发板:友善之臂Tiny6410
一、解压内核
tar xzvf linux-2.6.39.tar.gz
二、修改Makefile
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:'%'=%)
改成:
ARCH ?= arm
CROSS_COMPILE ?= arm-linux-
三、进入解压出来的linux-2.6.39目录,拷贝arch/arm/configs/s3c6400_defconfig到当前目录并重命名为.config
cp arch/arm/configs/s3c6400_defconfig ./.config
四、基本配置
执行make menuconfig
1、选择CPU型号:
System Type --->
*** System MMU ***
│ │ -*- S3C64XX DMA
│ │ [ ] SMDK6400
│ │ [ ] A&W6410
│ │ [*] MINI6410
│ │ [ ] REAL6410
│ │ [ ] SMDK6410
│ │ [ ] NCP
│ │ [ ] Airgoo HMT
│ │ [ ] SmartQ 5
│ │ [ ] SmartQ 7
只选上MINI6410其它的不选。
2、支持进程中通信
General setup --->
│ │ [*] System V IPC
3、退出内核图形配置菜单,执行make生成zImage镜像文件,将arch/arm/boot/zImage拷贝到tftp共享目录,tftp服务器搭建见贴http://www.cnblogs.com/ape-ming/p/5100449.html
五、启动开发板通过tftp下载内核镜像文件并启动内核,出现以下信息:
VFS: Cannot open root device 'nfs' or unknown-block(0,255)
Please append a correct 'root=' boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,255)
[
[
[
[
[
这是没有支持MTD分区或者没有文件系统支持,先修改下MTD分区:
打开arch/arm/mach-s3c64xx/mach-mini6410.c,并修改分区
static struct mtd_partition mini6410_nand_part[] = {
[0] = {
.name = 'uboot',
.size = SZ_1M,
.offset = 0,
},
[1] = {
.name = 'kernel',
.size = SZ_2M,
.offset = SZ_1M,
},
[2] = {
.name = 'file system',
.size = MTDPART_SIZ_FULL,
.offset = SZ_1M + SZ_2M,
},
};
配置内核支持MTD:
Device Drivers --->
<*> Memory Technology Device (MTD) support --->
│ │ --- Memory Technology Device (MTD) support
│ │ [ ] Debugging
│ │ < > MTD tests support
│ │ [*] MTD partitioning support
│ │ < > RedBoot partition table parsing
│ │ [*] Command line partition table parsing
│ │ < > ARM Firmware Suite partition parsing
│ │ < > TI AR7 partitioning support
│ │ *** User Modules And Translation Layers ***
│ │ <*> Direct char device access to MTD devices
│ │ -*- Common interface to block layer for MTD 'translation layers'
│ │ <*> Caching block device access to MTD devices
配置内核支持DM9000:
[*] Networking support --->
Networking options --->
│ │ <*> Packet socket //包套接字接口
│ │ <*> Unix domain sockets //Unix域套接字
│ │ < > PF_KEY sockets
│ │ [*] TCP/IP networking //TCP/IP网络
│ │ [*] IP: multicasting //IP广播协议