Buildroot使用的是NUC970_Buildroot
Buildroot已经取消了initial RAM
  │ │    [ ] cpio the root filesystem (for use as an initial RAM filesyste│ │  
  │ │    [ ] initial RAM filesystem linked into linux kernel              │ │  
在make linux-menuconfig里面也取消了initial RAM
[ ] Initial RAM filesystem and RAM disk (initramfs/initrd) suppor 取消选中
把> Boot options 项中的(root=/dev/ram0 console=ttyS0,115200n8 rdinit=/sbin/init mem=64M) 
    修改为(noinitrd  root=/dev/mtdblock2  rootfstype=yaffs2  rootflags=inband-tags console=ttyS0,115200n8 rdinit=/sbin/init mem=64M)     
相应的NAND flash驱动也选择了
    > Device Drivers > Generic Driver Options
    <*> Nuvoton NUC970/N9H30 FMI function selection                    
          Select FMI device to support (Support MTD NAND Flash)  --->    //默认    
 > Device Drivers > Memory Technology Device (MTD) support
      <*>   Caching block device access to MTD devices   
      -*-   NAND Device Support  --->           
          
 [...]  Drivers > Memory Technology Device (MTD) support > NAND Device Support    
        -*-   Nuvoton NUC970/N9H30 MTD NAND                                
                NUC970/N9H30 NAND Flash pin selection (Port C)  --->    
 > File systems > Miscellaneous filesystems 
      <*>   yaffs2 file system support  
生成的uimage内核 有5.8M这么大(这个不烧写rootfs_yaffs2.img就能进入系统),不用Buildroot生成的才1.9M。所以请问大家还有哪里需要设置呢?
最近编辑记录 Lvy (2019-11-05 19:48:29)
离线
find . |grep \\.o$ |xargs ls -l
看下哪些中间文件太大.
离线
现在怀疑是rootfs.cpio造成的970uimage内核变大并运行在ram的,请问怎么设置才能避开产生rootfs.cpio这个文件呢?
离线
你取消了, 应该就没有了。
离线
找到问题了,要吧 .config里的这项取消就好了 CONFIG_INITRAMFS_SOURCE="${BR_BINARIES_DIR}/rootfs.cpio"
离线
谢谢,确实是这样的 !
你取消了, 应该就没有了。
离线