Skip to contentSkip to conversation

board/freescale/imx8mqevk: Fix typos in readme

PATCH New André Hentschel 4 participants 20 messages Dec 26, 2018 – Dec 29, 2018 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/9 board/freescale/imx8mqevk: Fix typos in readme

---
 board/freescale/imx8mqevk/readme.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
board/freescale/imx8mqevk/readme.txt +2 -2
index a32c122f91..26b5ab74d0 100644
@@ -21,7 +21,7 @@ You will find in output/images/ the following files:
   - boot.vfat
   - fsl-imx8mq-evk.dtb
   - Image
-  - imx-boot-imx8mqevk-sd.bin
+  - imx-boot-sd.bin
   - lpddr4_pmu_train_fw.bin
   - rootfs.ext2
   - rootfs.ext4
@@ -69,7 +69,7 @@ Enable HDMI output
 
 To enable HDMI output at boot you must provide the video kernel boot
 argument.  To set the video boot argument from U-Boot run after
-stoping in U-Boot prompt:
+stopping in U-Boot prompt:
 
 setenv mmcargs 'setenv bootargs console=${console} root=${mmcroot} video=HDMI-A-1:1920x1080-32 at 60'
 saveenv
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/9 package/freescale-imx/firmware-imx: Fix typos

---
 package/freescale-imx/firmware-imx/firmware-imx.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/freescale-imx/firmware-imx/firmware-imx.mk +1 -1
index 0a503d7a66..240985297c 100644
@@ -35,7 +35,7 @@ endef
 
 define FIRMWARE_IMX_INSTALL_IMAGES_CMDS
 	# Create padded versions of lpddr4_pmu_* and generate lpddr4_pmu_train_fw.bin.
-	# lpddr4_pmu_train_fw.bin isneeded when generating imx-boot-imx8mqevk-sd.bin
+	# lpddr4_pmu_train_fw.bin is needed when generating imx-boot-sd.bin
 	# which is done in post-image script.
 	$(call FIRMWARE_IMX_PREPARE_LPDDR4_FW,1d)
 	$(call FIRMWARE_IMX_PREPARE_LPDDR4_FW,2d)
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/9 package/freescale-imx/firmware-imx: Fix typos

Hello,

Quoted 10 lines · Andr? Hentschel
---
 package/freescale-imx/firmware-imx/firmware-imx.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/freescale-imx/firmware-imx/firmware-imx.mk +0 -0
index 0a503d7a66..240985297c 100644

package/freescale-imx/firmware-imx/firmware-imx.mk endef · line 38

Quoted 5 lines
package/freescale-imx/firmware-imx/firmware-imx.mk +1 -1
@@ -35,7 +35,7 @@ endef
 
 define FIRMWARE_IMX_INSTALL_IMAGES_CMDS
 	# Create padded versions of lpddr4_pmu_* and generate lpddr4_pmu_train_fw.bin.
-	# lpddr4_pmu_train_fw.bin isneeded when generating imx-boot-imx8mqevk-sd.bin
+	# lpddr4_pmu_train_fw.bin is needed when generating imx-boot-sd.bin

Ditto, isn't this imx8-boot-sd.bin ?

Best regards,

Thomas

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

PATCH 2/9 package/freescale-imx/firmware-imx: Fix typos

Am 27.12.18 um 10:02 schrieb Thomas Petazzoni:

Quoted 21 lines

Hello,

Quoted 10 lines · Andr? Hentschel
---
 package/freescale-imx/firmware-imx/firmware-imx.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/freescale-imx/firmware-imx/firmware-imx.mk +0 -0
index 0a503d7a66..240985297c 100644

package/freescale-imx/firmware-imx/firmware-imx.mk endef · line 38

Quoted 5 lines
package/freescale-imx/firmware-imx/firmware-imx.mk +1 -1
@@ -35,7 +35,7 @@ endef
 
 define FIRMWARE_IMX_INSTALL_IMAGES_CMDS
 	# Create padded versions of lpddr4_pmu_* and generate lpddr4_pmu_train_fw.bin.
-	# lpddr4_pmu_train_fw.bin isneeded when generating imx-boot-imx8mqevk-sd.bin
+	# lpddr4_pmu_train_fw.bin is needed when generating imx-boot-sd.bin

Ditto, isn't this imx8-boot-sd.bin ?

Quoted 4 lines

Best regards,

Thomas

Hi,

Thanks for having a look!
You are right, I better should not introduce new typos...

#4 lore raw

PATCH 3/9 board/freescale/common/imx: Fix typo

In reply to André Hentschel
---
 board/freescale/common/imx/genimage.cfg.template_imx8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/common/imx/genimage.cfg.template_imx8 +1 -1
index fdb645014a..2f8842f8e0 100644
@@ -3,7 +3,7 @@
 # We mimic the .sdcard Freescale's image format:
 # * the SD card must have 33 kB free space at the beginning,
 # * U-Boot is integrated into imx8-boot-sd.bin and is dumped as is,
-# * a FAT partition at offset 32MB is containing Image and DTB files
+# * a FAT partition at offset 8MB is containing Image and DTB files
 # * a single root filesystem partition is required (ext2, ext3 or ext4)
 #
 
Signature · 1 line
2.17.1
#5 lore raw

PATCH 4/9 package/freescale-imx: Add support for i.MX8X

In reply to André Hentschel
---
 package/freescale-imx/Config.in                    | 3 +++
 package/freescale-imx/firmware-imx/firmware-imx.mk | 8 ++++++++
 2 files changed, 11 insertions(+)
package/freescale-imx/Config.in +3 -0
index 95c0aab08c..9001764437 100644
@@ -42,6 +42,9 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7
 
 config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
 	bool "imx8m"
+
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
+	bool "imx8x"
 endchoice
 
 config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
package/freescale-imx/firmware-imx/firmware-imx.mk +8 -0
index 240985297c..81664c5d2f 100644
@@ -45,6 +45,14 @@ define FIRMWARE_IMX_INSTALL_IMAGES_CMDS
 	cp $(@D)/firmware/hdmi/cadence/signed_hdmi_imx8m.bin \
 		$(BINARIES_DIR)/signed_hdmi_imx8m.bin
 endef
+else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y)
+FIRMWARE_IMX_INSTALL_IMAGES = YES
+define FIRMWARE_IMX_INSTALL_IMAGES_CMDS
+	# SECO firmware is needed when generating imx8-boot-sd.bin which
+	# is done in post-image script.
+	cp $(@D)/firmware/seco/ahab-container.img \
+		$(BINARIES_DIR)/ahab-container.img
+endef
 else
 define FIRMWARE_IMX_INSTALL_TARGET_CMDS
 	mkdir -p $(TARGET_DIR)/lib/firmware/imx
Signature · 1 line
2.17.1
#6 lore raw

PATCH 5/9 package/freescale-imx: Add imx-sc-firmware package

In reply to André Hentschel
---
 DEVELOPERS                                    |  1 +
 package/freescale-imx/Config.in               |  1 +
 .../freescale-imx/imx-sc-firmware/Config.in   |  8 +++++
 .../imx-sc-firmware/imx-sc-firmware.mk        | 29 +++++++++++++++++++
 4 files changed, 39 insertions(+)
 create mode 100644 package/freescale-imx/imx-sc-firmware/Config.in
 create mode 100644 package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk
DEVELOPERS +1 -0
index 2d58ea9014..11d3524b88 100644
@@ -124,6 +124,7 @@ F:	package/ktap/
 
 N:	Andr? Hentschel <[email protected]>
 F:	package/azure-iot-sdk-c/
+F:	package/freescale-imx/imx-sc-firmware/
 F:	package/libkrb5/
 F:	package/openal/
 F:	package/p7zip/
package/freescale-imx/Config.in +1 -0
index 9001764437..fcceacdc9e 100644
@@ -90,6 +90,7 @@ source "package/freescale-imx/imx-vpu/Config.in"
 source "package/freescale-imx/imx-vpu-hantro/Config.in"
 source "package/freescale-imx/imx-vpuwrap/Config.in"
 source "package/freescale-imx/firmware-imx/Config.in"
+source "package/freescale-imx/imx-sc-firmware/Config.in"
 if (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53)
 source "package/freescale-imx/gpu-amd-bin-mx51/Config.in"
 source "package/freescale-imx/libz160/Config.in"
package/freescale-imx/imx-sc-firmware/Config.in new file +8 -0
new file mode 100644
index 0000000000..b0e11c9dff
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_IMX_SC_FIRMWARE
+	bool "imx-sc-firmware"
+	depends on BR2_aarch64 # Only relevant for i.MX8
+	help
+	  System Control Unit Firmware blobs for the Freescale i.MX8 SoCs.
+
+	  This library is provided by Freescale as-is and doesn't have
+	  an upstream.
package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk new file +29 -0
new file mode 100644
index 0000000000..aa10322753
@@ -0,0 +1,29 @@
+################################################################################
+#
+# imx-sc-firmware
+#
+################################################################################
+
+IMX_SC_FIRMWARE_VERSION = 1.0
+IMX_SC_FIRMWARE_SITE = $(FREESCALE_IMX_SITE)
+IMX_SC_FIRMWARE_SOURCE = imx-sc-firmware-$(IMX_SC_FIRMWARE_VERSION).bin
+
+IMX_SC_FIRMWARE_LICENSE = NXP Semiconductor Software License Agreement
+IMX_SC_FIRMWARE_LICENSE_FILES = EULA COPYING
+IMX_SC_FIRMWARE_REDISTRIBUTE = NO
+
+define IMX_SC_FIRMWARE_EXTRACT_CMDS
+	$(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_SC_FIRMWARE_DL_DIR)/$(IMX_SC_FIRMWARE_SOURCE))
+endef
+
+ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y)
+IMX_SC_FIRMWARE_INSTALL_IMAGES = YES
+define IMX_SC_FIRMWARE_INSTALL_IMAGES_CMDS
+	# SCFW firmware is needed when generating imx8-boot-sd.bin which
+	# is done in post-image script.
+	cp $(@D)/mx8qx-mek-scfw-tcm.bin $(BINARIES_DIR)/mx8qx-mek-scfw-tcm.bin
+	cp $(@D)/mx8qx-val-scfw-tcm.bin $(BINARIES_DIR)/mx8qx-val-scfw-tcm.bin
+endef
+endif
+
+$(eval $(generic-package))
Signature · 1 line
2.17.1
#7 lore raw

PATCH 5/9 package/freescale-imx: Add imx-sc-firmware package

Hello,

Looks good overall, thanks for this work! Just one comment/suggestion below.

Quoted 63 lines · Andr? Hentschel
---
 DEVELOPERS                                    |  1 +
 package/freescale-imx/Config.in               |  1 +
 .../freescale-imx/imx-sc-firmware/Config.in   |  8 +++++
 .../imx-sc-firmware/imx-sc-firmware.mk        | 29 +++++++++++++++++++
 4 files changed, 39 insertions(+)
 create mode 100644 package/freescale-imx/imx-sc-firmware/Config.in
 create mode 100644 package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk
DEVELOPERS +1 -0
index 2d58ea9014..11d3524b88 100644
@@ -124,6 +124,7 @@ F:	package/ktap/
 
 N:	Andr? Hentschel <[email protected]>
 F:	package/azure-iot-sdk-c/
+F:	package/freescale-imx/imx-sc-firmware/
 F:	package/libkrb5/
 F:	package/openal/
 F:	package/p7zip/
package/freescale-imx/Config.in +1 -0
index 9001764437..fcceacdc9e 100644
@@ -90,6 +90,7 @@ source "package/freescale-imx/imx-vpu/Config.in"
 source "package/freescale-imx/imx-vpu-hantro/Config.in"
 source "package/freescale-imx/imx-vpuwrap/Config.in"
 source "package/freescale-imx/firmware-imx/Config.in"
+source "package/freescale-imx/imx-sc-firmware/Config.in"
 if (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53)
 source "package/freescale-imx/gpu-amd-bin-mx51/Config.in"
 source "package/freescale-imx/libz160/Config.in"
package/freescale-imx/imx-sc-firmware/Config.in new file +8 -0
new file mode 100644
index 0000000000..b0e11c9dff
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_IMX_SC_FIRMWARE
+	bool "imx-sc-firmware"
+	depends on BR2_aarch64 # Only relevant for i.MX8
+	help
+	  System Control Unit Firmware blobs for the Freescale i.MX8 SoCs.
+
+	  This library is provided by Freescale as-is and doesn't have
+	  an upstream.
package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk new file +9 -0
new file mode 100644
index 0000000000..aa10322753
@@ -0,0 +1,29 @@
+################################################################################
+#
+# imx-sc-firmware
+#
+################################################################################
+
+IMX_SC_FIRMWARE_VERSION = 1.0
+IMX_SC_FIRMWARE_SITE = $(FREESCALE_IMX_SITE)
+IMX_SC_FIRMWARE_SOURCE = imx-sc-firmware-$(IMX_SC_FIRMWARE_VERSION).bin

package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk line 19

Quoted 10 lines
package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk new file +10 -0
+
+IMX_SC_FIRMWARE_LICENSE = NXP Semiconductor Software License Agreement
+IMX_SC_FIRMWARE_LICENSE_FILES = EULA COPYING
+IMX_SC_FIRMWARE_REDISTRIBUTE = NO
+
+define IMX_SC_FIRMWARE_EXTRACT_CMDS
+	$(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_SC_FIRMWARE_DL_DIR)/$(IMX_SC_FIRMWARE_SOURCE))
+endef
+
+ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y)

So this package doesn't do anything on platforms other than BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X. Should the package "depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X" ?

Best regards,

Thomas

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

PATCH 5/9 package/freescale-imx: Add imx-sc-firmware package

Am 27.12.18 um 09:46 schrieb Thomas Petazzoni:

Quoted 3 lines

So this package doesn't do anything on platforms other than BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X. Should the package "depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X" ?

Thanks for having a look!
If it is better to change it later I can do that. Just note there is a third variant of i.MX8 which also needs this, evalboards should be out early 2019 for it.

#9 lore raw

PATCH 6/9 package/imx-mkimage: Bump to imx_4.14.62_1.0.0_beta

In reply to André Hentschel
---
 package/imx-mkimage/imx-mkimage.hash | 2 +-
 package/imx-mkimage/imx-mkimage.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/imx-mkimage/imx-mkimage.hash +1 -1
index e1cbdd973c..ceaac64b1c 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256 bc79e11cfbde303e200287fa6624028c8ce5344f8a35ed179b3fe217d74155da  imx-mkimage-rel_imx_4.9.51_8mq_ga.tar.gz
+sha256 17e22d0127879bb9f6f3aae82b22d02e0372578dc7a4f6c71647fce75c632ee2  imx-mkimage-rel_imx_4.14.62_1.0.0_beta.tar.gz
 sha256 231f7edcc7352d7734a96eef0b8030f77982678c516876fcb81e25b32d68564c  iMX8dv/COPYING
package/imx-mkimage/imx-mkimage.mk +1 -1
index 6fd6aa39b0..cde4fefcea 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-IMX_MKIMAGE_VERSION = rel_imx_4.9.51_8mq_ga
+IMX_MKIMAGE_VERSION = rel_imx_4.14.62_1.0.0_beta
 IMX_MKIMAGE_SITE = https://source.codeaurora.org/external/imx/imx-mkimage
 IMX_MKIMAGE_SITE_METHOD = git
 IMX_MKIMAGE_LICENSE = GPL-2.0+
Signature · 1 line
2.17.1
#10 lore raw

PATCH 6/9 package/imx-mkimage: Bump to imx_4.14.62_1.0.0_beta

Hi Andr?,

Quoted 20 lines · Andr? Hentschel
---
 package/imx-mkimage/imx-mkimage.hash | 2 +-
 package/imx-mkimage/imx-mkimage.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/imx-mkimage/imx-mkimage.hash +1 -1
index e1cbdd973c..ceaac64b1c 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256 bc79e11cfbde303e200287fa6624028c8ce5344f8a35ed179b3fe217d74155da  imx-mkimage-rel_imx_4.9.51_8mq_ga.tar.gz
+sha256 17e22d0127879bb9f6f3aae82b22d02e0372578dc7a4f6c71647fce75c632ee2  imx-mkimage-rel_imx_4.14.62_1.0.0_beta.tar.gz
 sha256 231f7edcc7352d7734a96eef0b8030f77982678c516876fcb81e25b32d68564c  iMX8dv/COPYING
package/imx-mkimage/imx-mkimage.mk +0 -0
index 6fd6aa39b0..cde4fefcea 100644

package/imx-mkimage/imx-mkimage.mk line 7

Quoted 5 lines
package/imx-mkimage/imx-mkimage.mk +1 -1
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-IMX_MKIMAGE_VERSION = rel_imx_4.9.51_8mq_ga
+IMX_MKIMAGE_VERSION = rel_imx_4.14.62_1.0.0_beta

Why not bump to the latest rel_imx_4.14.78_1.0.0_ga?

baruch

Quoted 3 lines
package/imx-mkimage/imx-mkimage.mk +0 -0
 IMX_MKIMAGE_SITE = https://source.codeaurora.org/external/imx/imx-mkimage
 IMX_MKIMAGE_SITE_METHOD = git
 IMX_MKIMAGE_LICENSE = GPL-2.0+
Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#11 lore raw

PATCH 6/9 package/imx-mkimage: Bump to imx_4.14.62_1.0.0_beta

Am 27.12.18 um 09:56 schrieb Baruch Siach:

Quoted 4 lines

package/imx-mkimage/imx-mkimage.mk line 7

Quoted 2 lines
package/imx-mkimage/imx-mkimage.mk +1 -1
-IMX_MKIMAGE_VERSION = rel_imx_4.9.51_8mq_ga
+IMX_MKIMAGE_VERSION = rel_imx_4.14.62_1.0.0_beta

Why not bump to the latest rel_imx_4.14.78_1.0.0_ga?

Hi Baruch,

Thanks for having a look!
rel_imx_4.14.62_1.0.0_beta is the version currently used in:
https://git.buildroot.net/buildroot/tree/configs/freescale_imx8mqevk_defconfig
Further I did all my testing with it and don't have access to the imx8x board for the next two weeks. So for now I'd like to stick to that version until I and the imx8mq maintainers can test it.

reviewer
#12 lore raw

PATCH 6/9 package/imx-mkimage: Bump to imx_4.14.62_1.0.0_beta

In reply to Baruch Siach
Quoted 4 lines · Baruch Siach

package/imx-mkimage/imx-mkimage.mk line 7

Quoted 2 lines
package/imx-mkimage/imx-mkimage.mk +1 -1
-IMX_MKIMAGE_VERSION = rel_imx_4.9.51_8mq_ga
+IMX_MKIMAGE_VERSION = rel_imx_4.14.62_1.0.0_beta

Why not bump to the latest rel_imx_4.14.78_1.0.0_ga?

Yes, that would be preferred. Thanks

#13 lore raw

PATCH 7/9 package/imx-mkimage: Add support for all other i.MX8 SOCs

In reply to André Hentschel
---
 package/imx-mkimage/imx-mkimage.mk | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
package/imx-mkimage/imx-mkimage.mk +12 -2
index cde4fefcea..36e25c2a7c 100644
@@ -11,15 +11,25 @@ IMX_MKIMAGE_LICENSE = GPL-2.0+
 IMX_MKIMAGE_LICENSE_FILES = iMX8dv/COPYING
 HOST_IMX_MKIMAGE_DEPENDENCIES = host-zlib
 
+ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M),y)
 define HOST_IMX_MKIMAGE_BUILD_CMDS
-	# Currently this only supports iMX8M. When more hardware is available
-	# this needs to be selectable based on iMX8-version (iMX8M,iMXQ etc).
 	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)/iMX8M -f soc.mak mkimage_imx8
 endef
+else
+define HOST_IMX_MKIMAGE_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) MKIMG=mkimage_imx8 mkimage_imx8
+endef
+endif
 
+ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M),y)
 define HOST_IMX_MKIMAGE_INSTALL_CMDS
 	$(INSTALL) -D -m 755 $(@D)/iMX8M/mkimage_imx8 $(HOST_DIR)/bin/mkimage_imx8
 	$(INSTALL) -D -m 755 $(@D)/iMX8M/mkimage_fit_atf.sh $(HOST_DIR)/bin/mkimage_fit_atf.sh
 endef
+else
+define HOST_IMX_MKIMAGE_INSTALL_CMDS
+	$(INSTALL) -D -m 755 $(@D)/mkimage_imx8 $(HOST_DIR)/bin/mkimage_imx8
+endef
+endif
 
 $(eval $(host-generic-package))
Signature · 1 line
2.17.1
reviewer
#14 lore raw

PATCH 7/9 package/imx-mkimage: Add support for all other i.MX8 SOCs

Hi Andr?,

Quoted 2 lines · Andr? Hentschel

Please add a simple commit log and state the imx8 variants that will be supported.

#15 lore raw

PATCH 7/9 package/imx-mkimage: Add support for all other i.MX8 SOCs

Am 27.12.18 um 16:40 schrieb Fabio Estevam:

Quoted 8 lines

Hi Andr?,

Quoted 2 lines · Andr? Hentschel

Please add a simple commit log and state the imx8 variants that will be supported.

Thanks for having a look.
I'll test it as soon as I have access to the board again. For the meantime my updated changes can be found here (untested):
https://github.com/AndreRH/buildroot/tree/c2810022babfef0b1236237e463f34a3ce32bc82

#17 lore raw

PATCH 8/9 board/freescale/common/imx: Add support for i.MX8X

In reply to André Hentschel
---
 .../common/imx/genimage.cfg.template_imx8     |  2 +-
 .../common/imx/imx8-bootloader-prepare.sh     | 20 ++++++++++++++-----
 board/freescale/common/imx/post-image.sh      | 13 ++++++++++++
 3 files changed, 29 insertions(+), 6 deletions(-)
board/freescale/common/imx/genimage.cfg.template_imx8 +1 -1
index 2f8842f8e0..bd5f6cdc73 100644
@@ -23,7 +23,7 @@ image sdcard.img {
   partition imx-boot {
     in-partition-table = "no"
     image = "imx8-boot-sd.bin"
-    offset = 33K
+    offset = %IMXOFFSET%
   }
 
   partition boot {
board/freescale/common/imx/imx8-bootloader-prepare.sh +15 -5
index cc12666ae6..e98e93a857 100755
@@ -7,12 +7,22 @@ main ()
 		echo "ERROR: couldn't find dtb: $UBOOT_DTB"
 		exit 1
 	fi
-	cat ${BINARIES_DIR}/u-boot-spl.bin ${BINARIES_DIR}/lpddr4_pmu_train_fw.bin > ${BINARIES_DIR}/u-boot-spl-ddr.bin
-	BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot.bin ${HOST_DIR}/bin/mkimage_fit_atf.sh ${UBOOT_DTB} > ${BINARIES_DIR}/u-boot.its
-	${HOST_DIR}/bin/mkimage -E -p 0x3000 -f ${BINARIES_DIR}/u-boot.its ${BINARIES_DIR}/u-boot.itb
-	rm -f ${BINARIES_DIR}/u-boot.its
 
-	${HOST_DIR}/bin/mkimage_imx8 -fit -signed_hdmi ${BINARIES_DIR}/signed_hdmi_imx8m.bin -loader ${BINARIES_DIR}/u-boot-spl-ddr.bin 0x7E1000 -second_loader ${BINARIES_DIR}/u-boot.itb 0x40200000 0x60000 -out ${BINARIES_DIR}/imx8-boot-sd.bin
+	if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then
+		cat ${BINARIES_DIR}/u-boot-spl.bin ${BINARIES_DIR}/lpddr4_pmu_train_fw.bin > ${BINARIES_DIR}/u-boot-spl-ddr.bin
+		BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot.bin ${HOST_DIR}/bin/mkimage_fit_atf.sh ${UBOOT_DTB} > ${BINARIES_DIR}/u-boot.its
+		${HOST_DIR}/bin/mkimage -E -p 0x3000 -f ${BINARIES_DIR}/u-boot.its ${BINARIES_DIR}/u-boot.itb
+		rm -f ${BINARIES_DIR}/u-boot.its
+
+		${HOST_DIR}/bin/mkimage_imx8 -fit -signed_hdmi ${BINARIES_DIR}/signed_hdmi_imx8m.bin -loader ${BINARIES_DIR}/u-boot-spl-ddr.bin 0x7E1000 -second_loader ${BINARIES_DIR}/u-boot.itb 0x40200000 0x60000 -out ${BINARIES_DIR}/imx8-boot-sd.bin
+	else
+		${HOST_DIR}/bin/mkimage_imx8 -commit > ${BINARIES_DIR}/mkimg.commit
+		cat ${BINARIES_DIR}/u-boot.bin ${BINARIES_DIR}/mkimg.commit > ${BINARIES_DIR}/u-boot-hash.bin
+		cp ${BINARIES_DIR}/bl31.bin ${BINARIES_DIR}/u-boot-atf.bin
+		dd if=${BINARIES_DIR}/u-boot-hash.bin of=${BINARIES_DIR}/u-boot-atf.bin bs=1K seek=128
+
+		${HOST_DIR}/bin/mkimage_imx8 -soc QX -rev B0 -append ${BINARIES_DIR}/ahab-container.img -c -scfw ${BINARIES_DIR}/mx8qx-mek-scfw-tcm.bin -ap ${BINARIES_DIR}/u-boot-atf.bin a35 0x80000000 -out ${BINARIES_DIR}/imx8-boot-sd.bin
+	fi
 
 	exit $?
 }
board/freescale/common/imx/post-image.sh +13 -0
index 6590beda3e..12a5bea73b 100755
@@ -34,6 +34,8 @@ genimage_type()
 {
 	if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then
 		echo "genimage.cfg.template_imx8"
+	elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X=y$" ${BR2_CONFIG}; then
+		echo "genimage.cfg.template_imx8"
 	elif grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
 		echo "genimage.cfg.template_spl"
 	else
@@ -41,6 +43,15 @@ genimage_type()
 	fi
 }
 
+imx_offset()
+{
+	if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then
+		echo "33K"
+	else
+		echo "32K"
+	fi
+}
+
 uboot_image()
 {
 	if grep -Eq "^BR2_TARGET_UBOOT_FORMAT_DTB_IMX=y$" ${BR2_CONFIG}; then
@@ -53,11 +64,13 @@ uboot_image()
 main()
 {
 	local FILES="$(dtb_list) $(linux_image)"
+	local IMXOFFSET="$(imx_offset)"
 	local UBOOTBIN="$(uboot_image)"
 	local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)"
 	local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
 
 	sed -e "s/%FILES%/${FILES}/" \
+		-e "s/%IMXOFFSET%/${IMXOFFSET}/" \
 		-e "s/%UBOOTBIN%/${UBOOTBIN}/" \
 		board/freescale/common/imx/$(genimage_type) > ${GENIMAGE_CFG}
 
Signature · 1 line
2.17.1
#18 lore raw

PATCH 9/9 configs/freescale_imx8qxpmek: New defconfig

In reply to André Hentschel
---
 .gitlab-ci.yml                         |  1 +
 board/freescale/imx8qxpmek/readme.txt  | 67 ++++++++++++++++++++++++++
 configs/freescale_imx8qxpmek_defconfig | 40 +++++++++++++++
 3 files changed, 108 insertions(+)
 create mode 100644 board/freescale/imx8qxpmek/readme.txt
 create mode 100644 configs/freescale_imx8qxpmek_defconfig
.gitlab-ci.yml +1 -0
index f393cbbdfb..c09475a0de 100644
@@ -143,6 +143,7 @@ freescale_imx6qsabresd_defconfig: *defconfig
 freescale_imx6sxsabresd_defconfig: *defconfig
 freescale_imx7dsabresd_defconfig: *defconfig
 freescale_imx8mqevk_defconfig: *defconfig
+freescale_imx8mqxpmek_defconfig: *defconfig
 freescale_p1025twr_defconfig: *defconfig
 freescale_t1040d4rdb_defconfig: *defconfig
 friendlyarm_nanopi_a64_defconfig: *defconfig
board/freescale/imx8qxpmek/readme.txt new file +67 -0

67 lines not on this page · raw message

configs/freescale_imx8qxpmek_defconfig new file +40 -0
new file mode 100644
index 0000000000..91cfc54789
@@ -0,0 +1,40 @@
+BR2_aarch64=y
+BR2_cortex_a35=y
+BR2_ARM_FPU_VFPV3=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/freescale/common/imx/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/fsl-imx8qxp-mek.dtb"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.14.62_1.0.0_beta"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/fsl-imx8qxp-mek"
+BR2_PACKAGE_FREESCALE_IMX=y
+BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X=y
+BR2_PACKAGE_FIRMWARE_IMX=y
+BR2_PACKAGE_IMX_SC_FIRMWARE=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/imx-atf"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="rel_imx_4.14.62_1.0.0_beta"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8qxp"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.14.62_1.0.0_beta"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8qxp_mek"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_IMX_MKIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
Signature · 1 line
2.17.1
#19 lore raw

PATCH 1/9 board/freescale/imx8mqevk: Fix typos in readme

In reply to André Hentschel

Hello,

Quoted 10 lines · Andr? Hentschel
---
 board/freescale/imx8mqevk/readme.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
board/freescale/imx8mqevk/readme.txt +0 -0
index a32c122f91..26b5ab74d0 100644

board/freescale/imx8mqevk/readme.txt You will find in output/images/ the following files: · line 24

Quoted 5 lines
board/freescale/imx8mqevk/readme.txt +1 -1
@@ -21,7 +21,7 @@ You will find in output/images/ the following files:
   - boot.vfat
   - fsl-imx8mq-evk.dtb
   - Image
-  - imx-boot-imx8mqevk-sd.bin
+  - imx-boot-sd.bin

Isn't the actual file name imx8-boot-sd.bin ?

At least this is what board/freescale/common/imx/imx8-bootloader-prepare.sh is producing, and what board/freescale/common/imx/genimage.cfg.template_imx8 is using as input.

Best regards,

Thomas

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