summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAdrian Freihofer <adrian.freihofer@gmail.com>2025-02-06 23:56:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-02-11 11:44:19 +0000
commit9ea3f0e4cdaa32e5d3af5e52b6990bac9618ea48 (patch)
treef3727605abb26271f181e77b70420813a31415e7 /meta
parent68bbc11f8f843a3b066130d4f2d887d45a4797c2 (diff)
downloadpoky-9ea3f0e4cdaa32e5d3af5e52b6990bac9618ea48.tar.gz
kernel-fitimage.bbclass: do not use the UBOOT_ENV variable
The kernel-fitimage.bbclass evaluates the UBOOT_ENV variable from the u-boot recipe. Based on this variable an u-boot script might be added to the fitImage. However, the UBOOT_ENV variable is also used to install the script as an old u-boot image, usually named boot.scr into the /boot directory of the target device. This dual usage of one variable leads to several strange side effects. Some examples: - If UBOOT_ENV_SUFFIX is set to the default value scr, the boot.cmd script gets added as a legacy uImage to the fitImage. That does not look useful. - If the UBOOT_ENV_SUFFIX is set to e.g. txt the script is not converted into a legacy uImage and a usable plain text script gets added to the fitImage. But the same script ends up redundant in /boot. Another strange detail is that the UBOOT_ENV_BINARY gets set to e.g. boot.txt for this configuration. - Appending the script to the u-boot recipe and then hand it over to the kernel recipe via the staged /boot directory looks like over complicated. Such kind of over complications and u-boot kernel inter-dependencies lead to an almost unmaintainable kernel-fitimage.bbclass. - A single variable does not allow you to add a text file to the fitImage and at the same time place boot.scr file in the /boot directory of the target device. - It is not documented or obvious how the UBOOT_ENV variable should be used together with the kernel-fitimage.bbclass. The commit which introduced this feature (among other features...) is: https://git.yoctoproject.org/poky/commit/?id=8a2f4e143b52109fbd0ee8d792e327d460b8c1e6 This commit is going to remove the u-boot script part of it. The removal of this function requires a note in the migration guide. The migration should be straightforward: If UBOOT_ENV and the kernel-fitimage.bbclass are used, the u-boot script must now be appended to the kernel recipe and the new FIT_UBOOT_ENV variable must be used. (From OE-Core rev: ab7f0b5e3d3612c43f9aab9ea2b7bd554d02859d) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes-recipe/kernel-fitimage.bbclass13
1 files changed, 0 insertions, 13 deletions
diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass
index bd2e371b63..22356fe567 100644
--- a/meta/classes-recipe/kernel-fitimage.bbclass
+++ b/meta/classes-recipe/kernel-fitimage.bbclass
@@ -41,10 +41,6 @@ python __anonymous () {
41 if image: 41 if image:
42 d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete') 42 d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
43 43
44 ubootenv = d.getVar('UBOOT_ENV')
45 if ubootenv:
46 d.appendVarFlag('do_assemble_fitimage', 'depends', ' virtual/bootloader:do_populate_sysroot')
47
48 #check if there are any dtb providers 44 #check if there are any dtb providers
49 providerdtb = d.getVar("PREFERRED_PROVIDER_virtual/dtb") 45 providerdtb = d.getVar("PREFERRED_PROVIDER_virtual/dtb")
50 if providerdtb: 46 if providerdtb:
@@ -607,15 +603,6 @@ fitimage_assemble() {
607 # Step 3: Prepare a u-boot script section 603 # Step 3: Prepare a u-boot script section
608 # 604 #
609 605
610 if [ -n "${UBOOT_ENV}" ] && [ -d "${STAGING_DIR_HOST}/boot" ]; then
611 if [ -e "${STAGING_DIR_HOST}/boot/${UBOOT_ENV_BINARY}" ]; then
612 cp ${STAGING_DIR_HOST}/boot/${UBOOT_ENV_BINARY} ${B}
613 bootscr_id="${UBOOT_ENV_BINARY}"
614 fitimage_emit_section_boot_script $1 "$bootscr_id" ${UBOOT_ENV_BINARY}
615 else
616 bbwarn "${STAGING_DIR_HOST}/boot/${UBOOT_ENV_BINARY} not found."
617 fi
618 fi
619 if [ -n "${FIT_UBOOT_ENV}" ]; then 606 if [ -n "${FIT_UBOOT_ENV}" ]; then
620 cp ${UNPACKDIR}/${FIT_UBOOT_ENV} ${B} 607 cp ${UNPACKDIR}/${FIT_UBOOT_ENV} ${B}
621 bootscr_id="${FIT_UBOOT_ENV}" 608 bootscr_id="${FIT_UBOOT_ENV}"