内核移植-- linux:
1.解压到工作目录后进入linux-.2顶层目录:
#cd linux-2.6.30.2/
开始肯定是改Makefile了
ARCH ?= arm
CROSS_COMPILE ?= arm-linux-
arch/arm/configs/目录里面与s2410_defconfig
所以先在顶层目录执行:
#make s2410_defconfig
2.修改nandflash分区:
#vim arch/arm/plat-s24xx/common-smdk.c
改为:
static struct mtd_partition smdk_default_nand_part[] = {
[0] = {
.name = "Bootloarder",
.size = 0x00100000,
.offset = 0,
},
[1] = {
.name = "kernel",
.offset = 0x00100000,
.size = 0x00300000,
},
[2] = {
.name = "rootfs",
.offset = 0x00400000,
.size = 0x02800000,
}
[3] = {
.name = "user",
.offset = 0x00000,
.size = 0x02d00000,
},
}
make menuconfig
Boot option ----->
修改启动参数为:
noinitrd root=/dev/mtdblock2 init=/bin/ash console=ttySAC0,115200
File System--->
Miscellaneous filesystems--->
[*]Compressed ROM file system support (cramfs)
确保此项选上,因为后面准备挂cramfs文件系统。
于是退出保存,生成.config
#make
等一段时间后,生成arch/arm/boot/zImage