linux-3.4.6移植

1、进入linux-3.4.6目录,vi Makefile 修改195、196行如下内容

ARCH            ?=arm
CROSS_COMPILE   ?=arm-linux-

2、 打开arch/arm/mach-s3c24xx/mach-mini2440.c,修改参数分区

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,
        },
};

3、vi drivers/mtd/nand/s3c2410.c  修改846行

 chip->ecc.mode      = NAND_ECC_NONE;

 

4 、支持yaffs2

从官网获得yaffs2源码

git clone git://www.aleph1.co.uk/yaffs2

给内核打补丁

./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内核启动

posted @ 2016-04-17 22:45  jetli  阅读(405)  评论(0编辑  收藏  举报