All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v5 1/9] package/nxp: new package directory
@ 2020-02-07  8:38 Changming Huang
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 2/9] package/qoriq-rcw: move rcw into nxp and rename it Changming Huang
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: Changming Huang @ 2020-02-07  8:38 UTC (permalink / raw)
  To: buildroot

The "nxp" directory is intended to contain all NXP
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 v4:
no changes.

changes since v3:
no changes.

changes since v2:
1. change the sub-direcotry to "nxp".
2. add helper.mk macro to extract compressed file.

changes since v1:
no changes.
---
 package/Config.in     |  1 +
 package/nxp/Config.in |  4 ++++
 package/nxp/helper.mk | 32 ++++++++++++++++++++++++++++++++
 3 files changed, 37 insertions(+)
 create mode 100644 package/nxp/Config.in
 create mode 100644 package/nxp/helper.mk

diff --git a/package/Config.in b/package/Config.in
index bad4f9cba6..f9827769a2 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -497,6 +497,7 @@ endmenu
 	source "package/nvidia-driver/Config.in"
 	source "package/nvidia-tegra23/Config.in"
 	source "package/nvme/Config.in"
+	source "package/nxp/Config.in"
 	source "package/ofono/Config.in"
 	source "package/on2-8170-modules/Config.in"
 	source "package/open2300/Config.in"
diff --git a/package/nxp/Config.in b/package/nxp/Config.in
new file mode 100644
index 0000000000..575542c7ab
--- /dev/null
+++ b/package/nxp/Config.in
@@ -0,0 +1,4 @@
+menu "NXP QorIQ libraries"
+	depends on BR2_aarch64 || BR2_arm || BR2_powerpc64 || BR2_powerpc
+
+endmenu
diff --git a/package/nxp/helper.mk b/package/nxp/helper.mk
new file mode 100644
index 0000000000..79e4236249
--- /dev/null
+++ b/package/nxp/helper.mk
@@ -0,0 +1,32 @@
+################################################################################
+#
+# helper
+#
+################################################################################
+
+# Helper for self-extracting binaries distributed by NXP.
+#
+# The --force option makes sure it doesn't fail if the source
+# directory already exists. The --auto-accept skips the license check,
+# as it is not needed in Buildroot because we have legal-info. Since
+# there's a EULA in the binary file, we extract it in this macro, and
+# it should therefore be added to the LICENSE_FILES variable of
+# packages using this macro. Also, remember to set REDISTRIBUTE to
+# "NO". Indeed, this is a legal minefield: the EULA specifies that the
+# Board Support Package includes software and hardware (sic!) for
+# which a separate license is needed...
+#
+# $(1): full path to the archive file
+#
+define NXP_EXTRACT_HELPER
+	awk 'BEGIN      { start = 0; } \
+	     /^EOEULA/  { start = 0; } \
+	                { if (start) print; } \
+	     /<<EOEULA/ { start = 1; }' \
+	    $(1) > $(@D)/EULA
+	cd $(@D) && sh $(1) --force --auto-accept
+	find $(@D)/$(basename $(notdir $(1))) -mindepth 1 -maxdepth 1 -exec mv {} $(@D) \;
+	rmdir $(@D)/$(basename $(notdir $(1)))
+endef
+
+include $(sort $(wildcard package/nxp/*/*.mk))
-- 
2.17.1

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

* [Buildroot] [PATCH v5 2/9] package/qoriq-rcw: move rcw into nxp and rename it
  2020-02-07  8:38 [Buildroot] [PATCH v5 1/9] package/nxp: new package directory Changming Huang
@ 2020-02-07  8:38 ` Changming Huang
  2020-04-14  9:35   ` Heiko Thiery
  2020-12-16 21:02   ` Yann E. MORIN
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 3/9] package/qoriq-rcw: bump to version LSDK-19.09 Changming Huang
                   ` (7 subsequent siblings)
  8 siblings, 2 replies; 20+ messages in thread
From: Changming Huang @ 2020-02-07  8:38 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---
changes since v4:
no changes.

changes since v3:
no changes.

changes since v2:
1. change the package name to qoriq-rcw to keep consistent with imx-xxx.
2. add the handing in Config.in.legacy

changes since v1:
1. new patch.
2. move rcw to sub-directory freescale-qoriq.
3. rename to fsl-qoriq-rcw.
---
 Config.in.legacy                              | 16 ++++++
 DEVELOPERS                                    |  2 +-
 package/Config.in.host                        |  2 +-
 package/{rcw => nxp/qoriq-rcw}/Config.in.host |  6 +--
 .../rcw.hash => nxp/qoriq-rcw/qoriq-rcw.hash} |  2 +-
 package/nxp/qoriq-rcw/qoriq-rcw.mk            | 50 +++++++++++++++++++
 package/rcw/rcw.mk                            | 50 -------------------
 7 files changed, 72 insertions(+), 56 deletions(-)
 rename package/{rcw => nxp/qoriq-rcw}/Config.in.host (88%)
 rename package/{rcw/rcw.hash => nxp/qoriq-rcw/qoriq-rcw.hash} (82%)
 create mode 100644 package/nxp/qoriq-rcw/qoriq-rcw.mk
 delete mode 100644 package/rcw/rcw.mk

diff --git a/Config.in.legacy b/Config.in.legacy
index 3c6984d886..2473282e9d 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -258,6 +258,22 @@ config BR2_BINUTILS_VERSION_2_30_X
 	  current default version (2.31 or later) has been selected
 	  instead.
 
+config BR2_PACKAGE_HOST_RCW
+	bool "rcw package was removed"
+	select BR2_LEGACY
+	help
+	  Because rcw package has been renamed to qoriq-rcw and moved
+	  to "nxp", option BR2_PACKAGE_HOST_RCW is removed, the option
+	  BR2_PACKAGE_HOST_QORIQ_RCW can be used for QorIQ platforms.
+
+config BR2_PACKAGE_HOST_RCW
+	bool "rcw package was removed"
+	select BR2_LEGACY
+	help
+	  Because rcw package has been renamed to qoriq-rcw and moved
+	  to "nxp", option BR2_PACKAGE_HOST_RCW is removed, the option
+	  BR2_PACKAGE_HOST_QORIQ_RCW can be used for QorIQ platforms.
+
 config BR2_PACKAGE_RPI_USERLAND_START_VCFILED
 	bool "rpi-userland start vcfiled was removed"
 	select BR2_LEGACY
diff --git a/DEVELOPERS b/DEVELOPERS
index d8ea23e0b3..e555b9773b 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1654,6 +1654,7 @@ F:	package/mrouted/
 F:	package/mtd/
 F:	package/mtools/
 F:	package/nginx-upload/
+F:	package/nxp/qoriq-rcw/
 F:	package/omniorb/
 F:	package/openresolv/
 F:	package/paxtest/
@@ -1674,7 +1675,6 @@ F:	package/python-pyrex/
 F:	package/python-tinyrpc/
 F:	package/python-txdbus/
 F:	package/raptor/
-F:	package/rcw/
 F:	package/rng-tools/
 F:	package/rsyslog/
 F:	package/setools/
diff --git a/package/Config.in.host b/package/Config.in.host
index 62e860d7c3..55f1e87f89 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -45,6 +45,7 @@ menu "Host utilities"
 	source "package/mtd/Config.in.host"
 	source "package/mtools/Config.in.host"
 	source "package/mxsldr/Config.in.host"
+	source "package/nxp/qoriq-rcw/Config.in.host"
 	source "package/omap-u-boot-utils/Config.in.host"
 	source "package/openocd/Config.in.host"
 	source "package/opkg-utils/Config.in.host"
@@ -62,7 +63,6 @@ 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/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/nxp/qoriq-rcw/Config.in.host
similarity index 88%
rename from package/rcw/Config.in.host
rename to package/nxp/qoriq-rcw/Config.in.host
index a9253958d9..8f78a40908 100644
--- a/package/rcw/Config.in.host
+++ b/package/nxp/qoriq-rcw/Config.in.host
@@ -1,4 +1,4 @@
-config BR2_PACKAGE_HOST_RCW
+config BR2_PACKAGE_HOST_QORIQ_RCW
 	bool "host rcw"
 	help
 	  This package provides an reset configuration word(RCW)
@@ -11,9 +11,9 @@ config BR2_PACKAGE_HOST_RCW
 
 	  https://source.codeaurora.org/external/qoriq/qoriq-components/rcw/
 
-if BR2_PACKAGE_HOST_RCW
+if BR2_PACKAGE_HOST_QORIQ_RCW
 
-config BR2_PACKAGE_HOST_RCW_CUSTOM_PATH
+config BR2_PACKAGE_HOST_QORIQ_RCW_CUSTOM_PATH
 	string "RCW Source file paths"
 	help
 	  Space-separated list of .rcw and .rcwi files, that will be
diff --git a/package/rcw/rcw.hash b/package/nxp/qoriq-rcw/qoriq-rcw.hash
similarity index 82%
rename from package/rcw/rcw.hash
rename to package/nxp/qoriq-rcw/qoriq-rcw.hash
index 7de1ec659a..e9708d960d 100644
--- a/package/rcw/rcw.hash
+++ b/package/nxp/qoriq-rcw/qoriq-rcw.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256 1421ada9fec10b12ff21cd9ad82f0a835b191cb2dde80f03547764574b1346c3 rcw-LSDK-18.12.tar.gz
+sha256 1421ada9fec10b12ff21cd9ad82f0a835b191cb2dde80f03547764574b1346c3 qoriq-rcw-LSDK-18.12.tar.gz
 sha256 a531b3146425e592db17a51ff39c4801cb01fb4055ffdaada0572decc0655bcd LICENSE
diff --git a/package/nxp/qoriq-rcw/qoriq-rcw.mk b/package/nxp/qoriq-rcw/qoriq-rcw.mk
new file mode 100644
index 0000000000..3308f20192
--- /dev/null
+++ b/package/nxp/qoriq-rcw/qoriq-rcw.mk
@@ -0,0 +1,50 @@
+################################################################################
+#
+# qoriq-rcw
+#
+################################################################################
+
+QORIQ_RCW_VERSION = LSDK-18.12
+QORIQ_RCW_SITE = https://source.codeaurora.org/external/qoriq/qoriq-components/rcw
+QORIQ_RCW_SITE_METHOD = git
+QORIQ_RCW_LICENSE = BSD-3-Clause
+QORIQ_RCW_LICENSE_FILES = LICENSE
+
+QORIQ_RCW_FILES = $(call qstrip,$(BR2_PACKAGE_HOST_QORIQ_RCW_CUSTOM_PATH))
+
+ifneq ($(QORIQ_RCW_FILES),)
+# Get the name of the custom rcw file from the custom list
+QORIQ_RCW_PROJECT = $(notdir $(filter %.rcw,$(QORIQ_RCW_FILES)))
+
+# Error if there are no or more than one .rcw file
+ifeq ($(BR_BUILDING),y)
+ifneq ($(words $(QORIQ_RCW_PROJECT)),1)
+$(error BR2_PACKAGE_HOST_QORIQ_RCW_CUSTOM_PATH must have exactly one .rcw file)
+endif
+endif
+
+define HOST_QORIQ_RCW_ADD_CUSTOM_RCW_FILES
+	mkdir -p $(@D)/custom_board/rcw
+	cp -f $(filter-out %.rcw,$(QORIQ_RCW_FILES)) $(@D)/custom_board
+	cp -f $(filter %.rcw,$(QORIQ_RCW_FILES)) $(@D)/custom_board/rcw
+endef
+HOST_QORIQ_RCW_POST_PATCH_HOOKS += HOST_QORIQ_RCW_ADD_CUSTOM_RCW_FILES
+
+define HOST_QORIQ_RCW_BUILD_CMDS
+	python $(@D)/rcw.py -i $(@D)/custom_board/rcw/$(QORIQ_RCW_PROJECT) -I $(@D)/custom_board -o $(@D)/PBL.bin
+endef
+
+define HOST_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_QORIQ_RCW_INSTALL_CMDS
+	mkdir -p  $(HOST_DIR)/share/rcw
+	cp -a $(@D)/* $(HOST_DIR)/share/rcw
+	$(HOST_QORIQ_RCW_INSTALL_DELIVERY_FILE)
+endef
+
+$(eval $(host-generic-package))
diff --git a/package/rcw/rcw.mk b/package/rcw/rcw.mk
deleted file mode 100644
index 36d2da61b5..0000000000
--- a/package/rcw/rcw.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-################################################################################
-#
-# 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
-
-RCW_FILES = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_CUSTOM_PATH))
-
-ifneq ($(RCW_FILES),)
-# Get the name of the custom rcw file from the custom list
-RCW_PROJECT = $(notdir $(filter %.rcw,$(RCW_FILES)))
-
-# Error if there are no or more than one .rcw file
-ifeq ($(BR_BUILDING),y)
-ifneq ($(words $(RCW_PROJECT)),1)
-$(error BR2_PACKAGE_HOST_RCW_CUSTOM_PATH must have exactly one .rcw file)
-endif
-endif
-
-define HOST_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
-	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
-	$(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
-	mkdir -p  $(HOST_DIR)/share/rcw
-	cp -a $(@D)/* $(HOST_DIR)/share/rcw
-	$(HOST_RCW_INSTALL_DELIVERY_FILE)
-endef
-
-$(eval $(host-generic-package))
-- 
2.17.1

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

* [Buildroot] [PATCH v5 3/9] package/qoriq-rcw: bump to version LSDK-19.09
  2020-02-07  8:38 [Buildroot] [PATCH v5 1/9] package/nxp: new package directory Changming Huang
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 2/9] package/qoriq-rcw: move rcw into nxp and rename it Changming Huang
@ 2020-02-07  8:38 ` Changming Huang
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 4/9] package/qoriq-rcw: add target rcw binary support Changming Huang
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 20+ messages in thread
From: Changming Huang @ 2020-02-07  8:38 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 v4:
no changes.

changes since v3:
no changes.

changes since v2:
1. change the hash value.

changes since v1:
1. add-back license hash.
---
 package/nxp/qoriq-rcw/qoriq-rcw.hash | 2 +-
 package/nxp/qoriq-rcw/qoriq-rcw.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/nxp/qoriq-rcw/qoriq-rcw.hash b/package/nxp/qoriq-rcw/qoriq-rcw.hash
index e9708d960d..88460716f9 100644
--- a/package/nxp/qoriq-rcw/qoriq-rcw.hash
+++ b/package/nxp/qoriq-rcw/qoriq-rcw.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256 1421ada9fec10b12ff21cd9ad82f0a835b191cb2dde80f03547764574b1346c3 qoriq-rcw-LSDK-18.12.tar.gz
+sha256 4a9ce5bb1733239bf1b740b705df20f90802b16114e24f3fd56c08a7ba4b56c2 qoriq-rcw-LSDK-19.09.tar.gz
 sha256 a531b3146425e592db17a51ff39c4801cb01fb4055ffdaada0572decc0655bcd LICENSE
diff --git a/package/nxp/qoriq-rcw/qoriq-rcw.mk b/package/nxp/qoriq-rcw/qoriq-rcw.mk
index 3308f20192..7a0494adc6 100644
--- a/package/nxp/qoriq-rcw/qoriq-rcw.mk
+++ b/package/nxp/qoriq-rcw/qoriq-rcw.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-QORIQ_RCW_VERSION = LSDK-18.12
+QORIQ_RCW_VERSION = LSDK-19.09
 QORIQ_RCW_SITE = https://source.codeaurora.org/external/qoriq/qoriq-components/rcw
 QORIQ_RCW_SITE_METHOD = git
 QORIQ_RCW_LICENSE = BSD-3-Clause
-- 
2.17.1

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

* [Buildroot] [PATCH v5 4/9] package/qoriq-rcw: add target rcw binary support
  2020-02-07  8:38 [Buildroot] [PATCH v5 1/9] package/nxp: new package directory Changming Huang
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 2/9] package/qoriq-rcw: move rcw into nxp and rename it Changming Huang
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 3/9] package/qoriq-rcw: bump to version LSDK-19.09 Changming Huang
@ 2020-02-07  8:38 ` Changming Huang
  2022-01-06 14:48   ` Arnout Vandecappelle
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 5/9] boot/arm-trusted-firmware: allow additional make dependencies Changming Huang
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Changming Huang @ 2020-02-07  8:38 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_QORIQ_RCW_BIN to specify the RCW binary file.

Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
---
changes since v4:
no changes.

changes since v3:
no changes.

changes since v2:
1. modify the patch descrition.
2. more detail for BR2_PACKAGE_HOST_QORIQ_RCW_BIN.
3. remove two options not used in this patch.
4. add the condition detection in makefile for QorIQ RCW.

changes since v1:
1. add option BR2_PACKAGE_HOST_RCW_ATF for ATF.
---
 package/nxp/qoriq-rcw/Config.in.host | 12 ++++++++++++
 package/nxp/qoriq-rcw/qoriq-rcw.mk   | 15 +++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/package/nxp/qoriq-rcw/Config.in.host b/package/nxp/qoriq-rcw/Config.in.host
index 8f78a40908..9bf55894e8 100644
--- a/package/nxp/qoriq-rcw/Config.in.host
+++ b/package/nxp/qoriq-rcw/Config.in.host
@@ -25,4 +25,16 @@ config BR2_PACKAGE_HOST_QORIQ_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_QORIQ_RCW_BIN
+	string "Custom RCW"
+	depends on !BR2_PACKAGE_HOST_QORIQ_RCW_CUSTOM_PATH
+	help
+	  This option is used to specify the RCW binary file for board.
+	  which is composed with platform/serdes_value/rcw_file, platform
+	  is the platform name, serdes_value is the setting of the Serdes,
+	  rcw_file is the file name of RCW, for example:
+	  "ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.bin"
+
+	  If this option is empty, no rcw file is used.
+
 endif
diff --git a/package/nxp/qoriq-rcw/qoriq-rcw.mk b/package/nxp/qoriq-rcw/qoriq-rcw.mk
index 7a0494adc6..bbd085f277 100644
--- a/package/nxp/qoriq-rcw/qoriq-rcw.mk
+++ b/package/nxp/qoriq-rcw/qoriq-rcw.mk
@@ -37,6 +37,21 @@ endef
 define HOST_QORIQ_RCW_INSTALL_DELIVERY_FILE
 	$(INSTALL) -D -m 0644 $(@D)/PBL.bin $(BINARIES_DIR)/PBL.bin
 endef
+else
+QORIQ_RCW_PATH_FILE_BIN = $(call qstrip,$(BR2_PACKAGE_HOST_QORIQ_RCW_BIN))
+
+ifneq ($(QORIQ_RCW_PATH_FILE_BIN),)
+QORIQ_RCW_PLATFORM = $(firstword $(subst /, ,$(QORIQ_RCW_PATH_FILE_BIN)))
+QORIQ_RCW_FILE_BIN = $(lastword $(subst /, ,$(QORIQ_RCW_PATH_FILE_BIN)))
+
+define HOST_QORIQ_RCW_BUILD_CMDS
+	$(MAKE) -C $(@D)/$(QORIQ_RCW_PLATFORM)
+endef
+
+define HOST_QORIQ_RCW_INSTALL_DELIVERY_FILE
+	$(INSTALL) -D -m 0644 $(@D)/$(QORIQ_RCW_PATH_FILE_BIN) $(BINARIES_DIR)/$(QORIQ_RCW_FILE_BIN)
+endef
+endif
 endif
 
 # Copy source files and script into $(HOST_DIR)/share/rcw/ so a developer
-- 
2.17.1

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

* [Buildroot] [PATCH v5 5/9] boot/arm-trusted-firmware: allow additional make dependencies
  2020-02-07  8:38 [Buildroot] [PATCH v5 1/9] package/nxp: new package directory Changming Huang
                   ` (2 preceding siblings ...)
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 4/9] package/qoriq-rcw: add target rcw binary support Changming Huang
@ 2020-02-07  8:38 ` Changming Huang
  2022-01-06 15:05   ` Arnout Vandecappelle
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 6/9] package/qoriq-cadence-dp-firmware: new package Changming Huang
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Changming Huang @ 2020-02-07  8:38 UTC (permalink / raw)
  To: buildroot

Allow specifying additional build dependencies for ATF.

This might be more useful when using a custom git repository.

For example, when using with the ATF repository from NXP QorIQ,
the qoriq-rcw is used to build the pbl binary image.

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---
changes since v4:
1. remove the option BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS.
2. modify the description.

changes since v3:
no changes.

changes since v2:
1. introduce option BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS.
2. introduce option BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_DEPENDENCIES.
3. rewrite the makefile with these two options

changes since v1:
1. Use option BR2_PACKAGE_HOST_RCW_ATF as the condition for RCW used by ATF.
---
 boot/arm-trusted-firmware/Config.in               | 5 +++++
 boot/arm-trusted-firmware/arm-trusted-firmware.mk | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
index 373591d497..c9b74064d7 100644
--- a/boot/arm-trusted-firmware/Config.in
+++ b/boot/arm-trusted-firmware/Config.in
@@ -142,6 +142,11 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS
 	  E.G. When using the QorIQ custom ATF repository from NXP,
 	  the target 'pbl' can be used to build the pbl binary.
 
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_DEPENDENCIES
+	string "Additional AFT dependencies"
+	help
+	  Additional dependencies for ATF build, E.G. "host-qoriq-rcw"
+
 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 bf1ac46cf6..43be2fef99 100644
--- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
+++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
@@ -92,6 +92,9 @@ endif
 
 ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
 
+ARM_TRUSTED_FIRMWARE_DEPENDENCIES += \
+	$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_DEPENDENCIES))
+
 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] 20+ messages in thread

* [Buildroot] [PATCH v5 6/9] package/qoriq-cadence-dp-firmware: new package
  2020-02-07  8:38 [Buildroot] [PATCH v5 1/9] package/nxp: new package directory Changming Huang
                   ` (3 preceding siblings ...)
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 5/9] boot/arm-trusted-firmware: allow additional make dependencies Changming Huang
@ 2020-02-07  8:38 ` Changming Huang
  2022-01-06 15:14   ` Michael Walle
  2022-01-06 15:19   ` Arnout Vandecappelle
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 7/9] package/qoriq-rcw:Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO Changming Huang
                   ` (3 subsequent siblings)
  8 siblings, 2 replies; 20+ messages in thread
From: Changming Huang @ 2020-02-07  8:38 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 v4:
1. remove the variable NXP_QORIQ_SITE.
2. use the url for qoriq-cadence-dp-firmware site directly.

changes since v3:
no changes.

changes since v2:
1. change the package name to qoriq-cadence-dp-firmware.
2. add the hash of COPYING.
3. modify makefile with new option.
4. update DEVELOPERS with alphabetic ordering

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/nxp/Config.in                         |  2 ++
 .../nxp/qoriq-cadence-dp-firmware/Config.in   |  4 ++++
 .../qoriq-cadence-dp-firmware.hash            |  3 +++
 .../qoriq-cadence-dp-firmware.mk              | 23 +++++++++++++++++++
 5 files changed, 35 insertions(+)
 create mode 100644 package/nxp/qoriq-cadence-dp-firmware/Config.in
 create mode 100644 package/nxp/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.hash
 create mode 100644 package/nxp/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index e555b9773b..ffb07d67ea 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -529,6 +529,9 @@ F:	configs/nanopi_m1_plus_defconfig
 F:	configs/olimex_a13_olinuxino_defconfig
 F:	configs/orangepi_plus_defconfig
 
+N:	Changming Huang <jerry.huang@nxp.com>
+F:	package/nxp/qoriq-cadence-dp-firmware/
+
 N:	Chris Packham <judge.packham@gmail.com>
 F:	package/gstreamer1/gst1-shark/
 F:	package/micropython/
diff --git a/package/nxp/Config.in b/package/nxp/Config.in
index 575542c7ab..855d62700b 100644
--- a/package/nxp/Config.in
+++ b/package/nxp/Config.in
@@ -1,4 +1,6 @@
 menu "NXP QorIQ libraries"
 	depends on BR2_aarch64 || BR2_arm || BR2_powerpc64 || BR2_powerpc
 
+source "package/nxp/qoriq-cadence-dp-firmware/Config.in"
+
 endmenu
diff --git a/package/nxp/qoriq-cadence-dp-firmware/Config.in b/package/nxp/qoriq-cadence-dp-firmware/Config.in
new file mode 100644
index 0000000000..3f494bd3a3
--- /dev/null
+++ b/package/nxp/qoriq-cadence-dp-firmware/Config.in
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_QORIQ_CADENCE_DP_FIRMWARE
+	bool "qoriq-cadence-dp-firmware"
+	help
+	  NXP QorIQ cadence DP firmware, a resident EL3 firmware.
diff --git a/package/nxp/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.hash b/package/nxp/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.hash
new file mode 100644
index 0000000000..89aaf1d71b
--- /dev/null
+++ b/package/nxp/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 5871c5717be32f14a59624d5699d405e8ce9ae2e9c9ef86fd16e13d264a40e58  firmware-cadence-lsdk1909.bin
+sha256 d55f024af2bfff714b90de596f6d0399124b999e8c18a86b13a3b507bae6f561  COPYING
diff --git a/package/nxp/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.mk b/package/nxp/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.mk
new file mode 100644
index 0000000000..5c29602574
--- /dev/null
+++ b/package/nxp/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# qoriq-cadence-dp-firmware
+#
+################################################################################
+
+QORIQ_CADENCE_DP_FIRMWARE_VERSION = lsdk1909
+QORIQ_CADENCE_DP_FIRMWARE_SITE = http://www.nxp.com/lgfiles/sdk/$(QORIQ_CADENCE_DP_FIRMWARE_VERSION)
+QORIQ_CADENCE_DP_FIRMWARE_SOURCE = firmware-cadence-$(QORIQ_CADENCE_DP_FIRMWARE_VERSION).bin
+QORIQ_CADENCE_DP_FIRMWARE_LICENSE = NXP-Binary-EULA
+QORIQ_CADENCE_DP_FIRMWARE_LICENSE_FILES = COPYING
+QORIQ_CADENCE_DP_FIRMWARE_INSTALL_IMAGES = YES
+QORIQ_CADENCE_DP_FIRMWARE_INSTALL_TARGET = NO
+
+define QORIQ_CADENCE_DP_FIRMWARE_EXTRACT_CMDS
+	$(call NXP_EXTRACT_HELPER,$(QORIQ_CADENCE_DP_FIRMWARE_DL_DIR)/$(QORIQ_CADENCE_DP_FIRMWARE_SOURCE))
+endef
+
+define QORIQ_CADENCE_DP_FIRMWARE_INSTALL_IMAGES_CMDS
+	$(INSTALL) -D -m 0644 $(@D)/dp/ls1028a-dp-fw.bin $(BINARIES_DIR)/ls1028a-dp-fw.bin
+endef
+
+$(eval $(generic-package))
-- 
2.17.1

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

* [Buildroot] [PATCH v5 7/9] package/qoriq-rcw:Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO
  2020-02-07  8:38 [Buildroot] [PATCH v5 1/9] package/nxp: new package directory Changming Huang
                   ` (4 preceding siblings ...)
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 6/9] package/qoriq-cadence-dp-firmware: new package Changming Huang
@ 2020-02-07  8:38 ` Changming Huang
  2022-01-06 15:54   ` Arnout Vandecappelle
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 8/9] package/nxp/qoriq-rcw: introduce BR2_PACKAGE_HOST_QORIQ_RCW_BOOT_MODE for boot mode Changming Huang
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Changming Huang @ 2020-02-07  8:38 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 since v4:
no changes.

changes since v3:
no changes.

changes since v2:
no changes.

changes since 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/nxp/qoriq-rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch
 create mode 100644 package/nxp/qoriq-rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patch

diff --git a/package/nxp/qoriq-rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch b/package/nxp/qoriq-rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch
new file mode 100644
index 0000000000..21c6c84cbd
--- /dev/null
+++ b/package/nxp/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/nxp/qoriq-rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patch b/package/nxp/qoriq-rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patch
new file mode 100644
index 0000000000..4f00541d69
--- /dev/null
+++ b/package/nxp/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] 20+ messages in thread

* [Buildroot] [PATCH v5 8/9] package/nxp/qoriq-rcw: introduce BR2_PACKAGE_HOST_QORIQ_RCW_BOOT_MODE for boot mode
  2020-02-07  8:38 [Buildroot] [PATCH v5 1/9] package/nxp: new package directory Changming Huang
                   ` (5 preceding siblings ...)
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 7/9] package/qoriq-rcw:Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO Changming Huang
@ 2020-02-07  8:38 ` Changming Huang
  2022-01-06 15:55   ` Arnout Vandecappelle
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 9/9] board/nxp/ls1028ardb: new board Changming Huang
  2022-01-06 14:45 ` [Buildroot] [PATCH v5 1/9] package/nxp: new package directory Arnout Vandecappelle
  8 siblings, 1 reply; 20+ messages in thread
From: Changming Huang @ 2020-02-07  8:38 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---
changes since v4:
no changes.

changes since v3:
1. split this option from board patch.
---
 package/nxp/qoriq-rcw/Config.in.host | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/nxp/qoriq-rcw/Config.in.host b/package/nxp/qoriq-rcw/Config.in.host
index 9bf55894e8..7f5fbb3202 100644
--- a/package/nxp/qoriq-rcw/Config.in.host
+++ b/package/nxp/qoriq-rcw/Config.in.host
@@ -37,4 +37,10 @@ config BR2_PACKAGE_HOST_QORIQ_RCW_BIN
 
 	  If this option is empty, no rcw file is used.
 
+config BR2_PACKAGE_HOST_QORIQ_RCW_BOOT_MODE
+	string "QorIQ RCW Boot mode"
+	depends on !BR2_PACKAGE_HOST_QORIQ_RCW_CUSTOM_PATH
+	help
+	  Specify the boot mode, for example, sd, emmc, flexspi_nor.
+
 endif
-- 
2.17.1

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

* [Buildroot] [PATCH v5 9/9] board/nxp/ls1028ardb: new board
  2020-02-07  8:38 [Buildroot] [PATCH v5 1/9] package/nxp: new package directory Changming Huang
                   ` (6 preceding siblings ...)
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 8/9] package/nxp/qoriq-rcw: introduce BR2_PACKAGE_HOST_QORIQ_RCW_BOOT_MODE for boot mode Changming Huang
@ 2020-02-07  8:38 ` Changming Huang
  2022-01-06 16:27   ` Arnout Vandecappelle
  2022-01-06 14:45 ` [Buildroot] [PATCH v5 1/9] package/nxp: new package directory Arnout Vandecappelle
  8 siblings, 1 reply; 20+ messages in thread
From: Changming Huang @ 2020-02-07  8:38 UTC (permalink / raw)
  To: buildroot

This is to support NXP LS1028ARDB board 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/nxp/ls1028ardb/: scripts related with ls1028ardb
nxp_ls1028ardb-64b_defconfig: defconfig boot from SD card

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---
changes since v4:
1. change the uboot version to LSDK-19.09-update-311219.
2. change the linux version to LSDK-19.09-update-311219-V4.19.
3. change the NXP atf version to LSDK-19.09-update-311219.

changes since v3:
1. merge previous version patch 8 and patch 9 to one.
2. split RCW options BR2_PACKAGE_HOST_QORIQ_RCW_BOOT_MODE to another patch.
3. remove scritps about emmc and xspi.
4. remove xspi and emmc configuration.
5. add new option BR2_ROOTFS_OVERLAY for 10-network.rules.
6. modify u-boot environment scripts, remove all setting not used.
7. remove the scripts which is not used by default configuration.

changes since v2:
1. Modify the qoriq-cadence-dp-firmware option in defconfig.
2. rename defconfig to nxp_ls1028*.
3. remove extra packages except busybox in defconfig.
4. modify the description of file genimage.xspi.cfg.template.

changes since v1:
1. add new option in configs/freescale_ls1028ardb-xxxx_defconfig.
---
 board/nxp/common/ls/busybox.config            |  9 ++
 board/nxp/ls1028ardb/genimage.sd.cfg.template | 52 ++++++++++++
 board/nxp/ls1028ardb/post-image.sh            | 57 +++++++++++++
 board/nxp/ls1028ardb/readme.txt               | 61 +++++++++++++
 .../etc/udev/rules.d/10-network.rules         | 16 ++++
 .../nxp/ls1028ardb/u-boot-environment-sd.txt  | 13 +++
 configs/nxp_ls1028ardb-64b_defconfig          | 85 +++++++++++++++++++
 7 files changed, 293 insertions(+)
 create mode 100644 board/nxp/common/ls/busybox.config
 create mode 100644 board/nxp/ls1028ardb/genimage.sd.cfg.template
 create mode 100755 board/nxp/ls1028ardb/post-image.sh
 create mode 100644 board/nxp/ls1028ardb/readme.txt
 create mode 100644 board/nxp/ls1028ardb/rootfs_overlay/etc/udev/rules.d/10-network.rules
 create mode 100644 board/nxp/ls1028ardb/u-boot-environment-sd.txt
 create mode 100644 configs/nxp_ls1028ardb-64b_defconfig

diff --git a/board/nxp/common/ls/busybox.config b/board/nxp/common/ls/busybox.config
new file mode 100644
index 0000000000..7074c65aa6
--- /dev/null
+++ b/board/nxp/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/nxp/ls1028ardb/genimage.sd.cfg.template b/board/nxp/ls1028ardb/genimage.sd.cfg.template
new file mode 100644
index 0000000000..ab50e103c1
--- /dev/null
+++ b/board/nxp/ls1028ardb/genimage.sd.cfg.template
@@ -0,0 +1,52 @@
+# Minimal SD card image for the NXP boards Template
+#
+# SD card image (sdcard.img) 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/nxp/ls1028ardb/post-image.sh b/board/nxp/ls1028ardb/post-image.sh
new file mode 100755
index 0000000000..c655074386
--- /dev/null
+++ b/board/nxp/ls1028ardb/post-image.sh
@@ -0,0 +1,57 @@
+#!/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
+}
+
+#
+# genimage.sd.cfg.template: Boot from SD
+# genimage.emmc.cfg.template: Boot from eMMC
+#
+genimage_type()
+{
+	if grep -Eq "^BR2_PACKAGE_HOST_QORIQ_RCW_BOOT_MODE=\"emmc\"$" ${BR2_CONFIG}; then
+		echo "genimage.emmc.cfg.template"
+	elif grep -Eq "^BR2_PACKAGE_HOST_QORIQ_RCW_BOOT_MODE=\"sd\"$" ${BR2_CONFIG}; then
+		echo "genimage.sd.cfg.template"
+	fi
+}
+
+main()
+{
+	local FILES="$(dtb_file) "ls1028a-dp-fw.bin", "Image""
+	local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)"
+	local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+	sed -e "s/%FILES%/${FILES}/" \
+		board/nxp/ls1028ardb/$(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/nxp/ls1028ardb/readme.txt b/board/nxp/ls1028ardb/readme.txt
new file mode 100644
index 0000000000..713babd7c3
--- /dev/null
+++ b/board/nxp/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/nxp/ls1028ardb/rootfs_overlay/etc/udev/rules.d/10-network.rules b/board/nxp/ls1028ardb/rootfs_overlay/etc/udev/rules.d/10-network.rules
new file mode 100644
index 0000000000..19f41634bd
--- /dev/null
+++ b/board/nxp/ls1028ardb/rootfs_overlay/etc/udev/rules.d/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/nxp/ls1028ardb/u-boot-environment-sd.txt b/board/nxp/ls1028ardb/u-boot-environment-sd.txt
new file mode 100644
index 0000000000..f91e6b585f
--- /dev/null
+++ b/board/nxp/ls1028ardb/u-boot-environment-sd.txt
@@ -0,0 +1,13 @@
+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
+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/configs/nxp_ls1028ardb-64b_defconfig b/configs/nxp_ls1028ardb-64b_defconfig
new file mode 100644
index 0000000000..cb0131a35c
--- /dev/null
+++ b/configs/nxp_ls1028ardb-64b_defconfig
@@ -0,0 +1,85 @@
+# Architecture
+BR2_aarch64=y
+BR2_cortex_a72=y
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+
+# Hostname and issue
+BR2_TARGET_GENERIC_HOSTNAME="LS1028ARDB"
+
+# toolchain
+BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
+BR2_TOOLCHAIN_BUILDROOT_LIBC="glibc"
+
+# Linux headers same as kernel
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=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-update-311219"
+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/nxp/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-update-311219-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/nxp/ls1028ardb/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="$(LINUX_DIR) $(TOPDIR) $(UBOOT_DIR)"
+
+# busybox setting
+BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/nxp/common/ls/busybox.config"
+BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
+
+# packages for rcw
+BR2_PACKAGE_HOST_QORIQ_RCW=y
+BR2_PACKAGE_HOST_QORIQ_RCW_BOOT_MODE="sd"
+BR2_PACKAGE_HOST_QORIQ_RCW_BIN="ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.bin"
+
+#Display port firmware
+BR2_PACKAGE_QORIQ_CADENCE_DP_FIRMWARE=y
+
+#eudev support
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+BR2_ROOTFS_OVERLAY="board/nxp/ls1028ardb/rootfs_overlay"
+
+# 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-update-311219"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="ls1028ardb"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="fip.bin bl2_sd.pbl"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS="pbl"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_DEPENDENCIES="host-qoriq-rcw"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="BOOT_MODE=sd RCW=$(BINARIES_DIR)/rcw_1300_sdboot.bin"
-- 
2.17.1

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

* [Buildroot] [PATCH v5 2/9] package/qoriq-rcw: move rcw into nxp and rename it
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 2/9] package/qoriq-rcw: move rcw into nxp and rename it Changming Huang
@ 2020-04-14  9:35   ` Heiko Thiery
  2020-12-16 21:02   ` Yann E. MORIN
  1 sibling, 0 replies; 20+ messages in thread
From: Heiko Thiery @ 2020-04-14  9:35 UTC (permalink / raw)
  To: buildroot

Hi Jerry,

Am Fr., 7. Feb. 2020 um 09:41 Uhr schrieb Changming Huang <jerry.huang@nxp.com>:
>
> Move package/rcw into package/nxp,
> and rename it to qoriq-rcw.
>
> Signed-off-by: Changming Huang <jerry.huang@nxp.com>
> ---
> changes since v4:
> no changes.
>
> changes since v3:
> no changes.
>
> changes since v2:
> 1. change the package name to qoriq-rcw to keep consistent with imx-xxx.
> 2. add the handing in Config.in.legacy
>
> changes since v1:
> 1. new patch.
> 2. move rcw to sub-directory freescale-qoriq.
> 3. rename to fsl-qoriq-rcw.
> ---
>  Config.in.legacy                              | 16 ++++++
>  DEVELOPERS                                    |  2 +-
>  package/Config.in.host                        |  2 +-
>  package/{rcw => nxp/qoriq-rcw}/Config.in.host |  6 +--
>  .../rcw.hash => nxp/qoriq-rcw/qoriq-rcw.hash} |  2 +-
>  package/nxp/qoriq-rcw/qoriq-rcw.mk            | 50 +++++++++++++++++++
>  package/rcw/rcw.mk                            | 50 -------------------
>  7 files changed, 72 insertions(+), 56 deletions(-)
>  rename package/{rcw => nxp/qoriq-rcw}/Config.in.host (88%)
>  rename package/{rcw/rcw.hash => nxp/qoriq-rcw/qoriq-rcw.hash} (82%)
>  create mode 100644 package/nxp/qoriq-rcw/qoriq-rcw.mk
>  delete mode 100644 package/rcw/rcw.mk
>
> diff --git a/Config.in.legacy b/Config.in.legacy
> index 3c6984d886..2473282e9d 100644
> --- a/Config.in.legacy
> +++ b/Config.in.legacy
> @@ -258,6 +258,22 @@ config BR2_BINUTILS_VERSION_2_30_X
>           current default version (2.31 or later) has been selected
>           instead.
>
> +config BR2_PACKAGE_HOST_RCW
> +       bool "rcw package was removed"
> +       select BR2_LEGACY
> +       help
> +         Because rcw package has been renamed to qoriq-rcw and moved
> +         to "nxp", option BR2_PACKAGE_HOST_RCW is removed, the option
> +         BR2_PACKAGE_HOST_QORIQ_RCW can be used for QorIQ platforms.
> +
> +config BR2_PACKAGE_HOST_RCW
> +       bool "rcw package was removed"
> +       select BR2_LEGACY
> +       help
> +         Because rcw package has been renamed to qoriq-rcw and moved
> +         to "nxp", option BR2_PACKAGE_HOST_RCW is removed, the option
> +         BR2_PACKAGE_HOST_QORIQ_RCW can be used for QorIQ platforms.
> +

here seems to be a mistake ... the BR2_PACKAGE_HOST_RCW section is
there twice :-/

-- 
Heiko

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

* [Buildroot] [PATCH v5 2/9] package/qoriq-rcw: move rcw into nxp and rename it
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 2/9] package/qoriq-rcw: move rcw into nxp and rename it Changming Huang
  2020-04-14  9:35   ` Heiko Thiery
@ 2020-12-16 21:02   ` Yann E. MORIN
  1 sibling, 0 replies; 20+ messages in thread
From: Yann E. MORIN @ 2020-12-16 21:02 UTC (permalink / raw)
  To: buildroot

Changming, All,

On 2020-02-07 16:38 +0800, Changming Huang spake thusly:
> Move package/rcw into package/nxp,
> and rename it to qoriq-rcw.
> 
> Signed-off-by: Changming Huang <jerry.huang@nxp.com>

I have eventually applied that patch to master, with a few changes:

  - rebase on master
  - incorporate changes by Michael
  - don't move to an 'nxp' sub-directory
  - reword the legacy entry; select the new package
  - expand commit log to explain why we keep installing in
    host/usr/share/rcw/ (thanks to Michael for prompting that)

Also, I've updated the commit log based on the recent patch from
Micheal:
    https://patchwork.ozlabs.org/project/buildroot/patch/20201215081736.4791-1-michael at walle.cc/

I'm going to look further into the rest of the series in the coming
days.

Sorry for the huge delay in handling that...

Regards,
Yann E. MORIN.

> ---
> changes since v4:
> no changes.
> 
> changes since v3:
> no changes.
> 
> changes since v2:
> 1. change the package name to qoriq-rcw to keep consistent with imx-xxx.
> 2. add the handing in Config.in.legacy
> 
> changes since v1:
> 1. new patch.
> 2. move rcw to sub-directory freescale-qoriq.
> 3. rename to fsl-qoriq-rcw.
> ---
>  Config.in.legacy                              | 16 ++++++
>  DEVELOPERS                                    |  2 +-
>  package/Config.in.host                        |  2 +-
>  package/{rcw => nxp/qoriq-rcw}/Config.in.host |  6 +--
>  .../rcw.hash => nxp/qoriq-rcw/qoriq-rcw.hash} |  2 +-
>  package/nxp/qoriq-rcw/qoriq-rcw.mk            | 50 +++++++++++++++++++
>  package/rcw/rcw.mk                            | 50 -------------------
>  7 files changed, 72 insertions(+), 56 deletions(-)
>  rename package/{rcw => nxp/qoriq-rcw}/Config.in.host (88%)
>  rename package/{rcw/rcw.hash => nxp/qoriq-rcw/qoriq-rcw.hash} (82%)
>  create mode 100644 package/nxp/qoriq-rcw/qoriq-rcw.mk
>  delete mode 100644 package/rcw/rcw.mk
> 
> diff --git a/Config.in.legacy b/Config.in.legacy
> index 3c6984d886..2473282e9d 100644
> --- a/Config.in.legacy
> +++ b/Config.in.legacy
> @@ -258,6 +258,22 @@ config BR2_BINUTILS_VERSION_2_30_X
>  	  current default version (2.31 or later) has been selected
>  	  instead.
>  
> +config BR2_PACKAGE_HOST_RCW
> +	bool "rcw package was removed"
> +	select BR2_LEGACY
> +	help
> +	  Because rcw package has been renamed to qoriq-rcw and moved
> +	  to "nxp", option BR2_PACKAGE_HOST_RCW is removed, the option
> +	  BR2_PACKAGE_HOST_QORIQ_RCW can be used for QorIQ platforms.
> +
> +config BR2_PACKAGE_HOST_RCW
> +	bool "rcw package was removed"
> +	select BR2_LEGACY
> +	help
> +	  Because rcw package has been renamed to qoriq-rcw and moved
> +	  to "nxp", option BR2_PACKAGE_HOST_RCW is removed, the option
> +	  BR2_PACKAGE_HOST_QORIQ_RCW can be used for QorIQ platforms.
> +
>  config BR2_PACKAGE_RPI_USERLAND_START_VCFILED
>  	bool "rpi-userland start vcfiled was removed"
>  	select BR2_LEGACY
> diff --git a/DEVELOPERS b/DEVELOPERS
> index d8ea23e0b3..e555b9773b 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1654,6 +1654,7 @@ F:	package/mrouted/
>  F:	package/mtd/
>  F:	package/mtools/
>  F:	package/nginx-upload/
> +F:	package/nxp/qoriq-rcw/
>  F:	package/omniorb/
>  F:	package/openresolv/
>  F:	package/paxtest/
> @@ -1674,7 +1675,6 @@ F:	package/python-pyrex/
>  F:	package/python-tinyrpc/
>  F:	package/python-txdbus/
>  F:	package/raptor/
> -F:	package/rcw/
>  F:	package/rng-tools/
>  F:	package/rsyslog/
>  F:	package/setools/
> diff --git a/package/Config.in.host b/package/Config.in.host
> index 62e860d7c3..55f1e87f89 100644
> --- a/package/Config.in.host
> +++ b/package/Config.in.host
> @@ -45,6 +45,7 @@ menu "Host utilities"
>  	source "package/mtd/Config.in.host"
>  	source "package/mtools/Config.in.host"
>  	source "package/mxsldr/Config.in.host"
> +	source "package/nxp/qoriq-rcw/Config.in.host"
>  	source "package/omap-u-boot-utils/Config.in.host"
>  	source "package/openocd/Config.in.host"
>  	source "package/opkg-utils/Config.in.host"
> @@ -62,7 +63,6 @@ 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/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/nxp/qoriq-rcw/Config.in.host
> similarity index 88%
> rename from package/rcw/Config.in.host
> rename to package/nxp/qoriq-rcw/Config.in.host
> index a9253958d9..8f78a40908 100644
> --- a/package/rcw/Config.in.host
> +++ b/package/nxp/qoriq-rcw/Config.in.host
> @@ -1,4 +1,4 @@
> -config BR2_PACKAGE_HOST_RCW
> +config BR2_PACKAGE_HOST_QORIQ_RCW
>  	bool "host rcw"
>  	help
>  	  This package provides an reset configuration word(RCW)
> @@ -11,9 +11,9 @@ config BR2_PACKAGE_HOST_RCW
>  
>  	  https://source.codeaurora.org/external/qoriq/qoriq-components/rcw/
>  
> -if BR2_PACKAGE_HOST_RCW
> +if BR2_PACKAGE_HOST_QORIQ_RCW
>  
> -config BR2_PACKAGE_HOST_RCW_CUSTOM_PATH
> +config BR2_PACKAGE_HOST_QORIQ_RCW_CUSTOM_PATH
>  	string "RCW Source file paths"
>  	help
>  	  Space-separated list of .rcw and .rcwi files, that will be
> diff --git a/package/rcw/rcw.hash b/package/nxp/qoriq-rcw/qoriq-rcw.hash
> similarity index 82%
> rename from package/rcw/rcw.hash
> rename to package/nxp/qoriq-rcw/qoriq-rcw.hash
> index 7de1ec659a..e9708d960d 100644
> --- a/package/rcw/rcw.hash
> +++ b/package/nxp/qoriq-rcw/qoriq-rcw.hash
> @@ -1,3 +1,3 @@
>  # Locally calculated
> -sha256 1421ada9fec10b12ff21cd9ad82f0a835b191cb2dde80f03547764574b1346c3 rcw-LSDK-18.12.tar.gz
> +sha256 1421ada9fec10b12ff21cd9ad82f0a835b191cb2dde80f03547764574b1346c3 qoriq-rcw-LSDK-18.12.tar.gz
>  sha256 a531b3146425e592db17a51ff39c4801cb01fb4055ffdaada0572decc0655bcd LICENSE
> diff --git a/package/nxp/qoriq-rcw/qoriq-rcw.mk b/package/nxp/qoriq-rcw/qoriq-rcw.mk
> new file mode 100644
> index 0000000000..3308f20192
> --- /dev/null
> +++ b/package/nxp/qoriq-rcw/qoriq-rcw.mk
> @@ -0,0 +1,50 @@
> +################################################################################
> +#
> +# qoriq-rcw
> +#
> +################################################################################
> +
> +QORIQ_RCW_VERSION = LSDK-18.12
> +QORIQ_RCW_SITE = https://source.codeaurora.org/external/qoriq/qoriq-components/rcw
> +QORIQ_RCW_SITE_METHOD = git
> +QORIQ_RCW_LICENSE = BSD-3-Clause
> +QORIQ_RCW_LICENSE_FILES = LICENSE
> +
> +QORIQ_RCW_FILES = $(call qstrip,$(BR2_PACKAGE_HOST_QORIQ_RCW_CUSTOM_PATH))
> +
> +ifneq ($(QORIQ_RCW_FILES),)
> +# Get the name of the custom rcw file from the custom list
> +QORIQ_RCW_PROJECT = $(notdir $(filter %.rcw,$(QORIQ_RCW_FILES)))
> +
> +# Error if there are no or more than one .rcw file
> +ifeq ($(BR_BUILDING),y)
> +ifneq ($(words $(QORIQ_RCW_PROJECT)),1)
> +$(error BR2_PACKAGE_HOST_QORIQ_RCW_CUSTOM_PATH must have exactly one .rcw file)
> +endif
> +endif
> +
> +define HOST_QORIQ_RCW_ADD_CUSTOM_RCW_FILES
> +	mkdir -p $(@D)/custom_board/rcw
> +	cp -f $(filter-out %.rcw,$(QORIQ_RCW_FILES)) $(@D)/custom_board
> +	cp -f $(filter %.rcw,$(QORIQ_RCW_FILES)) $(@D)/custom_board/rcw
> +endef
> +HOST_QORIQ_RCW_POST_PATCH_HOOKS += HOST_QORIQ_RCW_ADD_CUSTOM_RCW_FILES
> +
> +define HOST_QORIQ_RCW_BUILD_CMDS
> +	python $(@D)/rcw.py -i $(@D)/custom_board/rcw/$(QORIQ_RCW_PROJECT) -I $(@D)/custom_board -o $(@D)/PBL.bin
> +endef
> +
> +define HOST_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_QORIQ_RCW_INSTALL_CMDS
> +	mkdir -p  $(HOST_DIR)/share/rcw
> +	cp -a $(@D)/* $(HOST_DIR)/share/rcw
> +	$(HOST_QORIQ_RCW_INSTALL_DELIVERY_FILE)
> +endef
> +
> +$(eval $(host-generic-package))
> diff --git a/package/rcw/rcw.mk b/package/rcw/rcw.mk
> deleted file mode 100644
> index 36d2da61b5..0000000000
> --- a/package/rcw/rcw.mk
> +++ /dev/null
> @@ -1,50 +0,0 @@
> -################################################################################
> -#
> -# 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
> -
> -RCW_FILES = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_CUSTOM_PATH))
> -
> -ifneq ($(RCW_FILES),)
> -# Get the name of the custom rcw file from the custom list
> -RCW_PROJECT = $(notdir $(filter %.rcw,$(RCW_FILES)))
> -
> -# Error if there are no or more than one .rcw file
> -ifeq ($(BR_BUILDING),y)
> -ifneq ($(words $(RCW_PROJECT)),1)
> -$(error BR2_PACKAGE_HOST_RCW_CUSTOM_PATH must have exactly one .rcw file)
> -endif
> -endif
> -
> -define HOST_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
> -	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
> -	$(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
> -	mkdir -p  $(HOST_DIR)/share/rcw
> -	cp -a $(@D)/* $(HOST_DIR)/share/rcw
> -	$(HOST_RCW_INSTALL_DELIVERY_FILE)
> -endef
> -
> -$(eval $(host-generic-package))
> -- 
> 2.17.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* Re: [Buildroot] [PATCH v5 1/9] package/nxp: new package directory
  2020-02-07  8:38 [Buildroot] [PATCH v5 1/9] package/nxp: new package directory Changming Huang
                   ` (7 preceding siblings ...)
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 9/9] board/nxp/ls1028ardb: new board Changming Huang
@ 2022-01-06 14:45 ` Arnout Vandecappelle
  2022-01-06 15:00   ` Michael Walle
  8 siblings, 1 reply; 20+ messages in thread
From: Arnout Vandecappelle @ 2022-01-06 14:45 UTC (permalink / raw)
  To: Changming Huang, buildroot
  Cc: geomatsi, Chris Dimich, michael, thomas.petazzoni, heiko.thiery,
	Michael Trimarchi, matthew.weber

  Hi Changming,

  I finally started picking up this series after two years. Unfortunately, I 
have a lot of requests for changes still.

On 07/02/2020 09:38, Changming Huang wrote:
> The "nxp" directory is intended to contain all NXP
> QorIQ (including PowerPC and LayerScape serial) related packages,
> together with their download site and version info.

  We try to avoid subdirectories in package/; we only add them in case there is 
some common functionality that needs to be factored out, like for e.g. qt5.

  In this series, the only commonality that I found is the binary extraction, 
but it ends up to be used only by qoriq-cadence-dp-firmware. That's not worth it 
IMHO.

  Therefore, I marked this patch and rejected.

  Note that it would make sense to do this if we would also move the 
freescale-imx stuff into the same directory (freescale is anyway nxp now so it 
should be OK to do that).


> Signed-off-by: Changming Huang <jerry.huang@nxp.com>
> ---
> changes since v4:
> no changes.
> 
> changes since v3:
> no changes.
> 
> changes since v2:
> 1. change the sub-direcotry to "nxp".
> 2. add helper.mk macro to extract compressed file.
> 
> changes since v1:
> no changes.
> ---
>   package/Config.in     |  1 +
>   package/nxp/Config.in |  4 ++++
>   package/nxp/helper.mk | 32 ++++++++++++++++++++++++++++++++
>   3 files changed, 37 insertions(+)
>   create mode 100644 package/nxp/Config.in
>   create mode 100644 package/nxp/helper.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index bad4f9cba6..f9827769a2 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -497,6 +497,7 @@ endmenu
>   	source "package/nvidia-driver/Config.in"
>   	source "package/nvidia-tegra23/Config.in"
>   	source "package/nvme/Config.in"
> +	source "package/nxp/Config.in"
>   	source "package/ofono/Config.in"
>   	source "package/on2-8170-modules/Config.in"
>   	source "package/open2300/Config.in"
> diff --git a/package/nxp/Config.in b/package/nxp/Config.in
> new file mode 100644
> index 0000000000..575542c7ab
> --- /dev/null
> +++ b/package/nxp/Config.in
> @@ -0,0 +1,4 @@
> +menu "NXP QorIQ libraries"
> +	depends on BR2_aarch64 || BR2_arm || BR2_powerpc64 || BR2_powerpc
> +
> +endmenu
> diff --git a/package/nxp/helper.mk b/package/nxp/helper.mk
> new file mode 100644
> index 0000000000..79e4236249
> --- /dev/null
> +++ b/package/nxp/helper.mk

  The .mk file should have the same name as the directory, so nxp.mk.

  Regards,
  Arnout

> @@ -0,0 +1,32 @@
> +################################################################################
> +#
> +# helper
> +#
> +################################################################################
> +
> +# Helper for self-extracting binaries distributed by NXP.
> +#
> +# The --force option makes sure it doesn't fail if the source
> +# directory already exists. The --auto-accept skips the license check,
> +# as it is not needed in Buildroot because we have legal-info. Since
> +# there's a EULA in the binary file, we extract it in this macro, and
> +# it should therefore be added to the LICENSE_FILES variable of
> +# packages using this macro. Also, remember to set REDISTRIBUTE to
> +# "NO". Indeed, this is a legal minefield: the EULA specifies that the
> +# Board Support Package includes software and hardware (sic!) for
> +# which a separate license is needed...
> +#
> +# $(1): full path to the archive file
> +#
> +define NXP_EXTRACT_HELPER
> +	awk 'BEGIN      { start = 0; } \
> +	     /^EOEULA/  { start = 0; } \
> +	                { if (start) print; } \
> +	     /<<EOEULA/ { start = 1; }' \
> +	    $(1) > $(@D)/EULA
> +	cd $(@D) && sh $(1) --force --auto-accept
> +	find $(@D)/$(basename $(notdir $(1))) -mindepth 1 -maxdepth 1 -exec mv {} $(@D) \;
> +	rmdir $(@D)/$(basename $(notdir $(1)))
> +endef
> +
> +include $(sort $(wildcard package/nxp/*/*.mk))
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v5 4/9] package/qoriq-rcw: add target rcw binary support
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 4/9] package/qoriq-rcw: add target rcw binary support Changming Huang
@ 2022-01-06 14:48   ` Arnout Vandecappelle
  0 siblings, 0 replies; 20+ messages in thread
From: Arnout Vandecappelle @ 2022-01-06 14:48 UTC (permalink / raw)
  To: Changming Huang, buildroot
  Cc: michael, matthew.weber, thomas.petazzoni, geomatsi, heiko.thiery



On 07/02/2020 09:38, Changming Huang 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_QORIQ_RCW_BIN to specify the RCW binary file.

  It took me some time to understand: this is actually simply about an in-tree 
RCW source, rather than a custom one. So I heavily modified this patch:

      - rename the option to _RCW_INTREE;
      - update commit message, documentation, and internal variables
        accordingly;
      - reorganise condition tree so it becomes a little simpler;
      - add patsubst so the source can be specified as either %.rcw or %.bin;
      - always install it as PBL.bin, to be consistent with the custom
        option.

  Note that that last one (PBL.bin) also affects post-image scripts that use it. 
But I didn't get down to the ls1028ardb defconfig.

  Regards,
  Arnout

> 
> Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> ---
> changes since v4:
> no changes.
> 
> changes since v3:
> no changes.
> 
> changes since v2:
> 1. modify the patch descrition.
> 2. more detail for BR2_PACKAGE_HOST_QORIQ_RCW_BIN.
> 3. remove two options not used in this patch.
> 4. add the condition detection in makefile for QorIQ RCW.
> 
> changes since v1:
> 1. add option BR2_PACKAGE_HOST_RCW_ATF for ATF.
> ---
>   package/nxp/qoriq-rcw/Config.in.host | 12 ++++++++++++
>   package/nxp/qoriq-rcw/qoriq-rcw.mk   | 15 +++++++++++++++
>   2 files changed, 27 insertions(+)
> 
> diff --git a/package/nxp/qoriq-rcw/Config.in.host b/package/nxp/qoriq-rcw/Config.in.host
> index 8f78a40908..9bf55894e8 100644
> --- a/package/nxp/qoriq-rcw/Config.in.host
> +++ b/package/nxp/qoriq-rcw/Config.in.host
> @@ -25,4 +25,16 @@ config BR2_PACKAGE_HOST_QORIQ_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_QORIQ_RCW_BIN
> +	string "Custom RCW"
> +	depends on !BR2_PACKAGE_HOST_QORIQ_RCW_CUSTOM_PATH
> +	help
> +	  This option is used to specify the RCW binary file for board.
> +	  which is composed with platform/serdes_value/rcw_file, platform
> +	  is the platform name, serdes_value is the setting of the Serdes,
> +	  rcw_file is the file name of RCW, for example:
> +	  "ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.bin"
> +
> +	  If this option is empty, no rcw file is used.
> +
>   endif
> diff --git a/package/nxp/qoriq-rcw/qoriq-rcw.mk b/package/nxp/qoriq-rcw/qoriq-rcw.mk
> index 7a0494adc6..bbd085f277 100644
> --- a/package/nxp/qoriq-rcw/qoriq-rcw.mk
> +++ b/package/nxp/qoriq-rcw/qoriq-rcw.mk
> @@ -37,6 +37,21 @@ endef
>   define HOST_QORIQ_RCW_INSTALL_DELIVERY_FILE
>   	$(INSTALL) -D -m 0644 $(@D)/PBL.bin $(BINARIES_DIR)/PBL.bin
>   endef
> +else
> +QORIQ_RCW_PATH_FILE_BIN = $(call qstrip,$(BR2_PACKAGE_HOST_QORIQ_RCW_BIN))
> +
> +ifneq ($(QORIQ_RCW_PATH_FILE_BIN),)
> +QORIQ_RCW_PLATFORM = $(firstword $(subst /, ,$(QORIQ_RCW_PATH_FILE_BIN)))
> +QORIQ_RCW_FILE_BIN = $(lastword $(subst /, ,$(QORIQ_RCW_PATH_FILE_BIN)))
> +
> +define HOST_QORIQ_RCW_BUILD_CMDS
> +	$(MAKE) -C $(@D)/$(QORIQ_RCW_PLATFORM)
> +endef
> +
> +define HOST_QORIQ_RCW_INSTALL_DELIVERY_FILE
> +	$(INSTALL) -D -m 0644 $(@D)/$(QORIQ_RCW_PATH_FILE_BIN) $(BINARIES_DIR)/$(QORIQ_RCW_FILE_BIN)
> +endef
> +endif
>   endif
>   
>   # Copy source files and script into $(HOST_DIR)/share/rcw/ so a developer
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v5 1/9] package/nxp: new package directory
  2022-01-06 14:45 ` [Buildroot] [PATCH v5 1/9] package/nxp: new package directory Arnout Vandecappelle
@ 2022-01-06 15:00   ` Michael Walle
  0 siblings, 0 replies; 20+ messages in thread
From: Michael Walle @ 2022-01-06 15:00 UTC (permalink / raw)
  To: Arnout Vandecappelle
  Cc: geomatsi, Chris Dimich, Changming Huang, thomas.petazzoni,
	buildroot, heiko.thiery, Michael Trimarchi, matthew.weber

Am 2022-01-06 15:45, schrieb Arnout Vandecappelle:
>  In this series, the only commonality that I found is the binary
> extraction, but it ends up to be used only by
> qoriq-cadence-dp-firmware. That's not worth it IMHO.

mh? all the imx stuff is using this method.

> 
>  Therefore, I marked this patch and rejected.
> 
>  Note that it would make sense to do this if we would also move the
> freescale-imx stuff into the same directory (freescale is anyway nxp
> now so it should be OK to do that).

ah. yes. that was the idea back then IMHO.

-michael
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v5 5/9] boot/arm-trusted-firmware: allow additional make dependencies
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 5/9] boot/arm-trusted-firmware: allow additional make dependencies Changming Huang
@ 2022-01-06 15:05   ` Arnout Vandecappelle
  0 siblings, 0 replies; 20+ messages in thread
From: Arnout Vandecappelle @ 2022-01-06 15:05 UTC (permalink / raw)
  To: Changming Huang, buildroot
  Cc: thomas.petazzoni, heiko.thiery, michael, geomatsi, matthew.weber



On 07/02/2020 09:38, Changming Huang wrote:
> Allow specifying additional build dependencies for ATF.
> 
> This might be more useful when using a custom git repository.
> 
> For example, when using with the ATF repository from NXP QorIQ,
> the qoriq-rcw is used to build the pbl binary image.

  This is not a very user-friendly way to do it. Since RCW support is something 
that is in upstream ATF, I think it makes a whole lot more sense to make it an 
explicit option. Something like:

config BR2_TARGET_ARM_TRUSTED_FIRMWARE_RCW
	bool "Include RCW"
	depends on BR2_HOST_QORIQ_RCW
	help
	  Include the RCW in BL2.

  That way you can also add the RCW=$(BINARIES_DIR)/PBL.bin automatically to the 
variables (and this is an advantage of always calling it PBL.bin :-)

  I've marked this patch as Changes Requested.

  Regards,
  Arnout

> 
> Signed-off-by: Changming Huang <jerry.huang@nxp.com>
> ---
> changes since v4:
> 1. remove the option BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS.
> 2. modify the description.
> 
> changes since v3:
> no changes.
> 
> changes since v2:
> 1. introduce option BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS.
> 2. introduce option BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_DEPENDENCIES.
> 3. rewrite the makefile with these two options
> 
> changes since v1:
> 1. Use option BR2_PACKAGE_HOST_RCW_ATF as the condition for RCW used by ATF.
> ---
>   boot/arm-trusted-firmware/Config.in               | 5 +++++
>   boot/arm-trusted-firmware/arm-trusted-firmware.mk | 3 +++
>   2 files changed, 8 insertions(+)
> 
> diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
> index 373591d497..c9b74064d7 100644
> --- a/boot/arm-trusted-firmware/Config.in
> +++ b/boot/arm-trusted-firmware/Config.in
> @@ -142,6 +142,11 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS
>   	  E.G. When using the QorIQ custom ATF repository from NXP,
>   	  the target 'pbl' can be used to build the pbl binary.
>   
> +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_DEPENDENCIES
> +	string "Additional AFT dependencies"
> +	help
> +	  Additional dependencies for ATF build, E.G. "host-qoriq-rcw"
> +
>   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 bf1ac46cf6..43be2fef99 100644
> --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> @@ -92,6 +92,9 @@ endif
>   
>   ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
>   
> +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += \
> +	$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_DEPENDENCIES))
> +
>   ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)
>   ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += fip
>   ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-openssl
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v5 6/9] package/qoriq-cadence-dp-firmware: new package
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 6/9] package/qoriq-cadence-dp-firmware: new package Changming Huang
@ 2022-01-06 15:14   ` Michael Walle
  2022-01-06 15:19   ` Arnout Vandecappelle
  1 sibling, 0 replies; 20+ messages in thread
From: Michael Walle @ 2022-01-06 15:14 UTC (permalink / raw)
  To: Changming Huang
  Cc: buildroot, heiko.thiery, geomatsi, thomas.petazzoni, matthew.weber

Am 2020-02-07 09:38, 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>

Arnout, please note that upstream uboot and linux won't use
this firmware. So this can be dropped.

Proper support for the cadence phy will likely be using
the request_firmware() method in linux (and i guess binaries
will then end up in the linux-firmware package).

-michael
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v5 6/9] package/qoriq-cadence-dp-firmware: new package
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 6/9] package/qoriq-cadence-dp-firmware: new package Changming Huang
  2022-01-06 15:14   ` Michael Walle
@ 2022-01-06 15:19   ` Arnout Vandecappelle
  1 sibling, 0 replies; 20+ messages in thread
From: Arnout Vandecappelle @ 2022-01-06 15:19 UTC (permalink / raw)
  To: Changming Huang, buildroot
  Cc: michael, matthew.weber, thomas.petazzoni, geomatsi, heiko.thiery



On 07/02/2020 09:38, Changming Huang 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>

  Applied to master, with a few changes:

      - move out of nxp directory;
      - add extraction helper;
      - set REDISTRIBUTE to NO.


  Regards,
  Arnout

> ---
> changes since v4:
> 1. remove the variable NXP_QORIQ_SITE.
> 2. use the url for qoriq-cadence-dp-firmware site directly.
> 
> changes since v3:
> no changes.
> 
> changes since v2:
> 1. change the package name to qoriq-cadence-dp-firmware.
> 2. add the hash of COPYING.
> 3. modify makefile with new option.
> 4. update DEVELOPERS with alphabetic ordering
> 
> 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/nxp/Config.in                         |  2 ++
>   .../nxp/qoriq-cadence-dp-firmware/Config.in   |  4 ++++
>   .../qoriq-cadence-dp-firmware.hash            |  3 +++
>   .../qoriq-cadence-dp-firmware.mk              | 23 +++++++++++++++++++
>   5 files changed, 35 insertions(+)
>   create mode 100644 package/nxp/qoriq-cadence-dp-firmware/Config.in
>   create mode 100644 package/nxp/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.hash
>   create mode 100644 package/nxp/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.mk
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index e555b9773b..ffb07d67ea 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -529,6 +529,9 @@ F:	configs/nanopi_m1_plus_defconfig
>   F:	configs/olimex_a13_olinuxino_defconfig
>   F:	configs/orangepi_plus_defconfig
>   
> +N:	Changming Huang <jerry.huang@nxp.com>
> +F:	package/nxp/qoriq-cadence-dp-firmware/
> +
>   N:	Chris Packham <judge.packham@gmail.com>
>   F:	package/gstreamer1/gst1-shark/
>   F:	package/micropython/
> diff --git a/package/nxp/Config.in b/package/nxp/Config.in
> index 575542c7ab..855d62700b 100644
> --- a/package/nxp/Config.in
> +++ b/package/nxp/Config.in
> @@ -1,4 +1,6 @@
>   menu "NXP QorIQ libraries"
>   	depends on BR2_aarch64 || BR2_arm || BR2_powerpc64 || BR2_powerpc
>   
> +source "package/nxp/qoriq-cadence-dp-firmware/Config.in"
> +
>   endmenu
> diff --git a/package/nxp/qoriq-cadence-dp-firmware/Config.in b/package/nxp/qoriq-cadence-dp-firmware/Config.in
> new file mode 100644
> index 0000000000..3f494bd3a3
> --- /dev/null
> +++ b/package/nxp/qoriq-cadence-dp-firmware/Config.in
> @@ -0,0 +1,4 @@
> +config BR2_PACKAGE_QORIQ_CADENCE_DP_FIRMWARE
> +	bool "qoriq-cadence-dp-firmware"
> +	help
> +	  NXP QorIQ cadence DP firmware, a resident EL3 firmware.
> diff --git a/package/nxp/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.hash b/package/nxp/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.hash
> new file mode 100644
> index 0000000000..89aaf1d71b
> --- /dev/null
> +++ b/package/nxp/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256 5871c5717be32f14a59624d5699d405e8ce9ae2e9c9ef86fd16e13d264a40e58  firmware-cadence-lsdk1909.bin
> +sha256 d55f024af2bfff714b90de596f6d0399124b999e8c18a86b13a3b507bae6f561  COPYING
> diff --git a/package/nxp/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.mk b/package/nxp/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.mk
> new file mode 100644
> index 0000000000..5c29602574
> --- /dev/null
> +++ b/package/nxp/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.mk
> @@ -0,0 +1,23 @@
> +################################################################################
> +#
> +# qoriq-cadence-dp-firmware
> +#
> +################################################################################
> +
> +QORIQ_CADENCE_DP_FIRMWARE_VERSION = lsdk1909
> +QORIQ_CADENCE_DP_FIRMWARE_SITE = http://www.nxp.com/lgfiles/sdk/$(QORIQ_CADENCE_DP_FIRMWARE_VERSION)
> +QORIQ_CADENCE_DP_FIRMWARE_SOURCE = firmware-cadence-$(QORIQ_CADENCE_DP_FIRMWARE_VERSION).bin
> +QORIQ_CADENCE_DP_FIRMWARE_LICENSE = NXP-Binary-EULA
> +QORIQ_CADENCE_DP_FIRMWARE_LICENSE_FILES = COPYING
> +QORIQ_CADENCE_DP_FIRMWARE_INSTALL_IMAGES = YES
> +QORIQ_CADENCE_DP_FIRMWARE_INSTALL_TARGET = NO
> +
> +define QORIQ_CADENCE_DP_FIRMWARE_EXTRACT_CMDS
> +	$(call NXP_EXTRACT_HELPER,$(QORIQ_CADENCE_DP_FIRMWARE_DL_DIR)/$(QORIQ_CADENCE_DP_FIRMWARE_SOURCE))
> +endef
> +
> +define QORIQ_CADENCE_DP_FIRMWARE_INSTALL_IMAGES_CMDS
> +	$(INSTALL) -D -m 0644 $(@D)/dp/ls1028a-dp-fw.bin $(BINARIES_DIR)/ls1028a-dp-fw.bin
> +endef
> +
> +$(eval $(generic-package))
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v5 7/9] package/qoriq-rcw:Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 7/9] package/qoriq-rcw:Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO Changming Huang
@ 2022-01-06 15:54   ` Arnout Vandecappelle
  0 siblings, 0 replies; 20+ messages in thread
From: Arnout Vandecappelle @ 2022-01-06 15:54 UTC (permalink / raw)
  To: Changming Huang, buildroot
  Cc: michael, matthew.weber, thomas.petazzoni, geomatsi, heiko.thiery



On 07/02/2020 09:38, Changming Huang 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.

  This sounds like something really board specific, which should be applied 
upstream first and lacking that, it's IMHO better to use BR2_GLOBAL_PATCH_DIR 
and do it in the board-specific defconfig instead of patching qoriq-rcw package.

  In addition, qoriq-rcw has been updated so the patch maybe doesn't apply any more.

  Therefore, I marked this one as Rejected.

  Regards,
  Arnout

> 
> Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> ---
> changes since v4:
> no changes.
> 
> changes since v3:
> no changes.
> 
> changes since v2:
> no changes.
> 
> changes since 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/nxp/qoriq-rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch
>   create mode 100644 package/nxp/qoriq-rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patch
> 
> diff --git a/package/nxp/qoriq-rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch b/package/nxp/qoriq-rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch
> new file mode 100644
> index 0000000000..21c6c84cbd
> --- /dev/null
> +++ b/package/nxp/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/nxp/qoriq-rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patch b/package/nxp/qoriq-rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patch
> new file mode 100644
> index 0000000000..4f00541d69
> --- /dev/null
> +++ b/package/nxp/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
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v5 8/9] package/nxp/qoriq-rcw: introduce BR2_PACKAGE_HOST_QORIQ_RCW_BOOT_MODE for boot mode
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 8/9] package/nxp/qoriq-rcw: introduce BR2_PACKAGE_HOST_QORIQ_RCW_BOOT_MODE for boot mode Changming Huang
@ 2022-01-06 15:55   ` Arnout Vandecappelle
  0 siblings, 0 replies; 20+ messages in thread
From: Arnout Vandecappelle @ 2022-01-06 15:55 UTC (permalink / raw)
  To: Changming Huang, buildroot
  Cc: thomas.petazzoni, heiko.thiery, michael, geomatsi, matthew.weber



On 07/02/2020 09:38, Changming Huang wrote:
> Introduce BR2_PACKAGE_HOST_QORIQ_RCW_BOOT_MODE for the boot mode.
> Because the RCW binary can be stored in different media, for example:
> sd - RCW locate in SD card, boot the board from SD card
> emmc - RCW locate in eMMC chip, boot the board from eMMC chip
> qspi - RCW locate in QSPI flash, boot the board from QSPI flash
> flexspi_nor - RCW locate in flexSPI, boot the board from flexSPI Nor/Nand flash
> 
> Signed-off-by: Changming Huang <jerry.huang@nxp.com>
> ---
> changes since v4:
> no changes.
> 
> changes since v3:
> 1. split this option from board patch.
> ---
>   package/nxp/qoriq-rcw/Config.in.host | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/package/nxp/qoriq-rcw/Config.in.host b/package/nxp/qoriq-rcw/Config.in.host
> index 9bf55894e8..7f5fbb3202 100644
> --- a/package/nxp/qoriq-rcw/Config.in.host
> +++ b/package/nxp/qoriq-rcw/Config.in.host
> @@ -37,4 +37,10 @@ config BR2_PACKAGE_HOST_QORIQ_RCW_BIN
>   
>   	  If this option is empty, no rcw file is used.
>   
> +config BR2_PACKAGE_HOST_QORIQ_RCW_BOOT_MODE

  You introduce this symbol but it is not used anywhere. So what is the point?

  I marked it as rejected.

  Regards,
  Arnout

> +	string "QorIQ RCW Boot mode"
> +	depends on !BR2_PACKAGE_HOST_QORIQ_RCW_CUSTOM_PATH
> +	help
> +	  Specify the boot mode, for example, sd, emmc, flexspi_nor.
> +
>   endif
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v5 9/9] board/nxp/ls1028ardb: new board
  2020-02-07  8:38 ` [Buildroot] [PATCH v5 9/9] board/nxp/ls1028ardb: new board Changming Huang
@ 2022-01-06 16:27   ` Arnout Vandecappelle
  0 siblings, 0 replies; 20+ messages in thread
From: Arnout Vandecappelle @ 2022-01-06 16:27 UTC (permalink / raw)
  To: Changming Huang, buildroot
  Cc: thomas.petazzoni, heiko.thiery, michael, geomatsi, matthew.weber



On 07/02/2020 09:38, Changming Huang wrote:
> This is to support NXP LS1028ARDB board 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/nxp/ls1028ardb/: scripts related with ls1028ardb
> nxp_ls1028ardb-64b_defconfig: defconfig boot from SD card
> 
> Signed-off-by: Changming Huang <jerry.huang@nxp.com>

  Due to the changes in other packages and because some of the previous patches 
weren't applied, this defconfig wouldn't be valid any more so I marked it as 
Changes Requested.

[snip]
> diff --git a/board/nxp/common/ls/busybox.config b/board/nxp/common/ls/busybox.config
> new file mode 100644
> index 0000000000..7074c65aa6
> --- /dev/null
> +++ b/board/nxp/common/ls/busybox.config

  Since you're only adding a single board here, I prefer to put it in the 
board-specific directory, and to move it to common/ later if it turns out to be 
indeed shared. But that's a minor thing.

> @@ -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

  I understand that you probably need taskset on a LayerScape (although, is it 
used by anything in this defconfig?). But I don't understand why you need all 
the rest. Please explain that in the commit message.

> diff --git a/board/nxp/ls1028ardb/genimage.sd.cfg.template b/board/nxp/ls1028ardb/genimage.sd.cfg.template
> new file mode 100644
> index 0000000000..ab50e103c1
> --- /dev/null
> +++ b/board/nxp/ls1028ardb/genimage.sd.cfg.template
> @@ -0,0 +1,52 @@
> +# Minimal SD card image for the NXP boards Template
> +#
> +# SD card image (sdcard.img) 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

  I don't know if it's possible for this board, but generally we prefer to use 
the modern organisation with just a single rootfs partition which has the kernel 
and extlinux.conf in /boot. U-Boot should support that. But if that's an unusual 
configuration for this board, it's OK to keep it as is.

> +# * a single root filesystem partition is required (ext2, ext3 or ext4)
> +#
> +
> +image boot.vfat {
> +  vfat {
> +    files = {
> +      %FILES%
> +    }
> +  }
> +  size = 256M

  Isn't that way too much? I think it should fit in something like 16M, no?

> +}
> +
> +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

  Isnt this way too much? Everything before fits in 8M, so why such a large offset?

> +  }
> +
> +  partition rootfs {
> +    partition-type = 0x83
> +    image = "rootfs.ext2"
> +  }
> +}
> diff --git a/board/nxp/ls1028ardb/post-image.sh b/board/nxp/ls1028ardb/post-image.sh
> new file mode 100755
> index 0000000000..c655074386
> --- /dev/null
> +++ b/board/nxp/ls1028ardb/post-image.sh
> @@ -0,0 +1,57 @@
> +#!/usr/bin/env bash
> +# args from BR2_ROOTFS_POST_SCRIPT_ARGS
> +# $2 linux building directory
> +# $3 buildroot top directory
> +# $4 u-boot building directory

  AFAICS none of these arguments are actually used, so just remove them.

> +
> +#
> +# 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
> +}

  Why not just ls $(BINARIES_DIR)/*.dtb ?

> +
> +#
> +# genimage.sd.cfg.template: Boot from SD
> +# genimage.emmc.cfg.template: Boot from eMMC
> +#
> +genimage_type()
> +{
> +	if grep -Eq "^BR2_PACKAGE_HOST_QORIQ_RCW_BOOT_MODE=\"emmc\"$" ${BR2_CONFIG}; then

  Ah, this is where you use boot mode! This is really not OK, we can't have a 
generic option in a package that gets used in a board specific config.

  In this case it's pretty simple: you only have sd support in this defconfig, 
so hardcode sd. If you later want to add another defconfig with emmc, you can 
add it as a BR2_ROOTFS_POST_SCRIPT_ARGS argument to the script.

> +		echo "genimage.emmc.cfg.template"
> +	elif grep -Eq "^BR2_PACKAGE_HOST_QORIQ_RCW_BOOT_MODE=\"sd\"$" ${BR2_CONFIG}; then
> +		echo "genimage.sd.cfg.template"
> +	fi
> +}
> +
> +main()
> +{
> +	local FILES="$(dtb_file) "ls1028a-dp-fw.bin", "Image""

  Just for my information: who is consuming that firmware file? Since it's in 
the FAT partition, I guess it's not loaded by the kernel, but by U-Boot or ATF 
or something?

> +	local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)"
> +	local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
> +
> +	sed -e "s/%FILES%/${FILES}/" \
> +		board/nxp/ls1028ardb/$(genimage_type) > ${GENIMAGE_CFG}

  You can avoid the board/nxp/ls1028ardb hardcoding by using ${0%/*}

		${0%/*}/genimage.$2.cfg.template > ${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 $@

main "$@"

> diff --git a/board/nxp/ls1028ardb/readme.txt b/board/nxp/ls1028ardb/readme.txt
> new file mode 100644
> index 0000000000..713babd7c3
> --- /dev/null
> +++ b/board/nxp/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

  If you can simply use the SD image for eMMC as well, why do you distinguish 
between them?

> +    # 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

  Where does this xspi.cpio.img come from?

> +    => 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/nxp/ls1028ardb/rootfs_overlay/etc/udev/rules.d/10-network.rules b/board/nxp/ls1028ardb/rootfs_overlay/etc/udev/rules.d/10-network.rules
> new file mode 100644
> index 0000000000..19f41634bd
> --- /dev/null
> +++ b/board/nxp/ls1028ardb/rootfs_overlay/etc/udev/rules.d/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/nxp/ls1028ardb/u-boot-environment-sd.txt b/board/nxp/ls1028ardb/u-boot-environment-sd.txt
> new file mode 100644
> index 0000000000..f91e6b585f
> --- /dev/null
> +++ b/board/nxp/ls1028ardb/u-boot-environment-sd.txt
> @@ -0,0 +1,13 @@
> +baudrate=115200
> +bootcmd=setenv bootargs root=/dev/mmcblk0p2 rootwait rw earlycon=uart8250,0x21c0500 console=ttyS0,115200 cma=256M video=1920x1080-32@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
> +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/configs/nxp_ls1028ardb-64b_defconfig b/configs/nxp_ls1028ardb-64b_defconfig
> new file mode 100644
> index 0000000000..cb0131a35c
> --- /dev/null
> +++ b/configs/nxp_ls1028ardb-64b_defconfig
> @@ -0,0 +1,85 @@
> +# Architecture
> +BR2_aarch64=y
> +BR2_cortex_a72=y
> +
> +# Filesystem
> +BR2_TARGET_ROOTFS_EXT2=y
> +BR2_TARGET_ROOTFS_EXT2_4=y
> +
> +# Hostname and issue
> +BR2_TARGET_GENERIC_HOSTNAME="LS1028ARDB"
> +
> +# toolchain
> +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y

  Why a glibc toolchain?

> +BR2_TOOLCHAIN_BUILDROOT_LIBC="glibc"

  This is a blind symbol, shouldn't be set in the defconfig.

> +
> +# Linux headers same as kernel
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=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-update-311219"
> +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

  Why do you need mkimage on the target? (host-uboot-tools is built 
automatically by selecting envimage below).

> +BR2_TARGET_UBOOT_ENVIMAGE=y
> +BR2_TARGET_UBOOT_ENVIMAGE_SOURCE="board/nxp/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-update-311219-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"

  Why doesn't BR2_LINUX_KERNEL_IMAGE work?

> +
> +# Serial port config
> +BR2_TARGET_GENERIC_GETTY=y

  This is already the default.

> +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"

  The default "console" should work, doesn't it?

> +
> +# 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/nxp/ls1028ardb/post-image.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="$(LINUX_DIR) $(TOPDIR) $(UBOOT_DIR)"
> +
> +# busybox setting
> +BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/nxp/common/ls/busybox.config"
> +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
> +
> +# packages for rcw
> +BR2_PACKAGE_HOST_QORIQ_RCW=y
> +BR2_PACKAGE_HOST_QORIQ_RCW_BOOT_MODE="sd"
> +BR2_PACKAGE_HOST_QORIQ_RCW_BIN="ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.bin"
> +
> +#Display port firmware
> +BR2_PACKAGE_QORIQ_CADENCE_DP_FIRMWARE=y
> +
> +#eudev support
> +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y

  It would be good to explain in the commit message why this is needed.

  Regards,
  Arnout

> +BR2_ROOTFS_OVERLAY="board/nxp/ls1028ardb/rootfs_overlay"
> +
> +# 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-update-311219"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="ls1028ardb"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="fip.bin bl2_sd.pbl"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS="pbl"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_DEPENDENCIES="host-qoriq-rcw"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="BOOT_MODE=sd RCW=$(BINARIES_DIR)/rcw_1300_sdboot.bin"
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-01-06 16:28 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07  8:38 [Buildroot] [PATCH v5 1/9] package/nxp: new package directory Changming Huang
2020-02-07  8:38 ` [Buildroot] [PATCH v5 2/9] package/qoriq-rcw: move rcw into nxp and rename it Changming Huang
2020-04-14  9:35   ` Heiko Thiery
2020-12-16 21:02   ` Yann E. MORIN
2020-02-07  8:38 ` [Buildroot] [PATCH v5 3/9] package/qoriq-rcw: bump to version LSDK-19.09 Changming Huang
2020-02-07  8:38 ` [Buildroot] [PATCH v5 4/9] package/qoriq-rcw: add target rcw binary support Changming Huang
2022-01-06 14:48   ` Arnout Vandecappelle
2020-02-07  8:38 ` [Buildroot] [PATCH v5 5/9] boot/arm-trusted-firmware: allow additional make dependencies Changming Huang
2022-01-06 15:05   ` Arnout Vandecappelle
2020-02-07  8:38 ` [Buildroot] [PATCH v5 6/9] package/qoriq-cadence-dp-firmware: new package Changming Huang
2022-01-06 15:14   ` Michael Walle
2022-01-06 15:19   ` Arnout Vandecappelle
2020-02-07  8:38 ` [Buildroot] [PATCH v5 7/9] package/qoriq-rcw:Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO Changming Huang
2022-01-06 15:54   ` Arnout Vandecappelle
2020-02-07  8:38 ` [Buildroot] [PATCH v5 8/9] package/nxp/qoriq-rcw: introduce BR2_PACKAGE_HOST_QORIQ_RCW_BOOT_MODE for boot mode Changming Huang
2022-01-06 15:55   ` Arnout Vandecappelle
2020-02-07  8:38 ` [Buildroot] [PATCH v5 9/9] board/nxp/ls1028ardb: new board Changming Huang
2022-01-06 16:27   ` Arnout Vandecappelle
2022-01-06 14:45 ` [Buildroot] [PATCH v5 1/9] package/nxp: new package directory Arnout Vandecappelle
2022-01-06 15:00   ` Michael Walle

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.