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

转载于:https://www.cnblogs.com/jetli-/p/5402653.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值