How to include any files in rootfs with YOCTO

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

How to include any files in rootfs with YOCTO

How to include any files in rootfs with YOCTO

Dear all,

Below a small howto to get rid of the usual file copy to your rootfs.

This is my way of automatically include files to my generated image under yocto.

1. Create a recipe

Under source/meta

Below in plain text:

SUMMARY = "My test videos"
DESCRIPTION = "Test Videos"
HOMEPAGE = ""
LICENSE = "CLOSED"
MY_FILES = "/home/freerod/Videos/demo_video_VGA_25fps.MP4"

inherit allarch

do_install() {
install -d ${D}${datadir}/movies
install -m 0644 ${MY_FILES} ${D}${datadir}/movies/
}

FILES_${PN} += "${datadir}/movies"

This aims at creating a movies directory in:

/usr/share/movies within the rootfs, with the named demo_video_VGA_25fps.MP4 in it

2. CORE_IMAGE_EXTRA_INSTALL += "myvideos"

3. Check that the video will be put into the generated rootfs:

freerod@ubuntu:~/mx6/fsl-yocto-3.14.28_1.0.0/build_mx6dl$ ll tmp/work/all-poky-linux/myvideos/1.0-r0/packages-split/myvideos/usr/share/movies/demo_video_VGA_25fps.MP4

-rw-r--r-- 2 freerod freerod 14076709 Jun  2 01:40 tmp/work/all-poky-linux/myvideos/1.0-r0/packages-split/myvideos/usr/share/movies/demo_video_VGA_25fps.MP4

Tags (1)
Comments

Hi Rodrigue

any idea how do i place/include the file in different partition of SD card like Fat Partition.

Thanks

Niranjan 

No ratings
Version history
Last update:
‎06-01-2015 06:51 AM
Updated by: