From project/image/configs/i2m/, we can know that the smallest file system consists of project/image/rootfs/rootfs.tar.gz and project/image/busybox/busybox-1.20.2-arm-linux-gnueabihf -glibc-8.2.1-dynamic.tar.gz composition.
#vi project/configs/i2m/
BUSYBOX comes from project/configs/nvr/i2m/8.2.1/spinand.glibc.011a.64

Therefore, we can customize the files by customizing project/image/rootfs/rootfs.tar.gz and project/image/busybox/busybox-1.20.2-arm-linux-gnueabihf-glibc-8.2.1-dynamic.tar.gz system.
The following describes the use of buildroot to customize the file system.

  • Download buildroot-2020.05.tar.bz2 from buildroot official website, unzip and enter the unzip directory;
  • Configure cross compilation chain

    #make menuconfig
  • start to compile
  • Repack
    After the compilation is complete, generate output/images/rootfs.tar, execute the following command to repackage:
    #mkdir output/images/rootfs
    #tar -xvf output/images/rootfs.tar -C output/images/rootfs
    #tar -cvf output/images/rootfs.tar.gz output/images/rootfs
  • Replace the target file system
    #cp output/images/rootfs.tar.gz ../project/image/rootfs/rootfs.tar.gz -f
    • Close busybox
      Since the file system compiled with buildroot already contains busybox, the original busybox is no longer needed:
      #vi project/image/configs/i2m/
文档更新时间: 2020-11-13 12:03   作者:admin