From 6ede3ca704e67fa92170149f0f3549f1f8b2c162 Mon Sep 17 00:00:00 2001 From: Andrey Zhizhikin Date: Tue, 18 Aug 2020 09:59:11 +0000 Subject: u-boot-imx: upgrade to imx_v2020.04_5.4.24_2.1.0 Drop patch appplied upstream, remove additional install step which is handled by imx-boot recipe. Update u-boot dtb names in machine description files, upstream U-Boot from NXP has DTB files renamed. Upgrade u-boot-imx-tools and u-boot-imx-mfgtool to 2020.04 as well to match u-boot-imx recipe. Signed-off-by: Andrey Zhizhikin (cherry picked from commit 5b58232d3e7b5e66d5bdcfd11a6265b098b2f898) --- conf/machine/imx8mmevk.conf | 2 +- conf/machine/imx8mnevk.conf | 2 +- conf/machine/imx8mqevk.conf | 2 +- recipes-bsp/u-boot/u-boot-imx-common.inc | 4 +- recipes-bsp/u-boot/u-boot-imx-mfgtool_2019.04.bb | 8 ---- recipes-bsp/u-boot/u-boot-imx-mfgtool_2020.04.bb | 8 ++++ recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb | 10 ----- recipes-bsp/u-boot/u-boot-imx-tools_2020.04.bb | 10 +++++ ...dd-target-to-generate-initial-environment.patch | 49 ---------------------- recipes-bsp/u-boot/u-boot-imx_2019.04.bb | 35 ---------------- recipes-bsp/u-boot/u-boot-imx_2020.04.bb | 32 ++++++++++++++ 11 files changed, 55 insertions(+), 107 deletions(-) delete mode 100644 recipes-bsp/u-boot/u-boot-imx-mfgtool_2019.04.bb create mode 100644 recipes-bsp/u-boot/u-boot-imx-mfgtool_2020.04.bb delete mode 100644 recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb create mode 100644 recipes-bsp/u-boot/u-boot-imx-tools_2020.04.bb delete mode 100644 recipes-bsp/u-boot/u-boot-imx/0001-Add-target-to-generate-initial-environment.patch delete mode 100644 recipes-bsp/u-boot/u-boot-imx_2019.04.bb create mode 100644 recipes-bsp/u-boot/u-boot-imx_2020.04.bb diff --git a/conf/machine/imx8mmevk.conf b/conf/machine/imx8mmevk.conf index 57d74d9c..db722c72 100644 --- a/conf/machine/imx8mmevk.conf +++ b/conf/machine/imx8mmevk.conf @@ -39,7 +39,7 @@ SPL_BINARY = "spl/u-boot-spl.bin" DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin" # Set u-boot DTB -UBOOT_DTB_NAME = "fsl-imx8mm-evk.dtb" +UBOOT_DTB_NAME = "imx8mm-evk.dtb" # Set imx-mkimage boot target IMXBOOT_TARGETS = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_evk_flexspi', 'flash_evk', d)}" diff --git a/conf/machine/imx8mnevk.conf b/conf/machine/imx8mnevk.conf index cc92ac7c..80d77ac8 100644 --- a/conf/machine/imx8mnevk.conf +++ b/conf/machine/imx8mnevk.conf @@ -36,7 +36,7 @@ DDR_FIRMWARE_NAME = "ddr4_imem_1d_201810.bin \ ddr4_dmem_2d_201810.bin" # Set u-boot DTB -UBOOT_DTB_NAME = "fsl-imx8mn-ddr4-evk.dtb" +UBOOT_DTB_NAME = "imx8mn-ddr4-evk.dtb" # Set imx-mkimage boot target IMXBOOT_TARGETS = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_ddr4_evk_flexspi', 'flash_ddr4_evk', d)}" diff --git a/conf/machine/imx8mqevk.conf b/conf/machine/imx8mqevk.conf index 25e03093..2c9c8c29 100644 --- a/conf/machine/imx8mqevk.conf +++ b/conf/machine/imx8mqevk.conf @@ -41,7 +41,7 @@ SPL_BINARY = "spl/u-boot-spl.bin" DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin" # Set u-boot DTB -UBOOT_DTB_NAME = "fsl-imx8mq-evk.dtb" +UBOOT_DTB_NAME = "imx8mq-evk.dtb" # Set imx-mkimage boot target IMXBOOT_TARGETS = "flash_evk flash_evk_no_hdmi flash_dp_evk" diff --git a/recipes-bsp/u-boot/u-boot-imx-common.inc b/recipes-bsp/u-boot/u-boot-imx-common.inc index a2d2ed01..e5f15b12 100644 --- a/recipes-bsp/u-boot/u-boot-imx-common.inc +++ b/recipes-bsp/u-boot/u-boot-imx-common.inc @@ -3,9 +3,9 @@ DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards." LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRCBRANCH = "lf-5.4.y_v2019.04" +SRCBRANCH = "imx_v2020.04_5.4.24_2.1.0" SRC_URI = "git://source.codeaurora.org/external/imx/uboot-imx.git;protocol=https;branch=${SRCBRANCH}" -SRCREV = "228843cdf5435d4bd69f42a6015f78761ff4cc0d" +SRCREV = "4979a99482f7e04a3c1f4fb55e3182395ee8f710" DEPENDS += "flex-native bison-native bc-native dtc-native" diff --git a/recipes-bsp/u-boot/u-boot-imx-mfgtool_2019.04.bb b/recipes-bsp/u-boot/u-boot-imx-mfgtool_2019.04.bb deleted file mode 100644 index 2b296c19..00000000 --- a/recipes-bsp/u-boot/u-boot-imx-mfgtool_2019.04.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-imx:" - -require u-boot-imx_${PV}.bb -require u-boot-mfgtool.inc diff --git a/recipes-bsp/u-boot/u-boot-imx-mfgtool_2020.04.bb b/recipes-bsp/u-boot/u-boot-imx-mfgtool_2020.04.bb new file mode 100644 index 00000000..2b296c19 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-imx-mfgtool_2020.04.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-imx:" + +require u-boot-imx_${PV}.bb +require u-boot-mfgtool.inc diff --git a/recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb b/recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb deleted file mode 100644 index 12ac72e2..00000000 --- a/recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb +++ /dev/null @@ -1,10 +0,0 @@ -require recipes-bsp/u-boot/u-boot-tools.inc -require u-boot-imx-common.inc - -PROVIDES_append_class-target = " ${MLPREFIX}u-boot-tools" -PROVIDES_append_class-native = " u-boot-tools-native" -PROVIDES_append_class-nativesdk = " nativesdk-u-boot-tools" - -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" -COMPATIBLE_MACHINE_class-target = "(mx6|mx7|mx8)" diff --git a/recipes-bsp/u-boot/u-boot-imx-tools_2020.04.bb b/recipes-bsp/u-boot/u-boot-imx-tools_2020.04.bb new file mode 100644 index 00000000..12ac72e2 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-imx-tools_2020.04.bb @@ -0,0 +1,10 @@ +require recipes-bsp/u-boot/u-boot-tools.inc +require u-boot-imx-common.inc + +PROVIDES_append_class-target = " ${MLPREFIX}u-boot-tools" +PROVIDES_append_class-native = " u-boot-tools-native" +PROVIDES_append_class-nativesdk = " nativesdk-u-boot-tools" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" +COMPATIBLE_MACHINE_class-target = "(mx6|mx7|mx8)" diff --git a/recipes-bsp/u-boot/u-boot-imx/0001-Add-target-to-generate-initial-environment.patch b/recipes-bsp/u-boot/u-boot-imx/0001-Add-target-to-generate-initial-environment.patch deleted file mode 100644 index c717e029..00000000 --- a/recipes-bsp/u-boot/u-boot-imx/0001-Add-target-to-generate-initial-environment.patch +++ /dev/null @@ -1,49 +0,0 @@ -From bdaa73a5b3923257add182b4ab8058dbfa33421b Mon Sep 17 00:00:00 2001 -From: Stefano Babic -Date: Wed, 13 Mar 2019 09:46:45 +0100 -Subject: [PATCH] Add target to generate initial environment - -The initial environment is linked to the u-boot binary. Modifying the -environment from User Space with the env tools requires that the tools -are always built together with the bootloader to be sure that they -contain the initial environment in case no environment is stored into -persistent storage or when a board boots with just the default -environment. This makes difficult for distros to provide a general -package to access the environment. A simpler way is if the tools are -generic for all boards and a configuration file is given to provide the -initial environment. - -The patch just generates the initial environment by extracting it from -the compiled object. This file can then be used for tools in user space -to initialize the environment. - -Signed-off-by: Stefano Babic - -Upstream-Status: Backport [https://github.com/u-boot/u-boot/commit/bdaa73a5b3923257add182b4ab8058dbfa33421b] - -Signed-off-by: Andrey Zhizhikin ---- - Makefile | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/Makefile b/Makefile -index 66a09ac900..f2c7bb6041 100644 ---- a/Makefile -+++ b/Makefile -@@ -1977,6 +1977,13 @@ endif - $(build)=$(build-dir) $(@:.ko=.o) - $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost - -+quiet_cmd_genenv = GENENV $@ -+cmd_genenv = $(OBJCOPY) --dump-section .rodata.default_environment=$@ env/common.o; \ -+ sed --in-place -e 's/\x00/\x0A/g' $@ -+ -+u-boot-initial-env: u-boot.bin -+ $(call if_changed,genenv) -+ - # Consistency checks - # --------------------------------------------------------------------------- - --- -2.17.1 - diff --git a/recipes-bsp/u-boot/u-boot-imx_2019.04.bb b/recipes-bsp/u-boot/u-boot-imx_2019.04.bb deleted file mode 100644 index d37ede83..00000000 --- a/recipes-bsp/u-boot/u-boot-imx_2019.04.bb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2013-2016 Freescale Semiconductor -# Copyright 2018 (C) O.S. Systems Software LTDA. -# Copyright 2017-2019 NXP - -require recipes-bsp/u-boot/u-boot.inc -require u-boot-imx-common.inc - -SRC_URI += "file://0001-Add-target-to-generate-initial-environment.patch" - -PROVIDES += "u-boot" - -do_deploy_append_mx8m() { - # Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8m*-XX.dtb for mkimage to generate boot binary - if [ -n "${UBOOT_CONFIG}" ] - then - for config in ${UBOOT_MACHINE}; do - i=$(expr $i + 1); - for type in ${UBOOT_CONFIG}; do - j=$(expr $j + 1); - if [ $j -eq $i ] - then - install -d ${DEPLOYDIR}/${BOOT_TOOLS} - install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} - install -m 0777 ${B}/${config}/tools/mkimage ${DEPLOYDIR}/${BOOT_TOOLS}/mkimage_uboot - install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} - fi - done - unset j - done - unset i - fi -} - -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/recipes-bsp/u-boot/u-boot-imx_2020.04.bb b/recipes-bsp/u-boot/u-boot-imx_2020.04.bb new file mode 100644 index 00000000..b36730e0 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-imx_2020.04.bb @@ -0,0 +1,32 @@ +# Copyright (C) 2013-2016 Freescale Semiconductor +# Copyright 2018 (C) O.S. Systems Software LTDA. +# Copyright (C) 2017-2020 NXP + +require recipes-bsp/u-boot/u-boot.inc +require u-boot-imx-common.inc + +PROVIDES += "u-boot" + +do_deploy_append_mx8m() { + # Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8m*-XX.dtb for mkimage to generate boot binary + if [ -n "${UBOOT_CONFIG}" ] + then + for config in ${UBOOT_MACHINE}; do + i=$(expr $i + 1); + for type in ${UBOOT_CONFIG}; do + j=$(expr $j + 1); + if [ $j -eq $i ] + then + install -d ${DEPLOYDIR}/${BOOT_TOOLS} + install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} + install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} + fi + done + unset j + done + unset i + fi +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" -- cgit v1.2.3-54-g00ecf