From 3a4927effd8e6c17c2fae03125e86a61b23a9c6f Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Tue, 26 Apr 2022 09:26:25 +0200 Subject: imx-boot: don't restrict to the nxp bsp only Choosing if the boot container FIT image is built with imx-mkimage/ imx-boot or the U-Boot provided binman can be done with the imx-boot-container MACHINEOVERRIDES. Change the used overrides from *nxp-bsp to *generic-bsp. Signed-off-by: Max Krummenacher --- .../use-imx-security-controller-firmware.bbclass | 2 +- recipes-bsp/imx-mkimage/imx-boot_1.0.bb | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/classes/use-imx-security-controller-firmware.bbclass b/classes/use-imx-security-controller-firmware.bbclass index dfd708e4..eb88fb99 100644 --- a/classes/use-imx-security-controller-firmware.bbclass +++ b/classes/use-imx-security-controller-firmware.bbclass @@ -25,7 +25,7 @@ SECO_FIRMWARE_NAME:mx8dx-nxp-bsp = "mx8qxc0-ahab-container.img" SECO_FIRMWARE_NAME:mx8dxl-nxp-bsp = "mx8dxla1-ahab-container.img" python () { - if "mx8m-nxp-bsp" in d.getVar('MACHINEOVERRIDES').split(":"): + if "mx8m-generic-bsp" in d.getVar('MACHINEOVERRIDES').split(":"): return # We need to allow the recipes to be parsed for this case seco_firmware = d.getVar('SECO_FIRMWARE_NAME') diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb index 88689ead..4e1b860a 100644 --- a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb +++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb @@ -10,8 +10,8 @@ SECTION = "BSP" inherit use-imx-security-controller-firmware IMX_EXTRA_FIRMWARE = "firmware-imx-8 imx-sc-firmware imx-seco" -IMX_EXTRA_FIRMWARE:mx8m-nxp-bsp = "firmware-imx-8m" -IMX_EXTRA_FIRMWARE:mx8x-nxp-bsp = "imx-sc-firmware imx-seco" +IMX_EXTRA_FIRMWARE:mx8m-generic-bsp = "firmware-imx-8m" +IMX_EXTRA_FIRMWARE:mx8x-generic-bsp = "imx-sc-firmware imx-seco" DEPENDS += " \ u-boot \ ${IMX_EXTRA_FIRMWARE} \ @@ -20,7 +20,7 @@ DEPENDS += " \ " # xxd is a dependency of fspi_packer.sh DEPENDS += "xxd-native" -DEPENDS:append:mx8m-nxp-bsp = " u-boot-mkimage-native dtc-native" +DEPENDS:append:mx8m-generic-bsp = " u-boot-mkimage-native dtc-native" BOOT_NAME = "imx-boot" PROVIDES = "${BOOT_NAME}" @@ -61,19 +61,19 @@ IMXBOOT_TARGETS ?= \ 'flash_multi_cores flash_dcd', d), d)}" BOOT_STAGING = "${S}/${IMX_BOOT_SOC_TARGET}" -BOOT_STAGING:mx8m-nxp-bsp = "${S}/iMX8M" -BOOT_STAGING:mx8dx-nxp-bsp = "${S}/iMX8QX" +BOOT_STAGING:mx8m-generic-bsp = "${S}/iMX8M" +BOOT_STAGING:mx8dx-generic-bsp = "${S}/iMX8QX" SOC_FAMILY = "INVALID" -SOC_FAMILY:mx8-nxp-bsp = "mx8" -SOC_FAMILY:mx8m-nxp-bsp = "mx8m" -SOC_FAMILY:mx8x-nxp-bsp = "mx8x" +SOC_FAMILY:mx8-generic-bsp = "mx8" +SOC_FAMILY:mx8m-generic-bsp = "mx8m" +SOC_FAMILY:mx8x-generic-bsp = "mx8x" REV_OPTION ?= "" -REV_OPTION:mx8qxp-nxp-bsp = \ +REV_OPTION:mx8qxp-generic-bsp = \ "${@bb.utils.contains('MACHINE_FEATURES', 'soc-revb0', '', \ 'REV=C0', d)}" -REV_OPTION:mx8dx-nxp-bsp = "REV=C0" +REV_OPTION:mx8dx-generic-bsp = "REV=C0" compile_mx8m() { bbnote 8MQ/8MM/8MN/8MP boot binary build @@ -202,4 +202,4 @@ addtask deploy before do_build after do_compile PACKAGE_ARCH = "${MACHINE_ARCH}" FILES:${PN} = "/boot" -COMPATIBLE_MACHINE = "(mx8-nxp-bsp)" +COMPATIBLE_MACHINE = "(mx8-generic-bsp)" -- cgit v1.2.3-54-g00ecf From 1f938bda8b6a7d1db6468901297d07c72f764c22 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Tue, 26 Apr 2022 12:07:04 +0200 Subject: imx-boot-container: resurrect imx-boot symlink Having a symlink named 'imx-boot' allows to have the consumers of the boot container, e.g. wic to be oblivious on who created the bootcontainer. Signed-off-by: Max Krummenacher --- classes/imx-boot-container.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/imx-boot-container.bbclass b/classes/imx-boot-container.bbclass index a3496e8b..71c2809d 100644 --- a/classes/imx-boot-container.bbclass +++ b/classes/imx-boot-container.bbclass @@ -87,6 +87,7 @@ do_deploy:append() { # artifacts handled by oe-core's u-boot.inc are # treated. ln -sf flash.bin-${MACHINE}-${type} flash.bin + ln -sf flash.bin-${MACHINE}-${type} imx-boot fi done unset j -- cgit v1.2.3-54-g00ecf From 2065d8697a99d52f528a61af180ce3747a397d87 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Tue, 26 Apr 2022 12:15:40 +0200 Subject: imx-boot-container-bootpart: drop wks file Now that we have a symlink with constant name 'imx-boot' independent on the use of the MACHINEOVERRIDE 'imx-boot-container', drop the additonal imx-boot-container-bootpart file as imx-imx-boot-bootpart does the same thing. Signed-off-by: Max Krummenacher --- conf/machine/include/imx-base.inc | 10 ---------- wic/imx-boot-container-bootpart.wks.in | 26 -------------------------- 2 files changed, 36 deletions(-) delete mode 100644 wic/imx-boot-container-bootpart.wks.in diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index d9c16811..d108552d 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc @@ -505,16 +505,6 @@ SOC_DEFAULT_WKS_FILE:mx8m-nxp-bsp ?= "imx-imx-boot-bootpart.wks.in" SOC_DEFAULT_WKS_FILE:mx8-nxp-bsp ?= "imx-imx-boot-bootpart.wks.in" SOC_DEFAULT_WKS_FILE:mxs-generic-bsp ?= "imx-uboot-mxs-bootpart.wks.in" -# Boot container built as a part of mainline U-Boot uses different WKS -# file as the entire mx8m series, as U-Boot versions later than 2021.04 are -# providing two separate binaries, namely flash.bin and u-boot.itb. Those -# files are packed into the boot partition. -# Binaries produced by U-Boot build itself are serving as a direct -# replacement of imx-boot from NXP. -# Creation of those binary files is controlled by UBOOT_PROVIDES_BOOT_CONTAINER -# variable defined above. -SOC_DEFAULT_WKS_FILE:imx-boot-container ?= "imx-boot-container-bootpart.wks.in" - WKS_FILE ?= "${SOC_DEFAULT_WKS_FILE}" SERIAL_CONSOLES = "115200;ttymxc0" diff --git a/wic/imx-boot-container-bootpart.wks.in b/wic/imx-boot-container-bootpart.wks.in deleted file mode 100644 index 321ee46b..00000000 --- a/wic/imx-boot-container-bootpart.wks.in +++ /dev/null @@ -1,26 +0,0 @@ -# short-description: Create SD card image with a boot partition for i.MX8M -# long-description: -# Create an image that can be written onto a SD card using dd for use -# with i.MX8M SoC family -# It uses binary boot container called flash.bin provided directly by -# the U-Boot recipe, and U-Boot ITB files which is created by binman utility -# of U-Boot. -# Those files are added it into the boot partition, which is populated as a -# raw copy into the image. -# Boot container prepared by U-Boot already container SPL, U-Boot itself, -# U-Boot DTB file, ATF, and optional OP-TEE components. -# -# The disk layout used is: -# - ----------- -------------- ------------- -# | | flash.bin | boot | rootfs | -# - ----------- -------------- ------------- -# ^ ^ ^ ^ ^ -# | | | | | -# 0 | 8MiB 72MiB 72MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) -# ${IMX_BOOT_SEEK} 32 or 33kiB, see reference manual -# -part u-boot --source rawcopy --sourceparams="file=flash.bin" --ondisk mmcblk --no-table --align ${IMX_BOOT_SEEK} -part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 8192 --size 64 -part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 8192 - -bootloader --ptable msdos -- cgit v1.2.3-54-g00ecf