From a5cf92c3c35ce1fea695c36320fe72cdf102693f Mon Sep 17 00:00:00 2001 From: Andrey Zhizhikin Date: Mon, 17 Jan 2022 16:36:42 +0000 Subject: u-boot-fslc: upgrade to v2022.01+fslc U-Boot fork has been updated to include new version v2022.01 from upstream. Following commits were ported from 2021.07+fslc revision: ---- e2b8a409f3 imx: iMX6: Define disconnect_from_pc function 708efb65a3 MLK-21854-2 imx: uuu: Update autoboot to run uuu or fastboot c51871146b pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition 9033bca081 mx6sabre_common: Dynamically change the video output 4b3275b77f mx6sabresd: Enable video interfaces in bootargs ---- Following new commits are added to this revision: ---- 18bb53aebf imx8mn-ddr4-evk: generate single bootable image 125754edb5 imx8mq_evk: configs: add/cleanup variables for distro boot ---- Update U-Boot recipe versions and point to new revision. Signed-off-by: Andrey Zhizhikin --- recipes-bsp/u-boot/u-boot-fslc-common_2021.07.inc | 19 -------------- recipes-bsp/u-boot/u-boot-fslc-common_2022.01.inc | 19 ++++++++++++++ recipes-bsp/u-boot/u-boot-fslc-mfgtool_2021.07.bb | 8 ------ recipes-bsp/u-boot/u-boot-fslc-mfgtool_2022.01.bb | 8 ++++++ recipes-bsp/u-boot/u-boot-fslc-mxsboot_2021.07.bb | 32 ----------------------- recipes-bsp/u-boot/u-boot-fslc-mxsboot_2022.01.bb | 32 +++++++++++++++++++++++ recipes-bsp/u-boot/u-boot-fslc_2021.07.bb | 31 ---------------------- recipes-bsp/u-boot/u-boot-fslc_2022.01.bb | 31 ++++++++++++++++++++++ 8 files changed, 90 insertions(+), 90 deletions(-) delete mode 100644 recipes-bsp/u-boot/u-boot-fslc-common_2021.07.inc create mode 100644 recipes-bsp/u-boot/u-boot-fslc-common_2022.01.inc delete mode 100644 recipes-bsp/u-boot/u-boot-fslc-mfgtool_2021.07.bb create mode 100644 recipes-bsp/u-boot/u-boot-fslc-mfgtool_2022.01.bb delete mode 100644 recipes-bsp/u-boot/u-boot-fslc-mxsboot_2021.07.bb create mode 100644 recipes-bsp/u-boot/u-boot-fslc-mxsboot_2022.01.bb delete mode 100644 recipes-bsp/u-boot/u-boot-fslc_2021.07.bb create mode 100644 recipes-bsp/u-boot/u-boot-fslc_2022.01.bb diff --git a/recipes-bsp/u-boot/u-boot-fslc-common_2021.07.inc b/recipes-bsp/u-boot/u-boot-fslc-common_2021.07.inc deleted file mode 100644 index 7d4016923..000000000 --- a/recipes-bsp/u-boot/u-boot-fslc-common_2021.07.inc +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2012-2019 O.S. Systems Software LTDA. -# Released under the MIT license (see COPYING.MIT for the terms) - -inherit fsl-u-boot-localversion - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://Licenses/README;md5=5a7450c57ffe5ae63fd732446b988025" - -DEPENDS += "flex-native bison-native" - -SRC_URI = "git://github.com/Freescale/u-boot-fslc.git;branch=${SRCBRANCH};protocol=https" - -SRCREV = "691e634bfd317ede487d2b864a126847ffeb4aa7" -SRCBRANCH = "2021.07+fslc" - -PV = "v2021.07+git${SRCPV}" - -S = "${WORKDIR}/git" -B = "${WORKDIR}/build" diff --git a/recipes-bsp/u-boot/u-boot-fslc-common_2022.01.inc b/recipes-bsp/u-boot/u-boot-fslc-common_2022.01.inc new file mode 100644 index 000000000..341e2802d --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-fslc-common_2022.01.inc @@ -0,0 +1,19 @@ +# Copyright (C) 2012-2019 O.S. Systems Software LTDA. +# Released under the MIT license (see COPYING.MIT for the terms) + +inherit fsl-u-boot-localversion + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=5a7450c57ffe5ae63fd732446b988025" + +DEPENDS += "flex-native bison-native" + +SRC_URI = "git://github.com/Freescale/u-boot-fslc.git;branch=${SRCBRANCH};protocol=https" + +SRCREV = "ed9503daa309c765a8654dc89c486326b4850f6d" +SRCBRANCH = "2022.01+fslc" + +PV = "v2022.01+git${SRCPV}" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/build" diff --git a/recipes-bsp/u-boot/u-boot-fslc-mfgtool_2021.07.bb b/recipes-bsp/u-boot/u-boot-fslc-mfgtool_2021.07.bb deleted file mode 100644 index 2e79166b2..000000000 --- a/recipes-bsp/u-boot/u-boot-fslc-mfgtool_2021.07.bb +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (C) 2014 O.S. Systems Software LTDA. -# Copyright (C) 2014-2016 Freescale Semiconductor -# Copyright 2017-2019 NXP - -FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot-fslc:" - -require u-boot-fslc_${PV}.bb -require u-boot-mfgtool.inc diff --git a/recipes-bsp/u-boot/u-boot-fslc-mfgtool_2022.01.bb b/recipes-bsp/u-boot/u-boot-fslc-mfgtool_2022.01.bb new file mode 100644 index 000000000..2e79166b2 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-fslc-mfgtool_2022.01.bb @@ -0,0 +1,8 @@ +# Copyright (C) 2014 O.S. Systems Software LTDA. +# Copyright (C) 2014-2016 Freescale Semiconductor +# Copyright 2017-2019 NXP + +FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot-fslc:" + +require u-boot-fslc_${PV}.bb +require u-boot-mfgtool.inc diff --git a/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2021.07.bb b/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2021.07.bb deleted file mode 100644 index a3a732ef3..000000000 --- a/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2021.07.bb +++ /dev/null @@ -1,32 +0,0 @@ -require u-boot-fslc-common_${PV}.inc - -DESCRIPTION = "U-boot bootloader mxsboot tool" -SECTION = "bootloader" - -DEPENDS = "bison-native dtc openssl" - -PROVIDES = "u-boot-mxsboot" - -EXTRA_OEMAKE:class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1 CONFIG_MX28=y' -EXTRA_OEMAKE:class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1 CONFIG_MX28=y' -EXTRA_OEMAKE:class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1 CONFIG_MX28=y' - -do_compile () { - oe_runmake -C ${S} O=${B} sandbox_defconfig - - # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and - # generating it requires bin2header tool, which for target build - # is built with target tools and thus cannot be executed on host. - sed -i "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" .config - - oe_runmake -C ${S} O=${B} cross_tools NO_SDL=1 -} - -do_install () { - install -Dm 0755 tools/mxsboot ${D}${bindir}/uboot-mxsboot - ln -sf uboot-mxsboot ${D}${bindir}/mxsboot -} - -COMPATIBLE_MACHINE:class-target = "(mxs|mx5|mx6|mx7|vf|use-mainline-bsp)" - -BBCLASSEXTEND = "native nativesdk" diff --git a/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2022.01.bb b/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2022.01.bb new file mode 100644 index 000000000..a3a732ef3 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2022.01.bb @@ -0,0 +1,32 @@ +require u-boot-fslc-common_${PV}.inc + +DESCRIPTION = "U-boot bootloader mxsboot tool" +SECTION = "bootloader" + +DEPENDS = "bison-native dtc openssl" + +PROVIDES = "u-boot-mxsboot" + +EXTRA_OEMAKE:class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1 CONFIG_MX28=y' +EXTRA_OEMAKE:class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1 CONFIG_MX28=y' +EXTRA_OEMAKE:class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1 CONFIG_MX28=y' + +do_compile () { + oe_runmake -C ${S} O=${B} sandbox_defconfig + + # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and + # generating it requires bin2header tool, which for target build + # is built with target tools and thus cannot be executed on host. + sed -i "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" .config + + oe_runmake -C ${S} O=${B} cross_tools NO_SDL=1 +} + +do_install () { + install -Dm 0755 tools/mxsboot ${D}${bindir}/uboot-mxsboot + ln -sf uboot-mxsboot ${D}${bindir}/mxsboot +} + +COMPATIBLE_MACHINE:class-target = "(mxs|mx5|mx6|mx7|vf|use-mainline-bsp)" + +BBCLASSEXTEND = "native nativesdk" diff --git a/recipes-bsp/u-boot/u-boot-fslc_2021.07.bb b/recipes-bsp/u-boot/u-boot-fslc_2021.07.bb deleted file mode 100644 index 21989ae53..000000000 --- a/recipes-bsp/u-boot/u-boot-fslc_2021.07.bb +++ /dev/null @@ -1,31 +0,0 @@ -require recipes-bsp/u-boot/u-boot.inc -require u-boot-fslc-common_${PV}.inc - -DESCRIPTION = "U-Boot based on mainline U-Boot used by FSL Community BSP in \ -order to provide support for some backported features and fixes, or because it \ -was submitted for revision and it takes some time to become part of a stable \ -version, or because it is not applicable for upstreaming." - -inherit ${@oe.utils.ifelse(d.getVar('UBOOT_PROVIDES_BOOT_CONTAINER') == '1', 'imx-boot-container', '')} - -DEPENDS += "bc-native dtc-native python3-setuptools-native lzop-native" - -# Location known to imx-boot component, where U-Boot artifacts -# should be additionally deployed. -# See below note above do_deploy:append:mx8m for the purpose of -# this delopyment location -BOOT_TOOLS = "imx-boot-tools" - -PROVIDES += "u-boot" - -B = "${WORKDIR}/build" - -# FIXME: Allow linking of 'tools' binaries with native libraries -# used for generating the boot logo and other tools used -# during the build process. -EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CPPFLAGS}" \ - HOSTLDFLAGS="${BUILD_LDFLAGS}" \ - HOSTSTRIP=true' - -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "(mxs|mx5|mx6|mx7|vf|use-mainline-bsp)" diff --git a/recipes-bsp/u-boot/u-boot-fslc_2022.01.bb b/recipes-bsp/u-boot/u-boot-fslc_2022.01.bb new file mode 100644 index 000000000..21989ae53 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-fslc_2022.01.bb @@ -0,0 +1,31 @@ +require recipes-bsp/u-boot/u-boot.inc +require u-boot-fslc-common_${PV}.inc + +DESCRIPTION = "U-Boot based on mainline U-Boot used by FSL Community BSP in \ +order to provide support for some backported features and fixes, or because it \ +was submitted for revision and it takes some time to become part of a stable \ +version, or because it is not applicable for upstreaming." + +inherit ${@oe.utils.ifelse(d.getVar('UBOOT_PROVIDES_BOOT_CONTAINER') == '1', 'imx-boot-container', '')} + +DEPENDS += "bc-native dtc-native python3-setuptools-native lzop-native" + +# Location known to imx-boot component, where U-Boot artifacts +# should be additionally deployed. +# See below note above do_deploy:append:mx8m for the purpose of +# this delopyment location +BOOT_TOOLS = "imx-boot-tools" + +PROVIDES += "u-boot" + +B = "${WORKDIR}/build" + +# FIXME: Allow linking of 'tools' binaries with native libraries +# used for generating the boot logo and other tools used +# during the build process. +EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CPPFLAGS}" \ + HOSTLDFLAGS="${BUILD_LDFLAGS}" \ + HOSTSTRIP=true' + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(mxs|mx5|mx6|mx7|vf|use-mainline-bsp)" -- cgit v1.2.3-54-g00ecf From 399f542a2d26237770eb5013c698990b7417a403 Mon Sep 17 00:00:00 2001 From: Andrey Zhizhikin Date: Tue, 18 Jan 2022 12:52:20 +0000 Subject: imx-boot-container: align with u-boot 2022.01 Recent version of U-Boot v2022.01 reverted boot container generation mechanism to provide single boot container isntead of separate binaries for SPL+DDR and U-Boot FIT. New approach provides packing of those separate components inside the U-Boot binman, and is delivered as a single 'flash.bin' file, which resembles the original behavior before binman image packing was introduced. Adapt our boot container class and WIC file to pick up this consolidated binary instead of two separate pieces. Signed-off-by: Andrey Zhizhikin --- classes/imx-boot-container.bbclass | 2 -- wic/imx-boot-container-bootpart.wks.in | 13 ++++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/classes/imx-boot-container.bbclass b/classes/imx-boot-container.bbclass index 3ffa7cbd9..19b433128 100644 --- a/classes/imx-boot-container.bbclass +++ b/classes/imx-boot-container.bbclass @@ -85,7 +85,6 @@ do_deploy:append() { j=$(expr $j + 1); if [ $j -eq $i ] then - install -m 0644 ${B}/${config}/u-boot.itb ${DEPLOYDIR}/u-boot.itb-${MACHINE}-${type} install -m 0644 ${B}/${config}/flash.bin ${DEPLOYDIR}/flash.bin-${MACHINE}-${type} # When there's more than one word in UBOOT_CONFIG, # this will overwrite the links created in @@ -94,7 +93,6 @@ do_deploy:append() { # word in UBOOT_CONFIG. This is also how all other # artifacts handled by oe-core's u-boot.inc are # treated. - ln -sf u-boot.itb-${MACHINE}-${type} u-boot.itb ln -sf flash.bin-${MACHINE}-${type} flash.bin fi done diff --git a/wic/imx-boot-container-bootpart.wks.in b/wic/imx-boot-container-bootpart.wks.in index 88679a68f..321ee46b9 100644 --- a/wic/imx-boot-container-bootpart.wks.in +++ b/wic/imx-boot-container-bootpart.wks.in @@ -11,16 +11,15 @@ # U-Boot DTB file, ATF, and optional OP-TEE components. # # The disk layout used is: -# - ----------- -------------- ---------------------------- -# | | flash.bin | u-boot.itb | boot | rootfs | -# - ----------- -------------- ---------------------------- -# ^ ^ ^ ^ ^ ^ -# | | | | | | -# 0 | 384KiB 8MiB 72MiB 72MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) +# - ----------- -------------- ------------- +# | | 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 u-boot-itb --source rawcopy --sourceparams="file=u-boot.itb" --ondisk mmcblk --no-table --align 384 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 -- cgit v1.2.3-54-g00ecf