Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updating numbered headings

...

  • No need to keep all files in the init RAM disk inside the bootable image;

  • Use a larger file system without affecting resources in RAM;

  • Update the file system on the per-file basis without need to rebuild the entire bootable image.

1. Building the Project

Step through the following procedure:

  1. On the Linux development host, install the BSP distribution and activate the cross-build environment as described in TBD Installing and Activating Cross Development Environment:

    Code Block
    $ tar -jxf linux-cm-imxrt-<bsp>-<release>.tar.bz2
    $ cd linux-cm-imxrt-<bsp>-<release>
    $ . ./ACTIVATE.sh
  2. Change to the rootfs project directory:

    Code Block
    $ cd projects/rootfs
  3. Update the Linux configuration in order to not include the initial RAM disk into the bootable uImage. For this, run make kmenuconfig in the project directory and uncheck (disable) the Initial RAM filesystem... option:

    Code Block
    General setup --->
    [ ] Initial RAM filesystem and RAM disk (initramfs/initrd) support
  4. Enable building the tarball with the root file system outside of the bootable uImage. For this, define the special FS_IMAGES option as $(SAMPLE).tar.gz in Makefile. Open the projects/rootfs/Makefile file in a text editor and uncomment the following line:

    Code Block
    FS_IMAGES := $(SAMPLE).tar.gz
    
    
  5. Build the project:

    Code Block
    $ make
    ...
    SAMPLE=rootfs  \
            ../rfs-builder.py create-rfs-dir \
            rootfs.initramfs `pwd`/rootfs-build-tmpdir
    tar -C rootfs-build-tmpdir -zcf rootfs.tar.gz --owner=0 --group=0 .
  6. Check that the following images required to boot the system with the root file system mounted on SD Card has been created:

    • rootfs.uImage - a kernel image without the root file system in it;

    • rootfs.tar.gz - a tarball containing the root filesystem.

    Code Block
    $ ls -1 rootfs.uImage rootfs.tar.gz
    rootfs.tar.gz
    rootfs.uImage
    $

2. Partitioning SD Card

The Emcraft Linux software distribution for the i.MX RT BSPs assumes the following utilization of the SD card storage:

...