Skip to contentSkip to conversation

package/freescale-imx/imx-m4-demos: new package

PATCH New Fabrice Goucem 2 participants 7 messages Jul 31, 2020 – Aug 6, 2020 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/freescale-imx/imx-m4-demos: new package

New package to download and install i.MX Cortex-M4 demos for following SoCs:
* i.MX7D
* i.MX7ULP
* i.MX8M
* i.MX8MM
* i.MX8MN
* i.MX8QM
* i.MX8QXP

Yocto recipes from where the demos location has been extracted:
https://source.codeaurora.org/external/imx/meta-imx/tree/meta-sdk/recipes-fsl/m4-demos?h=zeus-5.4.24-2.1.0

---
 DEVELOPERS                                    |  1 +
 board/freescale/common/imx/post-image.sh      | 14 ++++-
 package/freescale-imx/Config.in               | 10 ++++
 .../freescale-imx/imx-mcore-demos/Config.in   | 11 ++++
 .../imx-mcore-demos/imx-mcore-demos.hash      | 10 ++++
 .../imx-mcore-demos/imx-mcore-demos.mk        | 54 +++++++++++++++++++
 6 files changed, 99 insertions(+), 1 deletion(-)
 create mode 100644 package/freescale-imx/imx-mcore-demos/Config.in
 create mode 100644 package/freescale-imx/imx-mcore-demos/imx-mcore-demos.hash
 create mode 100644 package/freescale-imx/imx-mcore-demos/imx-mcore-demos.mk
DEVELOPERS +1 -0
index ee840dbb8b..387eb61c06 100644
@@ -908,6 +908,7 @@ F:	package/whois/
 N:	Fabrice Goucem <[email protected]>
 F:	board/freescale/imx6ullevk/
 F:	configs/freescale_imx6ullevk_defconfig
+F:	package/freescale-imx/imx-mcore-demos/
 
 N:	Falco Hyfing <[email protected]>
 F:	package/python-pymodbus/
board/freescale/common/imx/post-image.sh +13 -1
index 06ccaac3a4..dc651ac584 100755
@@ -30,6 +30,18 @@ linux_image()
 	fi
 }
 
+#
+# mcore_image prints all available MCORE demo file names for the genimage
+# configuration file
+#
+mcore_image()
+{
+	if grep -Eq "^BR2_PACKAGE_IMX_MCORE_DEMOS=y$" ${BR2_CONFIG}; then
+		echo -n ", "
+		for f in $(ls ${BINARIES_DIR}/mcore_*); do echo -n "$(basename $f), "; done
+	fi
+}
+
 genimage_type()
 {
 	if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8=y$" ${BR2_CONFIG}; then
@@ -79,7 +91,7 @@ uboot_image()
 
 main()
 {
-	local FILES="$(dtb_list) $(linux_image)"
+	local FILES="$(dtb_list) $(linux_image) $(mcore_image)"
 	local IMXOFFSET="$(imx_offset)"
 	local UBOOTBIN="$(uboot_image)"
 	local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)"
package/freescale-imx/Config.in +10 -0
index b0c7de8436..75c213a1d7 100644
@@ -96,10 +96,20 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
 
+config BR2_PACKAGE_FREESCALE_IMX_HAS_MCORE
+	bool
+	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8 || \
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM || \
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN || \
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
+
 source "package/freescale-imx/imx-alsa-plugins/Config.in"
 source "package/freescale-imx/imx-codec/Config.in"
 source "package/freescale-imx/imx-kobs/Config.in"
 source "package/freescale-imx/imx-lib/Config.in"
+source "package/freescale-imx/imx-mcore-demos/Config.in"
 source "package/freescale-imx/imx-m4fwloader/Config.in"
 source "package/freescale-imx/imx-parser/Config.in"
 source "package/freescale-imx/imx-uuc/Config.in"
package/freescale-imx/imx-mcore-demos/Config.in new file +11 -0
new file mode 100644
index 0000000000..705a6c4557
@@ -0,0 +1,11 @@
+comment "imx-mcore-demos needs an i.MX platform with Cortex-Mx"
+	depends on !BR2_PACKAGE_FREESCALE_IMX_HAS_MCORE
+
+config BR2_PACKAGE_IMX_MCORE_DEMOS
+	bool "imx-mcore-demos"
+	depends on BR2_PACKAGE_FREESCALE_IMX_HAS_MCORE
+	help
+	  Cortex-Mx demo blobs for the Freescale i.MX SoCs.
+
+	  This library is provided by Freescale as-is and doesn't have
+	  an upstream.
package/freescale-imx/imx-mcore-demos/imx-mcore-demos.hash new file +10 -0
new file mode 100644
index 0000000000..13f3092c88
@@ -0,0 +1,10 @@
+# locally computed
+sha256  cc00d3b936d49b2794a2a99e10129437e70caba3fd26b8379b8c50dd22f73254  imx7d-sabresd-m4-freertos-1.0.1.bin
+sha256  a8fbe1180b3d20e933a410cd76e60baac7a9f54e8b2bae8b6b8a3e1af550eca6  imx7ulp-m4-demo-2.8.0.bin
+sha256  2dbfab7fbbe89e89a2881d77c84a6c257699dc73ee6462a813bdd5ad09836b04  imx8mm-m4-demo-2.8.0.bin
+sha256  e877c7462b6ea87c498563842f42352d204eb28a65f35f7dc1fec643f84abb66  imx8mn-m7-demo-2.8.0.bin
+sha256  ac88568f63a794530339775a6e49e7928d3d09bcf4ba5edacea1841989e674b0  imx8mq-m4-demo-2.8.0.bin
+sha256  d06a636b84cd559483091cbdb07b5ce9e15a534bca31d4cb756b33b696c2160b  imx8qm-m4-demo-2.8.0.bin
+sha256  7800cdbebe07f426cdac50b0e295d64215164a767e79ca58bd917445c50e345f  imx8qx-m4-demo-2.8.0.bin
+
+# no hash for license file as it is different for each package listed above
package/freescale-imx/imx-mcore-demos/imx-mcore-demos.mk new file +54 -0

54 lines not on this page · raw message

Signature · 1 line
2.27.0
#1 lore raw

PATCH 2/2 configs/freescale_imx7ulpevkb: new defconfig

Add basic support for NXP's i.MX7 ULP EVK board:

https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/evaluation-kit-for-the-i.mx-7ulp-applications-processor:MCIMX7ULP-EVK

---
Changes v6 -> v7:
- Updated imx-mcore-demos Yocto's URL (suggested by Gary Bisson)
- Renamed package imx-m4-demos to imx-mcore-demos (suggested by Gary Bisson)
- Factorised firmware copies in imx-mcore-demos recipe (suggested by Gary Bisson)
- Updated all mcore demos (bar i.MX7D) to 2.8.0 (suggested by Gary Bisson)

---
 DEVELOPERS                              |  2 +
 board/freescale/imx7ulpevkb/readme.txt  | 76 +++++++++++++++++++++++++
 configs/freescale_imx7ulpevkb_defconfig | 29 ++++++++++
 package/freescale-imx/Config.in         |  8 ++-
 4 files changed, 114 insertions(+), 1 deletion(-)
 create mode 100644 board/freescale/imx7ulpevkb/readme.txt
 create mode 100644 configs/freescale_imx7ulpevkb_defconfig
DEVELOPERS +2 -0
index 387eb61c06..78be02ccc8 100644
@@ -907,7 +907,9 @@ F:	package/whois/
 
 N:	Fabrice Goucem <[email protected]>
 F:	board/freescale/imx6ullevk/
+F:	board/freescale/imx7ulpevkb/
 F:	configs/freescale_imx6ullevk_defconfig
+F:	configs/freescale_imx7ulpevkb_defconfig
 F:	package/freescale-imx/imx-mcore-demos/
 
 N:	Falco Hyfing <[email protected]>
board/freescale/imx7ulpevkb/readme.txt new file +76 -0

76 lines not on this page · raw message

configs/freescale_imx7ulpevkb_defconfig new file +29 -0
new file mode 100644
index 0000000000..9402062663
@@ -0,0 +1,29 @@
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0"
+BR2_LINUX_KERNEL_DEFCONFIG="imx_v7"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7ulp-evkb"
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+BR2_PACKAGE_FREESCALE_IMX=y
+BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP=y
+BR2_PACKAGE_IMX_MCORE_DEMOS=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARDNAME="mx7ulp_evk"
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+# BR2_TARGET_UBOOT_FORMAT_BIN is not set
+BR2_TARGET_UBOOT_FORMAT_IMX=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
package/freescale-imx/Config.in +7 -1
index 75c213a1d7..cc0d8fc7a8 100644
@@ -38,7 +38,10 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL
 	bool "imx6ul/imx6ull"
 
 config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7
-	bool "imx7d/imx7ulp"
+	bool "imx7d"
+
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP
+	bool "imx7ulp"
 
 config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8
 	bool "imx8"
@@ -68,6 +71,7 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
 	default "IMX6S" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S
 	default "IMX6UL" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL
 	default "IMX7" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7
+	default "IMX7ULP" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP
 	default "IMX8" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8
 	default "IMX8MQ" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
 	default "IMX8MM" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM
@@ -90,6 +94,7 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU
 	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8 || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM || \
@@ -99,6 +104,7 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU
 config BR2_PACKAGE_FREESCALE_IMX_HAS_MCORE
 	bool
 	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8 || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM || \
Signature · 1 line
2.27.0
#2 lore raw

PATCH 2/2 configs/freescale_imx7ulpevkb: new defconfig

Hello Fabrice,

Thanks for this patch, see below for some comments.

Quoted 4 lines · On Fri, 31 Jul 2020 14:13:33 +0200 Fabrice Goucem <[email protected]>…
 DEVELOPERS                              |  2 +
 board/freescale/imx7ulpevkb/readme.txt  | 76 +++++++++++++++++++++++++
 configs/freescale_imx7ulpevkb_defconfig | 29 ++++++++++
 package/freescale-imx/Config.in         |  8 ++-

This is doing two things at once: adding the IMX7ULP support in package/freescale-imx/Config.in (which should come as a separate patch, and before the imx-m4-demos package) and the imx7ulpevkb defconfig addition. Could you split that up ?

package/freescale-imx/Config.in config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL · line 44

Quoted 13 lines
package/freescale-imx/Config.in +4 -1
index 75c213a1d7..cc0d8fc7a8 100644
@@ -38,7 +38,10 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL
 	bool "imx6ul/imx6ull"
 
 config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7
-	bool "imx7d/imx7ulp"
+	bool "imx7d"
+
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP
+	bool "imx7ulp"

The commit log should detail why you're separating IMX7ULP from IMX7:
because they have different imx-m4-demos packages, at least that's what I understood.

Quoted 12 lines
package/freescale-imx/Config.in +1 -0
 config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8
 	bool "imx8"
@@ -68,6 +71,7 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
 	default "IMX6S" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S
 	default "IMX6UL" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL
 	default "IMX7" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7
+	default "IMX7ULP" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP
 	default "IMX8" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8
 	default "IMX8MQ" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
 	default "IMX8MM" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM

package/freescale-imx/Config.in config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU · line 96

Quoted 3 lines
package/freescale-imx/Config.in +0 -0
@@ -90,6 +94,7 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU
 	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \

Are you sure the i.MX7 has a GPU ? According to
https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-7-processors:IMX7-SERIES
only the i.MX7 ULP has a GPU, unless I'm misreading this.

package/freescale-imx/Config.in config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU · line 110

Quoted 12 lines
package/freescale-imx/Config.in +2 -0
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8 || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM || \
@@ -99,6 +104,7 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU
 config BR2_PACKAGE_FREESCALE_IMX_HAS_MCORE
 	bool
 	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8 || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM || \

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 2/2 configs/freescale_imx7ulpevkb: new defconfig

Hello Thomas,

Thanks for your comments.

Quoted 13 lines · Thomas Petazzoni

Hello Fabrice,

Thanks for this patch, see below for some comments.

Quoted 5 lines · On Fri, 31 Jul 2020 14:13:33 +0200 Fabrice Goucem <[email protected]>…
 DEVELOPERS                              |  2 +
 board/freescale/imx7ulpevkb/readme.txt  | 76
+++++++++++++++++++++++++
 configs/freescale_imx7ulpevkb_defconfig | 29 ++++++++++
 package/freescale-imx/Config.in         |  8 ++-
Quoted 5 lines

This is doing two things at once: adding the IMX7ULP support in package/freescale-imx/Config.in (which should come as a separate patch,
and before the imx-m4-demos package) and the imx7ulpevkb defconfig addition. Could you split that up ?

Chicken and egg situation...
Package imx-mcore-demos is needed to introduce support to i.MX7ULP EVK. What I can do is remove i.MX7ULP support in the initial imx-mcore-demos commit and add it in the i.MX7ULP commit.

Quoted 9 lines
Quoted 9 lines
package/freescale- renamed from package/freescale-imx/Config.in +0 -0

imx/Config.in
index 75c213a1d7..cc0d8fc7a8 100644

package/freescale-imx/Config.in +0 -0
@@ -38,7 +38,10 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL
 	bool "imx6ul/imx6ull"
 
Quoted 11 lines

package/freescale-imx/Config.in config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL · line 44

Quoted 6 lines
package/freescale-imx/Config.in +4 -1
 config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7
-	bool "imx7d/imx7ulp"
+	bool "imx7d"
+
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP
+	bool "imx7ulp"

The commit log should detail why you're separating IMX7ULP from IMX7:
because they have different imx-m4-demos packages, at least that's what
I understood.

Yes, this is exactely why we need to differentiate them. Will add this information to the commit log.

Quoted 12 lines
Quoted 12 lines
package/freescale-imx/Config.in +1 -0
 config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8
 	bool "imx8"
@@ -68,6 +71,7 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
 	default "IMX6S" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S
 	default "IMX6UL" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL
 	default "IMX7" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7
+	default "IMX7ULP" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP
 	default "IMX8" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8
 	default "IMX8MQ" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
 	default "IMX8MM" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM
Quoted 8 lines

package/freescale-imx/Config.in config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU · line 96

Quoted 4 lines
package/freescale-imx/Config.in +0 -0
@@ -90,6 +94,7 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU
 	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \

Are you sure the i.MX7 has a GPU ? According to
https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-7-processors:IMX7-SERIES
only the i.MX7 ULP has a GPU, unless I'm misreading this.

You are correct.
However fixing that (that's in master) would not be part of my patch which only targets i.MX7 ULP support.

Quoted 16 lines

package/freescale-imx/Config.in config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU · line 110

Quoted 12 lines
package/freescale-imx/Config.in +2 -0
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8 || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM || \
@@ -99,6 +104,7 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU
 config BR2_PACKAGE_FREESCALE_IMX_HAS_MCORE
 	bool
 	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8 || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM || \

Best regards,

Thomas

#4 lore raw

PATCH 2/2 configs/freescale_imx7ulpevkb: new defconfig

Hello Fabrice,

Quoted 10 lines · On Thu, 06 Aug 2020 18:57:28 +0200 Fabrice Goucem <[email protected]>…
Quoted 5 lines

This is doing two things at once: adding the IMX7ULP support in package/freescale-imx/Config.in (which should come as a separate patch,
and before the imx-m4-demos package) and the imx7ulpevkb defconfig addition. Could you split that up ?

Chicken and egg situation...
Package imx-mcore-demos is needed to introduce support to i.MX7ULP EVK. What I can do is remove i.MX7ULP support in the initial imx-mcore-demos commit and add it in the i.MX7ULP commit.

There is no chicken and egg problem at all:

- PATCH 1: introduce BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP, adjusting the BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 definition along the way.

- PATCH 2: introduce the imx-mcore-demos package

- PATCH 3: adjust the logic in board/freescale/common/imx/post-image.sh to add the M4 firmware to the image

- PATCH 4: add the imx7ulpevkb defconfig

Quoted 7 lines
Quoted 3 lines

Are you sure the i.MX7 has a GPU ? According to
https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-7-processors:IMX7-SERIES
only the i.MX7 ULP has a GPU, unless I'm misreading this.

You are correct.
However fixing that (that's in master) would not be part of my patch which only targets i.MX7 ULP support.

The current option BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 has a prompt that says it covers both imx7d and imx7ulp, so it's not totally incorrect that I.MX7 in general can have a GPU. However, your series changes this vague IMX7 option by separating the IMX7ULP (which has a GPU) for the other IMX7 (that don't have a GPU). So it should be part of the patch adding BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP to readjust the fact that BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 doesn't have a GPU.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH 1/2 package/freescale-imx/imx-m4-demos: new package

In reply to Fabrice Goucem

Hello Fabrice,

Thanks a lot for your patch series. Overall it looks pretty good, but a few changes are needed.

First a minor detail: your commit title doesn't match the actual package name being added. See below for other comments.

Quoted 2 lines · On Fri, 31 Jul 2020 14:13:32 +0200 Fabrice Goucem <[email protected]>…
 DEVELOPERS                                    |  1 +
 board/freescale/common/imx/post-image.sh      | 14 ++++-

I think this part (changes to post-image.sh) should go into a separate commit, after the package addition.

Quoted 7 lines
board/freescale/common/imx/post-image.sh +0 -0
index 06ccaac3a4..dc651ac584 100755
@@ -30,6 +30,18 @@ linux_image()
 	fi
 }

board/freescale/common/imx/post-image.sh linux_image() · line 41

Quoted 10 lines
board/freescale/common/imx/post-image.sh +9 -0
 
+#
+# mcore_image prints all available MCORE demo file names for the genimage
+# configuration file
+#
+mcore_image()
+{
+	if grep -Eq "^BR2_PACKAGE_IMX_MCORE_DEMOS=y$" ${BR2_CONFIG}; then
+		echo -n ", "
+		for f in $(ls ${BINARIES_DIR}/mcore_*); do echo -n "$(basename $f), "; done

If I look at this, it seems like having the list finish with a comma is fine. If that's the case, then I think we should modify the linux_image() function so that it echoes a string that is comma-terminated, so that the mcore_image() doesn't have to worry about this, and looks like dtb_list() in how it handles the comma.

Quoted 6 lines
package/freescale-imx/imx-mcore-demos/imx-mcore-demos.hash new file +0 -0
new file mode 100644
index 0000000000..13f3092c88

package/freescale-imx/imx-mcore-demos/imx-mcore-demos.hash line 10

Quoted 10 lines
package/freescale-imx/imx-mcore-demos/imx-mcore-demos.hash new file +10 -0
@@ -0,0 +1,10 @@
+# locally computed
+sha256  cc00d3b936d49b2794a2a99e10129437e70caba3fd26b8379b8c50dd22f73254  imx7d-sabresd-m4-freertos-1.0.1.bin
+sha256  a8fbe1180b3d20e933a410cd76e60baac7a9f54e8b2bae8b6b8a3e1af550eca6  imx7ulp-m4-demo-2.8.0.bin
+sha256  2dbfab7fbbe89e89a2881d77c84a6c257699dc73ee6462a813bdd5ad09836b04  imx8mm-m4-demo-2.8.0.bin
+sha256  e877c7462b6ea87c498563842f42352d204eb28a65f35f7dc1fec643f84abb66  imx8mn-m7-demo-2.8.0.bin
+sha256  ac88568f63a794530339775a6e49e7928d3d09bcf4ba5edacea1841989e674b0  imx8mq-m4-demo-2.8.0.bin
+sha256  d06a636b84cd559483091cbdb07b5ce9e15a534bca31d4cb756b33b696c2160b  imx8qm-m4-demo-2.8.0.bin
+sha256  7800cdbebe07f426cdac50b0e295d64215164a767e79ca58bd917445c50e345f  imx8qx-m4-demo-2.8.0.bin
+
+# no hash for license file as it is different for each package listed above

Hm, that's is not great, but I don't really have a good/simple solution for this.

package/freescale-imx/imx-mcore-demos/imx-mcore-demos.hash

Quoted 4 lines
package/freescale-imx/imx-mcore-demos/imx-mcore-demos.hash new file +4 -0
+ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7),y)
+IMX_MCORE_DEMOS_VERSION = 1.0.1
+IMX_MCORE_DEMOS_SOURCE = imx7d-sabresd-m4-freertos-$(IMX_MCORE_DEMOS_VERSION).bin
+EXT = bin

Variables in Buildroot are global, so a variable named just "EXT" is not good. It should be IMX_MCORE_DEMOS_FILE_EXT or something like that.

Quoted 1 line

+else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP),y)

This BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP option is only introduced in the second patch of the series. I think it would make more sense to introduce the i.MX7ULP platform as a separate patch earlier in the series.

Quoted 1 line

+# Note: firmware names are copied to binaries directory with an "mcore_" prefix, for easier post image scripting

Please wrap long lines.

package/freescale-imx/imx-mcore-demos/imx-mcore-demos.hash

Quoted 2 lines
package/freescale-imx/imx-mcore-demos/imx-mcore-demos.hash new file +2 -0
+define IMX_MCORE_DEMOS_INSTALL_IMAGES_CMDS
+	for f in $(@D)/*.$(EXT); do cp "$$f" $(BINARIES_DIR)/mcore_$$(basename "$$f"); done

Could you try (untested):

	$(foreach f,$(wildcard $(@D)/*.$(IMX_MCORE_DEMOS_FILE_EXT), \
		$(INSTALL) -D -m 0644 $(f) $(BINARIES_DIR)/mcore_$(notdir $(f))
	)

This is a bit more make-style :-)

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw

PATCH 1/2 package/freescale-imx/imx-m4-demos: new package

Hello Thomas,

Quoted 12 lines

Hello Fabrice,

Thanks a lot for your patch series. Overall it looks pretty good, but a
few changes are needed.

First a minor detail: your commit title doesn't match the actual package name being added. See below for other comments.

On Fri, 31 Jul 2020 14:13:32 +0200
Fabrice Goucem <[email protected]> wrote:

Quoted 6 lines
Quoted 2 lines
 DEVELOPERS                                    |  1 +
 board/freescale/common/imx/post-image.sh      | 14 ++++-

I think this part (changes to post-image.sh) should go into a separate
commit, after the package addition.

Alrighty.

Quoted 23 lines
Quoted 21 lines
board/freescale/common/imx/post-image.sh +2 -0
index 06ccaac3a4..dc651ac584 100755
@@ -30,6 +30,18 @@ linux_image()
 	fi
 }
 
+#
+# mcore_image prints all available MCORE demo file names for the

genimage

board/freescale/common/imx/post-image.sh +5 -0
+# configuration file
+#
+mcore_image()
+{
+	if grep -Eq "^BR2_PACKAGE_IMX_MCORE_DEMOS=y$" ${BR2_CONFIG};

then

board/freescale/common/imx/post-image.sh +2 -0
+		echo -n ", "
+		for f in $(ls ${BINARIES_DIR}/mcore_*); do echo -n
Quoted 1 line

"$(basename $f), "; done

Quoted 7 lines

If I look at this, it seems like having the list finish with a comma is
fine. If that's the case, then I think we should modify the linux_image() function so that it echoes a string that is comma-terminated, so that the mcore_image() doesn't have to worry about
this, and looks like dtb_list() in how it handles the comma.

Indeed, having the list finish with a comma is fine. Will make linux_image() looks like dtb_list().

Quoted 32 lines
Quoted 26 lines
(quoted diff) +0 -0

demos.hash b/package/freescale-imx/imx-mcore-demos/imx-mcore- demos.hash
new file mode 100644
index 0000000000..13f3092c88

package/freescale-imx/imx-mcore-demos/imx-mcore-demos.hash new file +2 -0
@@ -0,0 +1,10 @@
+# locally computed
+sha256  cc00d3b936d49b2794a2a99e10129437e70caba3fd26b8379b8c50dd22

f73254 imx7d-sabresd-m4-freertos-1.0.1.bin
+sha256 a8fbe1180b3d20e933a410cd76e60baac7a9f54e8b2bae8b6b8a3e1af5 50eca6 imx7ulp-m4-demo-2.8.0.bin
+sha256 2dbfab7fbbe89e89a2881d77c84a6c257699dc73ee6462a813bdd5ad09 836b04 imx8mm-m4-demo-2.8.0.bin
+sha256 e877c7462b6ea87c498563842f42352d204eb28a65f35f7dc1fec643f8 4abb66 imx8mn-m7-demo-2.8.0.bin
+sha256 ac88568f63a794530339775a6e49e7928d3d09bcf4ba5edacea1841989 e674b0 imx8mq-m4-demo-2.8.0.bin
+sha256 d06a636b84cd559483091cbdb07b5ce9e15a534bca31d4cb756b33b696 c2160b imx8qm-m4-demo-2.8.0.bin
+sha256 7800cdbebe07f426cdac50b0e295d64215164a767e79ca58bd917445c5 0e345f imx8qx-m4-demo-2.8.0.bin

package/freescale-imx/imx-mcore-demos/imx-mcore-demos.hash new file +2 -0
+
+# no hash for license file as it is different for each package
Quoted 1 line

listed above

Hm, that's is not great, but I don't really have a good/simple solution
for this.

Quoted 9 lines
Quoted 5 lines
package/freescale-imx/imx-mcore-demos/imx-mcore-demos.hash new file +3 -0
+ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7),y)
+IMX_MCORE_DEMOS_VERSION = 1.0.1
+IMX_MCORE_DEMOS_SOURCE = imx7d-sabresd-m4-freertos-

$(IMX_MCORE_DEMOS_VERSION).bin
+EXT = bin

Variables in Buildroot are global, so a variable named just "EXT" is not good. It should be IMX_MCORE_DEMOS_FILE_EXT or something like that.

I was not aware of that. So definitely, yes, I'll rename that variable.

Quoted 7 lines
Quoted 2 lines

+else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP),y)

This BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP option is only introduced in the second patch of the series. I think it would make more sense to introduce the i.MX7ULP platform as a separate patch earlier in the series.

As mentioned in the email related to the i.MX7ULP support, I'll remove that part from this patch (related to imx-mcore-demos package introduction) and move to the other patch (related to i.MX7 ULP support).

Quoted 5 lines
Quoted 3 lines

+# Note: firmware names are copied to binaries directory with an "mcore_" prefix, for easier post image scripting

Please wrap long lines.

Sure.

Quoted 7 lines
Quoted 4 lines
package/freescale-imx/imx-mcore-demos/imx-mcore-demos.hash new file +2 -0
+define IMX_MCORE_DEMOS_INSTALL_IMAGES_CMDS
+	for f in $(@D)/*.$(EXT); do cp "$$f"

$(BINARIES_DIR)/mcore_$$(basename "$$f"); done

Could you try (untested):

Quoted 6 lines
	$(foreach f,$(wildcard $(@D)/*.$(IMX_MCORE_DEMOS_FILE_EXT), \
		$(INSTALL) -D -m 0644 $(f)
$(BINARIES_DIR)/mcore_$(notdir $(f))
	)

This is a bit more make-style :-)

Correct.
I'll do it this way then.

Quoted 3 lines

Thanks!

Thomas