一、进入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内核启动