内 核 版 本:linux-3.0
u-boot版本:u-boot-2010.09
开发板型号:FL2440
1、对根文件系统进行修改
(一)的前提下不需要修改
2、添加内核对 initramfs 的支持
[lingyun@localhost linux-3.0]$ vt100
[lingyun@localhost linux-3.0]$ make menuconfig
General setup --->
注:其中:../../rootfs_tree为自己的文件系统相对于内核的路径。
修改Makefile
[lingyun@localhost linux-3.0]$ vim Makefile
修改195、196行
注:196行为自己的交叉编译器的路径
[lingyun@localhost linux-3.0]$ make
编译过程省略
[lingyun@localhost linux-3.0]$ ls
ky-initramfs.bin为编译好的内核。
3 制作映像文件
因为文件系统和内核是集成在一起的,所以不需要制作文件系统映像
4 将内核和文件系统烧入开发板
[u-boot@keyue]# tftp 30008000 ky-initramfs.bin;nand erase 100000 800000;nand write 30008000 100000 $filesize
[u-boot@keyue]# bootm 30008000
注:在烧录时有些命令很长,多次输入会很麻烦,这是我们可以自己设置一些变量。如:
[u-boot@keyue]#set bkr 'tftp 30008000 ky-initramfs.bin;nand erase 100000 800000;nand write 30008000 100000 800000'
[u-boot@keyue]#set bootargs 'console=ttyS0,115200 mem=64M init=/linuxrc rw loglevel=7'
[u-boot@keyue]#set bootcmd_initramdisk 'nand read 30008000 100000 a00000;bootm 30008000'
[u-boot@keyue]#set bootcmd 'run bootcmd_initramdisk'
[u-boot@keyue]#save
查看变量:[u-boot@keyue]#pri
执行命令:[u-boot@keyue]#run bkr
这时执行的过程和上图的效果一样。
在烧录时的信息过长,略。最后当运行到下面时:
Copyright (C) 2013 keyue
FL2440 login: dm9000 dm9000.0: eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
Copyright (C) 2013 keyue
FL2440 login:
至此,文件系统已经烧入开发板,可以看到自己制作的文件系统。