diff mbox series

[1/4] package/imx-mkimage: bump version to lf-6.1.36-2.1.0

Message ID 20231011110932.4425-2-sebastien.szymanski@armadeus.com
State Accepted
Headers show
Series i.MX91 and i.MX93 support | expand

Commit Message

Sébastien Szymanski Oct. 11, 2023, 11:09 a.m. UTC
Bump imx-mkimage to the latest version to gain i.MX9 support.

Patch 0001 and 0004 are merged upstream:
https://github.com/nxp-imx/imx-mkimage/commit/ff23c4fd84bb88d73b52a0ccad733522d2faa477
https://github.com/nxp-imx/imx-mkimage/commit/bce82912c8206edd0cc97af8c6b30240229fae7f

Patch 0002 is no more needed, BUILD_LDFLAGS var is now available:
https://github.com/nxp-imx/imx-mkimage/commit/8185a000a7c6af562e773da812c6c8d141815531

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
---
 ...overriding-BL32-and-BL33-not-only-BL.patch | 60 ------------------
 .../0002-Add-LDFLAGS-to-link-step.patch       | 26 --------
 ...rt-for-overriding-BL31-BL32-and-BL33.patch | 61 -------------------
 package/imx-mkimage/imx-mkimage.hash          |  2 +-
 package/imx-mkimage/imx-mkimage.mk            |  7 ++-
 5 files changed, 5 insertions(+), 151 deletions(-)
 delete mode 100644 package/imx-mkimage/0001-Add-support-for-overriding-BL32-and-BL33-not-only-BL.patch
 delete mode 100644 package/imx-mkimage/0002-Add-LDFLAGS-to-link-step.patch
 delete mode 100644 package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch

Comments

Thomas Petazzoni Nov. 3, 2023, 9:16 a.m. UTC | #1
Hello Sébastien,

On Wed, 11 Oct 2023 13:09:29 +0200
Sébastien Szymanski <sebastien.szymanski@armadeus.com> wrote:

> Bump imx-mkimage to the latest version to gain i.MX9 support.
> 
> Patch 0001 and 0004 are merged upstream:
> https://github.com/nxp-imx/imx-mkimage/commit/ff23c4fd84bb88d73b52a0ccad733522d2faa477
> https://github.com/nxp-imx/imx-mkimage/commit/bce82912c8206edd0cc97af8c6b30240229fae7f
> 
> Patch 0002 is no more needed, BUILD_LDFLAGS var is now available:
> https://github.com/nxp-imx/imx-mkimage/commit/8185a000a7c6af562e773da812c6c8d141815531
> 
> Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>

I've applied, after doing some fixes.

> ---
>  ...overriding-BL32-and-BL33-not-only-BL.patch | 60 ------------------
>  .../0002-Add-LDFLAGS-to-link-step.patch       | 26 --------
>  ...rt-for-overriding-BL31-BL32-and-BL33.patch | 61 -------------------
>  package/imx-mkimage/imx-mkimage.hash          |  2 +-
>  package/imx-mkimage/imx-mkimage.mk            |  7 ++-
>  5 files changed, 5 insertions(+), 151 deletions(-)
>  delete mode 100644 package/imx-mkimage/0001-Add-support-for-overriding-BL32-and-BL33-not-only-BL.patch
>  delete mode 100644 package/imx-mkimage/0002-Add-LDFLAGS-to-link-step.patch
>  delete mode 100644 package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch

The remaining patch 0003 should have been renumbered 0001, and the
removed patches 0001, 0002 and 0004 should have been dropped from the
.checkpackageignore file.

>  IMX_MKIMAGE_LICENSE = GPL-2.0+
>  IMX_MKIMAGE_LICENSE_FILES = COPYING

This was no longer correct as the file has been renamed "LICENSE", so
the legal information was not working.

In general, please try to run "make check-package" and "make
<pkg>-legal-info" to verify this sort of details.

Pushed with those changes. Thanks a lot!

Thomas
Sébastien Szymanski Nov. 6, 2023, 8:56 a.m. UTC | #2
Hello Thomas,

On 11/3/23 10:16, Thomas Petazzoni wrote:
> Hello Sébastien,
> 
> On Wed, 11 Oct 2023 13:09:29 +0200
> Sébastien Szymanski <sebastien.szymanski@armadeus.com> wrote:
> 
>> Bump imx-mkimage to the latest version to gain i.MX9 support.
>>
>> Patch 0001 and 0004 are merged upstream:
>> https://github.com/nxp-imx/imx-mkimage/commit/ff23c4fd84bb88d73b52a0ccad733522d2faa477
>> https://github.com/nxp-imx/imx-mkimage/commit/bce82912c8206edd0cc97af8c6b30240229fae7f
>>
>> Patch 0002 is no more needed, BUILD_LDFLAGS var is now available:
>> https://github.com/nxp-imx/imx-mkimage/commit/8185a000a7c6af562e773da812c6c8d141815531
>>
>> Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
> 
> I've applied, after doing some fixes.
> 
>> ---
>>   ...overriding-BL32-and-BL33-not-only-BL.patch | 60 ------------------
>>   .../0002-Add-LDFLAGS-to-link-step.patch       | 26 --------
>>   ...rt-for-overriding-BL31-BL32-and-BL33.patch | 61 -------------------
>>   package/imx-mkimage/imx-mkimage.hash          |  2 +-
>>   package/imx-mkimage/imx-mkimage.mk            |  7 ++-
>>   5 files changed, 5 insertions(+), 151 deletions(-)
>>   delete mode 100644 package/imx-mkimage/0001-Add-support-for-overriding-BL32-and-BL33-not-only-BL.patch
>>   delete mode 100644 package/imx-mkimage/0002-Add-LDFLAGS-to-link-step.patch
>>   delete mode 100644 package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch
> 
> The remaining patch 0003 should have been renumbered 0001, and the
> removed patches 0001, 0002 and 0004 should have been dropped from the
> .checkpackageignore file.
> 
>>   IMX_MKIMAGE_LICENSE = GPL-2.0+
>>   IMX_MKIMAGE_LICENSE_FILES = COPYING
> 
> This was no longer correct as the file has been renamed "LICENSE", so
> the legal information was not working.
> 
> In general, please try to run "make check-package" and "make
> <pkg>-legal-info" to verify this sort of details.

I didn't know about the .checkpackageignore file. I'll pay attention to 
it and the _LICENSE_FILES next time! Thanks!

Regards,

> 
> Pushed with those changes. Thanks a lot!
> 
> Thomas
diff mbox series

Patch

diff --git a/package/imx-mkimage/0001-Add-support-for-overriding-BL32-and-BL33-not-only-BL.patch b/package/imx-mkimage/0001-Add-support-for-overriding-BL32-and-BL33-not-only-BL.patch
deleted file mode 100644
index 66891ac8e758..000000000000
--- a/package/imx-mkimage/0001-Add-support-for-overriding-BL32-and-BL33-not-only-BL.patch
+++ /dev/null
@@ -1,60 +0,0 @@ 
-From a4993eda7483cd01662f3f3e2965e7a568cb7178 Mon Sep 17 00:00:00 2001
-From: Erik Larsson <erik.larsson@combitech.se>
-Date: Thu, 8 Mar 2018 19:04:37 +0100
-Subject: [PATCH] Add support for overriding BL32 and BL33 not only BL31
-
-Signed-off-by: Erik Larsson <karl.erik.larsson@gmail.com>
-Signed-off-by: Christopher Dahlberg <crille.dahlberg@gmail.com>
-Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
----
- iMX8M/mkimage_fit_atf.sh | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/iMX8M/mkimage_fit_atf.sh b/iMX8M/mkimage_fit_atf.sh
-index 4f2b3f3..0444ff0 100755
---- a/iMX8M/mkimage_fit_atf.sh
-+++ b/iMX8M/mkimage_fit_atf.sh
-@@ -18,23 +18,23 @@ if [ ! -f $BL31 ]; then
- 	echo "ERROR: BL31 file $BL31 NOT found" >&2
- 	exit 0
- else
--	echo "bl31.bin size: " >&2
--	ls -lct bl31.bin | awk '{print $5}' >&2
-+	echo "$BL31 size: " >&2
-+	ls -lct $BL31 | awk '{print $5}' >&2
- fi
- 
--BL32="tee.bin"
-+[ -z "$BL32" ] && BL32="tee.bin"
- LOADABLES="\"atf-1\""
- 
- if [ ! -f $BL32 ]; then
- 	BL32=/dev/null
- else
- 	echo "Building with TEE support, make sure your bl31 is compiled with spd. If you do not want tee, please delete tee.bin" >&2
--	echo "tee.bin size: " >&2
--	ls -lct tee.bin | awk '{print $5}' >&2
-+	echo "$BL32 size: " >&2
-+	ls -lct $BL32 | awk '{print $5}' >&2
- 	LOADABLES="$LOADABLES, \"tee-1\""
- fi
- 
--BL33="u-boot-nodtb.bin"
-+[ -z "$BL33" ] && BL33="u-boot-nodtb.bin"
- DEK_BLOB="dek_blob_fit_dummy.bin"
- 
- if [ ! -f $DEK_BLOB ]; then
-@@ -49,8 +49,8 @@ if [ ! -f $BL33 ]; then
- 	exit 0
- else
- 
--	echo "u-boot-nodtb.bin size: " >&2
--	ls -lct u-boot-nodtb.bin | awk '{print $5}' >&2
-+	echo "$BL33 size: " >&2
-+	ls -lct $BL33 | awk '{print $5}' >&2
- fi
- 
- for dtname in $*
--- 
-2.31.1
-
diff --git a/package/imx-mkimage/0002-Add-LDFLAGS-to-link-step.patch b/package/imx-mkimage/0002-Add-LDFLAGS-to-link-step.patch
deleted file mode 100644
index 086e634d2318..000000000000
--- a/package/imx-mkimage/0002-Add-LDFLAGS-to-link-step.patch
+++ /dev/null
@@ -1,26 +0,0 @@ 
-From b7ace564b419a05a375a205fd4df8933716b241a Mon Sep 17 00:00:00 2001
-From: Erik Larsson <erik.larsson@combitech.se>
-Date: Tue, 6 Mar 2018 12:28:39 +0100
-Subject: [PATCH] Add LDFLAGS to link step
-
-Signed-off-by: Erik Larsson <karl.erik.larsson@gmail.com>
----
- iMX8M/soc.mak | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak
-index 4bfdc37..806b805 100644
---- a/iMX8M/soc.mak
-+++ b/iMX8M/soc.mak
-@@ -84,7 +84,7 @@ FW_DIR = imx-boot/imx-boot-tools/$(PLAT)
- $(MKIMG): mkimage_imx8.c
- 	@echo "PLAT="$(PLAT) "HDMI="$(HDMI)
- 	@echo "Compiling mkimage_imx8"
--	$(CC) $(CFLAGS) mkimage_imx8.c -o $(MKIMG) -lz
-+	$(CC) $(CFLAGS) mkimage_imx8.c -o $(MKIMG) $(LDFLAGS) -lz
- 
- lpddr4_imem_1d = lpddr4_pmu_train_1d_imem$(LPDDR_FW_VERSION).bin
- lpddr4_dmem_1d = lpddr4_pmu_train_1d_dmem$(LPDDR_FW_VERSION).bin
--- 
-2.31.1
-
diff --git a/package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch b/package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch
deleted file mode 100644
index 494aaf156659..000000000000
--- a/package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch
+++ /dev/null
@@ -1,61 +0,0 @@ 
-From b1e77d8ccabc6a3910ede2441ff567326291a355 Mon Sep 17 00:00:00 2001
-From: Thomas Perrot <thomas.perrot@bootlin.com>
-Date: Tue, 26 Apr 2022 15:10:04 +0200
-Subject: [PATCH] Add support for overriding BL31, BL32 and BL33
-
-Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
----
- iMX8M/print_fit_hab.sh | 14 +++++++++-----
- 1 file changed, 9 insertions(+), 5 deletions(-)
-
-diff --git a/iMX8M/print_fit_hab.sh b/iMX8M/print_fit_hab.sh
-index b915115..dbc28f2 100755
---- a/iMX8M/print_fit_hab.sh
-+++ b/iMX8M/print_fit_hab.sh
-@@ -1,12 +1,16 @@
- #!/bin/bash
- 
--BL32="tee.bin"
--
- let fit_off=$1
- 
- # keep backward compatibility
- [ -z "$TEE_LOAD_ADDR" ] && TEE_LOAD_ADDR="0xfe000000"
- 
-+[ -z "$BL31" ] && BL31="bl31.bin"
-+
-+[ -z "$BL32" ] && BL32="tee.bin"
-+
-+[ -z "$BL33" ] && BL33="u-boot-nodtb.bin"
-+
- if [ -z "$ATF_LOAD_ADDR" ]; then
- 	echo "ERROR: BL31 load address is not set" >&2
- 	exit 0
-@@ -26,7 +30,7 @@ else
- 	let uboot_sign_off=$((fit_off - 0x8000 - ivt_off + 0x3000))
- fi
- 
--let uboot_size=$(ls -lct u-boot-nodtb.bin | awk '{print $5}')
-+let uboot_size=$(ls -lct $BL33 | awk '{print $5}')
- let uboot_load_addr=0x40200000
- 
- let last_sign_off=$(((uboot_sign_off + uboot_size + 3) & ~3))
-@@ -64,13 +68,13 @@ done
- 
- let atf_sign_off=$((last_sign_off))
- let atf_load_addr=$ATF_LOAD_ADDR
--let atf_size=$(ls -lct bl31.bin | awk '{print $5}')
-+let atf_size=$(ls -lct $BL31 | awk '{print $5}')
- 
- if [ ! -f $BL32 ]; then
- 	let tee_size=0x0
- 	let tee_sign_off=$((atf_sign_off + atf_size))
- else
--	let tee_size=$(ls -lct tee.bin | awk '{print $5}')
-+	let tee_size=$(ls -lct $BL32 | awk '{print $5}')
- 
- 	let tee_sign_off=$(((atf_sign_off + atf_size + 3) & ~3))
- 	let tee_load_addr=$TEE_LOAD_ADDR
--- 
-2.31.1
-
diff --git a/package/imx-mkimage/imx-mkimage.hash b/package/imx-mkimage/imx-mkimage.hash
index 8346fd64b1fb..070d2eee7c61 100644
--- a/package/imx-mkimage/imx-mkimage.hash
+++ b/package/imx-mkimage/imx-mkimage.hash
@@ -1,3 +1,3 @@ 
 # Locally calculated
-sha256  593bd94aac027844bc58c62aae55557c14e1f8a99e68ba235a46f083759df3d4  imx-mkimage-lf-5.10.72_2.2.0.tar.gz
+sha256  fd538dc571ce06609d6a4d9ee8cfd7d0c93ec4685afa9f1079e5a5931ad3bdbc  imx-mkimage-lf-6.1.36_2.1.0.tar.gz
 sha256  231f7edcc7352d7734a96eef0b8030f77982678c516876fcb81e25b32d68564c  COPYING
diff --git a/package/imx-mkimage/imx-mkimage.mk b/package/imx-mkimage/imx-mkimage.mk
index 54c948e0d308..d5598692663e 100644
--- a/package/imx-mkimage/imx-mkimage.mk
+++ b/package/imx-mkimage/imx-mkimage.mk
@@ -4,7 +4,7 @@ 
 #
 ################################################################################
 
-IMX_MKIMAGE_VERSION = lf-5.10.72_2.2.0
+IMX_MKIMAGE_VERSION = lf-6.1.36_2.1.0
 IMX_MKIMAGE_SITE = $(call github,nxp-imx,imx-mkimage,$(IMX_MKIMAGE_VERSION))
 IMX_MKIMAGE_LICENSE = GPL-2.0+
 IMX_MKIMAGE_LICENSE_FILES = COPYING
@@ -15,7 +15,8 @@  ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M)$(BR2_PACKAGE_FREESCALE_IMX_PLA
 define HOST_IMX_MKIMAGE_BUILD_CMDS
 	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) \
 		CFLAGS="$(HOST_CFLAGS) -std=c99" \
-		-C $(@D)/iMX8M -f soc.mak mkimage_imx8
+		BUILD_LDFLAGS="$(HOST_LDFLAGS)" \
+		-C $(@D)/iMX8M SOC_DIR=iMX8M -f soc.mak mkimage_imx8
 endef
 define HOST_IMX_MKIMAGE_INSTALL_CMDS
 	$(INSTALL) -D -m 755 $(@D)/iMX8M/mkimage_imx8 $(HOST_DIR)/bin/mkimage_imx8
@@ -23,7 +24,7 @@  define HOST_IMX_MKIMAGE_INSTALL_CMDS
 	$(INSTALL) -D -m 755 $(@D)/iMX8M/print_fit_hab.sh $(HOST_DIR)/bin/print_fit_hab.sh
 endef
 else
-# i.MX8 and i.MX8X
+# i.MX8, i.MX8X and i.MX9
 define HOST_IMX_MKIMAGE_BUILD_CMDS
 	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) \
 		CFLAGS="$(HOST_CFLAGS) -std=c99" \