[EXT] Re: [PATCH] imx: add imx8mplus platform support

Andy Tang andy.tang at nxp.com
Wed Aug 17 00:36:57 PDT 2022


Hi Piotr,

Thanks for your valuable suggestions.

I will address most of your concern.
Some responses are inline.

> -----Original Message-----
> From: Piotr Dymacz <pepe2k at gmail.com>
> Sent: 2022年8月16日 19:16
> To: Andy Tang <andy.tang at nxp.com>
> Cc: openwrt-devel at lists.openwrt.org; Rafał Miłecki <zajec5 at gmail.com>;
> Petr Štetiar <ynezz at true.cz>
> Subject: [EXT] Re: [PATCH] imx: add imx8mplus platform support
> 
> Caution: EXT Email
> 
> Hi Andy,
> 
> Sorry for late reply. Please, see my comments inline below.
> 
> Rafał, Petr, it would be great if you could give your thoughts regarding my
> concerns about the 'firmware-imx' package.
> > > +++ b/package/firmware/imx/Makefile
> > @@ -0,0 +1,47 @@
> > +# SPDX-License-Identifier: GPL-2.0-only # # Copyright 2022 NXP #
> > +
> > +include $(TOPDIR)/rules.mk
> > +
> > +PKG_NAME:=firmware-imx
> > +PKG_VERSION:=8.15
> > +PKG_RELEASE:=1
> > +
> > +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).bin
> >
> +PKG_SOURCE_URL:=https://eur01.safelinks.protection.outlook.com/?url=h
> >
> +ttps%3A%2F%2Fwww.nxp.com%2Flgfiles%2FNMG%2FMAD%2FYOCTO%2F&
> amp;data=05
> >
> +%7C01%7Candy.tang%40nxp.com%7C3b32776df9fc458bdc3308da7f78c352
> %7C686e
> >
> +a1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637962453910142398%7C
> Unknown%7
> >
> +CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haW
> wiLCJX
> >
> +VCI6Mn0%3D%7C3000%7C%7C%7C&sdata=XYCuUHEbBXHxYglYSPaox
> nQVEGD0ivXF
> > +Ci0MaZllnKk%3D&reserved=0
> > +PKG_HASH:=ef91390da6c8a6a48c8121a5dd667de8
> 
> OK, so a 'firmware-imx-8.15.bin' file, hosted somewhere on NXP servers
> which seems to be a self-extracting package with bunch of proprietary binary
> blobs and almost 700 lines license. And it asks for EULA acceptance when
> extracting:
> 
> "Welcome to NXP firmware-imx-8.15.bin
> 
> You need to read and accept the EULA before you can continue.
> 
> LA_OPT_NXP_Software_License v34 February 2022 [...] "
> I don't think we can accept this (Rafał, Petr, any opinions?). Looking at other
> open source projects, e.g. Barebox requires users to manually obtain and
> extract the firmware [1]. U-Boot documentation for this board mentions only
> the DDR training and ATF firmware [2].
> 
> Are all the blobs really required by this platform? Is there any other, more
> open source friendly way to get these binary blobs?
Since the license issue, these blobs have been released together.
This is the only format to release these binaries even though not all of them are used on a specific platform.

If this is not acceptable, what's your suggestion for it? Let the user do this manually?

> > +endef
> > +TARGET_DEVICES += imx8mplus
> > diff --git a/target/linux/imx/image/mkits-multiple-config.sh
> > b/target/linux/imx/image/mkits-multiple-config.sh
> > new file mode 100755
> > index 0000000000..0d83f9e34d
> > --- /dev/null
> > +++ b/target/linux/imx/image/mkits-multiple-config.sh
> 
> [snip]
> 
> Maybe instead of introducing another copy of the same script (see the
> 'layerscape' target) you could reuse existing one and make some generic
> image commands out of it?
Could you please instruct me how I can reuse the script that belongs to other targets like this?

BR,
Andy

> 
> > diff --git a/target/linux/imx/imx8/config-5.15
> > b/target/linux/imx/imx8/config-5.15
> > new file mode 100644
> > index 0000000000..2b6ab299a0
> > --- /dev/null
> > +++ b/target/linux/imx/imx8/config-5.15
> > @@ -0,0 +1,2661 @@
> 
> [snip]
> 
> > diff --git a/target/linux/imx/imx8/target.mk
> > b/target/linux/imx/imx8/target.mk new file mode 100644 index
> > 0000000000..f990298d80
> > --- /dev/null
> > +++ b/target/linux/imx/imx8/target.mk
> > @@ -0,0 +1,11 @@
> > +# SPDX-License-Identifier: GPL-2.0-only # # Copyright 2022 NXP
> > +
> > +ARCH:=aarch64
> > +BOARDNAME:=NXP i.MX8 boards
> > +KERNELNAME:=Image
> > +
> > +define Target/Description
> > +     Build firmware images for NXP imx8 boards.
> > +endef
> > diff --git
> > a/target/linux/imx/patches-5.15/0001-fix-the-compiling-error.patch
> > b/target/linux/imx/patches-5.15/0001-fix-the-compiling-error.patch
> > new file mode 100644
> > index 0000000000..bd2cd68be8
> > --- /dev/null
> > +++ b/target/linux/imx/patches-5.15/0001-fix-the-compiling-error.patch
> > @@ -0,0 +1,39 @@
> > +From b671acdd69098b12ff7f567b1b6211ab4f38bf20 Mon Sep 17 00:00:00
> > +2001
> > +From: Yuantian Tang <andy.tang at nxp.com>
> > +Date: Tue, 28 Jun 2022 14:26:12 +0800
> > +Subject: [PATCH] fix the compiling error
> 
> Please, be more specific.
> 
> > +
> > +Signed-off-by: Andy Tang <andy.tang at nxp.com>
> > +---
> > + arch/arm64/kvm/hyp/nvhe/gen-hyprel.c | 1 +
> > + scripts/Makefile                     | 2 +-
> > + 2 files changed, 2 insertions(+), 1 deletion(-)
> > +
> > +diff --git a/arch/arm64/kvm/hyp/nvhe/gen-hyprel.c
> > +b/arch/arm64/kvm/hyp/nvhe/gen-hyprel.c
> > +index 6bc88a756cb7..99506facd30e 100644
> > +--- a/arch/arm64/kvm/hyp/nvhe/gen-hyprel.c
> > ++++ b/arch/arm64/kvm/hyp/nvhe/gen-hyprel.c
> > +@@ -36,6 +36,7 @@
> > + #include <sys/types.h>
> > + #include <sys/stat.h>
> > + #include <unistd.h>
> > ++#include <uapi/linux/elf-em.h>
> > +
> > + #include <generated/autoconf.h>
> > +
> > +diff --git a/scripts/Makefile b/scripts/Makefile index
> > +9adb6d247818..7013da949282 100644
> > +--- a/scripts/Makefile
> > ++++ b/scripts/Makefile
> > +@@ -21,7 +21,7 @@ HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
> > +HOSTCFLAGS_sign-file.o = $(CRYPTO_CFLAGS)  HOSTLDLIBS_sign-file =
> > +$(CRYPTO_LIBS)  HOSTCFLAGS_extract-cert.o = $(CRYPTO_CFLAGS)
> > +-HOSTLDLIBS_extract-cert = $(CRYPTO_LIBS)
> > ++HOSTLDLIBS_extract-cert = $(CRYPTO_LIBS) -lpthread
> > +
> > + ifdef CONFIG_UNWINDER_ORC
> > + ifeq ($(ARCH),x86_64)
> > +--
> > +2.25.1
> > +
> 
> [1]
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbareb
> ox.org%2Fdoc%2Flatest%2Fboards%2Fimx%2Fnxp-imx8mq-evk.html&da
> ta=05%7C01%7Candy.tang%40nxp.com%7C3b32776df9fc458bdc3308da7f78
> c352%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63796245391
> 0142398%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV
> 2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdat
> a=KWtnO0mxLOUx5SgC%2B1Cha9h8ZhyUqqHP7p8vB7hLyNI%3D&reser
> ved=0
> [2]
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.
> com%2Fu-boot%2Fu-boot%2Fblob%2Fmaster%2Fdoc%2Fboard%2Fnxp%2Fim
> x8mp_evk.rst&data=05%7C01%7Candy.tang%40nxp.com%7C3b32776df
> 9fc458bdc3308da7f78c352%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%
> 7C0%7C637962453910142398%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC
> 4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000
> %7C%7C%7C&sdata=AAm%2FwwuvUD%2FnVLCcIWFbYmGJljZkoc4q9K
> O8G9qIkGU%3D&reserved=0
> 
> --
> Cheers,
> Piotr


More information about the openwrt-devel mailing list