How to include any files in rootfs with YOCTO

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

タグ(1)
コメント

Hi Rodrigue

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

Thanks

Niranjan 

評価なし
バージョン履歴
最終更新日:
‎06-01-2015 06:51 AM
更新者: