一、進入linux-3.4.6目錄,vi Makefile 修改19五、196行以下內容linux
ARCH ?=arm
CROSS_COMPILE ?=arm-linux-git
二、 打開arch/arm/mach-s3c24xx/mach-mini2440.c,修改參數分區ide
static struct mtd_partition mini2440_default_nand_part[] __initdata = {
[0] = {
.name = "u-boot",
.size = SZ_512K,
.offset = 0,
},
[1] = {
.name = "u-boot-env",
.size = SZ_512K,
.offset = SZ_512K,
},
[2] = {
.name = "kernel",
/* 5 megabytes, for a kernel with no modules
* or a uImage with a ramdisk attached */
.size =SZ_4M,
.offset =SZ_1M,
},
[3] = {
.name = "root",
.offset = SZ_1M*5,
.size = SZ_1M*100,
},
};this
三、vi drivers/mtd/nand/s3c2410.c 修改846行spa
chip->ecc.mode = NAND_ECC_NONE;debug
4 、支持yaffs2
ip
從官網得到yaffs2源碼源碼
git clone git://www.aleph1.co.uk/yaffs2flash
給內核打補丁it
./patch-ker.sh c m /home/real_linux/linux-3.4.6
5 配置內核
make mini2440_defconfig
make menuconfig
Kernel Features --->
[*] Allow old ABI binaries to run with this kernel (EXPERIMENTAL)
[*] Provide old way to pass kernel parameters
Device Drivers --->
<*> Memory Technology Device (MTD) support --->
< > FTL (Flash Translation Layer) support
< > NFTL (NAND Flash Translation Layer) support
< > INFTL (Inverse NAND Flash Translation Layer) support
去掉這三項,會消除相應的警告
File systems --->
[*] Miscellaneous filesystems --->
<*> yaffs2 file system support
Kernel hacking --->
[*] Kernel low-level debugging functions (read help!)
(這裏沒選上,starting kernel 以後無輸出)
make uImage
而後燒寫到nanflash。 接上面uboot移植,就能夠引導linux內核啓動