The simplest way if file is added to compiled file system.
Use the command sequence as below. This command sequence was used on the P2020DS board.
a. Add files to ext2 rootfs
0. These steps are needed if rootfs.ext2.gz.uboot format is used.
sudo apt-get install u-boot-tools
Following are the steps for adding files into rootfilesystem:
dd if=fsl_image_minimal_p2020ds.rootfs.ext2.gz.uboot of=fsl_image_minimal_p2020ds.rootfs.ext2.gz bs=64 skip=1
1. gunzip fsl_image_minimal_p2020ds.rootfs.ext2.gz
2. mkdir ./mnt
3. mount -o loop fsl_image_minimal_p2020ds.rootfs.ext2 ./mnt
4. Now, one can copy files into appropriate location under “./mnt” directory.
5. umount ./mnt
6. gzip -9 fsl_image_minimal_p2020ds.rootfs.ext2
7. mkimage -A ppc -O linux -T ramdisk -C gzip -n 'fsl_image_minimal_p2020ds.rootfs.ext2.gz.uboot' -d fsl_image_minimal_p2020ds.rootfs.ext2.gz rootfs_full.ext2.gz.uboot
+++++++++++++++++++++++
b. Here are the steps for re-tailoring jffs2 based rootfs
1. Follow steps 1-4 as mentioned above
2. Execute the following command
mkfs.jffs2 -b -n -e 0x20000 --pad=0x800 -r mount1/ -o rfs.jffs2
rfs.jffs2 will be the jffs2 based file system containing the custom changes made through steps 1-4
Please note that mkfs.jffs2 binary should be present on the host machine (x86, etc)
Have a great day,
Pavel
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------