how to put test.bmp in /home/root folder?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to put test.bmp in /home/root folder?

2,045 Views
freescaleusr1
Contributor I

Hi,

I use yocto core-image-minimal image,I wish to place a test picture like : test .bmp into the sdcard image file, I find the root folder in build/tmp/work/..../core-image-minimal/1.0-r0/rootfs/home/,and cp it into it, then bitbake core-image-minimal, but the picture file still disappear. so these rootfs files all are updated when bitbake. so how to bitbake and not make these rootfs files not updated again, or  what is the simplest method to place picture in /home/root in final image? looking forward to reply, thanks.

Labels (3)
0 Kudos
Reply
3 Replies

1,254 Views
Pavel
NXP Employee
NXP Employee

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,254 Views
LuisCasado
NXP Employee
NXP Employee
0 Kudos
Reply

1,254 Views
freescaleusr1
Contributor I

Luis

Thanks for reply, yours is the most easy way, but I have question, I must use rsync to do it, or can i wrtie the following? :

IMAGE_PREPROCESS_COMMAND += " cp /home/root/test.bmp ${WORKDIR}/rootfs ; "

looking forward to reply,thanks.

0 Kudos
Reply