June 2017
Intermediate to advanced
478 pages
13h 14m
English
The following sequence of instructions creates the archive, compresses it, and adds a U-Boot header ready for loading onto the target:
$ cd ~/rootfs$ find . | cpio -H newc -ov --owner root:root > ../initramfs.cpio$ cd ..$ gzip initramfs.cpio$ mkimage -A arm -O linux -T ramdisk -d initramfs.cpio.gz uRamdisk
Note that we run cpio with the option: --owner root:root. This is a quick fix for the file ownership problem mentioned earlier, making everything in the cpio archive have UID and GID of 0.
The final size of the uRamdisk file is about 2.9 MB with no kernel modules. Add to that 4.4 MB for the kernel zImage file and 440 KB for U-Boot, and this gives a total of 7.7 MB of storage needed to boot this board. We are a little ...
Read now
Unlock full access