All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/9] new board ls1028ardb introduced
@ 2019-11-21 10:23 Changming Huang
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 01/10] package/freescale-qoriq: new package directory Changming Huang
                   ` (9 more replies)
  0 siblings, 10 replies; 51+ messages in thread
From: Changming Huang @ 2019-11-21 10:23 UTC (permalink / raw)
  To: buildroot

changes since v1:
1> According to the feedback from other guys, modify the codes
2> create one new patch to move package/rcw to package/freescale-qoriq/
patches detail in v2:
0001-xxxx: is 0005-xxxx in v1, don't change
0002-xxxx: new patch to move rcw to sub-direcotry "freescale-qoriq"
0003-xxxx: is 0001-xxxx in v1, add-back license hash
0004-xxxx: is 0002-xxxx in v1, add option BR2_PACKAGE_HOST_RCW_ATF
0005-xxxx: is 0003-xxxx in v1, add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
0006-xxxx: is 0004-xxxx in v1, use BR2_PACKAGE_HOST_RCW_ATF ATF
0007-xxxx: is 0006-xxxx in v1, rename to fsl-qoriq-cadence-dp-fw, 
	use the "fsl" to replace freescale, fw to replace firmware,
	update DEVELOPERS
	add license hash
	rewrite makefile
0008-xxxx: is 0007-xxxx in v1, change to unconditional for patches
0009-xxxx: is 0008-xxxx in v1, use BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW to DP
0010-xxxx: is 0009-xxxx in v1, add new options

---
The following nine patches is to enable LS1028ARDB board in Buildroot.

NXP LS1028A silicon is based on Arm A72 core and  designed for industry,
some key features are enabled:
  TSN - Time Sensitive Network on Network interface
  TSN/Swith - naive TSN Swith, support six ports
  DP - display port for different resolution up to 4K

The base for these patches is "next" branch, commitID: 5fd8db02ef

1. Upgrade the RCW version to latest version supported via LSDK-19.09
2. Use RCW binary for boot board
3. Intruduce u-boot-dtb.bin for NXP Layerscape serial platform
4. Introduce RCW to Arm-trusted-firmware
5. Create one freescale-qoriq direcotry for all firmware hardware related 
6. LS1028ARDB DP firmware is stored in freescale-qoriq
7. New patches to eanble GPIO interrupt for eNETC and Micro-bus
8. One standard directory for all Layerscape platform
9. LS1028ARDB related scripts and default configurations

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 01/10] package/freescale-qoriq: new package directory
  2019-11-21 10:23 [Buildroot] [PATCH v2 0/9] new board ls1028ardb introduced Changming Huang
@ 2019-11-21 10:23 ` Changming Huang
  2019-11-25 21:13   ` Thomas Petazzoni
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 02/10] package/freescale-qoriq/fsl-qoriq-rcw: move rcw into freescale-qoriq and rename it Changming Huang
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 51+ messages in thread
From: Changming Huang @ 2019-11-21 10:23 UTC (permalink / raw)
  To: buildroot

The freescale-qoriq directory is intended to contain all freescale
QorIQ (including PowerPC and LayerScape serial) related packages,
together with their download site and version info.

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---
changes since v1:
no changes
---
 package/Config.in                          | 1 +
 package/freescale-qoriq/Config.in          | 4 ++++
 package/freescale-qoriq/freescale-qoriq.mk | 1 +
 3 files changed, 6 insertions(+)
 create mode 100644 package/freescale-qoriq/Config.in
 create mode 100644 package/freescale-qoriq/freescale-qoriq.mk

diff --git a/package/Config.in b/package/Config.in
index 36d2b31e2e..4cdc8298f8 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -447,6 +447,7 @@ endmenu
 	source "package/flashrom/Config.in"
 	source "package/fmtools/Config.in"
 	source "package/freescale-imx/Config.in"
+	source "package/freescale-qoriq/Config.in"
 	source "package/fxload/Config.in"
 	source "package/gadgetfs-test/Config.in"
 	source "package/gcnano-binaries/Config.in"
diff --git a/package/freescale-qoriq/Config.in b/package/freescale-qoriq/Config.in
new file mode 100644
index 0000000000..51497c588e
--- /dev/null
+++ b/package/freescale-qoriq/Config.in
@@ -0,0 +1,4 @@
+menu "Freescale QorIQ libraries"
+	depends on BR2_aarch64 || BR2_arm || BR2_powerpc64 || BR2_powerpc
+
+endmenu
diff --git a/package/freescale-qoriq/freescale-qoriq.mk b/package/freescale-qoriq/freescale-qoriq.mk
new file mode 100644
index 0000000000..bbbbf3efbe
--- /dev/null
+++ b/package/freescale-qoriq/freescale-qoriq.mk
@@ -0,0 +1 @@
+include $(sort $(wildcard package/freescale-qoriq/*/*.mk))
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 02/10] package/freescale-qoriq/fsl-qoriq-rcw: move rcw into freescale-qoriq and rename it
  2019-11-21 10:23 [Buildroot] [PATCH v2 0/9] new board ls1028ardb introduced Changming Huang
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 01/10] package/freescale-qoriq: new package directory Changming Huang
@ 2019-11-21 10:23 ` Changming Huang
  2019-11-21 10:34   ` Michael Walle
  2019-11-25 21:15   ` [Buildroot] " Thomas Petazzoni
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 03/10] package/freescale-qoriq/fsl-qoriq-rcw: upgrade the rcw version to LSDK-19.09 Changming Huang
                   ` (7 subsequent siblings)
  9 siblings, 2 replies; 51+ messages in thread
From: Changming Huang @ 2019-11-21 10:23 UTC (permalink / raw)
  To: buildroot

From: Jerry Huang <jerry.huang@nxp.com>

Move package/rcw into package/freescale-qoriq,
and rename it to fsl-qoriq-rcw.

Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
---
changes since v1:
1. new patch
2. move rcw to sub-directory freescale-qoriq
3. rename to fsl-qoriq-rcw
---
 DEVELOPERS                                    |  2 +-
 package/Config.in.host                        |  2 +-
 .../fsl-qoriq-rcw}/Config.in.host             |  0
 .../fsl-qoriq-rcw/fsl-qoriq-rcw.hash}         |  0
 .../fsl-qoriq-rcw/fsl-qoriq-rcw.mk}           | 22 +++++++++----------
 5 files changed, 13 insertions(+), 13 deletions(-)
 rename package/{rcw => freescale-qoriq/fsl-qoriq-rcw}/Config.in.host (100%)
 rename package/{rcw/rcw.hash => freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.hash} (100%)
 rename package/{rcw/rcw.mk => freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk} (72%)

diff --git a/DEVELOPERS b/DEVELOPERS
index 19ea83df3b..9fbe229eb7 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1603,7 +1603,7 @@ F:	package/python-pyrex/
 F:	package/python-tinyrpc/
 F:	package/python-txdbus/
 F:	package/raptor/
-F:	package/rcw/
+F:	package/freescale-qoriq/fsl-qoriq-rcw/
 F:	package/rng-tools/
 F:	package/rsyslog/
 F:	package/setools/
diff --git a/package/Config.in.host b/package/Config.in.host
index 758c268e00..e4840080ad 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -62,7 +62,7 @@ menu "Host utilities"
 	source "package/qemu/Config.in.host"
 	source "package/raspberrypi-usbboot/Config.in.host"
 	source "package/rauc/Config.in.host"
-	source "package/rcw/Config.in.host"
+	source "package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host"
 	source "package/rustc/Config.in.host"
 	source "package/s6-rc/Config.in.host"
 	source "package/sam-ba/Config.in.host"
diff --git a/package/rcw/Config.in.host b/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host
similarity index 100%
rename from package/rcw/Config.in.host
rename to package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host
diff --git a/package/rcw/rcw.hash b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.hash
similarity index 100%
rename from package/rcw/rcw.hash
rename to package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.hash
diff --git a/package/rcw/rcw.mk b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
similarity index 72%
rename from package/rcw/rcw.mk
rename to package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
index 36d2da61b5..a5f3854271 100644
--- a/package/rcw/rcw.mk
+++ b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
@@ -1,14 +1,14 @@
 ################################################################################
 #
-# rcw
+# fsl-qoriq-rcw
 #
 ################################################################################
 
-RCW_VERSION = LSDK-18.12
-RCW_SITE = https://source.codeaurora.org/external/qoriq/qoriq-components/rcw
-RCW_SITE_METHOD = git
-RCW_LICENSE = BSD-3-Clause
-RCW_LICENSE_FILES = LICENSE
+FSL_QORIQ_RCW_VERSION = LSDK-18.12
+FSL_QORIQ_RCW_SITE = https://source.codeaurora.org/external/qoriq/qoriq-components/rcw
+FSL_QORIQ_RCW_SITE_METHOD = git
+FSL_QORIQ_RCW_LICENSE = BSD-3-Clause
+FSL_QORIQ_RCW_LICENSE_FILES = LICENSE
 
 RCW_FILES = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_CUSTOM_PATH))
 
@@ -23,28 +23,28 @@ $(error BR2_PACKAGE_HOST_RCW_CUSTOM_PATH must have exactly one .rcw file)
 endif
 endif
 
-define HOST_RCW_ADD_CUSTOM_RCW_FILES
+define HOST_FSL_QORIQ_RCW_ADD_CUSTOM_RCW_FILES
 	mkdir -p $(@D)/custom_board/rcw
 	cp -f $(filter-out %.rcw,$(RCW_FILES)) $(@D)/custom_board
 	cp -f $(filter %.rcw,$(RCW_FILES)) $(@D)/custom_board/rcw
 endef
 HOST_RCW_POST_PATCH_HOOKS += HOST_RCW_ADD_CUSTOM_RCW_FILES
 
-define HOST_RCW_BUILD_CMDS
+define HOST_FSL_QORIQ_RCW_BUILD_CMDS
 	python $(@D)/rcw.py -i $(@D)/custom_board/rcw/$(RCW_PROJECT) -I $(@D)/custom_board -o $(@D)/PBL.bin
 endef
 
-define HOST_RCW_INSTALL_DELIVERY_FILE
+define HOST_FSL_QORIQ_RCW_INSTALL_DELIVERY_FILE
 	$(INSTALL) -D -m 0644 $(@D)/PBL.bin $(BINARIES_DIR)/PBL.bin
 endef
 endif
 
 # Copy source files and script into $(HOST_DIR)/share/rcw/ so a developer
 # could use a post image or SDK to build/install PBL files.
-define HOST_RCW_INSTALL_CMDS
+define HOST_FSL_QORIQ_RCW_INSTALL_CMDS
 	mkdir -p  $(HOST_DIR)/share/rcw
 	cp -a $(@D)/* $(HOST_DIR)/share/rcw
-	$(HOST_RCW_INSTALL_DELIVERY_FILE)
+	$(HOST_FSL_QORIQ_RCW_INSTALL_DELIVERY_FILE)
 endef
 
 $(eval $(host-generic-package))
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 03/10] package/freescale-qoriq/fsl-qoriq-rcw: upgrade the rcw version to LSDK-19.09
  2019-11-21 10:23 [Buildroot] [PATCH v2 0/9] new board ls1028ardb introduced Changming Huang
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 01/10] package/freescale-qoriq: new package directory Changming Huang
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 02/10] package/freescale-qoriq/fsl-qoriq-rcw: move rcw into freescale-qoriq and rename it Changming Huang
@ 2019-11-21 10:23 ` Changming Huang
  2019-11-25 21:17   ` Thomas Petazzoni
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 04/10] package/freescale-qoriq/fsl-qoriq-rcw: add target rcw binary support Changming Huang
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 51+ messages in thread
From: Changming Huang @ 2019-11-21 10:23 UTC (permalink / raw)
  To: buildroot

From: Jerry Huang <jerry.huang@nxp.com>

Change the RCW version to LSDK-19.09.

Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
---
changes since v1:
1. add-back license hash
---
 package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.hash | 2 +-
 package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.hash b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.hash
index 7de1ec659a..413db80e6d 100644
--- a/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.hash
+++ b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256 1421ada9fec10b12ff21cd9ad82f0a835b191cb2dde80f03547764574b1346c3 rcw-LSDK-18.12.tar.gz
+sha256 4dca8adeda48836b86aa459cc526dfbb4e0873492682c3c3a828a28b82b7b100 fsl-qoriq-rcw-LSDK-19.09.tar.gz
 sha256 a531b3146425e592db17a51ff39c4801cb01fb4055ffdaada0572decc0655bcd LICENSE
diff --git a/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
index a5f3854271..a2c3f4f8a6 100644
--- a/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
+++ b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-FSL_QORIQ_RCW_VERSION = LSDK-18.12
+FSL_QORIQ_RCW_VERSION = LSDK-19.09
 FSL_QORIQ_RCW_SITE = https://source.codeaurora.org/external/qoriq/qoriq-components/rcw
 FSL_QORIQ_RCW_SITE_METHOD = git
 FSL_QORIQ_RCW_LICENSE = BSD-3-Clause
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 04/10] package/freescale-qoriq/fsl-qoriq-rcw: add target rcw binary support
  2019-11-21 10:23 [Buildroot] [PATCH v2 0/9] new board ls1028ardb introduced Changming Huang
                   ` (2 preceding siblings ...)
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 03/10] package/freescale-qoriq/fsl-qoriq-rcw: upgrade the rcw version to LSDK-19.09 Changming Huang
@ 2019-11-21 10:23 ` Changming Huang
  2019-11-25 21:23   ` Thomas Petazzoni
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 05/10] boot/arm-trusted-firmware: Add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE Changming Huang
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 51+ messages in thread
From: Changming Huang @ 2019-11-21 10:23 UTC (permalink / raw)
  To: buildroot

From: Jerry Huang <jerry.huang@nxp.com>

For NXP QorIQ (PowerPC and Layerscape) platform,
we need to specify the RCW file and build it to binary.

Introduce BR2_PACKAGE_HOST_RCW_ATF to use ATF for RCW.

Introduce BR2_PACKAGE_HOST_RCW_BIN to specify the RCW binary file.

Introduce BR2_PACKAGE_HOST_RCW_BOOT_MODE to define the boot mode.
Because the RCW binary can be stored in different media, for example:
SD card - RCW locate in SD card, boot the board from SD card
eMMC    - RCW locate in eMMC chip, boot the board from eMMC chip
flexSPI - RCW locate in flexSPI, boot the board from flexSPI Nor/Nand flash
QSPI    - RCW locate in QSPI flash, boot the board from QSPI flash

Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
---
changes since v1:
1. add option BR2_PACKAGE_HOST_RCW_ATF for ATF
---
 .../freescale-qoriq/fsl-qoriq-rcw/Config.in.host  | 15 +++++++++++++++
 .../fsl-qoriq-rcw/fsl-qoriq-rcw.mk                | 11 +++++++++++
 2 files changed, 26 insertions(+)

diff --git a/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host b/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host
index a9253958d9..f55f2a6f3a 100644
--- a/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host
+++ b/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host
@@ -25,4 +25,19 @@ config BR2_PACKAGE_HOST_RCW_CUSTOM_PATH
 	  included for use in the SDK or with post scripts but no
 	  RCW binary will not be generated.
 
+config BR2_PACKAGE_HOST_RCW_ATF
+	bool "atf for rcw"
+	help
+	  When ATF is used for RCW, enable this option.
+
+config BR2_PACKAGE_HOST_RCW_BIN
+	string "Custom RCW"
+	help
+	  This option is used to specify the RCW binary file for board.
+
+config BR2_PACKAGE_HOST_RCW_BOOT_MODE
+	string "Boot mode"
+	help
+	  Specify the boot mode, for example, sd, emmc, flexspi_nor.
+
 endif
diff --git a/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
index a2c3f4f8a6..15c4024eb8 100644
--- a/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
+++ b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
@@ -37,6 +37,17 @@ endef
 define HOST_FSL_QORIQ_RCW_INSTALL_DELIVERY_FILE
 	$(INSTALL) -D -m 0644 $(@D)/PBL.bin $(BINARIES_DIR)/PBL.bin
 endef
+else
+RCW_BIN = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
+RCW_PLATFORM = $(firstword $(subst /, ,$(RCW_BIN)))
+
+define HOST_FSL_QORIQ_RCW_BUILD_CMDS
+	cd $(@D)/$(RCW_PLATFORM) && $(MAKE)
+endef
+
+define HOST_FSL_QORIQ_RCW_INSTALL_DELIVERY_FILE
+	$(INSTALL) -D -m 0644 $(@D)/$(RCW_BIN) $(BINARIES_DIR)/
+endef
 endif
 
 # Copy source files and script into $(HOST_DIR)/share/rcw/ so a developer
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 05/10] boot/arm-trusted-firmware: Add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
  2019-11-21 10:23 [Buildroot] [PATCH v2 0/9] new board ls1028ardb introduced Changming Huang
                   ` (3 preceding siblings ...)
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 04/10] package/freescale-qoriq/fsl-qoriq-rcw: add target rcw binary support Changming Huang
@ 2019-11-21 10:23 ` Changming Huang
  2019-11-22  9:11   ` Sergey Matyukevich
  2019-11-25 21:59   ` [Buildroot] " Thomas Petazzoni
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 06/10] boot/arm-trusted-firmware: Add RCW support Changming Huang
                   ` (4 subsequent siblings)
  9 siblings, 2 replies; 51+ messages in thread
From: Changming Huang @ 2019-11-21 10:23 UTC (permalink / raw)
  To: buildroot

From: Jerry Huang <jerry.huang@nxp.com>

Add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE to define the U-Boot BIN.
The default setting is u-boot.bin, customer can change it to anything via defconfig.

Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
---
changes since v1:
1. add BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE for uboot binary file
2. default of new option is u-boot.bin.
3. use the new option for U-Boot BL33
---
 boot/arm-trusted-firmware/Config.in               | 12 ++++++++++++
 boot/arm-trusted-firmware/arm-trusted-firmware.mk |  3 ++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
index 78c03019d5..3e83590776 100644
--- a/boot/arm-trusted-firmware/Config.in
+++ b/boot/arm-trusted-firmware/Config.in
@@ -124,6 +124,18 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
 	  gets built before ATF, and that the appropriate BL33
 	  variable pointing to u-boot.bin is passed when building ATF.
 
+if BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
+
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
+	string "U-Boot BL33 Image for ATF"
+	default "u-boot.bin"
+	help
+	  The U-Boot BL33 image for ATF, u-boot.bin is the default setting,
+	  this setting can be changed to any U-Boot binary file that used,
+	  for example, u-boot-dtb.bin.
+
+endif
+
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES
 	string "Additional ATF build variables"
 	help
diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
index e528686aa1..2133d39e6d 100644
--- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
+++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
@@ -70,7 +70,8 @@ endif
 endif # BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
 
 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33),y)
-ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/u-boot.bin
+ARM_TRUSTED_FIRMWARE_UBOOT_BIN = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE))
+ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/$(ARM_TRUSTED_FIRMWARE_UBOOT_BIN)
 ARM_TRUSTED_FIRMWARE_DEPENDENCIES += uboot
 endif
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 06/10] boot/arm-trusted-firmware: Add RCW support
  2019-11-21 10:23 [Buildroot] [PATCH v2 0/9] new board ls1028ardb introduced Changming Huang
                   ` (4 preceding siblings ...)
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 05/10] boot/arm-trusted-firmware: Add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE Changming Huang
@ 2019-11-21 10:23 ` Changming Huang
  2019-11-22  9:19   ` Sergey Matyukevich
  2019-11-25 22:09   ` [Buildroot] " Thomas Petazzoni
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package Changming Huang
                   ` (3 subsequent siblings)
  9 siblings, 2 replies; 51+ messages in thread
From: Changming Huang @ 2019-11-21 10:23 UTC (permalink / raw)
  To: buildroot

NXP Layerscape platforms use RCW (Reset Configure Word) to
setup clocking and IO allocations and then launches the next stage of boot.
RCW needs ATF as well as uboot.
Option BR2_PACKAGE_HOST_RCW_ATF is used to determine if ATF is used for RCW.

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---
changes since v1:
1. Use option BR2_PACKAGE_HOST_RCW_ATF as the condition for RCW used by ATF.
---
 boot/arm-trusted-firmware/arm-trusted-firmware.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
index 2133d39e6d..2bca8109f1 100644
--- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
+++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
@@ -92,6 +92,15 @@ endif
 
 ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
 
+ifeq ($(BR2_PACKAGE_HOST_RCW_ATF),y)
+RCW_BOOT_MODE = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BOOT_MODE))
+RCW_PATH = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
+RCW_FILE = $(lastword $(subst /, ,$(RCW_PATH)))
+ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BOOT_MODE=$(RCW_BOOT_MODE) RCW=$(BINARIES_DIR)/$(RCW_FILE)
+ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += pbl
+ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-fsl-qoriq-rcw
+endif
+
 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)
 ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += fip
 ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-openssl
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-21 10:23 [Buildroot] [PATCH v2 0/9] new board ls1028ardb introduced Changming Huang
                   ` (5 preceding siblings ...)
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 06/10] boot/arm-trusted-firmware: Add RCW support Changming Huang
@ 2019-11-21 10:23 ` Changming Huang
  2019-11-21 10:42   ` Michael Walle
                     ` (2 more replies)
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 08/10] package/freescale-qoriq/fsl-qoriq-rcw:Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO Changming Huang
                   ` (2 subsequent siblings)
  9 siblings, 3 replies; 51+ messages in thread
From: Changming Huang @ 2019-11-21 10:23 UTC (permalink / raw)
  To: buildroot

From: Jerry Huang <jerry.huang@nxp.com>

This package provides the firmware for LS1028ARDB DP (display port).

Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
---
changes since v1:
1. rename the package to fsl-qoriq-cadence-dp-fw
2. update DEVELOPERS
3. add the hash of package
4. modify the context fo config file to package name
5. re-write the makefile according to rule of buildroot
6. add the license message in makefile
---
 DEVELOPERS                                    |  3 +++
 package/freescale-qoriq/Config.in             |  2 ++
 .../fsl-qoriq-cadence-dp-fw/Config.in         |  5 ++++
 .../fsl-qoriq-cadence-dp-fw.hash              |  2 ++
 .../fsl-qoriq-cadence-dp-fw.mk                | 24 +++++++++++++++++++
 5 files changed, 36 insertions(+)
 create mode 100644 package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
 create mode 100644 package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.hash
 create mode 100644 package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 9fbe229eb7..b15115f507 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2545,3 +2545,6 @@ F:	package/qjson/
 F:	package/quazip/
 F:	package/shapelib/
 F:	package/tinc/
+
+N:	Changming Huang <jerry.huang@nxp.com>
+F:	package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/
diff --git a/package/freescale-qoriq/Config.in b/package/freescale-qoriq/Config.in
index 51497c588e..89f575a344 100644
--- a/package/freescale-qoriq/Config.in
+++ b/package/freescale-qoriq/Config.in
@@ -1,4 +1,6 @@
 menu "Freescale QorIQ libraries"
 	depends on BR2_aarch64 || BR2_arm || BR2_powerpc64 || BR2_powerpc
 
+source "package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in"
+
 endmenu
diff --git a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
new file mode 100644
index 0000000000..9259776750
--- /dev/null
+++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW
+	bool "FSL QorIQ cadence DP firmware"
+	help
+	  FSL QorIQ cadence DP firmware, a resident EL3 firmware.
+	  link: http://www.nxp.com/lgfiles/sdk/lsdk1909/firmware-cadence-lsdk1909.bin
diff --git a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.hash b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.hash
new file mode 100644
index 0000000000..bee912bee1
--- /dev/null
+++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 5871c5717be32f14a59624d5699d405e8ce9ae2e9c9ef86fd16e13d264a40e58  firmware-cadence-lsdk1909.bin
diff --git a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.mk b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.mk
new file mode 100644
index 0000000000..d0d112e25f
--- /dev/null
+++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.mk
@@ -0,0 +1,24 @@
+################################################################################
+#
+# fsl-qoriq-cadence-dp-fw
+#
+################################################################################
+
+FSL_QORIQ_CADENCE_DP_FW_VERSION = lsdk1909
+FSL_QORIQ_CADENCE_DP_FW_SITE = http://www.nxp.com/lgfiles/sdk/lsdk1909
+FSL_QORIQ_CADENCE_DP_FW_SOURCE = firmware-cadence-$(FSL_QORIQ_CADENCE_DP_FW_VERSION).bin
+FSL_QORIQ_CADENCE_DP_FW_LICENSE = NXP-Binary-EULA
+FSL_QORIQ_CADENCE_DP_FW_LICENSE_FILES = COPYING
+FSL_QORIQ_CADENCE_DP_FW_INSTALL_IMAGES = YES
+FSL_QORIQ_CADENCE_DP_FW_INSTALL_TARGET = no
+
+define FSL_QORIQ_CADENCE_DP_FW_EXTRACT_CMDS
+	cd $(@D); \
+		sh $(FSL_QORIQ_CADENCE_DP_FW_DL_DIR)/$(FSL_QORIQ_CADENCE_DP_FW_SOURCE) --auto-accept;
+endef
+
+define FSL_QORIQ_CADENCE_DP_FW_INSTALL_IMAGES_CMDS
+	$(INSTALL) -D -m 0644 $(@D)/firmware-cadence-lsdk1909/dp/ls1028a-dp-fw.bin $(BINARIES_DIR)/ls1028a-dp-fw.bin
+endef
+
+$(eval $(generic-package))
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 08/10] package/freescale-qoriq/fsl-qoriq-rcw:Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO
  2019-11-21 10:23 [Buildroot] [PATCH v2 0/9] new board ls1028ardb introduced Changming Huang
                   ` (6 preceding siblings ...)
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package Changming Huang
@ 2019-11-21 10:23 ` Changming Huang
  2019-11-25 22:13   ` Thomas Petazzoni
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 09/10] board/freescale/common/ls: Add standard post image script for Layerscape processors Changming Huang
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 10/10] configs/freescale_ls1028ardb*: new board Changming Huang
  9 siblings, 1 reply; 51+ messages in thread
From: Changming Huang @ 2019-11-21 10:23 UTC (permalink / raw)
  To: buildroot

From: Jerry Huang <jerry.huang@nxp.com>

Because GPIO is used as interrupt for eNETC PHY and Micro-bus,
IIC5_PMUX and CLK_OUT_PMUX are enabled for GPIO.

Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
---
changes sinve v1:
1. change to unconditional for these two patches
---
 ...b-Enable-IIC5_PMUX-for-GPIO-function.patch | 42 +++++++++++++++++++
 ...nable-CLK_OUT_PMUX-for-GPIO-function.patch | 40 ++++++++++++++++++
 2 files changed, 82 insertions(+)
 create mode 100644 package/freescale-qoriq/fsl-qoriq-rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch
 create mode 100644 package/freescale-qoriq/fsl-qoriq-rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patch

diff --git a/package/freescale-qoriq/fsl-qoriq-rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch b/package/freescale-qoriq/fsl-qoriq-rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch
new file mode 100644
index 0000000000..21c6c84cbd
--- /dev/null
+++ b/package/freescale-qoriq/fsl-qoriq-rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch
@@ -0,0 +1,42 @@
+From 33b403cee1fa215927bc65dc14baf35a2fdbe7b3 Mon Sep 17 00:00:00 2001
+From: Jerry Huang <jerry.huang@nxp.com>
+Date: Thu, 19 Sep 2019 12:12:20 +0800
+Subject: [PATCH 1/2] ls1028ardb: Enable IIC5_PMUX for GPIO function
+
+Set IIC5_PMUX = 1 to enable GPIO function.
+
+Signed-off-by: Jianchao Wang <jianchao.wang@nxp.com>
+Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
+---
+ ls1028ardb/R_SQPP_0x85bb/rcw_1300_emmcboot.rcw | 2 +-
+ ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.rcw   | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ls1028ardb/R_SQPP_0x85bb/rcw_1300_emmcboot.rcw b/ls1028ardb/R_SQPP_0x85bb/rcw_1300_emmcboot.rcw
+index b46ea2e..5466a63 100644
+--- a/ls1028ardb/R_SQPP_0x85bb/rcw_1300_emmcboot.rcw
++++ b/ls1028ardb/R_SQPP_0x85bb/rcw_1300_emmcboot.rcw
+@@ -26,7 +26,7 @@ SYSCLK_FREQ=600
+ IIC2_PMUX=6
+ IIC3_PMUX=2
+ IIC4_PMUX=2
+-IIC5_PMUX=2
++IIC5_PMUX=1
+ IIC6_PMUX=2
+ CLK_OUT_PMUX=2
+ EC1_SAI4_5_PMUX=5
+diff --git a/ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.rcw b/ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.rcw
+index 04e2208..1908d8c 100644
+--- a/ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.rcw
++++ b/ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.rcw
+@@ -26,7 +26,7 @@ SYSCLK_FREQ=600
+ IIC2_PMUX=6
+ IIC3_PMUX=2
+ IIC4_PMUX=2
+-IIC5_PMUX=2
++IIC5_PMUX=1
+ IIC6_PMUX=3
+ CLK_OUT_PMUX=2
+ EC1_SAI4_5_PMUX=5
+--
+2.17.1
diff --git a/package/freescale-qoriq/fsl-qoriq-rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patch b/package/freescale-qoriq/fsl-qoriq-rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patch
new file mode 100644
index 0000000000..4f00541d69
--- /dev/null
+++ b/package/freescale-qoriq/fsl-qoriq-rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patch
@@ -0,0 +1,40 @@
+From 4a3c9ea5d0c7bf8eec8cb6276d6f4d940f3946db Mon Sep 17 00:00:00 2001
+From: Jerry Huang <jerry.huang@nxp.com>
+Date: Thu, 19 Sep 2019 12:13:48 +0800
+Subject: [PATCH 2/2] ls1028ardb/rcw: Enable CLK_OUT_PMUX for GPIO function
+
+Signed-off-by: Jianchao Wang <jianchao.wang@nxp.com>
+Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
+---
+ ls1028ardb/R_SQPP_0x85bb/rcw_1300_emmcboot.rcw | 2 +-
+ ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.rcw   | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ls1028ardb/R_SQPP_0x85bb/rcw_1300_emmcboot.rcw b/ls1028ardb/R_SQPP_0x85bb/rcw_1300_emmcboot.rcw
+index 5466a63..a5ed4d4 100644
+--- a/ls1028ardb/R_SQPP_0x85bb/rcw_1300_emmcboot.rcw
++++ b/ls1028ardb/R_SQPP_0x85bb/rcw_1300_emmcboot.rcw
+@@ -28,7 +28,7 @@ IIC3_PMUX=2
+ IIC4_PMUX=2
+ IIC5_PMUX=1
+ IIC6_PMUX=2
+-CLK_OUT_PMUX=2
++CLK_OUT_PMUX=1
+ EC1_SAI4_5_PMUX=5
+ EC1_SAI3_6_PMUX=5
+ USB3_CLK_FSEL=39
+diff --git a/ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.rcw b/ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.rcw
+index 1908d8c..c930b83 100644
+--- a/ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.rcw
++++ b/ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.rcw
+@@ -28,7 +28,7 @@ IIC3_PMUX=2
+ IIC4_PMUX=2
+ IIC5_PMUX=1
+ IIC6_PMUX=3
+-CLK_OUT_PMUX=2
++CLK_OUT_PMUX=1
+ EC1_SAI4_5_PMUX=5
+ EC1_SAI3_6_PMUX=5
+ USB3_CLK_FSEL=39
+--
+2.17.1
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 09/10] board/freescale/common/ls: Add standard post image script for Layerscape processors
  2019-11-21 10:23 [Buildroot] [PATCH v2 0/9] new board ls1028ardb introduced Changming Huang
                   ` (7 preceding siblings ...)
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 08/10] package/freescale-qoriq/fsl-qoriq-rcw:Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO Changming Huang
@ 2019-11-21 10:23 ` Changming Huang
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 10/10] configs/freescale_ls1028ardb*: new board Changming Huang
  9 siblings, 0 replies; 51+ messages in thread
From: Changming Huang @ 2019-11-21 10:23 UTC (permalink / raw)
  To: buildroot

Add the standard post image script for Layerscape processors (LS1028A
and other processors).

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---
changes since v1:
1. update DEVELOPERS
2. modify the condition for display firmware according 
---
 DEVELOPERS                                  |  1 +
 board/freescale/common/ls/busybox.config    |  9 ++
 board/freescale/common/ls/post-image-spi.sh | 64 ++++++++++++++
 board/freescale/common/ls/post-image.sh     | 92 +++++++++++++++++++++
 4 files changed, 166 insertions(+)
 create mode 100644 board/freescale/common/ls/busybox.config
 create mode 100755 board/freescale/common/ls/post-image-spi.sh
 create mode 100755 board/freescale/common/ls/post-image.sh

diff --git a/DEVELOPERS b/DEVELOPERS
index b15115f507..42411b51cf 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2548,3 +2548,4 @@ F:	package/tinc/
 
 N:	Changming Huang <jerry.huang@nxp.com>
 F:	package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/
+F:	board/freescale/common/ls/
diff --git a/board/freescale/common/ls/busybox.config b/board/freescale/common/ls/busybox.config
new file mode 100644
index 0000000000..7074c65aa6
--- /dev/null
+++ b/board/freescale/common/ls/busybox.config
@@ -0,0 +1,9 @@
+#
+# Additional Busybox Settings
+#
+CONFIG_TASKSET=y
+CONFIG_FEATURE_TASKSET_FANCY=y
+CONFIG_FEATURE_DF_FANCY=y
+CONFIG_FEATURE_SEAMLESS_GZ=y
+CONFIG_FEATURE_SEAMLESS_BZ2=y
+CONFIG_FEATURE_SEAMLESS_XZ=y
diff --git a/board/freescale/common/ls/post-image-spi.sh b/board/freescale/common/ls/post-image-spi.sh
new file mode 100755
index 0000000000..5e63b005ed
--- /dev/null
+++ b/board/freescale/common/ls/post-image-spi.sh
@@ -0,0 +1,64 @@
+#!/usr/bin/env bash
+# args from BR2_ROOTFS_POST_SCRIPT_ARGS
+# $2 linux building directory
+# $3 buildroot top directory
+# $4 u-boot building directory
+#
+plat_name()
+{
+	if grep -Eq "^BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM=\"ls1028ardb\"$" ${BR2_CONFIG}; then
+		echo "ls1028ardb"
+	fi
+}
+
+# genimage.qspi.cfg.template: Boot from 64MB QSPI flash
+# genimage.xspi.256MB.cfg.template: Boot from 256MB flexSPI_nor flash
+# genimage.xspi.64MB.cfg.template: Boot from 64MB flexSPI_nor flash
+# genimage.cfg.template: Boot from SD and eMMC
+#
+genimage_type()
+{
+        if grep -Eq "^BR2_PACKAGE_HOST_RCW_BOOT_MODE=\"qspi\"$" ${BR2_CONFIG}; then
+                echo "genimage.qspi.cfg.template"
+        elif grep -Eq "^BR2_PACKAGE_HOST_RCW_BOOT_MODE=\"flexspi_nor\"$" ${BR2_CONFIG}; then
+		echo "genimage.xspi.cfg.template"
+        elif grep -Eq "^BR2_PACKAGE_HOST_RCW_BOOT_MODE=\"emmc\"$" ${BR2_CONFIG}; then
+                echo "genimage.emmc.cfg.template"
+        elif grep -Eq "^BR2_PACKAGE_HOST_RCW_BOOT_MODE=\"sd\"$" ${BR2_CONFIG}; then
+                echo "genimage.sd.cfg.template"
+        fi
+}
+
+main()
+{
+	# build the itb image
+	cp board/freescale/$(plat_name)/kernel.its ${BINARIES_DIR}/kernel.its
+	cd ${BINARIES_DIR}/
+	/usr/bin/mkimage -f kernel.its kernel.itb
+	rm kernel.its
+
+	cd ${3}
+
+	# build the SDcard image
+	local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)"
+	local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+
+	sed -e "s/%FILES%/${FILES}/" \
+		board/freescale/$(plat_name)/$(genimage_type) > ${GENIMAGE_CFG}
+
+	rm -rf "${GENIMAGE_TMP}"
+
+	genimage \
+		--rootpath "${TARGET_DIR}" \
+		--tmppath "${GENIMAGE_TMP}" \
+		--inputpath "${BINARIES_DIR}" \
+		--outputpath "${BINARIES_DIR}" \
+		--config "${GENIMAGE_CFG}"
+
+	rm -f ${GENIMAGE_CFG}
+
+	exit $?
+}
+
+main $@
diff --git a/board/freescale/common/ls/post-image.sh b/board/freescale/common/ls/post-image.sh
new file mode 100755
index 0000000000..6bd69d47a7
--- /dev/null
+++ b/board/freescale/common/ls/post-image.sh
@@ -0,0 +1,92 @@
+#!/usr/bin/env bash
+# args from BR2_ROOTFS_POST_SCRIPT_ARGS
+# $2 linux building directory
+# $3 buildroot top directory
+# $4 u-boot building directory
+
+#
+# dtb_list extracts the list of DTB files from BR2_LINUX_KERNEL_INTREE_DTS_NAME
+# in ${BR_CONFIG}, then prints the corresponding list of file names for the
+# genimage configuration file
+#
+dtb_file()
+{
+        local DTB_LIST="$(sed -n 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([\/a-z0-9 \-]*\)"$/\1/p' ${BR2_CONFIG})"
+
+        for dt in $DTB_LIST; do
+                echo -n "\"`basename $dt`.dtb\", "
+        done
+}
+
+#
+# For Freescale/NXP Layerscape serial platforms (ARM v8), we use Image for SD/eMMC boot,
+# Image.gz for QSPI/XSPI boot. Then,prints the corresponding file name for the genimage
+# configuration file
+#
+linux_image()
+{
+	if grep -Eq "^BR2_LINUX_KERNEL_IMAGE_TARGET_NAME=\"Image\"$" ${BR2_CONFIG}; then
+		echo "\"Image\""
+	else
+		echo "\"Image.gz\""
+	fi
+}
+
+plat_name()
+{
+	if grep -Eq "^BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM=\"ls1028ardb\"$" ${BR2_CONFIG}; then
+		echo "ls1028ardb"
+	fi
+}
+
+#
+# genimage.qspi.cfg.template: Boot from 64MB QSPI flash
+# genimage.xspi.256MB.cfg.template: Boot from 256MB flexSPI_nor flash
+# genimage.xspi.64MB.cfg.template: Boot from 64MB flexSPI_nor flash
+# genimage.cfg.template: Boot from SD and eMMC
+#
+genimage_type()
+{
+        if grep -Eq "^BR2_PACKAGE_HOST_RCW_BOOT_MODE=\"qspi\"$" ${BR2_CONFIG}; then
+                echo "genimage.qspi.cfg.template"
+        elif grep -Eq "^BR2_PACKAGE_HOST_RCW_BOOT_MODE=\"flexspi_nor\"$" ${BR2_CONFIG}; then
+		echo "genimage.xspi.cfg.template"
+        elif grep -Eq "^BR2_PACKAGE_HOST_RCW_BOOT_MODE=\"emmc\"$" ${BR2_CONFIG}; then
+                echo "genimage.emmc.cfg.template"
+        elif grep -Eq "^BR2_PACKAGE_HOST_RCW_BOOT_MODE=\"sd\"$" ${BR2_CONFIG}; then
+                echo "genimage.sd.cfg.template"
+        fi
+}
+
+dp_fw()
+{
+	if grep -Eq "^BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW=y$" ${BR2_CONFIG}; then
+		echo "\"ls1028a-dp-fw.bin\", "
+
+	fi
+}
+
+main()
+{
+	local FILES="$(dtb_file) $(dp_fw) $(linux_image)"
+	local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)"
+	local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+	sed -e "s/%FILES%/${FILES}/" \
+		board/freescale/$(plat_name)/$(genimage_type) > ${GENIMAGE_CFG}
+
+	rm -rf "${GENIMAGE_TMP}"
+
+	genimage \
+		--rootpath "${TARGET_DIR}" \
+		--tmppath "${GENIMAGE_TMP}" \
+		--inputpath "${BINARIES_DIR}" \
+		--outputpath "${BINARIES_DIR}" \
+		--config "${GENIMAGE_CFG}"
+
+	rm -f ${GENIMAGE_CFG}
+
+	exit $?
+}
+
+main $@
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 10/10] configs/freescale_ls1028ardb*: new board
  2019-11-21 10:23 [Buildroot] [PATCH v2 0/9] new board ls1028ardb introduced Changming Huang
                   ` (8 preceding siblings ...)
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 09/10] board/freescale/common/ls: Add standard post image script for Layerscape processors Changming Huang
@ 2019-11-21 10:23 ` Changming Huang
  2019-11-25 22:17   ` Thomas Petazzoni
  9 siblings, 1 reply; 51+ messages in thread
From: Changming Huang @ 2019-11-21 10:23 UTC (permalink / raw)
  To: buildroot

This is to support Freescale/NXP LS1028ARDB in Buildroot.
The board is setup to track the Linux at 4.19 via NXP LSDK-19.09.

The target will build uboot and RCW binary with arm-trusted-firmware support.

board/freescale/ls1028ardb/: scripts related with ls1028ardb
freescale_ls1028ardb-emmc_defconfig: defconfig boot from emmc chip on board
freescale_ls1028ardb-sd_defconfig: defconfig boot from SD card
freescale_ls1028ardb-xspi_defconfig: defconfig boot from FlexSPI chip on board

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---
changes since v1:
1. add new option in configs/freescale_ls1028ardb-xxxx_defconfig
---
 .gitlab-ci.yml                                |   3 +
 DEVELOPERS                                    |   2 +
 .../ls1028ardb/genimage.emmc.cfg.template     |  52 +++++++
 .../ls1028ardb/genimage.sd.cfg.template       |  52 +++++++
 .../ls1028ardb/genimage.xspi.cfg.template     |  53 +++++++
 board/freescale/ls1028ardb/kernel.its         |  59 ++++++++
 .../ls1028ardb/ls1028-10-network.rules        |  16 +++
 board/freescale/ls1028ardb/post-cfg-udev.sh   |  10 ++
 board/freescale/ls1028ardb/readme.txt         |  61 ++++++++
 .../ls1028ardb/u-boot-environment-emmc.txt    |  22 +++
 .../ls1028ardb/u-boot-environment-sd.txt      |  21 +++
 .../ls1028ardb/u-boot-environment-xspi.txt    |  22 +++
 configs/freescale_ls1028ardb-emmc_defconfig   | 136 ++++++++++++++++++
 configs/freescale_ls1028ardb-sd_defconfig     | 135 +++++++++++++++++
 configs/freescale_ls1028ardb-xspi_defconfig   | 129 +++++++++++++++++
 15 files changed, 773 insertions(+)
 create mode 100644 board/freescale/ls1028ardb/genimage.emmc.cfg.template
 create mode 100644 board/freescale/ls1028ardb/genimage.sd.cfg.template
 create mode 100644 board/freescale/ls1028ardb/genimage.xspi.cfg.template
 create mode 100644 board/freescale/ls1028ardb/kernel.its
 create mode 100644 board/freescale/ls1028ardb/ls1028-10-network.rules
 create mode 100755 board/freescale/ls1028ardb/post-cfg-udev.sh
 create mode 100644 board/freescale/ls1028ardb/readme.txt
 create mode 100644 board/freescale/ls1028ardb/u-boot-environment-emmc.txt
 create mode 100644 board/freescale/ls1028ardb/u-boot-environment-sd.txt
 create mode 100644 board/freescale/ls1028ardb/u-boot-environment-xspi.txt
 create mode 100644 configs/freescale_ls1028ardb-emmc_defconfig
 create mode 100644 configs/freescale_ls1028ardb-sd_defconfig
 create mode 100644 configs/freescale_ls1028ardb-xspi_defconfig

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1d71257a20..b1ac4b9d28 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -183,6 +183,9 @@ freescale_imx8qxpmek_defconfig: { extends: .defconfig }
 freescale_p1025twr_defconfig: { extends: .defconfig }
 freescale_t1040d4rdb_defconfig: { extends: .defconfig }
 freescale_t2080_qds_rdb_defconfig: { extends: .defconfig }
+freescale_ls1028ardb-emmc_defconfig: { extends: .defconfig }
+freescale_ls1028ardb-sd_defconfig: { extends: .defconfig }
+freescale_ls1028ardb-xspi_defconfig: { extends: .defconfig }
 friendlyarm_nanopi_a64_defconfig: { extends: .defconfig }
 friendlyarm_nanopi_neo2_defconfig: { extends: .defconfig }
 friendlyarm_nanopi_neo_plus2_defconfig: { extends: .defconfig }
diff --git a/DEVELOPERS b/DEVELOPERS
index 42411b51cf..6ed1ee5379 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2549,3 +2549,5 @@ F:	package/tinc/
 N:	Changming Huang <jerry.huang@nxp.com>
 F:	package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/
 F:	board/freescale/common/ls/
+F:	board/freescale/ls1028ardb/
+F:	configs/freescale_ls1028ardb*
diff --git a/board/freescale/ls1028ardb/genimage.emmc.cfg.template b/board/freescale/ls1028ardb/genimage.emmc.cfg.template
new file mode 100644
index 0000000000..b5f00147f4
--- /dev/null
+++ b/board/freescale/ls1028ardb/genimage.emmc.cfg.template
@@ -0,0 +1,52 @@
+# Minimal eMMC boot image for the NXP boards Template
+#
+# We mimic the .sdcard NXP's image format:
+# * the SD card must have 4 kB free space at the beginning,
+# * U-Boot is dumped as is,
+# * a FAT partition at offset 64 MB is containing Image and DTB files
+# * a single root filesystem partition is required (ext2, ext3 or ext4)
+#
+
+image boot.vfat {
+  vfat {
+    files = {
+      %FILES%
+    }
+  }
+  size = 256M
+}
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition rcw {
+    in-partition-table = "no"
+    image = "bl2_emmc.pbl"
+    offset = 4096
+  }
+
+  partition u-boot {
+    in-partition-table = "no"
+    image = "fip.bin"
+    offset = 1M
+  }
+
+  partition u-boot-environment {
+    in-partition-table = "no"
+    image = "uboot-env.bin"
+    offset = 5M
+  }
+
+  partition boot {
+    partition-type = 0xC
+    bootable = "true"
+    image = "boot.vfat"
+    offset = 64M
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext2"
+  }
+}
diff --git a/board/freescale/ls1028ardb/genimage.sd.cfg.template b/board/freescale/ls1028ardb/genimage.sd.cfg.template
new file mode 100644
index 0000000000..97903fcd13
--- /dev/null
+++ b/board/freescale/ls1028ardb/genimage.sd.cfg.template
@@ -0,0 +1,52 @@
+# Minimal SD card image for the NXP boards Template
+#
+# We mimic the .sdcard NXP's image format:
+# * the SD card must have 4 kB free space at the beginning,
+# * U-Boot is dumped as is,
+# * a FAT partition at offset 64 MB is containing Image and DTB files
+# * a single root filesystem partition is required (ext2, ext3 or ext4)
+#
+
+image boot.vfat {
+  vfat {
+    files = {
+      %FILES%
+    }
+  }
+  size = 256M
+}
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition rcw {
+    in-partition-table = "no"
+    image = "bl2_sd.pbl"
+    offset = 4096
+  }
+
+  partition u-boot {
+    in-partition-table = "no"
+    image = "fip.bin"
+    offset = 1M
+  }
+
+  partition u-boot-environment {
+    in-partition-table = "no"
+    image = "uboot-env.bin"
+    offset = 5M
+  }
+
+  partition boot {
+    partition-type = 0xC
+    bootable = "true"
+    image = "boot.vfat"
+    offset = 64M
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext2"
+  }
+}
diff --git a/board/freescale/ls1028ardb/genimage.xspi.cfg.template b/board/freescale/ls1028ardb/genimage.xspi.cfg.template
new file mode 100644
index 0000000000..14d75a17f3
--- /dev/null
+++ b/board/freescale/ls1028ardb/genimage.xspi.cfg.template
@@ -0,0 +1,53 @@
+# Minimal QSPI image for the NXP boards Template
+#
+# We mimic the .sdcard NXP's image format:
+# * the SD card must have 4 kB free space at the beginning,
+# * U-Boot is dumped as is,
+# * a single root filesystem partition is required (ext2, ext3 or ext4)
+#
+flash xspi-256M-128K {
+        pebsize = 128K
+        numpebs = 2048
+        minimum-io-unit-size = 128k
+}
+
+image xspi.cpio.img {
+  flash {
+  }
+  flashtype = "xspi-256M-128K"
+
+  partition rcw {
+    in-partition-table = "no"
+    image = "bl2_flexspi_nor.pbl"
+    offset = 0
+    size = 1M
+  }
+
+  partition u-boot {
+    in-partition-table = "no"
+    image = "fip.bin"
+    offset = 1M
+    size = 4M
+  }
+
+  partition u-boot-environment {
+    in-partition-table = "no"
+    image = "uboot-env.bin"
+    offset = 5M
+    size = 1M
+  }
+
+  partition dp-firmware {
+    in-partition-table = "no"
+    image = "ls1028a-dp-fw.bin"
+    offset = 0x940000
+    size = 256K
+  }
+
+  partition boot {
+    in-partition-table = "no"
+    image = "kernel.itb"
+    offset = 16M
+    size = 48M
+  }
+}
diff --git a/board/freescale/ls1028ardb/kernel.its b/board/freescale/ls1028ardb/kernel.its
new file mode 100644
index 0000000000..08e9700f30
--- /dev/null
+++ b/board/freescale/ls1028ardb/kernel.its
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2019 NXP
+ *
+ * Changming Huang <jerry.huang@nxp.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+/dts-v1/;
+
+/ {
+	description = "Image file for the LS1028A Linux Kernel";
+	#address-cells = <1>;
+
+	images {
+		kernel at 1 {
+			description = "ARM64 Linux kernel";
+			data = /incbin/("./Image.gz");
+			type = "kernel";
+			arch = "arm64";
+			os = "linux";
+			compression = "gzip";
+			load = <0x80080000>;
+			entry = <0x80080000>;
+		};
+		fdt at 1 {
+			description = "Flattened Device Tree blob";
+			data = /incbin/("./fsl-ls1028a-rdb.dtb");
+			type = "flat_dt";
+			arch = "arm64";
+			compression = "none";
+			load = <0x90000000>;
+		};
+		ramdisk at 1 {
+			description = "LS1028 Ramdisk";
+                        data = /incbin/("./rootfs.cpio.gz");
+			type = "ramdisk";
+			arch = "arm64";
+			os = "linux";
+			compression = "gzip";
+		};
+	};
+
+	configurations {
+		default = "config at 1";
+		config at 1 {
+			description = "Boot Linux kernel";
+			kernel = "kernel at 1";
+			fdt = "fdt at 1";
+			ramdisk = "ramdisk at 1";
+		};
+		ls1028ardb {
+			description = "Boot Linux kernel";
+			kernel = "kernel at 1";
+			fdt = "fdt at 1";
+			ramdisk = "ramdisk at 1";
+		};
+	};
+};
diff --git a/board/freescale/ls1028ardb/ls1028-10-network.rules b/board/freescale/ls1028ardb/ls1028-10-network.rules
new file mode 100644
index 0000000000..19f41634bd
--- /dev/null
+++ b/board/freescale/ls1028ardb/ls1028-10-network.rules
@@ -0,0 +1,16 @@
+# ENETC rules
+ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.0", DRIVERS=="fsl_enetc", NAME:="eno0"
+ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.1", DRIVERS=="fsl_enetc", NAME:="eno1"
+ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.2", DRIVERS=="fsl_enetc", NAME:="eno2"
+ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.6", DRIVERS=="fsl_enetc", NAME:="eno3"
+ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:01.0", DRIVERS=="fsl_enetc_vf", NAME:="eno0vf0"
+ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:01.1", DRIVERS=="fsl_enetc_vf", NAME:="eno0vf1"
+ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:01.2", DRIVERS=="fsl_enetc_vf", NAME:="eno1vf0"
+ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:01.3", DRIVERS=="fsl_enetc_vf", NAME:="eno1vf1"
+# LS1028 switch rules
+ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p0", NAME="swp0"
+ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p1", NAME="swp1"
+ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p2", NAME="swp2"
+ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p3", NAME="swp3"
+ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p4", NAME="swp4"
+ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p5", NAME="swp5"
diff --git a/board/freescale/ls1028ardb/post-cfg-udev.sh b/board/freescale/ls1028ardb/post-cfg-udev.sh
new file mode 100755
index 0000000000..76a71b3916
--- /dev/null
+++ b/board/freescale/ls1028ardb/post-cfg-udev.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+main()
+{
+	cp board/freescale/ls1028ardb/ls1028-10-network.rules ${TARGET_DIR}/etc/udev/rules.d/10-network.rules
+
+	exit $?
+}
+
+main $@
diff --git a/board/freescale/ls1028ardb/readme.txt b/board/freescale/ls1028ardb/readme.txt
new file mode 100644
index 0000000000..713babd7c3
--- /dev/null
+++ b/board/freescale/ls1028ardb/readme.txt
@@ -0,0 +1,61 @@
+LS1028ARDB board is one platform based on LS1028A silicon for industry,
+which is supported in LSDK-19.09.
+
+One simple image file is created by buildroot, which includes RCW, uboot,
+Linux kernel, rootfs and other necessary binaries for this board.
+
+To program the image file created by buildroot into the flash.
+There are two way to do it:
+
+1. Program the image file on PC machine for SD card boot
+  $ sudo dd if=./output/images/sdcard.img of=/dev/sdx
+  # or in some other host machine:
+  $ sudo dd if=./output/images/sdcard.img of=/dev/mmcblkx
+
+  # find the right SD Card device name in your host machine and replace the
+  # ?sdx? or ?mmcblkx?.
+
+2. Program the image file on board for eMMC and XSPI boot
+Make sure your board has ipaddr, netmask, and serverip defined to reach your
+tftp server.
+
+  2.1 Program eMMC boot image file to eMMC chip
+    # Make sure output/images/sdcard.img is stored to tftp server
+    # Below command is one example
+    => tftpboot 0xa0000000 sdcard.img
+    => mmc dev 1
+    => mmc erase 0 0x200000
+    => mmc write 0xa0000000 0 0x200000
+
+    # The size "0x200000" will be changed when the image size is different.
+
+  2.2 Program XSPI boot image file to flash
+    # Make sure output/images/xspi.cpio.img is stored to tftp server
+    # Below command is one example
+    => tftpboot 0xa0000000 xspi.cpio.img
+    => sf probe
+    => sf erase 0 $filesize
+    => sf write 0xa0000000 0 $filesize
+
+3. Booting your new system
+Before booting the new system, we should make sure the switch setting is right.
+below switch setting is for each booting mode:
+    +-----------+---------------------+
+    |Boot mode  | Switch setting      |
+    +---------------------------------+
+    |SD boot    | SW2[1~4] = 0b?1000  |
+    +---------------------------------+
+    |eMMC boot  | SW2[1~4] = 0b?1001  |
+    +---------------------------------+
+    |XSPI boot  | SW2[1~4] = 0b?1111  |
+    +-----------+---------------------+
+
+or we use following command to reset the board in uboot prompt:
+  # boot from SD card
+  => qixis_reset sd
+
+  # boot from eMMC chip
+  => qixis_reset emmc
+
+  # boot from XSPI
+  => qixis_reset qspi
diff --git a/board/freescale/ls1028ardb/u-boot-environment-emmc.txt b/board/freescale/ls1028ardb/u-boot-environment-emmc.txt
new file mode 100644
index 0000000000..01a97aa89d
--- /dev/null
+++ b/board/freescale/ls1028ardb/u-boot-environment-emmc.txt
@@ -0,0 +1,22 @@
+baudrate=115200
+bootcmd=setenv bootargs root=/dev/mmcblk1p2 rootwait rw earlycon=uart8250,0x21c0500 console=ttyS0,115200 cma=256M video=1920x1080-32 at 60;mmc dev 1;mmcinfo;fatload mmc 1:1 ${dp_load} ${dp_file};hdp load ${dp_load} ${dp_offset};fatload mmc 1:1 ${loadaddr} ${bootfile};fatload mmc 1:1 ${fdtaddr} ${fdtfile};booti ${loadaddr} - ${fdtaddr}
+bootdelay=3
+bootfile=Image
+fdtfile=fsl-ls1028a-rdb.dtb
+eth2addr=00:1F:7B:63:35:E9
+ethact=FM1 at DTSEC3
+ethprime=FM1 at DTSEC3
+fdt_high=0xffffffffffffffff
+fdtcontroladdr=ffc01550
+fman_ucode=ffc12090
+hwconfig=fsl_ddr:bank_intlv=auto
+initrd_high=0xffffffffffffffff
+loadaddr=0xa0000000
+fdtaddr=0xb0000000
+dp_file=ls1028a-dp-fw.bin
+dp_load=0x90000000
+dp_offset=0x2000
+stderr=serial
+stdin=serial
+stdout=serial
+rollbackboot=setenv bootargs root=/dev/ram0 rootwait rw earlycon=uart8250,0x21c0500 console=ttyS0,115200;mmcinfo;fatload mmc 0:1 ${loadaddr} ${bootfile};bootm ${loadaddr}
diff --git a/board/freescale/ls1028ardb/u-boot-environment-sd.txt b/board/freescale/ls1028ardb/u-boot-environment-sd.txt
new file mode 100644
index 0000000000..820989280f
--- /dev/null
+++ b/board/freescale/ls1028ardb/u-boot-environment-sd.txt
@@ -0,0 +1,21 @@
+baudrate=115200
+bootcmd=setenv bootargs root=/dev/mmcblk0p2 rootwait rw earlycon=uart8250,0x21c0500 console=ttyS0,115200 cma=256M video=1920x1080-32 at 60;mmcinfo;fatload mmc 0:1 ${dp_load} ${dp_file}; hdp load ${dp_load} ${dp_offset};fatload mmc 0:1 ${loadaddr} ${bootfile};fatload mmc 0:1 ${fdtaddr} ${fdtfile};booti ${loadaddr} - ${fdtaddr}
+bootdelay=3
+bootfile=Image
+fdtfile=fsl-ls1028a-rdb.dtb
+eth2addr=00:1F:7B:63:35:E9
+ethact=FM1 at DTSEC3
+ethprime=FM1 at DTSEC3
+fdt_high=0xffffffffffffffff
+fdtcontroladdr=ffc01550
+fman_ucode=ffc12090
+hwconfig=fsl_ddr:bank_intlv=auto
+initrd_high=0xffffffffffffffff
+loadaddr=0xa0000000
+fdtaddr=0xb0000000
+dp_file=ls1028a-dp-fw.bin
+dp_load=0x90000000
+dp_offset=0x2000
+stderr=serial
+stdin=serial
+stdout=serial
diff --git a/board/freescale/ls1028ardb/u-boot-environment-xspi.txt b/board/freescale/ls1028ardb/u-boot-environment-xspi.txt
new file mode 100644
index 0000000000..5677cdddaa
--- /dev/null
+++ b/board/freescale/ls1028ardb/u-boot-environment-xspi.txt
@@ -0,0 +1,22 @@
+baudrate=115200
+bootcmd=setenv bootargs root=/dev/ram0 rw earlycon=uart8250,0x21c0500 console=ttyS0,115200 cma=256M video=1920x1080-32 at 60; sf probe 0:0; sf read $dp_load $dp_start $dp_size; hdp load $dp_load $dp_offset; sf read $kernel_load $kernel_start $kernel_size && bootm $kernel_load
+bootdelay=3
+eth2addr=00:1F:7B:63:35:E9
+ethact=FM1 at DTSEC3
+ethprime=FM1 at DTSEC3
+fdt_high=0xffffffffffffffff
+fdtcontroladdr=ffc01550
+fman_ucode=ffc12090
+hwconfig=fsl_ddr:bank_intlv=auto
+initrd_high=0xffffffffffffffff
+kernel_load=0xa0000000
+kernel_size=0x3000000
+kernel_start=0x1000000
+dp_load=0x90000000
+dp_start=0x940000
+dp_size=0x40000
+dp_offset=0x2000
+stderr=serial
+stdin=serial
+stdout=serial
+rollbackboot=setenv bootargs root=/dev/ram0 rootwait rw earlycon=uart8250,0x21c0500 console=ttyS0,115200;mmcinfo;fatload mmc 0:1 ${loadaddr} ${bootfile};bootm $loadaddr
diff --git a/configs/freescale_ls1028ardb-emmc_defconfig b/configs/freescale_ls1028ardb-emmc_defconfig
new file mode 100644
index 0000000000..c34db6cb0b
--- /dev/null
+++ b/configs/freescale_ls1028ardb-emmc_defconfig
@@ -0,0 +1,136 @@
+# Architecture
+BR2_aarch64=y
+BR2_cortex_a72=y
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_GZIP=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="500M"
+
+# Hostname and issue
+BR2_TARGET_GENERIC_HOSTNAME="LS1028ARDB"
+
+# Linux headers same as kernel
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
+
+# toolchain
+BR2_TOOLCHAIN_EXTERNAL=y
+
+# bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_FORMAT_DTB_BIN=y
+BR2_TARGET_UBOOT_BOARDNAME="ls1028ardb_tfa"
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="LSDK-19.09"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_BIN=n
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-dtb.bin"
+BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE=y
+BR2_TARGET_UBOOT_ENVIMAGE=y
+BR2_TARGET_UBOOT_ENVIMAGE_SOURCE="board/freescale/ls1028ardb/u-boot-environment-emmc.txt"
+BR2_TARGET_UBOOT_ENVIMAGE_SIZE="0x2000"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/qoriq/qoriq-components/linux"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="LSDK-19.09-V4.19"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/lsdk.config"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/fsl-ls1028a-rdb"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
+
+# Serial port config
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# required tools to create the microSD image
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/ls/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="$(LINUX_DIR) $(TOPDIR) $(UBOOT_DIR)"
+
+# busybox setting
+#BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/freescale/common/ls/busybox.config"
+BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
+
+# packages for rcw
+BR2_PACKAGE_HOST_RCW=y
+BR2_PACKAGE_HOST_RCW_ATF=y
+BR2_PACKAGE_HOST_RCW_BOOT_MODE="emmc"
+BR2_PACKAGE_HOST_RCW_BIN="ls1028ardb/R_SQPP_0x85bb/rcw_1300_emmcboot.bin"
+
+#Display port firmware
+BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW=y
+
+# basic packages and tools
+BR2_PACKAGE_MTD=y
+BR2_PACKAGE_MTD_MTD_DEBUG=y
+BR2_PACKAGE_SYSSTAT=y
+BR2_PACKAGE_E2FSPROGS=y
+BR2_PACKAGE_RT_TESTS=y
+BR2_PACKAGE_OPENSSH=y
+BR2_PACKAGE_OPENSSL=y
+BR2_PACKAGE_WGET=y
+
+# docker packages
+BR2_PACKAGE_DOCKER_CONTAINERD=y
+BR2_PACKAGE_DOCKER_ENGINE=y
+BR2_PACKAGE_DOCKER_ENGINE_DAEMON=y
+BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL=y
+BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS=y
+BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER=y
+BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS=y
+BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y
+BR2_PACKAGE_CGROUPFS_MOUNT=y
+BR2_PACKAGE_LIBCGROUP=y
+
+# ca-certs packages
+BR2_PACKAGE_CA_CERTIFICATES=y
+
+# dhcpd package
+BR2_PACKAGE_DHCPCD=y
+BR2_PACKAGE_DHCP=y
+BR2_PACKAGE_DHCP_CLIENT=y
+
+# resize2fs package
+BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
+
+# Text editors
+BR2_PACKAGE_NANO=y
+
+#eudev support
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/ls1028ardb/post-cfg-udev.sh"
+
+BR2_PACKAGE_ETHTOOL=y
+BR2_PACKAGE_COLLECTD_CURL=y
+BR2_PACKAGE_COLLECTD_CURL_JSON=y
+BR2_PACKAGE_COLLECTD_CURL_XML=y
+BR2_PACKAGE_LIBCURL=y
+BR2_PACKAGE_CURL=y
+BR2_PACKAGE_LIBCURL_VERBOSE=y
+BR2_PACKAGE_FLICKCURL=y
+BR2_PACKAGE_FLICKCURL_UTILS=y
+BR2_PACKAGE_BASH=y
+BR2_SYSTEM_BIN_SH_BASH=y
+BR2_SYSTEM_BIN_SH="bash"
+
+BR2_PACKAGE_HAVEGED=y
+
+# Arm-Trusted-Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE="u-boot-dtb.bin"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://source.codeaurora.org/external/qoriq/qoriq-components/atf"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="LSDK-19.09"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="ls1028ardb"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="fip.bin bl2_emmc.pbl"
diff --git a/configs/freescale_ls1028ardb-sd_defconfig b/configs/freescale_ls1028ardb-sd_defconfig
new file mode 100644
index 0000000000..39e125528f
--- /dev/null
+++ b/configs/freescale_ls1028ardb-sd_defconfig
@@ -0,0 +1,135 @@
+# Architecture
+BR2_aarch64=y
+BR2_cortex_a72=y
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_GZIP=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="500M"
+
+# Hostname and issue
+BR2_TARGET_GENERIC_HOSTNAME="LS1028ARDB"
+
+# Linux headers same as kernel
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
+
+# toolchain
+BR2_TOOLCHAIN_EXTERNAL=y
+
+# bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARDNAME="ls1028ardb_tfa"
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="LSDK-19.09"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_BIN=n
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-dtb.bin"
+BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE=y
+BR2_TARGET_UBOOT_ENVIMAGE=y
+BR2_TARGET_UBOOT_ENVIMAGE_SOURCE="board/freescale/ls1028ardb/u-boot-environment-sd.txt"
+BR2_TARGET_UBOOT_ENVIMAGE_SIZE="0x2000"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/qoriq/qoriq-components/linux"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="LSDK-19.09-V4.19"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/lsdk.config"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/fsl-ls1028a-rdb"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
+
+# Serial port config
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# required tools to create the microSD image
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/ls/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="$(LINUX_DIR) $(TOPDIR) $(UBOOT_DIR)"
+
+# busybox setting
+BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/freescale/common/ls/busybox.config"
+BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
+
+# packages for rcw
+BR2_PACKAGE_HOST_RCW=y
+BR2_PACKAGE_HOST_RCW_ATF=y
+BR2_PACKAGE_HOST_RCW_BOOT_MODE="sd"
+BR2_PACKAGE_HOST_RCW_BIN="ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.bin"
+
+#Display port firmware
+BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW=y
+
+# basic packages and tools
+BR2_PACKAGE_MTD=y
+BR2_PACKAGE_MTD_MTD_DEBUG=y
+BR2_PACKAGE_SYSSTAT=y
+BR2_PACKAGE_E2FSPROGS=y
+BR2_PACKAGE_RT_TESTS=y
+BR2_PACKAGE_OPENSSH=y
+BR2_PACKAGE_OPENSSL=y
+BR2_PACKAGE_WGET=y
+
+# docker packages
+BR2_PACKAGE_DOCKER_CONTAINERD=y
+BR2_PACKAGE_DOCKER_ENGINE=y
+#BR2_PACKAGE_DOCKER_ENGINE_DAEMON=y
+BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL=y
+BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS=y
+BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER=y
+BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS=y
+BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y
+BR2_PACKAGE_CGROUPFS_MOUNT=y
+BR2_PACKAGE_LIBCGROUP=y
+
+# ca-certs packages
+BR2_PACKAGE_CA_CERTIFICATES=y
+
+# dhcpd package
+BR2_PACKAGE_DHCPCD=y
+BR2_PACKAGE_DHCP=y
+BR2_PACKAGE_DHCP_CLIENT=y
+
+# resize2fs package
+BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
+
+# Text editors
+BR2_PACKAGE_NANO=y
+
+#eudev support
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/ls1028ardb/post-cfg-udev.sh"
+
+BR2_PACKAGE_ETHTOOL=y
+BR2_PACKAGE_COLLECTD_CURL=y
+BR2_PACKAGE_COLLECTD_CURL_JSON=y
+BR2_PACKAGE_COLLECTD_CURL_XML=y
+BR2_PACKAGE_LIBCURL=y
+BR2_PACKAGE_CURL=y
+BR2_PACKAGE_LIBCURL_VERBOSE=y
+BR2_PACKAGE_FLICKCURL=y
+BR2_PACKAGE_FLICKCURL_UTILS=y
+BR2_PACKAGE_BASH=y
+BR2_SYSTEM_BIN_SH_BASH=y
+BR2_SYSTEM_BIN_SH="bash"
+
+BR2_PACKAGE_HAVEGED=y
+
+# Arm-Trusted-Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE="u-boot-dtb.bin"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://source.codeaurora.org/external/qoriq/qoriq-components/atf"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="LSDK-19.09"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="ls1028ardb"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="fip.bin bl2_sd.pbl"
diff --git a/configs/freescale_ls1028ardb-xspi_defconfig b/configs/freescale_ls1028ardb-xspi_defconfig
new file mode 100644
index 0000000000..2c5b24edee
--- /dev/null
+++ b/configs/freescale_ls1028ardb-xspi_defconfig
@@ -0,0 +1,129 @@
+# Architecture
+BR2_aarch64=y
+BR2_cortex_a72=y
+
+# Filesystem
+BR2_TARGET_ROOTFS_CPIO=y
+BR2_TARGET_ROOTFS_CPIO_GZIP=y
+BR2_TARGET_ROOTFS_CPIO_UIMAGE=y
+
+# Hostname and issue
+BR2_TARGET_GENERIC_HOSTNAME="LS1028ARDB"
+
+# Linux headers same as kernel
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
+
+# toolchain
+BR2_TOOLCHAIN_EXTERNAL=y
+
+# bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARDNAME="ls1028ardb_tfa"
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="LSDK-19.09"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_BIN=n
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-dtb.bin"
+BR2_TARGET_UBOOT_ENVIMAGE=y
+BR2_TARGET_UBOOT_ENVIMAGE_SOURCE="board/freescale/ls1028ardb/u-boot-environment-xspi.txt"
+BR2_TARGET_UBOOT_ENVIMAGE_SIZE="0x2000"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/qoriq/qoriq-components/linux"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="LSDK-19.09-V4.19"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/lsdk.config"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/fsl-ls1028a-rdb"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image.gz"
+
+# Serial port config
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# required tools to create the microSD image
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/ls/post-image-spi.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="$(LINUX_DIR) $(TOPDIR) $(UBOOT_DIR)"
+
+# busybox setting
+BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/freescale/common/ls/busybox.config"
+BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
+
+# packages for rcw
+BR2_PACKAGE_HOST_RCW=y
+BR2_PACKAGE_HOST_RCW_ATF=y
+BR2_PACKAGE_HOST_RCW_BOOT_MODE="flexspi_nor"
+BR2_PACKAGE_HOST_RCW_BIN="ls1028ardb/R_SQPP_0x85bb/rcw_1500_gpu600.bin"
+
+#Display port firmware
+BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW=y
+
+# basic packages and tools
+BR2_PACKAGE_MTD=y
+BR2_PACKAGE_MTD_MTD_DEBUG=y
+BR2_PACKAGE_SYSSTAT=y
+BR2_PACKAGE_E2FSPROGS=y
+BR2_PACKAGE_RT_TESTS=y
+BR2_PACKAGE_OPENSSH=y
+BR2_PACKAGE_OPENSSL=y
+BR2_PACKAGE_WGET=y
+
+# ca-certs packages
+BR2_PACKAGE_CA_CERTIFICATES=y
+
+# curl package
+BR2_PACKAGE_CURL=y
+BR2_PACKAGE_LIBCURL=y
+
+# dhcpd package
+BR2_PACKAGE_DHCPCD=y
+BR2_PACKAGE_DHCP=y
+BR2_PACKAGE_DHCP_CLIENT=y
+
+# resize2fs package
+BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
+
+# Text editors
+BR2_PACKAGE_NANO=y
+
+#eudev support
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/ls1028ardb/post-cfg-udev.sh"
+
+# gzip,tar packages
+BR2_PACKAGE_GZIP=y
+BR2_PACKAGE_TAR=y
+
+# python package
+BR2_PACKAGE_PYTHON=y
+
+BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y
+BR2_PACKAGE_FILE=y
+
+BR2_PACKAGE_ETHTOOL=y
+BR2_PACKAGE_NET_TOOLS=y
+BR2_PACKAGE_BASH=y
+BR2_SYSTEM_BIN_SH_BASH=y
+BR2_SYSTEM_BIN_SH="bash"
+
+# haveged
+BR2_PACKAGE_HAVEGED=y
+
+# Arm-Trusted-Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE="u-boot-dtb.bin"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://source.codeaurora.org/external/qoriq/qoriq-components/atf"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="LSDK-19.09"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="ls1028ardb"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="fip.bin bl2_flexspi_nor.pbl"
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 02/10] package/freescale-qoriq/fsl-qoriq-rcw: move rcw into freescale-qoriq and rename it
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 02/10] package/freescale-qoriq/fsl-qoriq-rcw: move rcw into freescale-qoriq and rename it Changming Huang
@ 2019-11-21 10:34   ` Michael Walle
  2019-11-21 10:42     ` [Buildroot] [EXT] " Jerry Huang
  2019-11-25 21:15   ` [Buildroot] " Thomas Petazzoni
  1 sibling, 1 reply; 51+ messages in thread
From: Michael Walle @ 2019-11-21 10:34 UTC (permalink / raw)
  To: buildroot

Am 2019-11-21 11:23, schrieb Changming Huang:
> From: Jerry Huang <jerry.huang@nxp.com>
> 
> Move package/rcw into package/freescale-qoriq,
> and rename it to fsl-qoriq-rcw.
> 
> Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> ---
> changes since v1:
> 1. new patch
> 2. move rcw to sub-directory freescale-qoriq
> 3. rename to fsl-qoriq-rcw

shouldn't be the naming consistent with the sub-directory? I know there 
is already a freescale-imx and the packages are only named imx-*. On the 
other hand, the variable names will be longer. Mhh.

[snip]

-michael

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 02/10] package/freescale-qoriq/fsl-qoriq-rcw: move rcw into freescale-qoriq and rename it
  2019-11-21 10:34   ` Michael Walle
@ 2019-11-21 10:42     ` Jerry Huang
  0 siblings, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-21 10:42 UTC (permalink / raw)
  To: buildroot

Hi, Michael,

Best Regards
Jerry Huang

> -----Original Message-----
> From: Michael Walle <michael@walle.cc>
> Sent: Thursday, November 21, 2019 6:35 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; geomatsi at gmail.com;
> matthew.weber at collins.com; thomas.petazzoni at bootlin.com
> Subject: [EXT] Re: [PATCH v2 02/10] package/freescale-qoriq/fsl-qoriq-rcw: move
> rcw into freescale-qoriq and rename it
> 
> Caution: EXT Email
> 
> Am 2019-11-21 11:23, schrieb Changming Huang:
> > From: Jerry Huang <jerry.huang@nxp.com>
> >
> > Move package/rcw into package/freescale-qoriq, and rename it to
> > fsl-qoriq-rcw.
> >
> > Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> > ---
> > changes since v1:
> > 1. new patch
> > 2. move rcw to sub-directory freescale-qoriq 3. rename to
> > fsl-qoriq-rcw
> 
> shouldn't be the naming consistent with the sub-directory? I know there is
> already a freescale-imx and the packages are only named imx-*. On the other
> hand, the variable names will be longer. Mhh.
If keep the same with sub-directory, it is too long, so I use the short name "fsl" to replace "freescale".
Actually, the FSL is used widely before freescale is merge into NXP.

> [snip]
> 
> -michael

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package Changming Huang
@ 2019-11-21 10:42   ` Michael Walle
  2019-11-21 11:04     ` [Buildroot] [EXT] " Jerry Huang
  2019-11-22 10:41     ` Jerry Huang
  2019-11-21 10:51   ` [Buildroot] " Michael Walle
  2019-11-25 22:12   ` [Buildroot] " Thomas Petazzoni
  2 siblings, 2 replies; 51+ messages in thread
From: Michael Walle @ 2019-11-21 10:42 UTC (permalink / raw)
  To: buildroot

Am 2019-11-21 11:23, schrieb Changming Huang:
> From: Jerry Huang <jerry.huang@nxp.com>
> 
> This package provides the firmware for LS1028ARDB DP (display port).
> 
> Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> ---
> changes since v1:
> 1. rename the package to fsl-qoriq-cadence-dp-fw

All other firmware's in buildroot have a "-firmware" suffix.

> 2. update DEVELOPERS
> 3. add the hash of package
> 4. modify the context fo config file to package name
> 5. re-write the makefile according to rule of buildroot
> 6. add the license message in makefile
> ---
>  DEVELOPERS                                    |  3 +++
>  package/freescale-qoriq/Config.in             |  2 ++
>  .../fsl-qoriq-cadence-dp-fw/Config.in         |  5 ++++
>  .../fsl-qoriq-cadence-dp-fw.hash              |  2 ++
>  .../fsl-qoriq-cadence-dp-fw.mk                | 24 +++++++++++++++++++
>  5 files changed, 36 insertions(+)
>  create mode 100644 
> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
>  create mode 100644
> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.hash
>  create mode 100644
> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.mk
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 9fbe229eb7..b15115f507 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -2545,3 +2545,6 @@ F:	package/qjson/
>  F:	package/quazip/
>  F:	package/shapelib/
>  F:	package/tinc/
> +
> +N:	Changming Huang <jerry.huang@nxp.com>
> +F:	package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/
> diff --git a/package/freescale-qoriq/Config.in
> b/package/freescale-qoriq/Config.in
> index 51497c588e..89f575a344 100644
> --- a/package/freescale-qoriq/Config.in
> +++ b/package/freescale-qoriq/Config.in
> @@ -1,4 +1,6 @@
>  menu "Freescale QorIQ libraries"
>  	depends on BR2_aarch64 || BR2_arm || BR2_powerpc64 || BR2_powerpc
> 
> +source "package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in"
> +
>  endmenu
> diff --git a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> new file mode 100644
> index 0000000000..9259776750
> --- /dev/null
> +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> @@ -0,0 +1,5 @@
> +config BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW
> +	bool "FSL QorIQ cadence DP firmware"
> +	help
> +	  FSL QorIQ cadence DP firmware, a resident EL3 firmware.
> +	  link: 
> http://www.nxp.com/lgfiles/sdk/lsdk1909/firmware-cadence-lsdk1909.bin
> diff --git
> a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.hash
> b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.hash
> new file mode 100644
> index 0000000000..bee912bee1
> --- /dev/null
> +++
> b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.hash
> @@ -0,0 +1,2 @@
> +# Locally calculated
> +sha256
> 5871c5717be32f14a59624d5699d405e8ce9ae2e9c9ef86fd16e13d264a40e58
> firmware-cadence-lsdk1909.bin
> diff --git
> a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.mk
> b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.mk
> new file mode 100644
> index 0000000000..d0d112e25f
> --- /dev/null
> +++ 
> b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.mk
> @@ -0,0 +1,24 @@
> +################################################################################
> +#
> +# fsl-qoriq-cadence-dp-fw
> +#
> +################################################################################
> +
> +FSL_QORIQ_CADENCE_DP_FW_VERSION = lsdk1909
> +FSL_QORIQ_CADENCE_DP_FW_SITE = http://www.nxp.com/lgfiles/sdk/lsdk1909
> +FSL_QORIQ_CADENCE_DP_FW_SOURCE =
> firmware-cadence-$(FSL_QORIQ_CADENCE_DP_FW_VERSION).bin
> +FSL_QORIQ_CADENCE_DP_FW_LICENSE = NXP-Binary-EULA
> +FSL_QORIQ_CADENCE_DP_FW_LICENSE_FILES = COPYING
> +FSL_QORIQ_CADENCE_DP_FW_INSTALL_IMAGES = YES
> +FSL_QORIQ_CADENCE_DP_FW_INSTALL_TARGET = no
> +
> +define FSL_QORIQ_CADENCE_DP_FW_EXTRACT_CMDS
> +	cd $(@D); \
> +		sh
> $(FSL_QORIQ_CADENCE_DP_FW_DL_DIR)/$(FSL_QORIQ_CADENCE_DP_FW_SOURCE)
> --auto-accept;
> +endef
> +
> +define FSL_QORIQ_CADENCE_DP_FW_INSTALL_IMAGES_CMDS
> +	$(INSTALL) -D -m 0644
> $(@D)/firmware-cadence-lsdk1909/dp/ls1028a-dp-fw.bin
> $(BINARIES_DIR)/ls1028a-dp-fw.bin
> +endef

IMHO this should be also installed into the target filesystem. So the 
driver can
request the firmware binary. I know that this is not how NXP handles 
that at the
moment. But in the end, that should be the way to go, esp. since 
rockchip seems
to have the same/similar DP-PHY with a corresponding driver upstream and 
they are
already loading the firmware via request_firmware().

> +
> +$(eval $(generic-package))

-michael

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package Changming Huang
  2019-11-21 10:42   ` Michael Walle
@ 2019-11-21 10:51   ` Michael Walle
  2019-11-21 11:09     ` [Buildroot] [EXT] " Jerry Huang
  2019-11-22 10:40     ` Jerry Huang
  2019-11-25 22:12   ` [Buildroot] " Thomas Petazzoni
  2 siblings, 2 replies; 51+ messages in thread
From: Michael Walle @ 2019-11-21 10:51 UTC (permalink / raw)
  To: buildroot

Am 2019-11-21 11:23, schrieb Changming Huang:
> From: Jerry Huang <jerry.huang@nxp.com>
> 
> This package provides the firmware for LS1028ARDB DP (display port).
> 
> Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> ---
> changes since v1:
> 1. rename the package to fsl-qoriq-cadence-dp-fw
> 2. update DEVELOPERS
> 3. add the hash of package
> 4. modify the context fo config file to package name
> 5. re-write the makefile according to rule of buildroot
> 6. add the license message in makefile
> ---
>  DEVELOPERS                                    |  3 +++
>  package/freescale-qoriq/Config.in             |  2 ++
>  .../fsl-qoriq-cadence-dp-fw/Config.in         |  5 ++++
>  .../fsl-qoriq-cadence-dp-fw.hash              |  2 ++
>  .../fsl-qoriq-cadence-dp-fw.mk                | 24 +++++++++++++++++++
>  5 files changed, 36 insertions(+)
>  create mode 100644 
> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
>  create mode 100644
> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.hash
>  create mode 100644
> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.mk
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 9fbe229eb7..b15115f507 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -2545,3 +2545,6 @@ F:	package/qjson/
>  F:	package/quazip/
>  F:	package/shapelib/
>  F:	package/tinc/
> +
> +N:	Changming Huang <jerry.huang@nxp.com>
> +F:	package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/
> diff --git a/package/freescale-qoriq/Config.in
> b/package/freescale-qoriq/Config.in
> index 51497c588e..89f575a344 100644
> --- a/package/freescale-qoriq/Config.in
> +++ b/package/freescale-qoriq/Config.in
> @@ -1,4 +1,6 @@
>  menu "Freescale QorIQ libraries"
>  	depends on BR2_aarch64 || BR2_arm || BR2_powerpc64 || BR2_powerpc
> 
> +source "package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in"
> +
>  endmenu
> diff --git a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> new file mode 100644
> index 0000000000..9259776750
> --- /dev/null
> +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> @@ -0,0 +1,5 @@
> +config BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW
> +	bool "FSL QorIQ cadence DP firmware"
> +	help
> +	  FSL QorIQ cadence DP firmware, a resident EL3 firmware.
> +	  link: 
> http://www.nxp.com/lgfiles/sdk/lsdk1909/firmware-cadence-lsdk1909.bin
> diff --git
> a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.hash
> b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.hash
> new file mode 100644
> index 0000000000..bee912bee1
> --- /dev/null
> +++
> b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.hash
> @@ -0,0 +1,2 @@
> +# Locally calculated
> +sha256
> 5871c5717be32f14a59624d5699d405e8ce9ae2e9c9ef86fd16e13d264a40e58
> firmware-cadence-lsdk1909.bin
> diff --git
> a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.mk
> b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.mk
> new file mode 100644
> index 0000000000..d0d112e25f
> --- /dev/null
> +++ 
> b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.mk
> @@ -0,0 +1,24 @@
> +################################################################################
> +#
> +# fsl-qoriq-cadence-dp-fw
> +#
> +################################################################################
> +
> +FSL_QORIQ_CADENCE_DP_FW_VERSION = lsdk1909
> +FSL_QORIQ_CADENCE_DP_FW_SITE = http://www.nxp.com/lgfiles/sdk/lsdk1909
> +FSL_QORIQ_CADENCE_DP_FW_SOURCE =
> firmware-cadence-$(FSL_QORIQ_CADENCE_DP_FW_VERSION).bin
> +FSL_QORIQ_CADENCE_DP_FW_LICENSE = NXP-Binary-EULA
> +FSL_QORIQ_CADENCE_DP_FW_LICENSE_FILES = COPYING
> +FSL_QORIQ_CADENCE_DP_FW_INSTALL_IMAGES = YES
> +FSL_QORIQ_CADENCE_DP_FW_INSTALL_TARGET = no
> +
> +define FSL_QORIQ_CADENCE_DP_FW_EXTRACT_CMDS
> +	cd $(@D); \
> +		sh
> $(FSL_QORIQ_CADENCE_DP_FW_DL_DIR)/$(FSL_QORIQ_CADENCE_DP_FW_SOURCE)
> --auto-accept;
> +endef

There is already an FREESCALE_IMX_EXTRACT_HELPER macro. I guess that 
should be renamed and used here.

-michael

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-21 10:42   ` Michael Walle
@ 2019-11-21 11:04     ` Jerry Huang
  2019-11-22 10:41     ` Jerry Huang
  1 sibling, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-21 11:04 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Michael Walle <michael@walle.cc>
> Sent: Thursday, November 21, 2019 6:43 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; geomatsi at gmail.com;
> matthew.weber at collins.com; thomas.petazzoni at bootlin.com
> Subject: [EXT] Re: [PATCH v2 07/10]
> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
> 
> Caution: EXT Email
> 
> Am 2019-11-21 11:23, schrieb Changming Huang:
> > From: Jerry Huang <jerry.huang@nxp.com>
> >
> > This package provides the firmware for LS1028ARDB DP (display port).
> >
> > Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> > ---
> > changes since v1:
> > 1. rename the package to fsl-qoriq-cadence-dp-fw
> 
> All other firmware's in buildroot have a "-firmware" suffix.
Because the name is too long if I use the full name "freescale-qoriq-cadence-dp-firmware",
So I used short name "fsl" prefix to replace freescale and "fw" suffix to release firmware.
If necessary, I can use the full name, instead of short name.

> > 2. update DEVELOPERS
> > 3. add the hash of package
> > 4. modify the context fo config file to package name 5. re-write the
> > makefile according to rule of buildroot 6. add the license message in
> > makefile
> > ---
> >  DEVELOPERS                                    |  3 +++
> >  package/freescale-qoriq/Config.in             |  2 ++
> >  .../fsl-qoriq-cadence-dp-fw/Config.in         |  5 ++++
> >  .../fsl-qoriq-cadence-dp-fw.hash              |  2 ++
> >  .../fsl-qoriq-cadence-dp-fw.mk                | 24
> +++++++++++++++++++
> >  5 files changed, 36 insertions(+)
> >  create mode 100644
> > package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> >  create mode 100644
> > package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-f
> > w.hash
> >  create mode 100644
> > package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-f
> > w.mk
> >
> > diff --git a/DEVELOPERS b/DEVELOPERS
> > index 9fbe229eb7..b15115f507 100644
> > --- a/DEVELOPERS
> > +++ b/DEVELOPERS
> > @@ -2545,3 +2545,6 @@ F:      package/qjson/
> >  F:   package/quazip/
> >  F:   package/shapelib/
> >  F:   package/tinc/
> > +
> > +N:   Changming Huang <jerry.huang@nxp.com>
> > +F:   package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/
> > diff --git a/package/freescale-qoriq/Config.in
> > b/package/freescale-qoriq/Config.in
> > index 51497c588e..89f575a344 100644
> > --- a/package/freescale-qoriq/Config.in
> > +++ b/package/freescale-qoriq/Config.in
> > @@ -1,4 +1,6 @@
> >  menu "Freescale QorIQ libraries"
> >       depends on BR2_aarch64 || BR2_arm || BR2_powerpc64 ||
> > BR2_powerpc
> >
> > +source "package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in"
> > +
> >  endmenu
> > diff --git a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> > new file mode 100644
> > index 0000000000..9259776750
> > --- /dev/null
> > +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> > @@ -0,0 +1,5 @@
> > +config BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW
> > +     bool "FSL QorIQ cadence DP firmware"
> > +     help
> > +       FSL QorIQ cadence DP firmware, a resident EL3 firmware.
> > +       link:
> > https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.n
> >
> xp.com%2Flgfiles%2Fsdk%2Flsdk1909%2Ffirmware-cadence-lsdk1909.bin&amp;
> >
> data=02%7C01%7Cjerry.huang%40nxp.com%7Ca71c7361a8eb40680c9908d76e
> 6f8d1
> >
> e%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6370992977061416
> 81&amp;
> >
> sdata=cjWdcvyCKsIcw5qV5x%2BJEvVCiFuMeyBNprHm582rkws%3D&amp;reser
> ved=0
> > diff --git
> > a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.hash
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.hash
> > new file mode 100644
> > index 0000000000..bee912bee1
> > --- /dev/null
> > +++
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.hash
> > @@ -0,0 +1,2 @@
> > +# Locally calculated
> > +sha256
> > 5871c5717be32f14a59624d5699d405e8ce9ae2e9c9ef86fd16e13d264a40e58
> > firmware-cadence-lsdk1909.bin
> > diff --git
> > a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.mk
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.mk
> > new file mode 100644
> > index 0000000000..d0d112e25f
> > --- /dev/null
> > +++
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.mk
> > @@ -0,0 +1,24 @@
> >
> +###############################################################
> ######
> > +###########
> > +#
> > +# fsl-qoriq-cadence-dp-fw
> > +#
> >
> +###############################################################
> ######
> > +###########
> > +
> > +FSL_QORIQ_CADENCE_DP_FW_VERSION = lsdk1909
> > +FSL_QORIQ_CADENCE_DP_FW_SITE =
> > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
> >
> +nxp.com%2Flgfiles%2Fsdk%2Flsdk1909&amp;data=02%7C01%7Cjerry.huang%
> 40n
> >
> +xp.com%7Ca71c7361a8eb40680c9908d76e6f8d1e%7C686ea1d3bc2b4c6fa92c
> d99c5
> >
> +c301635%7C0%7C0%7C637099297706141681&amp;sdata=N1ZBA4m%2F%2F
> CF7WjNa5j
> > +XkfrnIastkxjHwoSO8G9%2BZcnk%3D&amp;reserved=0
> > +FSL_QORIQ_CADENCE_DP_FW_SOURCE =
> > firmware-cadence-$(FSL_QORIQ_CADENCE_DP_FW_VERSION).bin
> > +FSL_QORIQ_CADENCE_DP_FW_LICENSE = NXP-Binary-EULA
> > +FSL_QORIQ_CADENCE_DP_FW_LICENSE_FILES = COPYING
> > +FSL_QORIQ_CADENCE_DP_FW_INSTALL_IMAGES = YES
> > +FSL_QORIQ_CADENCE_DP_FW_INSTALL_TARGET = no
> > +
> > +define FSL_QORIQ_CADENCE_DP_FW_EXTRACT_CMDS
> > +     cd $(@D); \
> > +             sh
> >
> $(FSL_QORIQ_CADENCE_DP_FW_DL_DIR)/$(FSL_QORIQ_CADENCE_DP_FW_SO
> URCE)
> > --auto-accept;
> > +endef
> > +
> > +define FSL_QORIQ_CADENCE_DP_FW_INSTALL_IMAGES_CMDS
> > +     $(INSTALL) -D -m 0644
> > $(@D)/firmware-cadence-lsdk1909/dp/ls1028a-dp-fw.bin
> > $(BINARIES_DIR)/ls1028a-dp-fw.bin
> > +endef
> 
> IMHO this should be also installed into the target filesystem. So the driver can
> request the firmware binary. I know that this is not how NXP handles that at the
> moment. But in the end, that should be the way to go, esp. since rockchip seems
> to have the same/similar DP-PHY with a corresponding driver upstream and
> they are already loading the firmware via request_firmware().
Yes, this firmware can be into target filesystem, but the driver should be built as module.
If driver is built-in Linux kernel, we need to load this firmware before starting kernel.
Now ls1028ardb uses the build-in mode for DP driver, so I can't put it into target filesystem,
And load it in uboot prompt before starting kernel.

> > +
> > +$(eval $(generic-package))
> 
> -michael

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-21 10:51   ` [Buildroot] " Michael Walle
@ 2019-11-21 11:09     ` Jerry Huang
  2019-11-22 10:40     ` Jerry Huang
  1 sibling, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-21 11:09 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Michael Walle <michael@walle.cc>
> Sent: Thursday, November 21, 2019 6:52 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; geomatsi at gmail.com;
> matthew.weber at collins.com; thomas.petazzoni at bootlin.com
> Subject: [EXT] Re: [PATCH v2 07/10]
> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
> 
> Caution: EXT Email
> 
> Am 2019-11-21 11:23, schrieb Changming Huang:
> > From: Jerry Huang <jerry.huang@nxp.com>
> >
> > This package provides the firmware for LS1028ARDB DP (display port).
> >
> > Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> > ---
> > changes since v1:
> > 1. rename the package to fsl-qoriq-cadence-dp-fw 2. update DEVELOPERS
> > 3. add the hash of package 4. modify the context fo config file to
> > package name 5. re-write the makefile according to rule of buildroot
> > 6. add the license message in makefile
> > ---
> >  DEVELOPERS                                    |  3 +++
> >  package/freescale-qoriq/Config.in             |  2 ++
> >  .../fsl-qoriq-cadence-dp-fw/Config.in         |  5 ++++
> >  .../fsl-qoriq-cadence-dp-fw.hash              |  2 ++
> >  .../fsl-qoriq-cadence-dp-fw.mk                | 24
> +++++++++++++++++++
> >  5 files changed, 36 insertions(+)
> >  create mode 100644
> > package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> >  create mode 100644
> > package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-f
> > w.hash
> >  create mode 100644
> > package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-f
> > w.mk
> >
> > diff --git a/DEVELOPERS b/DEVELOPERS
> > index 9fbe229eb7..b15115f507 100644
> > --- a/DEVELOPERS
> > +++ b/DEVELOPERS
> > @@ -2545,3 +2545,6 @@ F:      package/qjson/
> >  F:   package/quazip/
> >  F:   package/shapelib/
> >  F:   package/tinc/
> > +
> > +N:   Changming Huang <jerry.huang@nxp.com>
> > +F:   package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/
> > diff --git a/package/freescale-qoriq/Config.in
> > b/package/freescale-qoriq/Config.in
> > index 51497c588e..89f575a344 100644
> > --- a/package/freescale-qoriq/Config.in
> > +++ b/package/freescale-qoriq/Config.in
> > @@ -1,4 +1,6 @@
> >  menu "Freescale QorIQ libraries"
> >       depends on BR2_aarch64 || BR2_arm || BR2_powerpc64 ||
> > BR2_powerpc
> >
> > +source "package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in"
> > +
> >  endmenu
> > diff --git a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> > new file mode 100644
> > index 0000000000..9259776750
> > --- /dev/null
> > +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> > @@ -0,0 +1,5 @@
> > +config BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW
> > +     bool "FSL QorIQ cadence DP firmware"
> > +     help
> > +       FSL QorIQ cadence DP firmware, a resident EL3 firmware.
> > +       link:
> > https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.n
> >
> xp.com%2Flgfiles%2Fsdk%2Flsdk1909%2Ffirmware-cadence-lsdk1909.bin&amp;
> >
> data=02%7C01%7Cjerry.huang%40nxp.com%7C8af29f72a8524b1f700608d76e7
> 0ce5
> >
> c%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6370993030840248
> 67&amp;
> >
> sdata=uSC8EhBphE5cLuUGjHWvGyRgNCs3kdPKUe3xBgAna3U%3D&amp;reserv
> ed=0
> > diff --git
> > a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.hash
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.hash
> > new file mode 100644
> > index 0000000000..bee912bee1
> > --- /dev/null
> > +++
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.hash
> > @@ -0,0 +1,2 @@
> > +# Locally calculated
> > +sha256
> > 5871c5717be32f14a59624d5699d405e8ce9ae2e9c9ef86fd16e13d264a40e58
> > firmware-cadence-lsdk1909.bin
> > diff --git
> > a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.mk
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.mk
> > new file mode 100644
> > index 0000000000..d0d112e25f
> > --- /dev/null
> > +++
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.mk
> > @@ -0,0 +1,24 @@
> >
> +###############################################################
> ######
> > +###########
> > +#
> > +# fsl-qoriq-cadence-dp-fw
> > +#
> >
> +###############################################################
> ######
> > +###########
> > +
> > +FSL_QORIQ_CADENCE_DP_FW_VERSION = lsdk1909
> > +FSL_QORIQ_CADENCE_DP_FW_SITE =
> > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
> >
> +nxp.com%2Flgfiles%2Fsdk%2Flsdk1909&amp;data=02%7C01%7Cjerry.huang%
> 40n
> >
> +xp.com%7C8af29f72a8524b1f700608d76e70ce5c%7C686ea1d3bc2b4c6fa92c
> d99c5
> >
> +c301635%7C0%7C0%7C637099303084024867&amp;sdata=efvW3VQKOjQPq5
> 5%2BMpeu
> > +uARsbNMl0NV99IwR1ylN9vs%3D&amp;reserved=0
> > +FSL_QORIQ_CADENCE_DP_FW_SOURCE =
> > firmware-cadence-$(FSL_QORIQ_CADENCE_DP_FW_VERSION).bin
> > +FSL_QORIQ_CADENCE_DP_FW_LICENSE = NXP-Binary-EULA
> > +FSL_QORIQ_CADENCE_DP_FW_LICENSE_FILES = COPYING
> > +FSL_QORIQ_CADENCE_DP_FW_INSTALL_IMAGES = YES
> > +FSL_QORIQ_CADENCE_DP_FW_INSTALL_TARGET = no
> > +
> > +define FSL_QORIQ_CADENCE_DP_FW_EXTRACT_CMDS
> > +     cd $(@D); \
> > +             sh
> >
> $(FSL_QORIQ_CADENCE_DP_FW_DL_DIR)/$(FSL_QORIQ_CADENCE_DP_FW_SO
> URCE)
> > --auto-accept;
> > +endef
> 
> There is already an FREESCALE_IMX_EXTRACT_HELPER macro. I guess that
> should be renamed and used here.
It is ok for me.

Hi, Thomas,
How do you think about it?

> -michael

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 05/10] boot/arm-trusted-firmware: Add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 05/10] boot/arm-trusted-firmware: Add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE Changming Huang
@ 2019-11-22  9:11   ` Sergey Matyukevich
  2019-11-22  9:24     ` [Buildroot] [EXT] " Jerry Huang
  2019-11-25 21:59   ` [Buildroot] " Thomas Petazzoni
  1 sibling, 1 reply; 51+ messages in thread
From: Sergey Matyukevich @ 2019-11-22  9:11 UTC (permalink / raw)
  To: buildroot

On Thu, Nov 21, 2019 at 06:23:19PM +0800, Changming Huang wrote:
> From: Jerry Huang <jerry.huang@nxp.com>
> 
> Add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE to define the U-Boot BIN.
> The default setting is u-boot.bin, customer can change it to anything via defconfig.
> 
> Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> ---
> changes since v1:
> 1. add BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE for uboot binary file
> 2. default of new option is u-boot.bin.
> 3. use the new option for U-Boot BL33
> ---
>  boot/arm-trusted-firmware/Config.in               | 12 ++++++++++++
>  boot/arm-trusted-firmware/arm-trusted-firmware.mk |  3 ++-
>  2 files changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
> index 78c03019d5..3e83590776 100644
> --- a/boot/arm-trusted-firmware/Config.in
> +++ b/boot/arm-trusted-firmware/Config.in
> @@ -124,6 +124,18 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
>  	  gets built before ATF, and that the appropriate BL33
>  	  variable pointing to u-boot.bin is passed when building ATF.
>  
> +if BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
> +
> +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
> +	string "U-Boot BL33 Image for ATF"
> +	default "u-boot.bin"
> +	help
> +	  The U-Boot BL33 image for ATF, u-boot.bin is the default setting,
> +	  this setting can be changed to any U-Boot binary file that used,
> +	  for example, u-boot-dtb.bin.
> +
> +endif
> +
>  config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES
>  	string "Additional ATF build variables"
>  	help
> diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> index e528686aa1..2133d39e6d 100644
> --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> @@ -70,7 +70,8 @@ endif
>  endif # BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
>  
>  ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33),y)
> -ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/u-boot.bin
> +ARM_TRUSTED_FIRMWARE_UBOOT_BIN = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE))
> +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/$(ARM_TRUSTED_FIRMWARE_UBOOT_BIN)
>  ARM_TRUSTED_FIRMWARE_DEPENDENCIES += uboot
>  endif

Hello Jerry,

Thanks for the update. This one looks good to me.

Reviewed-by: Sergey Matyukevich <geomatsi@mail.com>

Regards,
Sergey

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 06/10] boot/arm-trusted-firmware: Add RCW support
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 06/10] boot/arm-trusted-firmware: Add RCW support Changming Huang
@ 2019-11-22  9:19   ` Sergey Matyukevich
  2019-11-22  9:31     ` [Buildroot] [EXT] " Jerry Huang
  2019-11-25 22:09   ` [Buildroot] " Thomas Petazzoni
  1 sibling, 1 reply; 51+ messages in thread
From: Sergey Matyukevich @ 2019-11-22  9:19 UTC (permalink / raw)
  To: buildroot

> diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> index 2133d39e6d..2bca8109f1 100644
> --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> @@ -92,6 +92,15 @@ endif
>  
>  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
>  
> +ifeq ($(BR2_PACKAGE_HOST_RCW_ATF),y)
> +RCW_BOOT_MODE = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BOOT_MODE))
> +RCW_PATH = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
> +RCW_FILE = $(lastword $(subst /, ,$(RCW_PATH)))
> +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BOOT_MODE=$(RCW_BOOT_MODE) RCW=$(BINARIES_DIR)/$(RCW_FILE)
> +ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += pbl
> +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-fsl-qoriq-rcw
> +endif
> +
>  ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)
>  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += fip
>  ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-openssl

Hi Jerry, Thomas, and all

This approach looks reasonable to me: if we enable RCW_ATF in board config,
then arm-trusted-firmware build process is modified in accordance
with that choice.

However I am slightly worried about naming.  There was a discussion around the
first version of the patch set regarding too generic name for RCW package.
IIUC here we have the same issue here. Option BR2_PACKAGE_HOST_RCW_ATF
looks fairly generic, but it selects fsl-qoriq specific dependencies.

Thoughts ? Comments ?

Regards,
Sergey

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 05/10] boot/arm-trusted-firmware: Add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
  2019-11-22  9:11   ` Sergey Matyukevich
@ 2019-11-22  9:24     ` Jerry Huang
  0 siblings, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-22  9:24 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Sergey Matyukevich <geomatsi@gmail.com>
> Sent: Friday, November 22, 2019 5:11 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; matthew.weber at collins.com; michael at walle.cc;
> thomas.petazzoni at bootlin.com
> Subject: [EXT] Re: [PATCH v2 05/10] boot/arm-trusted-firmware: Add option
> BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
> 
> Caution: EXT Email
> 
> On Thu, Nov 21, 2019 at 06:23:19PM +0800, Changming Huang wrote:
> > From: Jerry Huang <jerry.huang@nxp.com>
> >
> > Add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
> to define the U-Boot BIN.
> > The default setting is u-boot.bin, customer can change it to anything via
> defconfig.
> >
> > Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> > ---
> > changes since v1:
> > 1. add BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE for
> uboot
> > binary file 2. default of new option is u-boot.bin.
> > 3. use the new option for U-Boot BL33
> > ---
> >  boot/arm-trusted-firmware/Config.in               | 12 ++++++++++++
> >  boot/arm-trusted-firmware/arm-trusted-firmware.mk |  3 ++-
> >  2 files changed, 14 insertions(+), 1 deletion(-)
> >
> > diff --git a/boot/arm-trusted-firmware/Config.in
> > b/boot/arm-trusted-firmware/Config.in
> > index 78c03019d5..3e83590776 100644
> > --- a/boot/arm-trusted-firmware/Config.in
> > +++ b/boot/arm-trusted-firmware/Config.in
> > @@ -124,6 +124,18 @@ config
> BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
> >         gets built before ATF, and that the appropriate BL33
> >         variable pointing to u-boot.bin is passed when building ATF.
> >
> > +if BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
> > +
> > +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
> > +     string "U-Boot BL33 Image for ATF"
> > +     default "u-boot.bin"
> > +     help
> > +       The U-Boot BL33 image for ATF, u-boot.bin is the default setting,
> > +       this setting can be changed to any U-Boot binary file that used,
> > +       for example, u-boot-dtb.bin.
> > +
> > +endif
> > +
> >  config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES
> >       string "Additional ATF build variables"
> >       help
> > diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > index e528686aa1..2133d39e6d 100644
> > --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > @@ -70,7 +70,8 @@ endif
> >  endif # BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
> >
> >  ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33),y)
> > -ARM_TRUSTED_FIRMWARE_MAKE_OPTS +=
> BL33=$(BINARIES_DIR)/u-boot.bin
> > +ARM_TRUSTED_FIRMWARE_UBOOT_BIN = $(call
> > +qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE))
> > +ARM_TRUSTED_FIRMWARE_MAKE_OPTS +=
> > +BL33=$(BINARIES_DIR)/$(ARM_TRUSTED_FIRMWARE_UBOOT_BIN)
> >  ARM_TRUSTED_FIRMWARE_DEPENDENCIES += uboot  endif
> 
> Hello Jerry,
> 
> Thanks for the update. This one looks good to me.
> 
> Reviewed-by: Sergey Matyukevich <geomatsi@mail.com>

Thanks a lot.

> Regards,
> Sergey

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 06/10] boot/arm-trusted-firmware: Add RCW support
  2019-11-22  9:19   ` Sergey Matyukevich
@ 2019-11-22  9:31     ` Jerry Huang
  0 siblings, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-22  9:31 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Sergey Matyukevich <geomatsi@gmail.com>
> Sent: Friday, November 22, 2019 5:20 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; matthew.weber at collins.com; michael at walle.cc;
> thomas.petazzoni at bootlin.com
> Subject: [EXT] Re: [PATCH v2 06/10] boot/arm-trusted-firmware: Add RCW
> support
> 
> Caution: EXT Email
> 
> > diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > index 2133d39e6d..2bca8109f1 100644
> > --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > @@ -92,6 +92,15 @@ endif
> >
> >  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
> >
> > +ifeq ($(BR2_PACKAGE_HOST_RCW_ATF),y)
> > +RCW_BOOT_MODE = $(call
> qstrip,$(BR2_PACKAGE_HOST_RCW_BOOT_MODE))
> > +RCW_PATH = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
> > +RCW_FILE = $(lastword $(subst /, ,$(RCW_PATH)))
> > +ARM_TRUSTED_FIRMWARE_MAKE_OPTS +=
> BOOT_MODE=$(RCW_BOOT_MODE)
> > +RCW=$(BINARIES_DIR)/$(RCW_FILE)
> ARM_TRUSTED_FIRMWARE_MAKE_TARGETS +=
> > +pbl ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-fsl-qoriq-rcw endif
> > +
> >  ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)
> >  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += fip
> > ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-openssl
> 
> Hi Jerry, Thomas, and all
> 
> This approach looks reasonable to me: if we enable RCW_ATF in board config,
> then arm-trusted-firmware build process is modified in accordance with that
> choice.
> 
> However I am slightly worried about naming.  There was a discussion around
> the first version of the patch set regarding too generic name for RCW package.
> IIUC here we have the same issue here. Option BR2_PACKAGE_HOST_RCW_ATF
> looks fairly generic, but it selects fsl-qoriq specific dependencies.
> 
> Thoughts ? Comments ?
Currently, just Freescale/NXP QorIQ platforms use RCW to configure the hardware.
Maybe, who can suggest one more reasonable name for that (BR2_PACKAGE_HOST_RCW_ATF) ?


> Regards,
> Sergey

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-21 10:51   ` [Buildroot] " Michael Walle
  2019-11-21 11:09     ` [Buildroot] [EXT] " Jerry Huang
@ 2019-11-22 10:40     ` Jerry Huang
  2019-11-22 11:00       ` Michael Walle
  2019-11-22 11:05       ` Thomas Petazzoni
  1 sibling, 2 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-22 10:40 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Michael Walle <michael@walle.cc>
> Sent: Thursday, November 21, 2019 6:52 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; geomatsi at gmail.com;
> matthew.weber at collins.com; thomas.petazzoni at bootlin.com
> Subject: [EXT] Re: [PATCH v2 07/10]
> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
> 
> Caution: EXT Email
> 
> Am 2019-11-21 11:23, schrieb Changming Huang:
> > From: Jerry Huang <jerry.huang@nxp.com>
> >
> > This package provides the firmware for LS1028ARDB DP (display port).
> >
> > Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> > ---
> > changes since v1:
> > 1. rename the package to fsl-qoriq-cadence-dp-fw 2. update DEVELOPERS
> > 3. add the hash of package 4. modify the context fo config file to
> > package name 5. re-write the makefile according to rule of buildroot
> > 6. add the license message in makefile
> > ---
> >  DEVELOPERS                                    |  3 +++
> >  package/freescale-qoriq/Config.in             |  2 ++
> >  .../fsl-qoriq-cadence-dp-fw/Config.in         |  5 ++++
> >  .../fsl-qoriq-cadence-dp-fw.hash              |  2 ++
> >  .../fsl-qoriq-cadence-dp-fw.mk                | 24
> +++++++++++++++++++
> >  5 files changed, 36 insertions(+)
> >  create mode 100644
> > package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> >  create mode 100644
> > package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-f
> > w.hash
> >  create mode 100644
> > package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-f
> > w.mk
> >
> > diff --git a/DEVELOPERS b/DEVELOPERS
> > index 9fbe229eb7..b15115f507 100644
> > --- a/DEVELOPERS
> > +++ b/DEVELOPERS
> > @@ -2545,3 +2545,6 @@ F:      package/qjson/
> >  F:   package/quazip/
> >  F:   package/shapelib/
> >  F:   package/tinc/
> > +
> > +N:   Changming Huang <jerry.huang@nxp.com>
> > +F:   package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/
> > diff --git a/package/freescale-qoriq/Config.in
> > b/package/freescale-qoriq/Config.in
> > index 51497c588e..89f575a344 100644
> > --- a/package/freescale-qoriq/Config.in
> > +++ b/package/freescale-qoriq/Config.in
> > @@ -1,4 +1,6 @@
> >  menu "Freescale QorIQ libraries"
> >       depends on BR2_aarch64 || BR2_arm || BR2_powerpc64 ||
> > BR2_powerpc
> >
> > +source "package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in"
> > +
> >  endmenu
> > diff --git a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> > new file mode 100644
> > index 0000000000..9259776750
> > --- /dev/null
> > +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> > @@ -0,0 +1,5 @@
> > +config BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW
> > +     bool "FSL QorIQ cadence DP firmware"
> > +     help
> > +       FSL QorIQ cadence DP firmware, a resident EL3 firmware.
> > +       link:
> > https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.n
> >
> xp.com%2Flgfiles%2Fsdk%2Flsdk1909%2Ffirmware-cadence-lsdk1909.bin&amp;
> >
> data=02%7C01%7Cjerry.huang%40nxp.com%7C8af29f72a8524b1f700608d76e7
> 0ce5
> >
> c%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6370993030840248
> 67&amp;
> >
> sdata=uSC8EhBphE5cLuUGjHWvGyRgNCs3kdPKUe3xBgAna3U%3D&amp;reserv
> ed=0
> > diff --git
> > a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.hash
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.hash
> > new file mode 100644
> > index 0000000000..bee912bee1
> > --- /dev/null
> > +++
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.hash
> > @@ -0,0 +1,2 @@
> > +# Locally calculated
> > +sha256
> > 5871c5717be32f14a59624d5699d405e8ce9ae2e9c9ef86fd16e13d264a40e58
> > firmware-cadence-lsdk1909.bin
> > diff --git
> > a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.mk
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.mk
> > new file mode 100644
> > index 0000000000..d0d112e25f
> > --- /dev/null
> > +++
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.mk
> > @@ -0,0 +1,24 @@
> >
> +###############################################################
> ######
> > +###########
> > +#
> > +# fsl-qoriq-cadence-dp-fw
> > +#
> >
> +###############################################################
> ######
> > +###########
> > +
> > +FSL_QORIQ_CADENCE_DP_FW_VERSION = lsdk1909
> > +FSL_QORIQ_CADENCE_DP_FW_SITE =
> > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
> >
> +nxp.com%2Flgfiles%2Fsdk%2Flsdk1909&amp;data=02%7C01%7Cjerry.huang%
> 40n
> >
> +xp.com%7C8af29f72a8524b1f700608d76e70ce5c%7C686ea1d3bc2b4c6fa92c
> d99c5
> >
> +c301635%7C0%7C0%7C637099303084024867&amp;sdata=efvW3VQKOjQPq5
> 5%2BMpeu
> > +uARsbNMl0NV99IwR1ylN9vs%3D&amp;reserved=0
> > +FSL_QORIQ_CADENCE_DP_FW_SOURCE =
> > firmware-cadence-$(FSL_QORIQ_CADENCE_DP_FW_VERSION).bin
> > +FSL_QORIQ_CADENCE_DP_FW_LICENSE = NXP-Binary-EULA
> > +FSL_QORIQ_CADENCE_DP_FW_LICENSE_FILES = COPYING
> > +FSL_QORIQ_CADENCE_DP_FW_INSTALL_IMAGES = YES
> > +FSL_QORIQ_CADENCE_DP_FW_INSTALL_TARGET = no
> > +
> > +define FSL_QORIQ_CADENCE_DP_FW_EXTRACT_CMDS
> > +     cd $(@D); \
> > +             sh
> >
> $(FSL_QORIQ_CADENCE_DP_FW_DL_DIR)/$(FSL_QORIQ_CADENCE_DP_FW_SO
> URCE)
> > --auto-accept;
> > +endef
> 
> There is already an FREESCALE_IMX_EXTRACT_HELPER macro. I guess that
> should be renamed and used here.

I changed this codes accordance with freescale-imx, create new option FREESCALE_QORIQ_EXTRACT_HELPER
Will post it to maillist marked "v3"

> -michael

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-21 10:42   ` Michael Walle
  2019-11-21 11:04     ` [Buildroot] [EXT] " Jerry Huang
@ 2019-11-22 10:41     ` Jerry Huang
  1 sibling, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-22 10:41 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Michael Walle <michael@walle.cc>
> Sent: Thursday, November 21, 2019 6:43 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; geomatsi at gmail.com;
> matthew.weber at collins.com; thomas.petazzoni at bootlin.com
> Subject: [EXT] Re: [PATCH v2 07/10]
> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
> 
> Caution: EXT Email
> 
> Am 2019-11-21 11:23, schrieb Changming Huang:
> > From: Jerry Huang <jerry.huang@nxp.com>
> >
> > This package provides the firmware for LS1028ARDB DP (display port).
> >
> > Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> > ---
> > changes since v1:
> > 1. rename the package to fsl-qoriq-cadence-dp-fw
> 
> All other firmware's in buildroot have a "-firmware" suffix.

Will use suffix "-firmware" in v3.

> > 2. update DEVELOPERS
> > 3. add the hash of package
> > 4. modify the context fo config file to package name 5. re-write the
> > makefile according to rule of buildroot 6. add the license message in
> > makefile
> > ---
> >  DEVELOPERS                                    |  3 +++
> >  package/freescale-qoriq/Config.in             |  2 ++
> >  .../fsl-qoriq-cadence-dp-fw/Config.in         |  5 ++++
> >  .../fsl-qoriq-cadence-dp-fw.hash              |  2 ++
> >  .../fsl-qoriq-cadence-dp-fw.mk                | 24
> +++++++++++++++++++
> >  5 files changed, 36 insertions(+)
> >  create mode 100644
> > package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> >  create mode 100644
> > package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-f
> > w.hash
> >  create mode 100644
> > package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-f
> > w.mk
> >
> > diff --git a/DEVELOPERS b/DEVELOPERS
> > index 9fbe229eb7..b15115f507 100644
> > --- a/DEVELOPERS
> > +++ b/DEVELOPERS
> > @@ -2545,3 +2545,6 @@ F:      package/qjson/
> >  F:   package/quazip/
> >  F:   package/shapelib/
> >  F:   package/tinc/
> > +
> > +N:   Changming Huang <jerry.huang@nxp.com>
> > +F:   package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/
> > diff --git a/package/freescale-qoriq/Config.in
> > b/package/freescale-qoriq/Config.in
> > index 51497c588e..89f575a344 100644
> > --- a/package/freescale-qoriq/Config.in
> > +++ b/package/freescale-qoriq/Config.in
> > @@ -1,4 +1,6 @@
> >  menu "Freescale QorIQ libraries"
> >       depends on BR2_aarch64 || BR2_arm || BR2_powerpc64 ||
> > BR2_powerpc
> >
> > +source "package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in"
> > +
> >  endmenu
> > diff --git a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> > new file mode 100644
> > index 0000000000..9259776750
> > --- /dev/null
> > +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> > @@ -0,0 +1,5 @@
> > +config BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW
> > +     bool "FSL QorIQ cadence DP firmware"
> > +     help
> > +       FSL QorIQ cadence DP firmware, a resident EL3 firmware.
> > +       link:
> > https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.n
> >
> xp.com%2Flgfiles%2Fsdk%2Flsdk1909%2Ffirmware-cadence-lsdk1909.bin&amp;
> >
> data=02%7C01%7Cjerry.huang%40nxp.com%7Ca71c7361a8eb40680c9908d76e
> 6f8d1
> >
> e%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6370992977061416
> 81&amp;
> >
> sdata=cjWdcvyCKsIcw5qV5x%2BJEvVCiFuMeyBNprHm582rkws%3D&amp;reser
> ved=0
> > diff --git
> > a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.hash
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.hash
> > new file mode 100644
> > index 0000000000..bee912bee1
> > --- /dev/null
> > +++
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.hash
> > @@ -0,0 +1,2 @@
> > +# Locally calculated
> > +sha256
> > 5871c5717be32f14a59624d5699d405e8ce9ae2e9c9ef86fd16e13d264a40e58
> > firmware-cadence-lsdk1909.bin
> > diff --git
> > a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.mk
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.mk
> > new file mode 100644
> > index 0000000000..d0d112e25f
> > --- /dev/null
> > +++
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.mk
> > @@ -0,0 +1,24 @@
> >
> +###############################################################
> ######
> > +###########
> > +#
> > +# fsl-qoriq-cadence-dp-fw
> > +#
> >
> +###############################################################
> ######
> > +###########
> > +
> > +FSL_QORIQ_CADENCE_DP_FW_VERSION = lsdk1909
> > +FSL_QORIQ_CADENCE_DP_FW_SITE =
> > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
> >
> +nxp.com%2Flgfiles%2Fsdk%2Flsdk1909&amp;data=02%7C01%7Cjerry.huang%
> 40n
> >
> +xp.com%7Ca71c7361a8eb40680c9908d76e6f8d1e%7C686ea1d3bc2b4c6fa92c
> d99c5
> >
> +c301635%7C0%7C0%7C637099297706141681&amp;sdata=N1ZBA4m%2F%2F
> CF7WjNa5j
> > +XkfrnIastkxjHwoSO8G9%2BZcnk%3D&amp;reserved=0
> > +FSL_QORIQ_CADENCE_DP_FW_SOURCE =
> > firmware-cadence-$(FSL_QORIQ_CADENCE_DP_FW_VERSION).bin
> > +FSL_QORIQ_CADENCE_DP_FW_LICENSE = NXP-Binary-EULA
> > +FSL_QORIQ_CADENCE_DP_FW_LICENSE_FILES = COPYING
> > +FSL_QORIQ_CADENCE_DP_FW_INSTALL_IMAGES = YES
> > +FSL_QORIQ_CADENCE_DP_FW_INSTALL_TARGET = no
> > +
> > +define FSL_QORIQ_CADENCE_DP_FW_EXTRACT_CMDS
> > +     cd $(@D); \
> > +             sh
> >
> $(FSL_QORIQ_CADENCE_DP_FW_DL_DIR)/$(FSL_QORIQ_CADENCE_DP_FW_SO
> URCE)
> > --auto-accept;
> > +endef
> > +
> > +define FSL_QORIQ_CADENCE_DP_FW_INSTALL_IMAGES_CMDS
> > +     $(INSTALL) -D -m 0644
> > $(@D)/firmware-cadence-lsdk1909/dp/ls1028a-dp-fw.bin
> > $(BINARIES_DIR)/ls1028a-dp-fw.bin
> > +endef
> 
> IMHO this should be also installed into the target filesystem. So the driver can
> request the firmware binary. I know that this is not how NXP handles that at the
> moment. But in the end, that should be the way to go, esp. since rockchip seems
> to have the same/similar DP-PHY with a corresponding driver upstream and
> they are already loading the firmware via request_firmware().
> 
> > +
> > +$(eval $(generic-package))
> 
> -michael

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-22 10:40     ` Jerry Huang
@ 2019-11-22 11:00       ` Michael Walle
  2019-11-25  2:40         ` Jerry Huang
  2019-11-22 11:05       ` Thomas Petazzoni
  1 sibling, 1 reply; 51+ messages in thread
From: Michael Walle @ 2019-11-22 11:00 UTC (permalink / raw)
  To: buildroot

Hi,
>> > +define FSL_QORIQ_CADENCE_DP_FW_EXTRACT_CMDS
>> > +     cd $(@D); \
>> > +             sh
>> >
>> $(FSL_QORIQ_CADENCE_DP_FW_DL_DIR)/$(FSL_QORIQ_CADENCE_DP_FW_SO
>> URCE)
>> > --auto-accept;
>> > +endef
>> 
>> There is already an FREESCALE_IMX_EXTRACT_HELPER macro. I guess that
>> should be renamed and used here.
> 
> I changed this codes accordance with freescale-imx, create new option
> FREESCALE_QORIQ_EXTRACT_HELPER

why FREESCALE_QORIQ_EXTRACT_HELPER? are there two different ones now?
Shouldn't it be just FREESCALE_EXTRACT_HELPER? and the definition of the 
macro should be moved out of the freescale-imx.mk?

or of course, there might be another subdirectory structure like:
packages/freescale/imx
packages/freescale/qoriq
pacakges/freescale/helper.mk

Or..

packages/freescale/fsl-imx-<package>
packages/freescale/fsl-qoriq-<package>
pacakges/freescale/helper.mk

And the macro might end up in the pacakges/freescale/helper.mk file.

TBH. I guess there have to be a cleanup before adding the qoriq stuff. 
Thomas? Matthew?

-michael

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-22 10:40     ` Jerry Huang
  2019-11-22 11:00       ` Michael Walle
@ 2019-11-22 11:05       ` Thomas Petazzoni
  2019-11-25  6:25         ` Jerry Huang
  1 sibling, 1 reply; 51+ messages in thread
From: Thomas Petazzoni @ 2019-11-22 11:05 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 22 Nov 2019 10:40:42 +0000
Jerry Huang <jerry.huang@nxp.com> wrote:

> > There is already an FREESCALE_IMX_EXTRACT_HELPER macro. I guess that
> > should be renamed and used here.  
> 
> I changed this codes accordance with freescale-imx, create new option FREESCALE_QORIQ_EXTRACT_HELPER
> Will post it to maillist marked "v3"

Could you wait a bit before sending v3, so that some time is given for
people to review the patch series? Maybe wait until Monday.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-22 11:00       ` Michael Walle
@ 2019-11-25  2:40         ` Jerry Huang
  0 siblings, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-25  2:40 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Michael Walle <michael@walle.cc>
> Sent: Friday, November 22, 2019 7:00 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; geomatsi at gmail.com;
> matthew.weber at collins.com; thomas.petazzoni at bootlin.com
> Subject: Re: [EXT] Re: [PATCH v2 07/10]
> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
> 
> Caution: EXT Email
> 
> Hi,
> >> > +define FSL_QORIQ_CADENCE_DP_FW_EXTRACT_CMDS
> >> > +     cd $(@D); \
> >> > +             sh
> >> >
> >>
> $(FSL_QORIQ_CADENCE_DP_FW_DL_DIR)/$(FSL_QORIQ_CADENCE_DP_FW_SO
> >> URCE)
> >> > --auto-accept;
> >> > +endef
> >>
> >> There is already an FREESCALE_IMX_EXTRACT_HELPER macro. I guess that
> >> should be renamed and used here.
> >
> > I changed this codes accordance with freescale-imx, create new option
> > FREESCALE_QORIQ_EXTRACT_HELPER
> 
> why FREESCALE_QORIQ_EXTRACT_HELPER? are there two different ones now?
> Shouldn't it be just FREESCALE_EXTRACT_HELPER? and the definition of the
> macro should be moved out of the freescale-imx.mk?
> 
> or of course, there might be another subdirectory structure like:
> packages/freescale/imx
> packages/freescale/qoriq
> pacakges/freescale/helper.mk
I think it makes sense to create another subdirectory like this.

> Or..
> 
> packages/freescale/fsl-imx-<package>
> packages/freescale/fsl-qoriq-<package>
> pacakges/freescale/helper.mk
> 
> And the macro might end up in the pacakges/freescale/helper.mk file.
> 
> TBH. I guess there have to be a cleanup before adding the qoriq stuff.
> Thomas? Matthew?
> 
> -michael

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-22 11:05       ` Thomas Petazzoni
@ 2019-11-25  6:25         ` Jerry Huang
  0 siblings, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-25  6:25 UTC (permalink / raw)
  To: buildroot

Hi, Thomas and all guys,

I got some feedback from internal company, because Freescale is merged into NXP, we need to use the company NXP, instead of Freescale.
So, need some modification for all patches of the board ls1028ardb:
board/nxp
configs/nxp_ls1028ardb*
package/nxp-qoriq/

any comment about that?

Best Regards
Jerry Huang

> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Friday, November 22, 2019 7:06 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: Michael Walle <michael@walle.cc>; buildroot at busybox.net;
> geomatsi at gmail.com; matthew.weber at collins.com
> Subject: Re: [EXT] Re: [PATCH v2 07/10]
> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
> 
> Caution: EXT Email
> 
> Hello,
> 
> On Fri, 22 Nov 2019 10:40:42 +0000
> Jerry Huang <jerry.huang@nxp.com> wrote:
> 
> > > There is already an FREESCALE_IMX_EXTRACT_HELPER macro. I guess that
> > > should be renamed and used here.
> >
> > I changed this codes accordance with freescale-imx, create new option
> > FREESCALE_QORIQ_EXTRACT_HELPER Will post it to maillist marked "v3"
> 
> Could you wait a bit before sending v3, so that some time is given for people to
> review the patch series? Maybe wait until Monday.
> 
> Thanks!
> 
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.c
> om&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7Ce3bcae6699d7446e1
> 20d08d76f3bf133%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637
> 100175553574097&amp;sdata=nymmd1QloyWLS8NkxwcTksguJfxjL7%2FafehtP
> tc%2B%2FFE%3D&amp;reserved=0

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 01/10] package/freescale-qoriq: new package directory
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 01/10] package/freescale-qoriq: new package directory Changming Huang
@ 2019-11-25 21:13   ` Thomas Petazzoni
  2019-11-26  2:49     ` [Buildroot] [EXT] " Jerry Huang
  0 siblings, 1 reply; 51+ messages in thread
From: Thomas Petazzoni @ 2019-11-25 21:13 UTC (permalink / raw)
  To: buildroot

On Thu, 21 Nov 2019 18:23:15 +0800
Changming Huang <jerry.huang@nxp.com> wrote:

> The freescale-qoriq directory is intended to contain all freescale
> QorIQ (including PowerPC and LayerScape serial) related packages,
> together with their download site and version info.
> 
> Signed-off-by: Changming Huang <jerry.huang@nxp.com>

So I think I read somewhere that you were suggested to use
package/nxp-qoriq/ instead of package/freescale-qoriq/. This change is
fine to me, so feel fee to do it in your v3.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 02/10] package/freescale-qoriq/fsl-qoriq-rcw: move rcw into freescale-qoriq and rename it
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 02/10] package/freescale-qoriq/fsl-qoriq-rcw: move rcw into freescale-qoriq and rename it Changming Huang
  2019-11-21 10:34   ` Michael Walle
@ 2019-11-25 21:15   ` Thomas Petazzoni
  2019-11-26  3:25     ` [Buildroot] [EXT] " Jerry Huang
  1 sibling, 1 reply; 51+ messages in thread
From: Thomas Petazzoni @ 2019-11-25 21:15 UTC (permalink / raw)
  To: buildroot

On Thu, 21 Nov 2019 18:23:16 +0800
Changming Huang <jerry.huang@nxp.com> wrote:

> From: Jerry Huang <jerry.huang@nxp.com>
> 
> Move package/rcw into package/freescale-qoriq,
> and rename it to fsl-qoriq-rcw.
> 
> Signed-off-by: Jerry Huang <jerry.huang@nxp.com>

Then, this package should be named nxp-qoriq-rcw, if you decide to name
the directory nxp-qoriq/.

> ---
> changes since v1:
> 1. new patch
> 2. move rcw to sub-directory freescale-qoriq
> 3. rename to fsl-qoriq-rcw
> ---
>  DEVELOPERS                                    |  2 +-
>  package/Config.in.host                        |  2 +-

You need Config.in.legacy handling due to the renaming of the option.

> diff --git a/DEVELOPERS b/DEVELOPERS
> index 19ea83df3b..9fbe229eb7 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1603,7 +1603,7 @@ F:	package/python-pyrex/
>  F:	package/python-tinyrpc/
>  F:	package/python-txdbus/
>  F:	package/raptor/
> -F:	package/rcw/
> +F:	package/freescale-qoriq/fsl-qoriq-rcw/

Please preserve alphabetic ordering.

>  F:	package/rng-tools/
>  F:	package/rsyslog/
>  F:	package/setools/
> diff --git a/package/Config.in.host b/package/Config.in.host
> index 758c268e00..e4840080ad 100644
> --- a/package/Config.in.host
> +++ b/package/Config.in.host
> @@ -62,7 +62,7 @@ menu "Host utilities"
>  	source "package/qemu/Config.in.host"
>  	source "package/raspberrypi-usbboot/Config.in.host"
>  	source "package/rauc/Config.in.host"
> -	source "package/rcw/Config.in.host"
> +	source "package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host"

Ditto: alphabetic ordering.

> -RCW_VERSION = LSDK-18.12
> -RCW_SITE = https://source.codeaurora.org/external/qoriq/qoriq-components/rcw
> -RCW_SITE_METHOD = git
> -RCW_LICENSE = BSD-3-Clause
> -RCW_LICENSE_FILES = LICENSE
> +FSL_QORIQ_RCW_VERSION = LSDK-18.12
> +FSL_QORIQ_RCW_SITE = https://source.codeaurora.org/external/qoriq/qoriq-components/rcw
> +FSL_QORIQ_RCW_SITE_METHOD = git
> +FSL_QORIQ_RCW_LICENSE = BSD-3-Clause
> +FSL_QORIQ_RCW_LICENSE_FILES = LICENSE
>  
>  RCW_FILES = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_CUSTOM_PATH))

How come the BR2_PACKAGE_HOST_RCW_CUSTOM_PATH option is not renamed ?

Also RCW_FILES should become NXP_QORIQ_RCW_FILES. All variables in the
.mk file should be renamed.

> -define HOST_RCW_ADD_CUSTOM_RCW_FILES
> +define HOST_FSL_QORIQ_RCW_ADD_CUSTOM_RCW_FILES
>  	mkdir -p $(@D)/custom_board/rcw
>  	cp -f $(filter-out %.rcw,$(RCW_FILES)) $(@D)/custom_board
>  	cp -f $(filter %.rcw,$(RCW_FILES)) $(@D)/custom_board/rcw
>  endef
>  HOST_RCW_POST_PATCH_HOOKS += HOST_RCW_ADD_CUSTOM_RCW_FILES

If you don't change the hook registration, the hook will never be
called. Please check globally in this patch.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 03/10] package/freescale-qoriq/fsl-qoriq-rcw: upgrade the rcw version to LSDK-19.09
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 03/10] package/freescale-qoriq/fsl-qoriq-rcw: upgrade the rcw version to LSDK-19.09 Changming Huang
@ 2019-11-25 21:17   ` Thomas Petazzoni
  2019-11-26  3:51     ` [Buildroot] [EXT] " Jerry Huang
  0 siblings, 1 reply; 51+ messages in thread
From: Thomas Petazzoni @ 2019-11-25 21:17 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 21 Nov 2019 18:23:17 +0800
Changming Huang <jerry.huang@nxp.com> wrote:

> From: Jerry Huang <jerry.huang@nxp.com>
> 
> Change the RCW version to LSDK-19.09.
> 
> Signed-off-by: Jerry Huang <jerry.huang@nxp.com>

The commit title should be:

	package/<packagename>: bump to version LSDK-19.03

> diff --git a/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.hash b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.hash
> index 7de1ec659a..413db80e6d 100644
> --- a/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.hash
> +++ b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.hash
> @@ -1,3 +1,3 @@
>  # Locally calculated
> -sha256 1421ada9fec10b12ff21cd9ad82f0a835b191cb2dde80f03547764574b1346c3 rcw-LSDK-18.12.tar.gz
> +sha256 4dca8adeda48836b86aa459cc526dfbb4e0873492682c3c3a828a28b82b7b100 fsl-qoriq-rcw-LSDK-19.09.tar.gz

The renaming of the tarball should have happened in patch 02/10, not
here: we should just see the change of the version number here.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 04/10] package/freescale-qoriq/fsl-qoriq-rcw: add target rcw binary support
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 04/10] package/freescale-qoriq/fsl-qoriq-rcw: add target rcw binary support Changming Huang
@ 2019-11-25 21:23   ` Thomas Petazzoni
  2019-11-26  4:33     ` [Buildroot] [EXT] " Jerry Huang
  0 siblings, 1 reply; 51+ messages in thread
From: Thomas Petazzoni @ 2019-11-25 21:23 UTC (permalink / raw)
  To: buildroot

Hello,

I'm sorry, but I don't really grasp what this patch is trying to do.

On Thu, 21 Nov 2019 18:23:18 +0800
Changming Huang <jerry.huang@nxp.com> wrote:

> From: Jerry Huang <jerry.huang@nxp.com>
> 
> For NXP QorIQ (PowerPC and Layerscape) platform,
> we need to specify the RCW file and build it to binary.
> 
> Introduce BR2_PACKAGE_HOST_RCW_ATF to use ATF for RCW.

What does this mean ?

> Introduce BR2_PACKAGE_HOST_RCW_BIN to specify the RCW binary file.

Hm, ok, but then it seems to be used to calculate from which directory
"make" is going to be invoked.

> Introduce BR2_PACKAGE_HOST_RCW_BOOT_MODE to define the boot mode.
> Because the RCW binary can be stored in different media, for example:
> SD card - RCW locate in SD card, boot the board from SD card
> eMMC    - RCW locate in eMMC chip, boot the board from eMMC chip
> flexSPI - RCW locate in flexSPI, boot the board from flexSPI Nor/Nand flash
> QSPI    - RCW locate in QSPI flash, boot the board from QSPI flash
> 
> Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> ---
> changes since v1:
> 1. add option BR2_PACKAGE_HOST_RCW_ATF for ATF
> ---
>  .../freescale-qoriq/fsl-qoriq-rcw/Config.in.host  | 15 +++++++++++++++
>  .../fsl-qoriq-rcw/fsl-qoriq-rcw.mk                | 11 +++++++++++
>  2 files changed, 26 insertions(+)
> 
> diff --git a/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host b/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host
> index a9253958d9..f55f2a6f3a 100644
> --- a/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host
> +++ b/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host
> @@ -25,4 +25,19 @@ config BR2_PACKAGE_HOST_RCW_CUSTOM_PATH
>  	  included for use in the SDK or with post scripts but no
>  	  RCW binary will not be generated.
>  
> +config BR2_PACKAGE_HOST_RCW_ATF
> +	bool "atf for rcw"
> +	help
> +	  When ATF is used for RCW, enable this option.

This option is not used in the code below.

> +
> +config BR2_PACKAGE_HOST_RCW_BIN

Should be named with a BR2_PACKAGE_HOST_FSL_QORIQ_RCW_ prefix.

> +	string "Custom RCW"
> +	help
> +	  This option is used to specify the RCW binary file for board.

More details are needed. What happens when this option is empty? Which
values are typically needed? Your code assumes there's one slash in the
value, this should be explained.

> +config BR2_PACKAGE_HOST_RCW_BOOT_MODE

This option is not used in the .mk file

> +	string "Boot mode"
> +	help
> +	  Specify the boot mode, for example, sd, emmc, flexspi_nor.
> +
>  endif
> diff --git a/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
> index a2c3f4f8a6..15c4024eb8 100644
> --- a/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
> +++ b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
> @@ -37,6 +37,17 @@ endef
>  define HOST_FSL_QORIQ_RCW_INSTALL_DELIVERY_FILE
>  	$(INSTALL) -D -m 0644 $(@D)/PBL.bin $(BINARIES_DIR)/PBL.bin
>  endef
> +else

Why is this part mutually exclusive with the
BR2_PACKAGE_HOST_RCW_CUSTOM_PATH option ? I'd like to understand what
they each try to do. If they are mutually exclusive, they should also
be mutually exclusive at the Config.in level. Could you please explain
the different use cases for rcw so that we can figure out the right way
to handle this ?

> +RCW_BIN = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
> +RCW_PLATFORM = $(firstword $(subst /, ,$(RCW_BIN)))

Variables must be prefixed by the package name, not just RCW_.

> +
> +define HOST_FSL_QORIQ_RCW_BUILD_CMDS
> +	cd $(@D)/$(RCW_PLATFORM) && $(MAKE)

Should be:

	$(MAKE) -C ...

> +endef
> +
> +define HOST_FSL_QORIQ_RCW_INSTALL_DELIVERY_FILE
> +	$(INSTALL) -D -m 0644 $(@D)/$(RCW_BIN) $(BINARIES_DIR)/

Complete destination path is needed, including the destination file
name.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 05/10] boot/arm-trusted-firmware: Add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 05/10] boot/arm-trusted-firmware: Add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE Changming Huang
  2019-11-22  9:11   ` Sergey Matyukevich
@ 2019-11-25 21:59   ` Thomas Petazzoni
  1 sibling, 0 replies; 51+ messages in thread
From: Thomas Petazzoni @ 2019-11-25 21:59 UTC (permalink / raw)
  To: buildroot

On Thu, 21 Nov 2019 18:23:19 +0800
Changming Huang <jerry.huang@nxp.com> wrote:

> From: Jerry Huang <jerry.huang@nxp.com>
> 
> Add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE to define the U-Boot BIN.
> The default setting is u-boot.bin, customer can change it to anything via defconfig.
> 
> Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> ---
> changes since v1:
> 1. add BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE for uboot binary file
> 2. default of new option is u-boot.bin.
> 3. use the new option for U-Boot BL33
> ---
>  boot/arm-trusted-firmware/Config.in               | 12 ++++++++++++
>  boot/arm-trusted-firmware/arm-trusted-firmware.mk |  3 ++-
>  2 files changed, 14 insertions(+), 1 deletion(-)

I have applied to next, after reworking the commit log and Config.in
help text.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 06/10] boot/arm-trusted-firmware: Add RCW support
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 06/10] boot/arm-trusted-firmware: Add RCW support Changming Huang
  2019-11-22  9:19   ` Sergey Matyukevich
@ 2019-11-25 22:09   ` Thomas Petazzoni
  2019-11-26  7:06     ` [Buildroot] [EXT] " Jerry Huang
  1 sibling, 1 reply; 51+ messages in thread
From: Thomas Petazzoni @ 2019-11-25 22:09 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 21 Nov 2019 18:23:20 +0800
Changming Huang <jerry.huang@nxp.com> wrote:

> diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> index 2133d39e6d..2bca8109f1 100644
> --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> @@ -92,6 +92,15 @@ endif
>  
>  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
>  
> +ifeq ($(BR2_PACKAGE_HOST_RCW_ATF),y)

This option should be introduced by this patch.

Overall, I'm not super happy with how arm-trusted-firmware works. In
some cases, it's a sub-option of arm-trusted-firmware that causes it to
use some additional package (for example OPTEE as BL32, U-Boot as
BL33), but sometimes it's the implicit fact of having another package
enabled (mv-ddr-marvell, vexpress-firmware), that causes
arm-trusted-firmware to use it. Not great.

So I'm not sure how to proceed with RCW.

> +RCW_BOOT_MODE = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BOOT_MODE))
> +RCW_PATH = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
> +RCW_FILE = $(lastword $(subst /, ,$(RCW_PATH)))

Those variables names should be prefixed with the package name, i.e ARM_TRUSTED_FIRMWARE.

> +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BOOT_MODE=$(RCW_BOOT_MODE) RCW=$(BINARIES_DIR)/$(RCW_FILE)

These BOOT_MODE and RCW options are not supported in ATF upstream,
apparently only in the NXP fork. I'm not sure we want explicit support
for vendor-specific things. Should we look at providing an
arm-trusted-firmware that can more easily be customized through options?

That's really an open discussion, I don't yet have a clear idea on how
to handle that.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package Changming Huang
  2019-11-21 10:42   ` Michael Walle
  2019-11-21 10:51   ` [Buildroot] " Michael Walle
@ 2019-11-25 22:12   ` Thomas Petazzoni
  2019-11-26  8:09     ` [Buildroot] [EXT] " Jerry Huang
  2 siblings, 1 reply; 51+ messages in thread
From: Thomas Petazzoni @ 2019-11-25 22:12 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 21 Nov 2019 18:23:21 +0800
Changming Huang <jerry.huang@nxp.com> wrote:

> From: Jerry Huang <jerry.huang@nxp.com>
> 
> This package provides the firmware for LS1028ARDB DP (display port).
> 
> Signed-off-by: Jerry Huang <jerry.huang@nxp.com>

Overall, looks pretty good. Rename to nxp-qoriq-... if you decide to
use the nxp branding.

> diff --git a/DEVELOPERS b/DEVELOPERS
> index 9fbe229eb7..b15115f507 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -2545,3 +2545,6 @@ F:	package/qjson/
>  F:	package/quazip/
>  F:	package/shapelib/
>  F:	package/tinc/
> +
> +N:	Changming Huang <jerry.huang@nxp.com>

Please sort your name at the right place in the DEVELOPERS file
(alphabetic ordering).

> diff --git a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> new file mode 100644
> index 0000000000..9259776750
> --- /dev/null
> +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> @@ -0,0 +1,5 @@
> +config BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW
> +	bool "FSL QorIQ cadence DP firmware"

Just:

	bool "fsl-qorirq-cadence-dp-fw

> +	help
> +	  FSL QorIQ cadence DP firmware, a resident EL3 firmware.
> +	  link: http://www.nxp.com/lgfiles/sdk/lsdk1909/firmware-cadence-lsdk1909.bin

One empty line between the description and the upstream URL, and no
"link: " before the link. Also, pointing to the binary file itself is
not useful, we need an actual web page. If none exist, just don't
provide an upstream URL.

> diff --git a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.hash b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.hash
> new file mode 100644
> index 0000000000..bee912bee1
> --- /dev/null
> +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.hash
> @@ -0,0 +1,2 @@
> +# Locally calculated
> +sha256 5871c5717be32f14a59624d5699d405e8ce9ae2e9c9ef86fd16e13d264a40e58  firmware-cadence-lsdk1909.bin

Hash of the license file is missing.

> diff --git a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.mk b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.mk
> new file mode 100644
> index 0000000000..d0d112e25f
> --- /dev/null
> +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp-fw.mk
> @@ -0,0 +1,24 @@
> +################################################################################
> +#
> +# fsl-qoriq-cadence-dp-fw
> +#
> +################################################################################
> +
> +FSL_QORIQ_CADENCE_DP_FW_VERSION = lsdk1909
> +FSL_QORIQ_CADENCE_DP_FW_SITE = http://www.nxp.com/lgfiles/sdk/lsdk1909
> +FSL_QORIQ_CADENCE_DP_FW_SOURCE = firmware-cadence-$(FSL_QORIQ_CADENCE_DP_FW_VERSION).bin
> +FSL_QORIQ_CADENCE_DP_FW_LICENSE = NXP-Binary-EULA
> +FSL_QORIQ_CADENCE_DP_FW_LICENSE_FILES = COPYING
> +FSL_QORIQ_CADENCE_DP_FW_INSTALL_IMAGES = YES
> +FSL_QORIQ_CADENCE_DP_FW_INSTALL_TARGET = no

Should be "NO" (upper_case)

> +
> +define FSL_QORIQ_CADENCE_DP_FW_EXTRACT_CMDS
> +	cd $(@D); \
> +		sh $(FSL_QORIQ_CADENCE_DP_FW_DL_DIR)/$(FSL_QORIQ_CADENCE_DP_FW_SOURCE) --auto-accept;

Final semi-colon not needed.

> +endef
> +
> +define FSL_QORIQ_CADENCE_DP_FW_INSTALL_IMAGES_CMDS
> +	$(INSTALL) -D -m 0644 $(@D)/firmware-cadence-lsdk1909/dp/ls1028a-dp-fw.bin $(BINARIES_DIR)/ls1028a-dp-fw.bin
> +endef
> +
> +$(eval $(generic-package))

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 08/10] package/freescale-qoriq/fsl-qoriq-rcw:Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 08/10] package/freescale-qoriq/fsl-qoriq-rcw:Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO Changming Huang
@ 2019-11-25 22:13   ` Thomas Petazzoni
  2019-11-26  8:15     ` [Buildroot] [EXT] " Jerry Huang
  0 siblings, 1 reply; 51+ messages in thread
From: Thomas Petazzoni @ 2019-11-25 22:13 UTC (permalink / raw)
  To: buildroot

On Thu, 21 Nov 2019 18:23:22 +0800
Changming Huang <jerry.huang@nxp.com> wrote:

> From: Jerry Huang <jerry.huang@nxp.com>
> 
> Because GPIO is used as interrupt for eNETC PHY and Micro-bus,
> IIC5_PMUX and CLK_OUT_PMUX are enabled for GPIO.
> 
> Signed-off-by: Jerry Huang <jerry.huang@nxp.com>

What is the upstream status of those patches? Will NXP merge them in
the rcw project, and will make them available as part of a future RCW
release ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [PATCH v2 10/10] configs/freescale_ls1028ardb*: new board
  2019-11-21 10:23 ` [Buildroot] [PATCH v2 10/10] configs/freescale_ls1028ardb*: new board Changming Huang
@ 2019-11-25 22:17   ` Thomas Petazzoni
  2019-11-26 12:02     ` [Buildroot] [EXT] " Jerry Huang
  0 siblings, 1 reply; 51+ messages in thread
From: Thomas Petazzoni @ 2019-11-25 22:17 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 21 Nov 2019 18:23:24 +0800
Changming Huang <jerry.huang@nxp.com> wrote:


> diff --git a/board/freescale/ls1028ardb/genimage.xspi.cfg.template b/board/freescale/ls1028ardb/genimage.xspi.cfg.template
> new file mode 100644
> index 0000000000..14d75a17f3
> --- /dev/null
> +++ b/board/freescale/ls1028ardb/genimage.xspi.cfg.template
> @@ -0,0 +1,53 @@
> +# Minimal QSPI image for the NXP boards Template
> +#
> +# We mimic the .sdcard NXP's image format:
> +# * the SD card must have 4 kB free space at the beginning,

SD card ? But this file is about creating an image for a QSPI flash.

> +# * U-Boot is dumped as is,
> +# * a single root filesystem partition is required (ext2, ext3 or ext4)

I don't see the root filesystem in this genimage configuration file

> diff --git a/configs/freescale_ls1028ardb-emmc_defconfig b/configs/freescale_ls1028ardb-emmc_defconfig

To be honest, I'm not sure we want 3 different configurations for this
board. Can we pick just one ?

> new file mode 100644
> index 0000000000..c34db6cb0b
> --- /dev/null
> +++ b/configs/freescale_ls1028ardb-emmc_defconfig
> @@ -0,0 +1,136 @@
> +# Architecture
> +BR2_aarch64=y
> +BR2_cortex_a72=y
> +
> +# Filesystem
> +BR2_TARGET_ROOTFS_EXT2=y
> +BR2_TARGET_ROOTFS_EXT2_4=y
> +BR2_TARGET_ROOTFS_EXT2_GZIP=y
> +BR2_TARGET_ROOTFS_EXT2_SIZE="500M"

Keep the default size and compression.

> +
> +# Hostname and issue
> +BR2_TARGET_GENERIC_HOSTNAME="LS1028ARDB"
> +
> +# Linux headers same as kernel
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
> +
> +# toolchain
> +BR2_TOOLCHAIN_EXTERNAL=y

Please stick to using the internal toolchain for defconfigs.

> +# bootloader
> +BR2_TARGET_UBOOT=y
> +BR2_TARGET_UBOOT_FORMAT_DTB_BIN=y
> +BR2_TARGET_UBOOT_BOARDNAME="ls1028ardb_tfa"
> +BR2_TARGET_UBOOT_CUSTOM_GIT=y
> +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot"
> +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="LSDK-19.09"
> +BR2_TARGET_UBOOT_NEEDS_DTC=y
> +BR2_TARGET_UBOOT_FORMAT_BIN=n
> +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
> +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-dtb.bin"
> +BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE=y
> +BR2_TARGET_UBOOT_ENVIMAGE=y
> +BR2_TARGET_UBOOT_ENVIMAGE_SOURCE="board/freescale/ls1028ardb/u-boot-environment-emmc.txt"
> +BR2_TARGET_UBOOT_ENVIMAGE_SIZE="0x2000"
> +
> +# Kernel
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_GIT=y
> +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/qoriq/qoriq-components/linux"
> +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="LSDK-19.09-V4.19"
> +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
> +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/lsdk.config"
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/fsl-ls1028a-rdb"
> +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
> +BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
> +
> +# Serial port config
> +BR2_TARGET_GENERIC_GETTY=y
> +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
> +
> +# required tools to create the microSD image
> +BR2_PACKAGE_HOST_DOSFSTOOLS=y
> +BR2_PACKAGE_HOST_GENIMAGE=y
> +BR2_PACKAGE_HOST_MTOOLS=y
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/ls/post-image.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="$(LINUX_DIR) $(TOPDIR) $(UBOOT_DIR)"
> +
> +# busybox setting
> +#BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/freescale/common/ls/busybox.config"
> +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
> +
> +# packages for rcw
> +BR2_PACKAGE_HOST_RCW=y
> +BR2_PACKAGE_HOST_RCW_ATF=y
> +BR2_PACKAGE_HOST_RCW_BOOT_MODE="emmc"
> +BR2_PACKAGE_HOST_RCW_BIN="ls1028ardb/R_SQPP_0x85bb/rcw_1300_emmcboot.bin"
> +
> +#Display port firmware
> +BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW=y
> +
> +# basic packages and tools
> +BR2_PACKAGE_MTD=y
> +BR2_PACKAGE_MTD_MTD_DEBUG=y
> +BR2_PACKAGE_SYSSTAT=y
> +BR2_PACKAGE_E2FSPROGS=y
> +BR2_PACKAGE_RT_TESTS=y
> +BR2_PACKAGE_OPENSSH=y
> +BR2_PACKAGE_OPENSSL=y
> +BR2_PACKAGE_WGET=y
> +
> +# docker packages
> +BR2_PACKAGE_DOCKER_CONTAINERD=y
> +BR2_PACKAGE_DOCKER_ENGINE=y
> +BR2_PACKAGE_DOCKER_ENGINE_DAEMON=y
> +BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL=y
> +BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS=y
> +BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER=y
> +BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS=y
> +BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y
> +BR2_PACKAGE_CGROUPFS_MOUNT=y
> +BR2_PACKAGE_LIBCGROUP=y

Please remove all extra packages: keep only Busybox in the target
filesystem. We want minimal defconfigs, that only build the bootloader,
kernel and a minimal root filesystem.

Thanks!

Thmas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 01/10] package/freescale-qoriq: new package directory
  2019-11-25 21:13   ` Thomas Petazzoni
@ 2019-11-26  2:49     ` Jerry Huang
  0 siblings, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-26  2:49 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Tuesday, November 26, 2019 5:13 AM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; michael at walle.cc; matthew.weber at collins.com;
> geomatsi at gmail.com
> Subject: [EXT] Re: [Buildroot] [PATCH v2 01/10] package/freescale-qoriq: new
> package directory
> 
> Caution: EXT Email
> 
> On Thu, 21 Nov 2019 18:23:15 +0800
> Changming Huang <jerry.huang@nxp.com> wrote:
> 
> > The freescale-qoriq directory is intended to contain all freescale
> > QorIQ (including PowerPC and LayerScape serial) related packages,
> > together with their download site and version info.
> >
> > Signed-off-by: Changming Huang <jerry.huang@nxp.com>
> 
> So I think I read somewhere that you were suggested to use package/nxp-qoriq/
> instead of package/freescale-qoriq/. This change is fine to me, so feel fee to do it
> in your v3.
[Jerry Huang] 
Yes, I will do this change in v3.

> Thanks,
> 
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.c
> om&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7C74086714ba394cd6b
> 7cc08d771ec47f3%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637
> 103131944681003&amp;sdata=3eDGrwaYCX99dBtZHMcGpG8ONM5pc8iSafW
> RGHPO8DE%3D&amp;reserved=0

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 02/10] package/freescale-qoriq/fsl-qoriq-rcw: move rcw into freescale-qoriq and rename it
  2019-11-25 21:15   ` [Buildroot] " Thomas Petazzoni
@ 2019-11-26  3:25     ` Jerry Huang
  0 siblings, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-26  3:25 UTC (permalink / raw)
  To: buildroot

Thanks a lot for your comment, Thomas.

Best Regards
Jerry Huang

> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Tuesday, November 26, 2019 5:16 AM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; michael at walle.cc; matthew.weber at collins.com;
> geomatsi at gmail.com
> Subject: [EXT] Re: [Buildroot] [PATCH v2 02/10]
> package/freescale-qoriq/fsl-qoriq-rcw: move rcw into freescale-qoriq and
> rename it
> 
> Caution: EXT Email
> 
> On Thu, 21 Nov 2019 18:23:16 +0800
> Changming Huang <jerry.huang@nxp.com> wrote:
> 
> > From: Jerry Huang <jerry.huang@nxp.com>
> >
> > Move package/rcw into package/freescale-qoriq, and rename it to
> > fsl-qoriq-rcw.
> >
> > Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> 
> Then, this package should be named nxp-qoriq-rcw, if you decide to name the
> directory nxp-qoriq/.
I renamed this package to qoriq-rcw, is it ok?
Because there are similar naming in freescale-imx.

> > ---
> > changes since v1:
> > 1. new patch
> > 2. move rcw to sub-directory freescale-qoriq 3. rename to
> > fsl-qoriq-rcw
> > ---
> >  DEVELOPERS                                    |  2 +-
> >  package/Config.in.host                        |  2 +-
> 
> You need Config.in.legacy handling due to the renaming of the option.
Sure, I will do it.

> 
> > diff --git a/DEVELOPERS b/DEVELOPERS
> > index 19ea83df3b..9fbe229eb7 100644
> > --- a/DEVELOPERS
> > +++ b/DEVELOPERS
> > @@ -1603,7 +1603,7 @@ F:      package/python-pyrex/
> >  F:   package/python-tinyrpc/
> >  F:   package/python-txdbus/
> >  F:   package/raptor/
> > -F:   package/rcw/
> > +F:   package/freescale-qoriq/fsl-qoriq-rcw/
> 
> Please preserve alphabetic ordering.
Sure

> 
> >  F:   package/rng-tools/
> >  F:   package/rsyslog/
> >  F:   package/setools/
> > diff --git a/package/Config.in.host b/package/Config.in.host index
> > 758c268e00..e4840080ad 100644
> > --- a/package/Config.in.host
> > +++ b/package/Config.in.host
> > @@ -62,7 +62,7 @@ menu "Host utilities"
> >       source "package/qemu/Config.in.host"
> >       source "package/raspberrypi-usbboot/Config.in.host"
> >       source "package/rauc/Config.in.host"
> > -     source "package/rcw/Config.in.host"
> > +     source "package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host"
> 
> Ditto: alphabetic ordering.
sure

> 
> > -RCW_VERSION = LSDK-18.12
> > -RCW_SITE =
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsour
> >
> ce.codeaurora.org%2Fexternal%2Fqoriq%2Fqoriq-components%2Frcw&amp;da
> ta
> >
> =02%7C01%7Cjerry.huang%40nxp.com%7C440c1c4d06f845dca04908d771ec9b
> da%7C
> >
> 686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637103133347439348&a
> mp;sdat
> >
> a=stm4A4DGFRjWmRHcqo%2FLchoIgp4GjrpRk6JvryEf6zc%3D&amp;reserved=0
> > -RCW_SITE_METHOD = git
> > -RCW_LICENSE = BSD-3-Clause
> > -RCW_LICENSE_FILES = LICENSE
> > +FSL_QORIQ_RCW_VERSION = LSDK-18.12
> > +FSL_QORIQ_RCW_SITE =
> > +https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsou
> >
> +rce.codeaurora.org%2Fexternal%2Fqoriq%2Fqoriq-components%2Frcw&amp;
> da
> >
> +ta=02%7C01%7Cjerry.huang%40nxp.com%7C440c1c4d06f845dca04908d771e
> c9bda
> >
> +%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6371031333474393
> 48&amp;
> >
> +sdata=stm4A4DGFRjWmRHcqo%2FLchoIgp4GjrpRk6JvryEf6zc%3D&amp;reser
> ved=0
> > +FSL_QORIQ_RCW_SITE_METHOD = git
> > +FSL_QORIQ_RCW_LICENSE = BSD-3-Clause
> > +FSL_QORIQ_RCW_LICENSE_FILES = LICENSE
> >
> >  RCW_FILES = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_CUSTOM_PATH))
> 
> How come the BR2_PACKAGE_HOST_RCW_CUSTOM_PATH option is not
> renamed ?
> 
> Also RCW_FILES should become NXP_QORIQ_RCW_FILES. All variables in the .mk
> file should be renamed.
I will rename all optioins.

> > -define HOST_RCW_ADD_CUSTOM_RCW_FILES
> > +define HOST_FSL_QORIQ_RCW_ADD_CUSTOM_RCW_FILES
> >       mkdir -p $(@D)/custom_board/rcw
> >       cp -f $(filter-out %.rcw,$(RCW_FILES)) $(@D)/custom_board
> >       cp -f $(filter %.rcw,$(RCW_FILES)) $(@D)/custom_board/rcw  endef
> > HOST_RCW_POST_PATCH_HOOKS += HOST_RCW_ADD_CUSTOM_RCW_FILES
> 
> If you don't change the hook registration, the hook will never be called. Please
> check globally in this patch.
Ok, will do it.

> Thanks,
> 
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.c
> om&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7C440c1c4d06f845dca0
> 4908d771ec9bda%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637
> 103133347439348&amp;sdata=Efi59wYwQ4QCZ7KLiyj6acpsadH5BuGJk%2FFyY
> dMDnBc%3D&amp;reserved=0

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 03/10] package/freescale-qoriq/fsl-qoriq-rcw: upgrade the rcw version to LSDK-19.09
  2019-11-25 21:17   ` Thomas Petazzoni
@ 2019-11-26  3:51     ` Jerry Huang
  0 siblings, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-26  3:51 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Tuesday, November 26, 2019 5:17 AM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; michael at walle.cc; matthew.weber at collins.com;
> geomatsi at gmail.com
> Subject: [EXT] Re: [Buildroot] [PATCH v2 03/10]
> package/freescale-qoriq/fsl-qoriq-rcw: upgrade the rcw version to LSDK-19.09
> 
> Caution: EXT Email
> 
> Hello,
> 
> On Thu, 21 Nov 2019 18:23:17 +0800
> Changming Huang <jerry.huang@nxp.com> wrote:
> 
> > From: Jerry Huang <jerry.huang@nxp.com>
> >
> > Change the RCW version to LSDK-19.09.
> >
> > Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> 
> The commit title should be:
> 
>         package/<packagename>: bump to version LSDK-19.03
> 
> > diff --git a/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.hash
> b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.hash
> > index 7de1ec659a..413db80e6d 100644
> > --- a/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.hash
> > +++ b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.hash
> > @@ -1,3 +1,3 @@
> >  # Locally calculated
> > -sha256
> 1421ada9fec10b12ff21cd9ad82f0a835b191cb2dde80f03547764574b1346c3
> rcw-LSDK-18.12.tar.gz
> > +sha256
> 4dca8adeda48836b86aa459cc526dfbb4e0873492682c3c3a828a28b82b7b100
> fsl-qoriq-rcw-LSDK-19.09.tar.gz
> 
> The renaming of the tarball should have happened in patch 02/10, not
> here: we should just see the change of the version number here.
Will do it in patch 02/10

> Best regards,
> 
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.c
> om&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7C31589b42787e4c216f
> 0a08d771ecd598%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637
> 103134322307809&amp;sdata=DbVJ8Mf3cz97vPhYsoDcxaL169xr3weAoNy99Q
> 9awzc%3D&amp;reserved=0

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 04/10] package/freescale-qoriq/fsl-qoriq-rcw: add target rcw binary support
  2019-11-25 21:23   ` Thomas Petazzoni
@ 2019-11-26  4:33     ` Jerry Huang
  0 siblings, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-26  4:33 UTC (permalink / raw)
  To: buildroot


Best Regards
Jerry Huang

> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Tuesday, November 26, 2019 5:24 AM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; michael at walle.cc; matthew.weber at collins.com;
> geomatsi at gmail.com
> Subject: [EXT] Re: [Buildroot] [PATCH v2 04/10]
> package/freescale-qoriq/fsl-qoriq-rcw: add target rcw binary support
> 
> Caution: EXT Email
> 
> Hello,
> 
> I'm sorry, but I don't really grasp what this patch is trying to do.
Hi, Thomas,
This patch is to build the binary *.bin file which is used by QorIQ platforms booting with the QorIQ-RCW source codes.

> On Thu, 21 Nov 2019 18:23:18 +0800
> Changming Huang <jerry.huang@nxp.com> wrote:
> 
> > From: Jerry Huang <jerry.huang@nxp.com>
> >
> > For NXP QorIQ (PowerPC and Layerscape) platform, we need to specify
> > the RCW file and build it to binary.
> >
> > Introduce BR2_PACKAGE_HOST_RCW_ATF to use ATF for RCW.
> 
> What does this mean ?
Which is used by ATF for RCW, will move it to patch 07/10

> 
> > Introduce BR2_PACKAGE_HOST_RCW_BIN to specify the RCW binary file.
>
> Hm, ok, but then it seems to be used to calculate from which directory "make" is
> going to be invoked.
This option is for RCW binary, including the path and file name, 
for example: ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.bin
the first word is the platform, last word is the binary file used.

> 
> > Introduce BR2_PACKAGE_HOST_RCW_BOOT_MODE to define the boot mode.
> > Because the RCW binary can be stored in different media, for example:
> > SD card - RCW locate in SD card, boot the board from SD card
> > eMMC    - RCW locate in eMMC chip, boot the board from eMMC chip
> > flexSPI - RCW locate in flexSPI, boot the board from flexSPI Nor/Nand flash
> > QSPI    - RCW locate in QSPI flash, boot the board from QSPI flash
> >
> > Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> > ---
> > changes since v1:
> > 1. add option BR2_PACKAGE_HOST_RCW_ATF for ATF
> > ---
> >  .../freescale-qoriq/fsl-qoriq-rcw/Config.in.host  | 15 +++++++++++++++
> >  .../fsl-qoriq-rcw/fsl-qoriq-rcw.mk                | 11 +++++++++++
> >  2 files changed, 26 insertions(+)
> >
> > diff --git a/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host
> > b/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host
> > index a9253958d9..f55f2a6f3a 100644
> > --- a/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host
> > +++ b/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host
> > @@ -25,4 +25,19 @@ config BR2_PACKAGE_HOST_RCW_CUSTOM_PATH
> >         included for use in the SDK or with post scripts but no
> >         RCW binary will not be generated.
> >
> > +config BR2_PACKAGE_HOST_RCW_ATF
> > +     bool "atf for rcw"
> > +     help
> > +       When ATF is used for RCW, enable this option.
> 
> This option is not used in the code below.
Will move it to patch 07/10.

> 
> > +
> > +config BR2_PACKAGE_HOST_RCW_BIN
> 
> Should be named with a BR2_PACKAGE_HOST_FSL_QORIQ_RCW_ prefix.
Sure,

> 
> > +     string "Custom RCW"
> > +     help
> > +       This option is used to specify the RCW binary file for board.
> 
> More details are needed. What happens when this option is empty? Which
> values are typically needed? Your code assumes there's one slash in the value,
> this should be explained.
> 
> > +config BR2_PACKAGE_HOST_RCW_BOOT_MODE
> 
> This option is not used in the .mk file
Which is used by ATF for RCW, will vove it to patch 07/10.

> 
> > +     string "Boot mode"
> > +     help
> > +       Specify the boot mode, for example, sd, emmc, flexspi_nor.
> > +
> >  endif
> > diff --git a/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
> > b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
> > index a2c3f4f8a6..15c4024eb8 100644
> > --- a/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
> > +++ b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
> > @@ -37,6 +37,17 @@ endef
> >  define HOST_FSL_QORIQ_RCW_INSTALL_DELIVERY_FILE
> >       $(INSTALL) -D -m 0644 $(@D)/PBL.bin $(BINARIES_DIR)/PBL.bin
> > endef
> > +else
> 
> Why is this part mutually exclusive with the
> BR2_PACKAGE_HOST_RCW_CUSTOM_PATH option ? I'd like to understand what
> they each try to do. If they are mutually exclusive, they should also be mutually
> exclusive at the Config.in level. Could you please explain the different use cases
> for rcw so that we can figure out the right way to handle this ?
According to original scripts, R2_PACKAGE_HOST_RCW_CUSTOM_PATH is used for the RCW specified by customer.
Add some special command is needed for this option.
In order to use the source codes from NXP, some other commands are needed, so they are mutually exclusive.
Then, I will add the mutually exclusive in config.in file.

> 
> > +RCW_BIN = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
> > +RCW_PLATFORM = $(firstword $(subst /, ,$(RCW_BIN)))
> 
> Variables must be prefixed by the package name, not just RCW_.
Sure,

> 
> > +
> > +define HOST_FSL_QORIQ_RCW_BUILD_CMDS
> > +     cd $(@D)/$(RCW_PLATFORM) && $(MAKE)
> 
> Should be:
> 
>         $(MAKE) -C ...
Will change it

> > +endef
> > +
> > +define HOST_FSL_QORIQ_RCW_INSTALL_DELIVERY_FILE
> > +     $(INSTALL) -D -m 0644 $(@D)/$(RCW_BIN) $(BINARIES_DIR)/
> 
> Complete destination path is needed, including the destination file name.
Sure, will add the file name.
> 
> Thanks!
> 
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.c
> om&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7Ca3c1ca285da948a32
> 78108d771edc2f5%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637
> 103138304575881&amp;sdata=o1hb4D4YqQ58G0RH0siotPJsl7kp3HS0u4T5jMA
> 7YR8%3D&amp;reserved=0

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 06/10] boot/arm-trusted-firmware: Add RCW support
  2019-11-25 22:09   ` [Buildroot] " Thomas Petazzoni
@ 2019-11-26  7:06     ` Jerry Huang
  2019-11-26  7:34       ` Jerry Huang
  0 siblings, 1 reply; 51+ messages in thread
From: Jerry Huang @ 2019-11-26  7:06 UTC (permalink / raw)
  To: buildroot

Hi, Thomas,
Some comment in lines, please review them, thanks a lot.

Best Regards
Jerry Huang

> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Tuesday, November 26, 2019 6:10 AM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; michael at walle.cc; matthew.weber at collins.com;
> geomatsi at gmail.com
> Subject: [EXT] Re: [Buildroot] [PATCH v2 06/10] boot/arm-trusted-firmware: Add
> RCW support
> 
> Caution: EXT Email
> 
> Hello,
> 
> On Thu, 21 Nov 2019 18:23:20 +0800
> Changming Huang <jerry.huang@nxp.com> wrote:
> 
> > diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > index 2133d39e6d..2bca8109f1 100644
> > --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > @@ -92,6 +92,15 @@ endif
> >
> >  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
> >
> > +ifeq ($(BR2_PACKAGE_HOST_RCW_ATF),y)
> 
> This option should be introduced by this patch.
Sure,

> Overall, I'm not super happy with how arm-trusted-firmware works. In some
> cases, it's a sub-option of arm-trusted-firmware that causes it to use some
> additional package (for example OPTEE as BL32, U-Boot as BL33), but
> sometimes it's the implicit fact of having another package enabled
> (mv-ddr-marvell, vexpress-firmware), that causes arm-trusted-firmware to use it.
> Not great.
> 
> So I'm not sure how to proceed with RCW.
Yes, it uses some additional package for booting.
But, if it does not use them (U-Boot as BL33, OPTEE as BL32, RCW as BL2), what can arm-trusted-firmware do?

> > +RCW_BOOT_MODE = $(call
> qstrip,$(BR2_PACKAGE_HOST_RCW_BOOT_MODE))
> > +RCW_PATH = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
> > +RCW_FILE = $(lastword $(subst /, ,$(RCW_PATH)))
> 
> Those variables names should be prefixed with the package name, i.e
> ARM_TRUSTED_FIRMWARE.
Sure,

> > +ARM_TRUSTED_FIRMWARE_MAKE_OPTS +=
> BOOT_MODE=$(RCW_BOOT_MODE)
> > +RCW=$(BINARIES_DIR)/$(RCW_FILE)
> 
> These BOOT_MODE and RCW options are not supported in ATF upstream,
> apparently only in the NXP fork. I'm not sure we want explicit support for
> vendor-specific things. Should we look at providing an arm-trusted-firmware
> that can more easily be customized through options?

Maybe we can provide three options
ARM_TRUSTED_FIRMWARE_EXTRA_OPTS: the custom OPTS
ARM_TRUSTED_FIRMWARE_EXTRA_TARGETS: the custom TARGETS
ARM_TRUSTED_FIRMWARE_EXTRA_DEPENDENCIES: the custom dependency

Which are defined in defconfig file or empty,
For example, NXP QorIQ:
ARM_TRUSTED_FIRMWARE_EXTRA_OPTS = " BOOT_MODE=sd RCW=$(BINARIES_DIR)/ rcw_1300_sdboot.bin"
ARM_TRUSTED_FIRMWARE_EXTRA_TARGETS = " pbl"
ARM_TRUSTED_FIRMWARE_EXTRA_DEPENDENCIES = "host-qoriq-rcw"
Or Marvell DDR:
ARM_TRUSTED_FIRMWARE_EXTRA_OPTS = " SCP_BL2=$(BINARIES_DIR)/scp-fw.bin"
ARM_TRUSTED_FIRMWARE_EXTRA_DEPENDENCIES = "mv-ddr-marvell"

we can use them as below without detecting the condition in ATF makefile:
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += ARM_TRUSTED_FIRMWARE_EXTRA_OPTS
ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += ARM_TRUSTED_FIRMWARE_EXTRA_TARGETS
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += ARM_TRUSTED_FIRMWARE_EXTRA_DEPENDENCIES

We can put anything we want into these options, and the ATF makefile is very clean.

How do you think about them?

> That's really an open discussion, I don't yet have a clear idea on how to handle
> that.
> 
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.c
> om&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7C74c02743671b4e18a
> b5c08d771f42b8f%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637
> 103165822614341&amp;sdata=rcEnN%2B%2FlfMpj0iwpikulfsCH0v813TaG86K
> GsE3eGTo%3D&amp;reserved=0

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 06/10] boot/arm-trusted-firmware: Add RCW support
  2019-11-26  7:06     ` [Buildroot] [EXT] " Jerry Huang
@ 2019-11-26  7:34       ` Jerry Huang
  0 siblings, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-26  7:34 UTC (permalink / raw)
  To: buildroot

I double check the "boot/arm-trusted-firmware/Config.in",
There is one option BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES,
I think it can be used to replace my previous mail mentioned: ARM_TRUSTED_FIRMWARE_EXTRA_OPTS.
Add now this option is added to ARM_TRUSTED_FIRMWARE_MAKE_OPTS

So in order to keep consistent with the context, two new options are defined:
BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS
BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_ DEPENDENCIES

ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_ DEPENDENCIES

Best Regards
Jerry Huang

> -----Original Message-----
> From: Jerry Huang
> Sent: Tuesday, November 26, 2019 3:07 PM
> To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: buildroot at busybox.net; michael at walle.cc; matthew.weber at collins.com;
> geomatsi at gmail.com
> Subject: RE: [EXT] Re: [Buildroot] [PATCH v2 06/10] boot/arm-trusted-firmware:
> Add RCW support
> 
> Hi, Thomas,
> Some comment in lines, please review them, thanks a lot.
> 
> Best Regards
> Jerry Huang
> 
> > -----Original Message-----
> > From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> > Sent: Tuesday, November 26, 2019 6:10 AM
> > To: Jerry Huang <jerry.huang@nxp.com>
> > Cc: buildroot at busybox.net; michael at walle.cc;
> > matthew.weber at collins.com; geomatsi at gmail.com
> > Subject: [EXT] Re: [Buildroot] [PATCH v2 06/10]
> > boot/arm-trusted-firmware: Add RCW support
> >
> > Caution: EXT Email
> >
> > Hello,
> >
> > On Thu, 21 Nov 2019 18:23:20 +0800
> > Changming Huang <jerry.huang@nxp.com> wrote:
> >
> > > diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > > b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > > index 2133d39e6d..2bca8109f1 100644
> > > --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > > +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > > @@ -92,6 +92,15 @@ endif
> > >
> > >  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
> > >
> > > +ifeq ($(BR2_PACKAGE_HOST_RCW_ATF),y)
> >
> > This option should be introduced by this patch.
> Sure,
> 
> > Overall, I'm not super happy with how arm-trusted-firmware works. In
> > some cases, it's a sub-option of arm-trusted-firmware that causes it
> > to use some additional package (for example OPTEE as BL32, U-Boot as
> > BL33), but sometimes it's the implicit fact of having another package
> > enabled (mv-ddr-marvell, vexpress-firmware), that causes
> arm-trusted-firmware to use it.
> > Not great.
> >
> > So I'm not sure how to proceed with RCW.
> Yes, it uses some additional package for booting.
> But, if it does not use them (U-Boot as BL33, OPTEE as BL32, RCW as BL2), what
> can arm-trusted-firmware do?
> 
> > > +RCW_BOOT_MODE = $(call
> > qstrip,$(BR2_PACKAGE_HOST_RCW_BOOT_MODE))
> > > +RCW_PATH = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
> > > +RCW_FILE = $(lastword $(subst /, ,$(RCW_PATH)))
> >
> > Those variables names should be prefixed with the package name, i.e
> > ARM_TRUSTED_FIRMWARE.
> Sure,
> 
> > > +ARM_TRUSTED_FIRMWARE_MAKE_OPTS +=
> > BOOT_MODE=$(RCW_BOOT_MODE)
> > > +RCW=$(BINARIES_DIR)/$(RCW_FILE)
> >
> > These BOOT_MODE and RCW options are not supported in ATF upstream,
> > apparently only in the NXP fork. I'm not sure we want explicit support
> > for vendor-specific things. Should we look at providing an
> > arm-trusted-firmware that can more easily be customized through options?
> 
> Maybe we can provide three options
> ARM_TRUSTED_FIRMWARE_EXTRA_OPTS: the custom OPTS
> ARM_TRUSTED_FIRMWARE_EXTRA_TARGETS: the custom TARGETS
> ARM_TRUSTED_FIRMWARE_EXTRA_DEPENDENCIES: the custom dependency
> 
> Which are defined in defconfig file or empty, For example, NXP QorIQ:
> ARM_TRUSTED_FIRMWARE_EXTRA_OPTS = " BOOT_MODE=sd
> RCW=$(BINARIES_DIR)/ rcw_1300_sdboot.bin"
> ARM_TRUSTED_FIRMWARE_EXTRA_TARGETS = " pbl"
> ARM_TRUSTED_FIRMWARE_EXTRA_DEPENDENCIES = "host-qoriq-rcw"
> Or Marvell DDR:
> ARM_TRUSTED_FIRMWARE_EXTRA_OPTS = "
> SCP_BL2=$(BINARIES_DIR)/scp-fw.bin"
> ARM_TRUSTED_FIRMWARE_EXTRA_DEPENDENCIES = "mv-ddr-marvell"
> 
> we can use them as below without detecting the condition in ATF makefile:
> ARM_TRUSTED_FIRMWARE_MAKE_OPTS +=
> ARM_TRUSTED_FIRMWARE_EXTRA_OPTS
> ARM_TRUSTED_FIRMWARE_MAKE_TARGETS +=
> ARM_TRUSTED_FIRMWARE_EXTRA_TARGETS
> ARM_TRUSTED_FIRMWARE_DEPENDENCIES +=
> ARM_TRUSTED_FIRMWARE_EXTRA_DEPENDENCIES
> 
> We can put anything we want into these options, and the ATF makefile is very
> clean.
> 
> How do you think about them?
> 
> > That's really an open discussion, I don't yet have a clear idea on how
> > to handle that.
> >
> > Thomas
> > --
> > Thomas Petazzoni, CTO, Bootlin
> > Embedded Linux and Kernel engineering
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fboot
> > lin.c
> om&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7C74c02743671b4e18a
> >
> b5c08d771f42b8f%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637
> >
> 103165822614341&amp;sdata=rcEnN%2B%2FlfMpj0iwpikulfsCH0v813TaG86K
> > GsE3eGTo%3D&amp;reserved=0

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-25 22:12   ` [Buildroot] " Thomas Petazzoni
@ 2019-11-26  8:09     ` Jerry Huang
  2019-11-26  9:21       ` Michael Walle
  2019-11-26  9:29       ` Michael Walle
  0 siblings, 2 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-26  8:09 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Tuesday, November 26, 2019 6:12 AM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; michael at walle.cc; matthew.weber at collins.com;
> geomatsi at gmail.com
> Subject: [EXT] Re: [Buildroot] [PATCH v2 07/10]
> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
> 
> Caution: EXT Email
> 
> Hello,
> 
> On Thu, 21 Nov 2019 18:23:21 +0800
> Changming Huang <jerry.huang@nxp.com> wrote:
> 
> > From: Jerry Huang <jerry.huang@nxp.com>
> >
> > This package provides the firmware for LS1028ARDB DP (display port).
> >
> > Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> 
> Overall, looks pretty good. Rename to nxp-qoriq-... if you decide to use the nxp
> branding.
Sure, I will rename it.

> > diff --git a/DEVELOPERS b/DEVELOPERS
> > index 9fbe229eb7..b15115f507 100644
> > --- a/DEVELOPERS
> > +++ b/DEVELOPERS
> > @@ -2545,3 +2545,6 @@ F:      package/qjson/
> >  F:   package/quazip/
> >  F:   package/shapelib/
> >  F:   package/tinc/
> > +
> > +N:   Changming Huang <jerry.huang@nxp.com>
> 
> Please sort your name at the right place in the DEVELOPERS file (alphabetic
> ordering).
sure

> > diff --git a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> > new file mode 100644
> > index 0000000000..9259776750
> > --- /dev/null
> > +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> > @@ -0,0 +1,5 @@
> > +config BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW
> > +     bool "FSL QorIQ cadence DP firmware"
> 
> Just:
> 
>         bool "fsl-qorirq-cadence-dp-fw
Sure,

> > +     help
> > +       FSL QorIQ cadence DP firmware, a resident EL3 firmware.
> > +       link:
> > + https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
> >
> + .nxp.com%2Flgfiles%2Fsdk%2Flsdk1909%2Ffirmware-cadence-lsdk1909.bin&
> > +
> amp;data=02%7C01%7Cjerry.huang%40nxp.com%7Ce1898ecb342d4abee75c0
> 8d77
> > +
> 1f48c4c%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63710316744
> 6779
> > +
> 441&amp;sdata=%2FM0R2H%2BoS5qxxyzQLATgP7ndtCyNkzyxkFxTHgNuk2o%3
> D&amp
> > + ;reserved=0
> 
> One empty line between the description and the upstream URL, and no
> "link: " before the link. Also, pointing to the binary file itself is not useful, we
> need an actual web page. If none exist, just don't provide an upstream URL.
Remove this link

> > diff --git
> > a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.hash
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.hash
> > new file mode 100644
> > index 0000000000..bee912bee1
> > --- /dev/null
> > +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadenc
> > +++ e-dp-fw.hash
> > @@ -0,0 +1,2 @@
> > +# Locally calculated
> > +sha256
> >
> +5871c5717be32f14a59624d5699d405e8ce9ae2e9c9ef86fd16e13d264a40e58
> > +firmware-cadence-lsdk1909.bin
> 
> Hash of the license file is missing.
Will add the hash in v3

> > diff --git
> > a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.mk
> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
> > -fw.mk
> > new file mode 100644
> > index 0000000000..d0d112e25f
> > --- /dev/null
> > +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadenc
> > +++ e-dp-fw.mk
> > @@ -0,0 +1,24 @@
> >
> +###############################################################
> ######
> > +###########
> > +#
> > +# fsl-qoriq-cadence-dp-fw
> > +#
> >
> +###############################################################
> ######
> > +###########
> > +
> > +FSL_QORIQ_CADENCE_DP_FW_VERSION = lsdk1909
> > +FSL_QORIQ_CADENCE_DP_FW_SITE =
> > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
> >
> +nxp.com%2Flgfiles%2Fsdk%2Flsdk1909&amp;data=02%7C01%7Cjerry.huang%
> 40n
> >
> +xp.com%7Ce1898ecb342d4abee75c08d771f48c4c%7C686ea1d3bc2b4c6fa92c
> d99c5
> >
> +c301635%7C0%7C0%7C637103167446779441&amp;sdata=pVGrODu3jQDZKQ
> cKs1zXSq
> > +ihEBQUw7Rq6C%2FRm%2Bn8FKU%3D&amp;reserved=0
> > +FSL_QORIQ_CADENCE_DP_FW_SOURCE =
> > +firmware-cadence-$(FSL_QORIQ_CADENCE_DP_FW_VERSION).bin
> > +FSL_QORIQ_CADENCE_DP_FW_LICENSE = NXP-Binary-EULA
> > +FSL_QORIQ_CADENCE_DP_FW_LICENSE_FILES = COPYING
> > +FSL_QORIQ_CADENCE_DP_FW_INSTALL_IMAGES = YES
> > +FSL_QORIQ_CADENCE_DP_FW_INSTALL_TARGET = no
> 
> Should be "NO" (upper_case)
Will correct it

> > +
> > +define FSL_QORIQ_CADENCE_DP_FW_EXTRACT_CMDS
> > +     cd $(@D); \
> > +             sh
> >
> +$(FSL_QORIQ_CADENCE_DP_FW_DL_DIR)/$(FSL_QORIQ_CADENCE_DP_FW_S
> OURCE)
> > +--auto-accept;
> 
> Final semi-colon not needed.
Will use below command in v3:
define QORIQ_CADENCE_DP_FIRMWARE_EXTRACT_CMDS
        $(call NXP_QORIQ_EXTRACT_HELPER,$(QORIQ_CADENCE_DP_FIRMWARE_DL_DIR)/$(QORIQ_CADENCE_DP_FIRMWARE_SOURCE))
endef

> > +endef
> > +
> > +define FSL_QORIQ_CADENCE_DP_FW_INSTALL_IMAGES_CMDS
> > +     $(INSTALL) -D -m 0644
> > +$(@D)/firmware-cadence-lsdk1909/dp/ls1028a-dp-fw.bin
> > +$(BINARIES_DIR)/ls1028a-dp-fw.bin endef
> > +
> > +$(eval $(generic-package))
> 
> Thanks!
> 
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.c
> om&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7Ce1898ecb342d4abee
> 75c08d771f48c4c%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637
> 103167446779441&amp;sdata=VhPk%2Bg9xWrIX%2B9RTaiC3r7KJdiChr2mQ1d
> h56QLbRyA%3D&amp;reserved=0

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 08/10] package/freescale-qoriq/fsl-qoriq-rcw:Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO
  2019-11-25 22:13   ` Thomas Petazzoni
@ 2019-11-26  8:15     ` Jerry Huang
  0 siblings, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-26  8:15 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Tuesday, November 26, 2019 6:14 AM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; michael at walle.cc; matthew.weber at collins.com;
> geomatsi at gmail.com
> Subject: [EXT] Re: [Buildroot] [PATCH v2 08/10]
> package/freescale-qoriq/fsl-qoriq-rcw:Enable IIC5_PMUX and CLK_OUT_PMUX
> for GPIO
> 
> Caution: EXT Email
> 
> On Thu, 21 Nov 2019 18:23:22 +0800
> Changming Huang <jerry.huang@nxp.com> wrote:
> 
> > From: Jerry Huang <jerry.huang@nxp.com>
> >
> > Because GPIO is used as interrupt for eNETC PHY and Micro-bus,
> > IIC5_PMUX and CLK_OUT_PMUX are enabled for GPIO.
> >
> > Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> 
> What is the upstream status of those patches? Will NXP merge them in the rcw
> project, and will make them available as part of a future RCW release ?
These two patches are for SD and eMMC boot, which are not pushed to upsteam.
If I use xSPI boot, the RCW setting is correct without these two patches.
As you mentioned in the reply of patch 10/10, if just one defconfig is pushed to buildroot, 
I can remove these two patches.

> Thanks,
> 
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.c
> om&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7C10089319800b42973
> 24908d771f4bd40%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637
> 103168375059339&amp;sdata=j0xbOhtQRtJfFqW%2BefA1mhEvCczUGIdbk0M
> COPIzg0k%3D&amp;reserved=0

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-26  8:09     ` [Buildroot] [EXT] " Jerry Huang
@ 2019-11-26  9:21       ` Michael Walle
  2019-11-26 10:13         ` Jerry Huang
  2019-11-26  9:29       ` Michael Walle
  1 sibling, 1 reply; 51+ messages in thread
From: Michael Walle @ 2019-11-26  9:21 UTC (permalink / raw)
  To: buildroot

Am 2019-11-26 09:09, schrieb Jerry Huang:
> Best Regards
> Jerry Huang
> 
>> -----Original Message-----
>> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
>> Sent: Tuesday, November 26, 2019 6:12 AM
>> To: Jerry Huang <jerry.huang@nxp.com>
>> Cc: buildroot at busybox.net; michael at walle.cc; 
>> matthew.weber at collins.com;
>> geomatsi at gmail.com
>> Subject: [EXT] Re: [Buildroot] [PATCH v2 07/10]
>> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
>> 
>> Caution: EXT Email
>> 
>> Hello,
>> 
>> On Thu, 21 Nov 2019 18:23:21 +0800
>> Changming Huang <jerry.huang@nxp.com> wrote:
>> 
>> > From: Jerry Huang <jerry.huang@nxp.com>
>> >
>> > This package provides the firmware for LS1028ARDB DP (display port).
>> >
>> > Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
>> 
>> Overall, looks pretty good. Rename to nxp-qoriq-... if you decide to 
>> use the nxp
>> branding.
> Sure, I will rename it.
> 
>> > diff --git a/DEVELOPERS b/DEVELOPERS
>> > index 9fbe229eb7..b15115f507 100644
>> > --- a/DEVELOPERS
>> > +++ b/DEVELOPERS
>> > @@ -2545,3 +2545,6 @@ F:      package/qjson/
>> >  F:   package/quazip/
>> >  F:   package/shapelib/
>> >  F:   package/tinc/
>> > +
>> > +N:   Changming Huang <jerry.huang@nxp.com>
>> 
>> Please sort your name at the right place in the DEVELOPERS file 
>> (alphabetic
>> ordering).
> sure
> 
>> > diff --git a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
>> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
>> > new file mode 100644
>> > index 0000000000..9259776750
>> > --- /dev/null
>> > +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
>> > @@ -0,0 +1,5 @@
>> > +config BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW
>> > +     bool "FSL QorIQ cadence DP firmware"
>> 
>> Just:
>> 
>>         bool "fsl-qorirq-cadence-dp-fw
> Sure,

Sorry about being so pedantic about this.. but like I said before, 
almost all (there is one exception, "murata-cyw-fw") firmware packages 
have a -firmware suffix.

-michael

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-26  8:09     ` [Buildroot] [EXT] " Jerry Huang
  2019-11-26  9:21       ` Michael Walle
@ 2019-11-26  9:29       ` Michael Walle
  2019-11-26 10:12         ` Thomas Petazzoni
  1 sibling, 1 reply; 51+ messages in thread
From: Michael Walle @ 2019-11-26  9:29 UTC (permalink / raw)
  To: buildroot

[sorry for the second mail]

Am 2019-11-26 09:09, schrieb Jerry Huang:
> Best Regards
> Jerry Huang
> 
>> -----Original Message-----
>> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
>> Sent: Tuesday, November 26, 2019 6:12 AM
>> To: Jerry Huang <jerry.huang@nxp.com>
>> Cc: buildroot at busybox.net; michael at walle.cc; 
>> matthew.weber at collins.com;
>> geomatsi at gmail.com
>> Subject: [EXT] Re: [Buildroot] [PATCH v2 07/10]
>> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
>> 
>> Caution: EXT Email
>> 
>> Hello,
>> 
>> On Thu, 21 Nov 2019 18:23:21 +0800
>> Changming Huang <jerry.huang@nxp.com> wrote:
>> 
>> > From: Jerry Huang <jerry.huang@nxp.com>
>> >
>> > This package provides the firmware for LS1028ARDB DP (display port).
>> >
>> > Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
>> 
>> Overall, looks pretty good. Rename to nxp-qoriq-... if you decide to 
>> use the nxp
>> branding.
> Sure, I will rename it.
> 
>> > diff --git a/DEVELOPERS b/DEVELOPERS
>> > index 9fbe229eb7..b15115f507 100644
>> > --- a/DEVELOPERS
>> > +++ b/DEVELOPERS
>> > @@ -2545,3 +2545,6 @@ F:      package/qjson/
>> >  F:   package/quazip/
>> >  F:   package/shapelib/
>> >  F:   package/tinc/
>> > +
>> > +N:   Changming Huang <jerry.huang@nxp.com>
>> 
>> Please sort your name at the right place in the DEVELOPERS file 
>> (alphabetic
>> ordering).
> sure
> 
>> > diff --git a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
>> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
>> > new file mode 100644
>> > index 0000000000..9259776750
>> > --- /dev/null
>> > +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
>> > @@ -0,0 +1,5 @@
>> > +config BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW
>> > +     bool "FSL QorIQ cadence DP firmware"
>> 
>> Just:
>> 
>>         bool "fsl-qorirq-cadence-dp-fw
> Sure,
> 
>> > +     help
>> > +       FSL QorIQ cadence DP firmware, a resident EL3 firmware.
>> > +       link:
>> > + https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
>> >
>> + .nxp.com%2Flgfiles%2Fsdk%2Flsdk1909%2Ffirmware-cadence-lsdk1909.bin&
>> > +
>> amp;data=02%7C01%7Cjerry.huang%40nxp.com%7Ce1898ecb342d4abee75c0
>> 8d77
>> > +
>> 1f48c4c%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63710316744
>> 6779
>> > +
>> 441&amp;sdata=%2FM0R2H%2BoS5qxxyzQLATgP7ndtCyNkzyxkFxTHgNuk2o%3
>> D&amp
>> > + ;reserved=0
>> 
>> One empty line between the description and the upstream URL, and no
>> "link: " before the link. Also, pointing to the binary file itself is 
>> not useful, we
>> need an actual web page. If none exist, just don't provide an upstream 
>> URL.
> Remove this link
> 
>> > diff --git
>> > a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
>> > -fw.hash
>> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
>> > -fw.hash
>> > new file mode 100644
>> > index 0000000000..bee912bee1
>> > --- /dev/null
>> > +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadenc
>> > +++ e-dp-fw.hash
>> > @@ -0,0 +1,2 @@
>> > +# Locally calculated
>> > +sha256
>> >
>> +5871c5717be32f14a59624d5699d405e8ce9ae2e9c9ef86fd16e13d264a40e58
>> > +firmware-cadence-lsdk1909.bin
>> 
>> Hash of the license file is missing.
> Will add the hash in v3
> 
>> > diff --git
>> > a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
>> > -fw.mk
>> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadence-dp
>> > -fw.mk
>> > new file mode 100644
>> > index 0000000000..d0d112e25f
>> > --- /dev/null
>> > +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/fsl-qoriq-cadenc
>> > +++ e-dp-fw.mk
>> > @@ -0,0 +1,24 @@
>> >
>> +###############################################################
>> ######
>> > +###########
>> > +#
>> > +# fsl-qoriq-cadence-dp-fw
>> > +#
>> >
>> +###############################################################
>> ######
>> > +###########
>> > +
>> > +FSL_QORIQ_CADENCE_DP_FW_VERSION = lsdk1909
>> > +FSL_QORIQ_CADENCE_DP_FW_SITE =
>> > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
>> >
>> +nxp.com%2Flgfiles%2Fsdk%2Flsdk1909&amp;data=02%7C01%7Cjerry.huang%
>> 40n
>> >
>> +xp.com%7Ce1898ecb342d4abee75c08d771f48c4c%7C686ea1d3bc2b4c6fa92c
>> d99c5
>> >
>> +c301635%7C0%7C0%7C637103167446779441&amp;sdata=pVGrODu3jQDZKQ
>> cKs1zXSq
>> > +ihEBQUw7Rq6C%2FRm%2Bn8FKU%3D&amp;reserved=0
>> > +FSL_QORIQ_CADENCE_DP_FW_SOURCE =
>> > +firmware-cadence-$(FSL_QORIQ_CADENCE_DP_FW_VERSION).bin
>> > +FSL_QORIQ_CADENCE_DP_FW_LICENSE = NXP-Binary-EULA
>> > +FSL_QORIQ_CADENCE_DP_FW_LICENSE_FILES = COPYING
>> > +FSL_QORIQ_CADENCE_DP_FW_INSTALL_IMAGES = YES
>> > +FSL_QORIQ_CADENCE_DP_FW_INSTALL_TARGET = no
>> 
>> Should be "NO" (upper_case)
> Will correct it
> 
>> > +
>> > +define FSL_QORIQ_CADENCE_DP_FW_EXTRACT_CMDS
>> > +     cd $(@D); \
>> > +             sh
>> >
>> +$(FSL_QORIQ_CADENCE_DP_FW_DL_DIR)/$(FSL_QORIQ_CADENCE_DP_FW_S
>> OURCE)
>> > +--auto-accept;
>> 
>> Final semi-colon not needed.
> Will use below command in v3:
> define QORIQ_CADENCE_DP_FIRMWARE_EXTRACT_CMDS
>         $(call
> NXP_QORIQ_EXTRACT_HELPER,$(QORIQ_CADENCE_DP_FIRMWARE_DL_DIR)/$(QORIQ_CADENCE_DP_FIRMWARE_SOURCE))
> endef

please don't duplicate that piece of code.. it should really be
NXP_EXTRACT_HELPER. which leads to the cleanup of the freescale-imx
and nxp-qoriq directories. IMHO both should be named consistently.
Thomas? Matthew?

-michael

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-26  9:29       ` Michael Walle
@ 2019-11-26 10:12         ` Thomas Petazzoni
  2019-11-26 10:31           ` Michael Walle
  0 siblings, 1 reply; 51+ messages in thread
From: Thomas Petazzoni @ 2019-11-26 10:12 UTC (permalink / raw)
  To: buildroot

On Tue, 26 Nov 2019 10:29:18 +0100
Michael Walle <michael@walle.cc> wrote:

> >> Final semi-colon not needed.  
> > Will use below command in v3:
> > define QORIQ_CADENCE_DP_FIRMWARE_EXTRACT_CMDS
> >         $(call
> > NXP_QORIQ_EXTRACT_HELPER,$(QORIQ_CADENCE_DP_FIRMWARE_DL_DIR)/$(QORIQ_CADENCE_DP_FIRMWARE_SOURCE))
> > endef  
> 
> please don't duplicate that piece of code.. it should really be
> NXP_EXTRACT_HELPER. which leads to the cleanup of the freescale-imx
> and nxp-qoriq directories. IMHO both should be named consistently.
> Thomas? Matthew?

What are you suggesting? A single package/nxp/ folder, with everything
in there?

If we do package/nxp-imx/ and package/nxp-qoirq/, then there is still
the question of where to put this common NXP_EXTRACT_HELPER macro

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-26  9:21       ` Michael Walle
@ 2019-11-26 10:13         ` Jerry Huang
  0 siblings, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-26 10:13 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Michael Walle <michael@walle.cc>
> Sent: Tuesday, November 26, 2019 5:22 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>;
> buildroot at busybox.net; matthew.weber at collins.com; geomatsi at gmail.com
> Subject: Re: [EXT] Re: [Buildroot] [PATCH v2 07/10]
> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
> 
> Caution: EXT Email
> 
> Am 2019-11-26 09:09, schrieb Jerry Huang:
> > Best Regards
> > Jerry Huang
> >
> >> -----Original Message-----
> >> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> >> Sent: Tuesday, November 26, 2019 6:12 AM
> >> To: Jerry Huang <jerry.huang@nxp.com>
> >> Cc: buildroot at busybox.net; michael at walle.cc;
> >> matthew.weber at collins.com; geomatsi at gmail.com
> >> Subject: [EXT] Re: [Buildroot] [PATCH v2 07/10]
> >> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
> >>
> >> Caution: EXT Email
> >>
> >> Hello,
> >>
> >> On Thu, 21 Nov 2019 18:23:21 +0800
> >> Changming Huang <jerry.huang@nxp.com> wrote:
> >>
> >> > From: Jerry Huang <jerry.huang@nxp.com>
> >> >
> >> > This package provides the firmware for LS1028ARDB DP (display port).
> >> >
> >> > Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> >>
> >> Overall, looks pretty good. Rename to nxp-qoriq-... if you decide to
> >> use the nxp branding.
> > Sure, I will rename it.
> >
> >> > diff --git a/DEVELOPERS b/DEVELOPERS
> >> > index 9fbe229eb7..b15115f507 100644
> >> > --- a/DEVELOPERS
> >> > +++ b/DEVELOPERS
> >> > @@ -2545,3 +2545,6 @@ F:      package/qjson/
> >> >  F:   package/quazip/
> >> >  F:   package/shapelib/
> >> >  F:   package/tinc/
> >> > +
> >> > +N:   Changming Huang <jerry.huang@nxp.com>
> >>
> >> Please sort your name at the right place in the DEVELOPERS file
> >> (alphabetic
> >> ordering).
> > sure
> >
> >> > diff --git a/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> >> > b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> >> > new file mode 100644
> >> > index 0000000000..9259776750
> >> > --- /dev/null
> >> > +++ b/package/freescale-qoriq/fsl-qoriq-cadence-dp-fw/Config.in
> >> > @@ -0,0 +1,5 @@
> >> > +config BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW
> >> > +     bool "FSL QorIQ cadence DP firmware"
> >>
> >> Just:
> >>
> >>         bool "fsl-qorirq-cadence-dp-fw
> > Sure,
> 
> Sorry about being so pedantic about this.. but like I said before,
> almost all (there is one exception, "murata-cyw-fw") firmware packages
> have a -firmware suffix.
Yes, it has been changed to " qoriq-cadence-dp-firmware " in v3

> -michael

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-26 10:12         ` Thomas Petazzoni
@ 2019-11-26 10:31           ` Michael Walle
  2019-11-26 12:10             ` Jerry Huang
  0 siblings, 1 reply; 51+ messages in thread
From: Michael Walle @ 2019-11-26 10:31 UTC (permalink / raw)
  To: buildroot

Am 2019-11-26 11:12, schrieb Thomas Petazzoni:
> On Tue, 26 Nov 2019 10:29:18 +0100
> Michael Walle <michael@walle.cc> wrote:
> 
>> >> Final semi-colon not needed.
>> > Will use below command in v3:
>> > define QORIQ_CADENCE_DP_FIRMWARE_EXTRACT_CMDS
>> >         $(call
>> > NXP_QORIQ_EXTRACT_HELPER,$(QORIQ_CADENCE_DP_FIRMWARE_DL_DIR)/$(QORIQ_CADENCE_DP_FIRMWARE_SOURCE))
>> > endef
>> 
>> please don't duplicate that piece of code.. it should really be
>> NXP_EXTRACT_HELPER. which leads to the cleanup of the freescale-imx
>> and nxp-qoriq directories. IMHO both should be named consistently.
>> Thomas? Matthew?
> 
> What are you suggesting? A single package/nxp/ folder, with everything
> in there?

correct. that would also solve the NXP_EXTRACT_HELPER thing. which would 
end up in
package/nxp/helper.mk or something like that.

> If we do package/nxp-imx/ and package/nxp-qoirq/, then there is still
> the question of where to put this common NXP_EXTRACT_HELPER macro

yes. see above.

-michael

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 10/10] configs/freescale_ls1028ardb*: new board
  2019-11-25 22:17   ` Thomas Petazzoni
@ 2019-11-26 12:02     ` Jerry Huang
  0 siblings, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-26 12:02 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Tuesday, November 26, 2019 6:18 AM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; michael at walle.cc; matthew.weber at collins.com;
> geomatsi at gmail.com
> Subject: [EXT] Re: [Buildroot] [PATCH v2 10/10] configs/freescale_ls1028ardb*:
> new board
> 
> Caution: EXT Email
> 
> Hello,
> 
> On Thu, 21 Nov 2019 18:23:24 +0800
> Changming Huang <jerry.huang@nxp.com> wrote:
> 
> 
> > diff --git a/board/freescale/ls1028ardb/genimage.xspi.cfg.template
> > b/board/freescale/ls1028ardb/genimage.xspi.cfg.template
> > new file mode 100644
> > index 0000000000..14d75a17f3
> > --- /dev/null
> > +++ b/board/freescale/ls1028ardb/genimage.xspi.cfg.template
> > @@ -0,0 +1,53 @@
> > +# Minimal QSPI image for the NXP boards Template # # We mimic the
> > +.sdcard NXP's image format:
> > +# * the SD card must have 4 kB free space at the beginning,
> 
> SD card ? But this file is about creating an image for a QSPI flash.
Will fix that in v3

> > +# * U-Boot is dumped as is,
> > +# * a single root filesystem partition is required (ext2, ext3 or
> > +ext4)
> 
> I don't see the root filesystem in this genimage configuration file
Will fix that in v3

> > diff --git a/configs/freescale_ls1028ardb-emmc_defconfig
> > b/configs/freescale_ls1028ardb-emmc_defconfig
> 
> To be honest, I'm not sure we want 3 different configurations for this board. Can
> we pick just one ?
There are three basic boot mode for ls1028ardb, so three configurations is for this board.
I think we need these three configurations.

> > new file mode 100644
> > index 0000000000..c34db6cb0b
> > --- /dev/null
> > +++ b/configs/freescale_ls1028ardb-emmc_defconfig
> > @@ -0,0 +1,136 @@
> > +# Architecture
> > +BR2_aarch64=y
> > +BR2_cortex_a72=y
> > +
> > +# Filesystem
> > +BR2_TARGET_ROOTFS_EXT2=y
> > +BR2_TARGET_ROOTFS_EXT2_4=y
> > +BR2_TARGET_ROOTFS_EXT2_GZIP=y
> > +BR2_TARGET_ROOTFS_EXT2_SIZE="500M"
> 
> Keep the default size and compression.
Sure,

> > +
> > +# Hostname and issue
> > +BR2_TARGET_GENERIC_HOSTNAME="LS1028ARDB"
> > +
> > +# Linux headers same as kernel
> > +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
> > +
> > +# toolchain
> > +BR2_TOOLCHAIN_EXTERNAL=y
> 
> Please stick to using the internal toolchain for defconfigs.
Sure,

> > +# bootloader
> > +BR2_TARGET_UBOOT=y
> > +BR2_TARGET_UBOOT_FORMAT_DTB_BIN=y
> > +BR2_TARGET_UBOOT_BOARDNAME="ls1028ardb_tfa"
> > +BR2_TARGET_UBOOT_CUSTOM_GIT=y
> >
> +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://eur01.safelinks.protectio
> n.outlook.com/?url=https%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fqo
> riq%2Fqoriq-components%2Fu-boot&amp;data=02%7C01%7Cjerry.huang%40nx
> p.com%7C8bf20e9e0b6144a467fa08d771f5485b%7C686ea1d3bc2b4c6fa92cd9
> 9c5c301635%7C0%7C0%7C637103170604588864&amp;sdata=y79I0o0l%2F%2
> BpHp9bkvMis693dAAbhvXUcIkCS%2BTBSetQ%3D&amp;reserved=0"
> > +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="LSDK-19.09"
> > +BR2_TARGET_UBOOT_NEEDS_DTC=y
> > +BR2_TARGET_UBOOT_FORMAT_BIN=n
> > +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
> > +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-dtb.bin"
> > +BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE=y
> > +BR2_TARGET_UBOOT_ENVIMAGE=y
> >
> +BR2_TARGET_UBOOT_ENVIMAGE_SOURCE="board/freescale/ls1028ardb/u-b
> oot-environment-emmc.txt"
> > +BR2_TARGET_UBOOT_ENVIMAGE_SIZE="0x2000"
> > +
> > +# Kernel
> > +BR2_LINUX_KERNEL=y
> > +BR2_LINUX_KERNEL_CUSTOM_GIT=y
> >
> +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://eur01.safelinks.protection
> .outlook.com/?url=https%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fqor
> iq%2Fqoriq-components%2Flinux&amp;data=02%7C01%7Cjerry.huang%40nxp.
> com%7C8bf20e9e0b6144a467fa08d771f5485b%7C686ea1d3bc2b4c6fa92cd99c
> 5c301635%7C0%7C0%7C637103170604588864&amp;sdata=mSyrWd0ZWOMh
> gsvIXTUx4y3sAITe50SLIhZ%2Bo14qIXc%3D&amp;reserved=0"
> > +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="LSDK-19.09-V4.19"
> > +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
> >
> +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64
> /configs/lsdk.config"
> > +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> > +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/fsl-ls1028a-rdb"
> > +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
> > +BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
> > +
> > +# Serial port config
> > +BR2_TARGET_GENERIC_GETTY=y
> > +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
> > +
> > +# required tools to create the microSD image
> > +BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_GENIMAGE=y
> > +BR2_PACKAGE_HOST_MTOOLS=y
> >
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/ls/post-image
> .sh"
> > +BR2_ROOTFS_POST_SCRIPT_ARGS="$(LINUX_DIR) $(TOPDIR)
> $(UBOOT_DIR)"
> > +
> > +# busybox setting
> >
> +#BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/freescale/com
> mon/ls/busybox.config"
> > +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
> > +
> > +# packages for rcw
> > +BR2_PACKAGE_HOST_RCW=y
> > +BR2_PACKAGE_HOST_RCW_ATF=y
> > +BR2_PACKAGE_HOST_RCW_BOOT_MODE="emmc"
> >
> +BR2_PACKAGE_HOST_RCW_BIN="ls1028ardb/R_SQPP_0x85bb/rcw_1300_em
> mcboot.bin"
> > +
> > +#Display port firmware
> > +BR2_PACKAGE_FSL_QORIQ_CADENCE_DP_FW=y
> > +
> > +# basic packages and tools
> > +BR2_PACKAGE_MTD=y
> > +BR2_PACKAGE_MTD_MTD_DEBUG=y
> > +BR2_PACKAGE_SYSSTAT=y
> > +BR2_PACKAGE_E2FSPROGS=y
> > +BR2_PACKAGE_RT_TESTS=y
> > +BR2_PACKAGE_OPENSSH=y
> > +BR2_PACKAGE_OPENSSL=y
> > +BR2_PACKAGE_WGET=y
> > +
> > +# docker packages
> > +BR2_PACKAGE_DOCKER_CONTAINERD=y
> > +BR2_PACKAGE_DOCKER_ENGINE=y
> > +BR2_PACKAGE_DOCKER_ENGINE_DAEMON=y
> > +BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL=y
> > +BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS=y
> > +BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER=y
> > +BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS=y
> > +BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y
> > +BR2_PACKAGE_CGROUPFS_MOUNT=y
> > +BR2_PACKAGE_LIBCGROUP=y
> 
> Please remove all extra packages: keep only Busybox in the target filesystem.
> We want minimal defconfigs, that only build the bootloader, kernel and a
> minimal root filesystem.
sure

> Thanks!
> 
> Thmas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.c
> om&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7C8bf20e9e0b6144a467
> fa08d771f5485b%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6371
> 03170604588864&amp;sdata=yvLKBVKXw7uBYHIPRRwjz6BzvH%2BO778aOz5i
> oYSBN1I%3D&amp;reserved=0

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [Buildroot] [EXT] Re: [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
  2019-11-26 10:31           ` Michael Walle
@ 2019-11-26 12:10             ` Jerry Huang
  0 siblings, 0 replies; 51+ messages in thread
From: Jerry Huang @ 2019-11-26 12:10 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Michael Walle <michael@walle.cc>
> Sent: Tuesday, November 26, 2019 6:31 PM
> To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Jerry Huang <jerry.huang@nxp.com>; buildroot at busybox.net;
> matthew.weber at collins.com; geomatsi at gmail.com
> Subject: Re: [EXT] Re: [Buildroot] [PATCH v2 07/10]
> package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package
> 
> Caution: EXT Email
> 
> Am 2019-11-26 11:12, schrieb Thomas Petazzoni:
> > On Tue, 26 Nov 2019 10:29:18 +0100
> > Michael Walle <michael@walle.cc> wrote:
> >
> >> >> Final semi-colon not needed.
> >> > Will use below command in v3:
> >> > define QORIQ_CADENCE_DP_FIRMWARE_EXTRACT_CMDS
> >> >         $(call
> >> >
> NXP_QORIQ_EXTRACT_HELPER,$(QORIQ_CADENCE_DP_FIRMWARE_DL_DIR)/
> $(QORI
> >> > Q_CADENCE_DP_FIRMWARE_SOURCE))
> >> > endef
> >>
> >> please don't duplicate that piece of code.. it should really be
> >> NXP_EXTRACT_HELPER. which leads to the cleanup of the freescale-imx
> >> and nxp-qoriq directories. IMHO both should be named consistently.
> >> Thomas? Matthew?
> >
> > What are you suggesting? A single package/nxp/ folder, with everything
> > in there?
> 
> correct. that would also solve the NXP_EXTRACT_HELPER thing. which would
> end up in package/nxp/helper.mk or something like that.
So, first, create directory "package/nxp" and push all ls1028ardb codes (including qoriq-rcw, qoriq-cadence-dp-firmware).
Then, move all packages under package/freescale-imx into package/nxp in One separate patch?

> > If we do package/nxp-imx/ and package/nxp-qoirq/, then there is still
> > the question of where to put this common NXP_EXTRACT_HELPER macro
> 
> yes. see above.
> 
> -michael

^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2019-11-26 12:10 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-21 10:23 [Buildroot] [PATCH v2 0/9] new board ls1028ardb introduced Changming Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 01/10] package/freescale-qoriq: new package directory Changming Huang
2019-11-25 21:13   ` Thomas Petazzoni
2019-11-26  2:49     ` [Buildroot] [EXT] " Jerry Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 02/10] package/freescale-qoriq/fsl-qoriq-rcw: move rcw into freescale-qoriq and rename it Changming Huang
2019-11-21 10:34   ` Michael Walle
2019-11-21 10:42     ` [Buildroot] [EXT] " Jerry Huang
2019-11-25 21:15   ` [Buildroot] " Thomas Petazzoni
2019-11-26  3:25     ` [Buildroot] [EXT] " Jerry Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 03/10] package/freescale-qoriq/fsl-qoriq-rcw: upgrade the rcw version to LSDK-19.09 Changming Huang
2019-11-25 21:17   ` Thomas Petazzoni
2019-11-26  3:51     ` [Buildroot] [EXT] " Jerry Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 04/10] package/freescale-qoriq/fsl-qoriq-rcw: add target rcw binary support Changming Huang
2019-11-25 21:23   ` Thomas Petazzoni
2019-11-26  4:33     ` [Buildroot] [EXT] " Jerry Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 05/10] boot/arm-trusted-firmware: Add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE Changming Huang
2019-11-22  9:11   ` Sergey Matyukevich
2019-11-22  9:24     ` [Buildroot] [EXT] " Jerry Huang
2019-11-25 21:59   ` [Buildroot] " Thomas Petazzoni
2019-11-21 10:23 ` [Buildroot] [PATCH v2 06/10] boot/arm-trusted-firmware: Add RCW support Changming Huang
2019-11-22  9:19   ` Sergey Matyukevich
2019-11-22  9:31     ` [Buildroot] [EXT] " Jerry Huang
2019-11-25 22:09   ` [Buildroot] " Thomas Petazzoni
2019-11-26  7:06     ` [Buildroot] [EXT] " Jerry Huang
2019-11-26  7:34       ` Jerry Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package Changming Huang
2019-11-21 10:42   ` Michael Walle
2019-11-21 11:04     ` [Buildroot] [EXT] " Jerry Huang
2019-11-22 10:41     ` Jerry Huang
2019-11-21 10:51   ` [Buildroot] " Michael Walle
2019-11-21 11:09     ` [Buildroot] [EXT] " Jerry Huang
2019-11-22 10:40     ` Jerry Huang
2019-11-22 11:00       ` Michael Walle
2019-11-25  2:40         ` Jerry Huang
2019-11-22 11:05       ` Thomas Petazzoni
2019-11-25  6:25         ` Jerry Huang
2019-11-25 22:12   ` [Buildroot] " Thomas Petazzoni
2019-11-26  8:09     ` [Buildroot] [EXT] " Jerry Huang
2019-11-26  9:21       ` Michael Walle
2019-11-26 10:13         ` Jerry Huang
2019-11-26  9:29       ` Michael Walle
2019-11-26 10:12         ` Thomas Petazzoni
2019-11-26 10:31           ` Michael Walle
2019-11-26 12:10             ` Jerry Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 08/10] package/freescale-qoriq/fsl-qoriq-rcw:Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO Changming Huang
2019-11-25 22:13   ` Thomas Petazzoni
2019-11-26  8:15     ` [Buildroot] [EXT] " Jerry Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 09/10] board/freescale/common/ls: Add standard post image script for Layerscape processors Changming Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 10/10] configs/freescale_ls1028ardb*: new board Changming Huang
2019-11-25 22:17   ` Thomas Petazzoni
2019-11-26 12:02     ` [Buildroot] [EXT] " Jerry Huang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.