Yocto using .bbappend file to override default init scripts entry for initramfs

I'm trying to write a .bbappend file that will be added to initramfs-live-boot_1.0.bb , which has a statement inside do_install() that writes the contents of init-live.sh , a shell script that controls the boot process, before init , initialization script that runs at boot time. The purpose of my .bbappend file is to link to a modified version of the script run to copy instead of the original without changing the openembedded-core and / or poky base environments. Thus, the .bbappend file and my version of the script are placed in my project directory with the rest of my own recipes to be created.

My initramfs-live-boot_1.0.bbappend looks like this:

 SUMMARY = "Replacement recipe" FILESEXTRAPATH_prepend := "${THISDIR}/files:" SRC_URI += "file://init.sh" do_install_append() { install -m 0755 ${WORKDIR}/init.sh ${D}/init } 

I have a files folder in the same directory as a .bbappend file that contains an init.sh script that should read.

The problem is when I try to create an image, it spits out this error:

 WARNING: Failed to fetch URL file://init.sh, attempting MIRRORS if available 

and then tries to search the poky directory for the missing files, and not in my project directory.

Am I spelling the .bbappend file .bbappend ? How do I start editing initramfs scripts with a .bbappend file?

+6
source share
1 answer

FILESEXTRAPATH_prepend := "${THISDIR}/files:" must be FILESEXTRAPATHS_prepend := "${THISDIR}/files:" . Pay attention to the last S in FILESEXTRAPATHS .

This should make you work for you.

Another improvement is to rename the file from init.sh to init-live.sh . That is, use the same name as the file in the original recipe initramfs-live-boot . This will allow you to remove your do_install_append() function as well as SRC_URI += "file://init.sh" from bbappend. The recipe will process them for you. So the only line you really need is FILESEXTRAPATHS_prepend := "${THISDIR}/files:" .

+6
source

All Articles