imx-boot, imx-mkimage: update to version lf-5.15.71-2.2.0

Both recipes (imx-boot and imx-mkimage) use the same source code
repository, so update both of them to the new NXP release, by copying
with minimal changes the recipes in meta-imx.

Also convert the original 'imx-mkimage' recipe, which was only for
native class, to a full target, native, nativesdk recipe. We need this
to be able to include the nativesdk one in our toolchain.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2022-12-23 11:16:15 +01:00
parent 78269acbe0
commit 345306b94c
6 changed files with 120 additions and 33 deletions

View File

@ -0,0 +1,79 @@
From 70b7d067ca0f6659e4f842f8d841714a26bf9d8c Mon Sep 17 00:00:00 2001
From: Andrey Zhizhikin <andrey.z@gmail.com>
Date: Thu, 21 Oct 2021 08:53:38 +0000
Subject: [PATCH] iMX8M: soc.mak: use native mkimage from sysroot
mkimage tool is provided as a part of sysroot from Yocto build. Current
implementation on the imx-mkimge on the other hand copies it locally in
order to invoke it from within the build folder.
Since recent updates, mkimage requires openssl.so to be installed, which
when local copy is used causes the tool not to operate and fails the
build.
Use it from the build sysroot, and do not pull the local version of it.
Upstream-Status: Inappropriate [OE-specific]
Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
---
iMX8M/soc.mak | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
Index: git/iMX8M/soc.mak
===================================================================
--- git.orig/iMX8M/soc.mak
+++ git/iMX8M/soc.mak
@@ -149,7 +149,7 @@ u-boot.itb: $(dtb)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
BL32=$(TEE) DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb) > u-boot.its
- ./mkimage_uboot -E -p 0x3000 -f u-boot.its u-boot.itb
+ mkimage -E -p 0x3000 -f u-boot.its u-boot.itb
@rm -f u-boot.its $(dtb)
dtb_ddr3l = valddr3l.dtb
@@ -161,7 +161,7 @@ u-boot-ddr3l.itb: $(dtb_ddr3l)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr3l)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr3l) > u-boot-ddr3l.its
- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr3l.its u-boot-ddr3l.itb
+ mkimage -E -p 0x3000 -f u-boot-ddr3l.its u-boot-ddr3l.itb
@rm -f u-boot.its $(dtb_ddr3l)
dtb_ddr3l_evk = evkddr3l.dtb
@@ -173,7 +173,7 @@ u-boot-ddr3l-evk.itb: $(dtb_ddr3l_evk)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr3l_evk)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr3l_evk) > u-boot-ddr3l-evk.its
- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr3l-evk.its u-boot-ddr3l-evk.itb
+ mkimage -E -p 0x3000 -f u-boot-ddr3l-evk.its u-boot-ddr3l-evk.itb
@rm -f u-boot.its $(dtb_ddr3l_evk)
dtb_ddr4 = valddr4.dtb
@@ -185,7 +185,7 @@ u-boot-ddr4.itb: $(dtb_ddr4)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr4)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr4) > u-boot-ddr4.its
- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr4.its u-boot-ddr4.itb
+ mkimage -E -p 0x3000 -f u-boot-ddr4.its u-boot-ddr4.itb
@rm -f u-boot.its $(dtb_ddr4)
dtb_ddr4_evk = evkddr4.dtb
@@ -197,7 +197,7 @@ u-boot-ddr4-evk.itb: $(dtb_ddr4_evk)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr4_evk)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr4_evk) > u-boot-ddr4-evk.its
- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr4-evk.its u-boot-ddr4-evk.itb
+ mkimage -E -p 0x3000 -f u-boot-ddr4-evk.its u-boot-ddr4-evk.itb
@rm -f u-boot.its $(dtb_ddr4_evk)
ifeq ($(HDMI),yes)
@@ -343,7 +343,6 @@ nightly :
@$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/fsl-$(PLAT)-evk.dtb -O fsl-$(PLAT)-evk.dtb
@$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/signed_hdmi_imx8m.bin -O signed_hdmi_imx8m.bin
@$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/signed_dp_imx8m.bin -O signed_dp_imx8m.bin
- @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/mkimage_uboot -O mkimage_uboot
archive :
git ls-files --others --exclude-standard -z | xargs -0 tar rvf $(ARCHIVE_PATH)/$(ARCHIVE_NAME)

View File

@ -16,28 +16,29 @@ Remove the file removal to avoid this.
Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com> Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com> Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
--- ---
iMX8M/soc.mak | 3 +-- iMX8M/soc.mak | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-) 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak
index 4bfdc37..b6595bc 100644 index 0a69b7167c5c..4a0cd4e59360 100644
--- a/iMX8M/soc.mak --- a/iMX8M/soc.mak
+++ b/iMX8M/soc.mak +++ b/iMX8M/soc.mak
@@ -149,7 +149,7 @@ u-boot.itb: $(dtb) @@ -154,7 +154,7 @@ u-boot.itb: $(dtb)
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb) ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ./mkimage_fit_atf.sh $(dtb) > u-boot.its BL32=$(TEE) DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb) > u-boot.its
./mkimage_uboot -E -p 0x3000 -f u-boot.its u-boot.itb mkimage -E -p 0x3000 -f u-boot.its u-boot.itb
- @rm -f u-boot.its $(dtb) - @rm -f u-boot.its $(dtb)
+ @rm -f u-boot.its + @rm -f u-boot.its
dtb_ddr3l = valddr3l.dtb dtb_ddr3l = valddr3l.dtb
$(dtb_ddr3l): $(dtb_ddr3l):
@@ -283,7 +283,6 @@ print_fit_hab: u-boot-nodtb.bin bl31.bin $(dtb) @@ -322,7 +322,6 @@ print_fit_hab: u-boot-nodtb.bin bl31.bin $(dtb)
./$(PAD_IMAGE) bl31.bin ./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb) ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ./print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ../$(SOC_DIR)/print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb)
- @rm -f $(dtb) - @rm -f $(dtb)
print_fit_hab_ddr4: u-boot-nodtb.bin bl31.bin $(dtb_ddr4_evk) print_fit_hab_ddr4: u-boot-nodtb.bin bl31.bin $(dtb_ddr4_evk)
./$(PAD_IMAGE) tee.bin ./$(PAD_IMAGE) $(TEE)

View File

@ -1,5 +1,11 @@
# Copyright (C) 2022 Digi International # Copyright (C) 2022 Digi International
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI:append = " \
file://0001-imx8m-soc.mak-preserve-dtbs-after-build.patch \
"
SOC_FAMILY:mx9-nxp-bsp = "mx93" SOC_FAMILY:mx9-nxp-bsp = "mx93"
# Do not tag imx-boot # Do not tag imx-boot

View File

@ -1,5 +1,5 @@
# Copyright (C) 2016 Freescale Semiconductor # Copyright (C) 2016 Freescale Semiconductor
# Copyright 2017-2021 NXP # Copyright 2017-2022 NXP
require imx-mkimage_git.inc require imx-mkimage_git.inc
@ -8,28 +8,14 @@ LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
SECTION = "BSP" SECTION = "BSP"
SRC_URI:append:ccimx8mn = " file://0001-imx8m-soc.mak-preserve-dtbs-after-build.patch" EXTRA_OEMAKE = "SOC=iMX8M mkimage_imx8"
# Beware: applied last to first
DEBUG_PREFIX_MAP = "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
-fdebug-prefix-map=${STAGING_DIR_HOST}= \
-fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
"
CFLAGS = "-O2 -Wall -std=c99 -I ${STAGING_INCDIR} -L ${STAGING_LIBDIR}" CFLAGS = "-O2 -Wall -std=c99 -I ${STAGING_INCDIR} -L ${STAGING_LIBDIR}"
do_compile () { do_install() {
cd ${S}
oe_runmake clean
oe_runmake bin
oe_runmake -C iMX8M -f soc.mak mkimage_imx8
}
do_install () {
cd ${S}
install -d ${D}${bindir} install -d ${D}${bindir}
install -m 0755 iMX8M/mkimage_imx8 ${D}${bindir}/mkimage_imx8m install -m 0755 iMX8M/mkimage_imx8 ${D}${bindir}/mkimage_imx8m
install -m 0755 iMX8M/mkimage_fit_atf.sh ${D}${bindir}/mkimage_fit_atf.sh
install -m 0755 iMX8M/print_fit_hab.sh ${D}${bindir}/print_fit_hab.sh
install -m 0755 mkimage_imx8 ${D}${bindir}/mkimage_imx8 install -m 0755 mkimage_imx8 ${D}${bindir}/mkimage_imx8
} }
FILES:${PN} = "${bindir}"
BBCLASSEXTEND = "native nativesdk"

View File

@ -0,0 +1,12 @@
# Copyright (C) 2022 Digi International
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI:append = " \
file://0001-imx8m-soc.mak-preserve-dtbs-after-build.patch \
"
# "fmacro-prefix-map" is not supported on old versions of GCC
DEBUG_PREFIX_MAP:remove:class-nativesdk = "-fmacro-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
BBCLASSEXTEND = "native nativesdk"

View File

@ -1,11 +1,14 @@
# Copyright 2017-2021 NXP # Copyright 2017-2022 NXP
DEPENDS = "zlib-native openssl-native" DEPENDS = "zlib openssl"
SRC_URI = "${IMX_MKIMAGE_SRC};branch=${SRCBRANCH} \
file://0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch \
"
IMX_MKIMAGE_SRC ?= "git://github.com/nxp-imx/imx-mkimage.git;protocol=https"
SRCBRANCH = "lf-5.15.71_2.2.0"
SRCREV = "3bfcfccb71ddf894be9c402732ccb229fe72099e"
SRCBRANCH = "lf-5.10.72_2.2.0"
IMX_MKIMAGE_SRC ?= "git://source.codeaurora.org/external/imx/imx-mkimage.git;protocol=https"
SRC_URI = "${IMX_MKIMAGE_SRC};branch=${SRCBRANCH}"
SRCREV = "7a277c8a1a21ff921d217889dde6a9f84e6d2168"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
BOOT_TOOLS = "imx-boot-tools" BOOT_TOOLS = "imx-boot-tools"