All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/9] new board ls1028ardb introduced
@ 2019-11-20  4:07 Changming Huang
  2019-11-20  4:07 ` [Buildroot] [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09 Changming Huang
                   ` (8 more replies)
  0 siblings, 9 replies; 39+ messages in thread
From: Changming Huang @ 2019-11-20  4:07 UTC (permalink / raw)
  To: buildroot

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

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

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

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

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

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

* [Buildroot] [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09
  2019-11-20  4:07 [Buildroot] [PATCH 0/9] new board ls1028ardb introduced Changming Huang
@ 2019-11-20  4:07 ` Changming Huang
  2019-11-20  7:59   ` Thomas Petazzoni
  2019-11-20  9:21   ` [Buildroot] " Michael Walle
  2019-11-20  4:07 ` [Buildroot] [PATCH 2/9] package/rcw: add target rcw binary support Changming Huang
                   ` (7 subsequent siblings)
  8 siblings, 2 replies; 39+ messages in thread
From: Changming Huang @ 2019-11-20  4:07 UTC (permalink / raw)
  To: buildroot

Change the RCW version to LSDK-19.09.

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---
 package/rcw/rcw.hash | 3 +--
 package/rcw/rcw.mk   | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/package/rcw/rcw.hash b/package/rcw/rcw.hash
index 7de1ec659a..3fbb5d167f 100644
--- a/package/rcw/rcw.hash
+++ b/package/rcw/rcw.hash
@@ -1,3 +1,2 @@
 # Locally calculated
-sha256 1421ada9fec10b12ff21cd9ad82f0a835b191cb2dde80f03547764574b1346c3 rcw-LSDK-18.12.tar.gz
-sha256 a531b3146425e592db17a51ff39c4801cb01fb4055ffdaada0572decc0655bcd LICENSE
+sha256 b69a6a8b187ba794e0af716a509ced2bbac83da0f6e94b5c7331a34619db21b1  rcw-LSDK-19.09.tar.gz
diff --git a/package/rcw/rcw.mk b/package/rcw/rcw.mk
index 36d2da61b5..3a8cf5c444 100644
--- a/package/rcw/rcw.mk
+++ b/package/rcw/rcw.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-RCW_VERSION = LSDK-18.12
+RCW_VERSION = LSDK-19.09
 RCW_SITE = https://source.codeaurora.org/external/qoriq/qoriq-components/rcw
 RCW_SITE_METHOD = git
 RCW_LICENSE = BSD-3-Clause
-- 
2.17.1

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

* [Buildroot] [PATCH 2/9] package/rcw: add target rcw binary support
  2019-11-20  4:07 [Buildroot] [PATCH 0/9] new board ls1028ardb introduced Changming Huang
  2019-11-20  4:07 ` [Buildroot] [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09 Changming Huang
@ 2019-11-20  4:07 ` Changming Huang
  2019-11-20  9:30   ` Matthew Weber
  2019-11-20  4:07 ` [Buildroot] [PATCH 3/9] boot/arm-trusted-firmware: Add u-boot-dtb.bin support Changming Huang
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 39+ messages in thread
From: Changming Huang @ 2019-11-20  4:07 UTC (permalink / raw)
  To: buildroot

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

Introduce BR2_PACKAGE_HOST_RCW_BIN to specify the RCW binary file

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

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---
 package/rcw/Config.in.host |  6 ++++++
 package/rcw/rcw.mk         | 11 +++++++++++
 2 files changed, 17 insertions(+)

diff --git a/package/rcw/Config.in.host b/package/rcw/Config.in.host
index a9253958d9..a53392dd3a 100644
--- a/package/rcw/Config.in.host
+++ b/package/rcw/Config.in.host
@@ -25,4 +25,10 @@ config BR2_PACKAGE_HOST_RCW_CUSTOM_PATH
 	  included for use in the SDK or with post scripts but no
 	  RCW binary will not be generated.
 
+config BR2_PACKAGE_HOST_RCW_BIN
+	string "Custom RCW"
+
+config BR2_PACKAGE_HOST_RCW_BOOT_MODE
+	string "Boot mode"
+
 endif
diff --git a/package/rcw/rcw.mk b/package/rcw/rcw.mk
index 3a8cf5c444..b12e577e39 100644
--- a/package/rcw/rcw.mk
+++ b/package/rcw/rcw.mk
@@ -37,6 +37,17 @@ endef
 define HOST_RCW_INSTALL_DELIVERY_FILE
 	$(INSTALL) -D -m 0644 $(@D)/PBL.bin $(BINARIES_DIR)/PBL.bin
 endef
+else
+RCW_BIN = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
+RCW_PLATFORM = $(firstword $(subst /, ,$(RCW_BIN)))
+
+define HOST_RCW_BUILD_CMDS
+	cd $(@D)/$(RCW_PLATFORM) && $(MAKE)
+endef
+
+define HOST_RCW_INSTALL_DELIVERY_FILE
+	$(INSTALL) -D -m 0644 $(@D)/$(RCW_BIN) $(BINARIES_DIR)/
+endef
 endif
 
 # Copy source files and script into $(HOST_DIR)/share/rcw/ so a developer
-- 
2.17.1

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

* [Buildroot] [PATCH 3/9] boot/arm-trusted-firmware: Add u-boot-dtb.bin support
  2019-11-20  4:07 [Buildroot] [PATCH 0/9] new board ls1028ardb introduced Changming Huang
  2019-11-20  4:07 ` [Buildroot] [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09 Changming Huang
  2019-11-20  4:07 ` [Buildroot] [PATCH 2/9] package/rcw: add target rcw binary support Changming Huang
@ 2019-11-20  4:07 ` Changming Huang
  2019-11-20  7:37   ` Sergey Matyukevich
  2019-11-20  4:07 ` [Buildroot] [PATCH 4/9] boot/arm-trusted-firmware: Add RCW support Changming Huang
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 39+ messages in thread
From: Changming Huang @ 2019-11-20  4:07 UTC (permalink / raw)
  To: buildroot

NXP Layerscape platforms use u-boot-dtb.bin to boot the board.

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---
 boot/arm-trusted-firmware/arm-trusted-firmware.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
index e528686aa1..70d36fff73 100644
--- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
+++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
@@ -70,7 +70,11 @@ endif
 endif # BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
 
 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33),y)
+ifeq ($(BR2_TARGET_UBOOT_FORMAT_DTB_BIN),y)
+ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/u-boot-dtb.bin
+else
 ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/u-boot.bin
+endif
 ARM_TRUSTED_FIRMWARE_DEPENDENCIES += uboot
 endif
 
-- 
2.17.1

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

* [Buildroot] [PATCH 4/9] boot/arm-trusted-firmware: Add RCW support
  2019-11-20  4:07 [Buildroot] [PATCH 0/9] new board ls1028ardb introduced Changming Huang
                   ` (2 preceding siblings ...)
  2019-11-20  4:07 ` [Buildroot] [PATCH 3/9] boot/arm-trusted-firmware: Add u-boot-dtb.bin support Changming Huang
@ 2019-11-20  4:07 ` Changming Huang
  2019-11-20  7:50   ` Sergey Matyukevich
  2019-11-20  4:07 ` [Buildroot] [PATCH 5/9] package/freescale-qoriq: new package directory Changming Huang
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 39+ messages in thread
From: Changming Huang @ 2019-11-20  4:07 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---
 boot/arm-trusted-firmware/arm-trusted-firmware.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
index 70d36fff73..6896d9a7aa 100644
--- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
+++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
@@ -95,6 +95,15 @@ endif
 
 ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
 
+RCW_BOOT_MODE = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BOOT_MODE))
+ifneq ($(RCW_BOOT_MODE),)
+RCW_PATH = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
+RCW_FILE = $(lastword $(subst /, ,$(RCW_PATH)))
+ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BOOT_MODE=$(RCW_BOOT_MODE) RCW=$(BINARIES_DIR)/$(RCW_FILE)
+ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += pbl
+ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-rcw
+endif
+
 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)
 ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += fip
 ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-openssl
-- 
2.17.1

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

* [Buildroot] [PATCH 5/9] package/freescale-qoriq: new package directory
  2019-11-20  4:07 [Buildroot] [PATCH 0/9] new board ls1028ardb introduced Changming Huang
                   ` (3 preceding siblings ...)
  2019-11-20  4:07 ` [Buildroot] [PATCH 4/9] boot/arm-trusted-firmware: Add RCW support Changming Huang
@ 2019-11-20  4:07 ` Changming Huang
  2019-11-20  8:57   ` Thomas Petazzoni
  2019-11-20  4:07 ` [Buildroot] [PATCH 6/9] package/freescale-qoriq/cadence: new package Changming Huang
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 39+ messages in thread
From: Changming Huang @ 2019-11-20  4:07 UTC (permalink / raw)
  To: buildroot

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

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

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

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

* [Buildroot] [PATCH 6/9] package/freescale-qoriq/cadence: new package
  2019-11-20  4:07 [Buildroot] [PATCH 0/9] new board ls1028ardb introduced Changming Huang
                   ` (4 preceding siblings ...)
  2019-11-20  4:07 ` [Buildroot] [PATCH 5/9] package/freescale-qoriq: new package directory Changming Huang
@ 2019-11-20  4:07 ` Changming Huang
  2019-11-20  9:13   ` Thomas Petazzoni
  2019-11-20  4:07 ` [Buildroot] [PATCH 7/9] package/rcw: Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO Changming Huang
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 39+ messages in thread
From: Changming Huang @ 2019-11-20  4:07 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---
 package/freescale-qoriq/Config.in          |  2 ++
 package/freescale-qoriq/cadence/Config.in  |  9 +++++++++
 package/freescale-qoriq/cadence/cadence.mk | 19 +++++++++++++++++++
 3 files changed, 30 insertions(+)
 create mode 100644 package/freescale-qoriq/cadence/Config.in
 create mode 100644 package/freescale-qoriq/cadence/cadence.mk

diff --git a/package/freescale-qoriq/Config.in b/package/freescale-qoriq/Config.in
index 51497c588e..03fdf345c0 100644
--- a/package/freescale-qoriq/Config.in
+++ b/package/freescale-qoriq/Config.in
@@ -1,4 +1,6 @@
 menu "Freescale QorIQ libraries"
 	depends on BR2_aarch64 || BR2_arm || BR2_powerpc64 || BR2_powerpc
 
+source "package/freescale-qoriq/cadence/Config.in"
+
 endmenu
diff --git a/package/freescale-qoriq/cadence/Config.in b/package/freescale-qoriq/cadence/Config.in
new file mode 100644
index 0000000000..67292a799f
--- /dev/null
+++ b/package/freescale-qoriq/cadence/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_CADENCE
+	bool "display port firmware"
+	help
+	Display Port, a resident EL3 firmware.
+
+if BR2_PACKAGE_CADENCE
+config BR2_PACKAGE_CADENCE_DP_BIN
+	string "Custom DP Firmware BIN"
+endif
diff --git a/package/freescale-qoriq/cadence/cadence.mk b/package/freescale-qoriq/cadence/cadence.mk
new file mode 100644
index 0000000000..dd78411e15
--- /dev/null
+++ b/package/freescale-qoriq/cadence/cadence.mk
@@ -0,0 +1,19 @@
+################################################################################
+#
+# DP firmware for NXP layerscape platforms
+#
+################################################################################
+CADENCE_INSTALL_IMAGES = YES
+
+DP_BIN = $(call qstrip,$(BR2_PACKAGE_CADENCE_DP_BIN))
+
+define CADENCE_BUILD_CMDS
+	cd $(@D)/ && wget http://www.nxp.com/lgfiles/sdk/lsdk1909/firmware-cadence-lsdk1909.bin &&\
+	chmod +x firmware-cadence-lsdk1909.bin && ./firmware-cadence-lsdk1909.bin --auto-accept;
+endef
+
+define CADENCE_INSTALL_IMAGES_CMDS
+	cp $(@D)/firmware-cadence-lsdk1909/dp/$(DP_BIN) $(BINARIES_DIR)/;
+endef
+
+$(eval $(generic-package))
-- 
2.17.1

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

* [Buildroot] [PATCH 7/9] package/rcw: Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO
  2019-11-20  4:07 [Buildroot] [PATCH 0/9] new board ls1028ardb introduced Changming Huang
                   ` (5 preceding siblings ...)
  2019-11-20  4:07 ` [Buildroot] [PATCH 6/9] package/freescale-qoriq/cadence: new package Changming Huang
@ 2019-11-20  4:07 ` Changming Huang
  2019-11-20  9:14   ` Thomas Petazzoni
  2019-11-20  4:07 ` [Buildroot] [PATCH 8/9] board/freescale/common/ls: Add standard post image script for Layerscape processors Changming Huang
  2019-11-20  4:07 ` [Buildroot] [PATCH 9/9] configs/freescale_ls1028ardb*: new board Changming Huang
  8 siblings, 1 reply; 39+ messages in thread
From: Changming Huang @ 2019-11-20  4:07 UTC (permalink / raw)
  To: buildroot

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: Changming Huang <jerry.huang@nxp.com>
---
 ...5_PMUX-for-GPIO-function.patch.conditional | 42 +++++++++++++++++++
 ...T_PMUX-for-GPIO-function.patch.conditional | 40 ++++++++++++++++++
 package/rcw/rcw.mk                            |  7 ++++
 3 files changed, 89 insertions(+)
 create mode 100644 package/rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch.conditional
 create mode 100644 package/rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patch.conditional

diff --git a/package/rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch.conditional b/package/rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch.conditional
new file mode 100644
index 0000000000..21c6c84cbd
--- /dev/null
+++ b/package/rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch.conditional
@@ -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/rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patch.conditional b/package/rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patch.conditional
new file mode 100644
index 0000000000..4f00541d69
--- /dev/null
+++ b/package/rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patch.conditional
@@ -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
diff --git a/package/rcw/rcw.mk b/package/rcw/rcw.mk
index b12e577e39..a7e140eb1d 100644
--- a/package/rcw/rcw.mk
+++ b/package/rcw/rcw.mk
@@ -41,6 +41,13 @@ else
 RCW_BIN = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
 RCW_PLATFORM = $(firstword $(subst /, ,$(RCW_BIN)))
 
+ifeq ($(findstring ls1028ardb, $(BR2_TARGET_UBOOT_BOARDNAME)), ls1028ardb)
+define HOST_RCW_CONFIGURE_CMDS
+	patch -p1 -s -d $(@D) < package/rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch.conditional; \
+	patch -p1 -s -d $(@D) < package/rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patch.conditional
+endef
+endif
+
 define HOST_RCW_BUILD_CMDS
 	cd $(@D)/$(RCW_PLATFORM) && $(MAKE)
 endef
-- 
2.17.1

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

* [Buildroot] [PATCH 8/9] board/freescale/common/ls: Add standard post image script for Layerscape processors
  2019-11-20  4:07 [Buildroot] [PATCH 0/9] new board ls1028ardb introduced Changming Huang
                   ` (6 preceding siblings ...)
  2019-11-20  4:07 ` [Buildroot] [PATCH 7/9] package/rcw: Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO Changming Huang
@ 2019-11-20  4:07 ` Changming Huang
  2019-11-20  4:07 ` [Buildroot] [PATCH 9/9] configs/freescale_ls1028ardb*: new board Changming Huang
  8 siblings, 0 replies; 39+ messages in thread
From: Changming Huang @ 2019-11-20  4:07 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---
 board/freescale/common/ls/busybox.config    |  9 ++
 board/freescale/common/ls/post-image-spi.sh | 64 ++++++++++++++
 board/freescale/common/ls/post-image.sh     | 92 +++++++++++++++++++++
 3 files changed, 165 insertions(+)
 create mode 100644 board/freescale/common/ls/busybox.config
 create mode 100755 board/freescale/common/ls/post-image-spi.sh
 create mode 100755 board/freescale/common/ls/post-image.sh

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

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

* [Buildroot] [PATCH 9/9] configs/freescale_ls1028ardb*: new board
  2019-11-20  4:07 [Buildroot] [PATCH 0/9] new board ls1028ardb introduced Changming Huang
                   ` (7 preceding siblings ...)
  2019-11-20  4:07 ` [Buildroot] [PATCH 8/9] board/freescale/common/ls: Add standard post image script for Layerscape processors Changming Huang
@ 2019-11-20  4:07 ` Changming Huang
  8 siblings, 0 replies; 39+ messages in thread
From: Changming Huang @ 2019-11-20  4:07 UTC (permalink / raw)
  To: buildroot

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

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

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

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---
 .gitlab-ci.yml                                |   3 +
 DEVELOPERS                                    |   6 +
 .../ls1028ardb/genimage.emmc.cfg.template     |  52 +++++++
 .../ls1028ardb/genimage.sd.cfg.template       |  52 +++++++
 .../ls1028ardb/genimage.xspi.cfg.template     |  53 +++++++
 board/freescale/ls1028ardb/kernel.its         |  59 ++++++++
 .../ls1028ardb/ls1028-10-network.rules        |  16 +++
 board/freescale/ls1028ardb/post-cfg-udev.sh   |  10 ++
 board/freescale/ls1028ardb/readme.txt         |  61 ++++++++
 .../ls1028ardb/u-boot-environment-emmc.txt    |  19 +++
 .../ls1028ardb/u-boot-environment-sd.txt      |  18 +++
 .../ls1028ardb/u-boot-environment-xspi.txt    |  22 +++
 configs/freescale_ls1028ardb-emmc_defconfig   | 135 ++++++++++++++++++
 configs/freescale_ls1028ardb-sd_defconfig     | 133 +++++++++++++++++
 configs/freescale_ls1028ardb-xspi_defconfig   | 129 +++++++++++++++++
 15 files changed, 768 insertions(+)
 create mode 100644 board/freescale/ls1028ardb/genimage.emmc.cfg.template
 create mode 100644 board/freescale/ls1028ardb/genimage.sd.cfg.template
 create mode 100644 board/freescale/ls1028ardb/genimage.xspi.cfg.template
 create mode 100644 board/freescale/ls1028ardb/kernel.its
 create mode 100644 board/freescale/ls1028ardb/ls1028-10-network.rules
 create mode 100755 board/freescale/ls1028ardb/post-cfg-udev.sh
 create mode 100644 board/freescale/ls1028ardb/readme.txt
 create mode 100644 board/freescale/ls1028ardb/u-boot-environment-emmc.txt
 create mode 100644 board/freescale/ls1028ardb/u-boot-environment-sd.txt
 create mode 100644 board/freescale/ls1028ardb/u-boot-environment-xspi.txt
 create mode 100644 configs/freescale_ls1028ardb-emmc_defconfig
 create mode 100644 configs/freescale_ls1028ardb-sd_defconfig
 create mode 100644 configs/freescale_ls1028ardb-xspi_defconfig

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

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

* [Buildroot] [PATCH 3/9] boot/arm-trusted-firmware: Add u-boot-dtb.bin support
  2019-11-20  4:07 ` [Buildroot] [PATCH 3/9] boot/arm-trusted-firmware: Add u-boot-dtb.bin support Changming Huang
@ 2019-11-20  7:37   ` Sergey Matyukevich
  2019-11-20  8:13     ` [Buildroot] [EXT] " Jerry Huang
  2019-11-20  9:07     ` [Buildroot] " Thomas Petazzoni
  0 siblings, 2 replies; 39+ messages in thread
From: Sergey Matyukevich @ 2019-11-20  7:37 UTC (permalink / raw)
  To: buildroot

> NXP Layerscape platforms use u-boot-dtb.bin to boot the board.
> 
> Signed-off-by: Changming Huang <jerry.huang@nxp.com>
> ---
>  boot/arm-trusted-firmware/arm-trusted-firmware.mk | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> index e528686aa1..70d36fff73 100644
> --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> @@ -70,7 +70,11 @@ endif
>  endif # BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
>  
>  ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33),y)
> +ifeq ($(BR2_TARGET_UBOOT_FORMAT_DTB_BIN),y)
> +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/u-boot-dtb.bin
> +else
>  ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/u-boot.bin
> +endif
>  ARM_TRUSTED_FIRMWARE_DEPENDENCIES += uboot
>  endif

Hi Jerry, Thomas, and all

Looks good, but probably we could make it a little bit more future-proof.
What do you think about using the same pattern-based approach here as
implemented in commit e4d276c357fdf9f19f99f8 (buildroot next branch)
for ATF firmware images.

In brief, to add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
in arm-trusted-firmware Config.in and set its default value to u-boot.bin.
Then u-boot-dtb.bin value could be specified in the board defconfig.

Thoughts ? Comments ?

Regards,
Sergey

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

* [Buildroot] [PATCH 4/9] boot/arm-trusted-firmware: Add RCW support
  2019-11-20  4:07 ` [Buildroot] [PATCH 4/9] boot/arm-trusted-firmware: Add RCW support Changming Huang
@ 2019-11-20  7:50   ` Sergey Matyukevich
  2019-11-20  8:45     ` [Buildroot] [EXT] " Jerry Huang
  0 siblings, 1 reply; 39+ messages in thread
From: Sergey Matyukevich @ 2019-11-20  7:50 UTC (permalink / raw)
  To: buildroot

> diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> index 70d36fff73..6896d9a7aa 100644
> --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> @@ -95,6 +95,15 @@ endif
>  
>  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
>  
> +RCW_BOOT_MODE = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BOOT_MODE))
> +ifneq ($(RCW_BOOT_MODE),)
> +RCW_PATH = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
> +RCW_FILE = $(lastword $(subst /, ,$(RCW_PATH)))
> +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BOOT_MODE=$(RCW_BOOT_MODE) RCW=$(BINARIES_DIR)/$(RCW_FILE)
> +ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += pbl
> +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-rcw
> +endif
> +
>  ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)
>  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += fip
>  ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-openssl

Hi Jerry and all,

Here arm-trusted-firmware build is modified when some host package
with specific configuration is enabled in board config.

Shouldn't it be the other way around ? To be more specific: another
Config.in option for arm-trusted-firmware which pulls required build
time dependencies, e.g. see Marvell DDR options or FIP options.

Regards,
Sergey

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

* [Buildroot] [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09
  2019-11-20  4:07 ` [Buildroot] [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09 Changming Huang
@ 2019-11-20  7:59   ` Thomas Petazzoni
  2019-11-20  8:04     ` [Buildroot] [EXT] " Jerry Huang
  2019-11-20  9:21   ` [Buildroot] " Michael Walle
  1 sibling, 1 reply; 39+ messages in thread
From: Thomas Petazzoni @ 2019-11-20  7:59 UTC (permalink / raw)
  To: buildroot

Hello Jerry,

First of all, thanks a lot for this patch series, it is very nice to
see NXP directly contributing to Buildroot some support for the LS1028
platform. See below one question about this patch.

On Wed, 20 Nov 2019 12:07:17 +0800
Changming Huang <jerry.huang@nxp.com> wrote:

> Change the RCW version to LSDK-19.09.
> 
> Signed-off-by: Changming Huang <jerry.huang@nxp.com>
> ---
>  package/rcw/rcw.hash | 3 +--
>  package/rcw/rcw.mk   | 2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/package/rcw/rcw.hash b/package/rcw/rcw.hash
> index 7de1ec659a..3fbb5d167f 100644
> --- a/package/rcw/rcw.hash
> +++ b/package/rcw/rcw.hash
> @@ -1,3 +1,2 @@
>  # Locally calculated
> -sha256 1421ada9fec10b12ff21cd9ad82f0a835b191cb2dde80f03547764574b1346c3 rcw-LSDK-18.12.tar.gz
> -sha256 a531b3146425e592db17a51ff39c4801cb01fb4055ffdaada0572decc0655bcd LICENSE

Why are you removing the hash of the license file here ?

Best regards,

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

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

* [Buildroot] [EXT] Re: [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09
  2019-11-20  7:59   ` Thomas Petazzoni
@ 2019-11-20  8:04     ` Jerry Huang
  0 siblings, 0 replies; 39+ messages in thread
From: Jerry Huang @ 2019-11-20  8:04 UTC (permalink / raw)
  To: buildroot

Thanks for your reply, Thomas.
I will add-back the hash of license file in next version.

Best Regards
Jerry Huang

-----Original Message-----
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> 
Sent: Wednesday, November 20, 2019 4:00 PM
To: Jerry Huang <jerry.huang@nxp.com>
Cc: buildroot at busybox.net
Subject: [EXT] Re: [Buildroot] [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09

Caution: EXT Email

Hello Jerry,

First of all, thanks a lot for this patch series, it is very nice to see NXP directly contributing to Buildroot some support for the LS1028 platform. See below one question about this patch.

On Wed, 20 Nov 2019 12:07:17 +0800
Changming Huang <jerry.huang@nxp.com> wrote:

> Change the RCW version to LSDK-19.09.
>
> Signed-off-by: Changming Huang <jerry.huang@nxp.com>
> ---
>  package/rcw/rcw.hash | 3 +--
>  package/rcw/rcw.mk   | 2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/package/rcw/rcw.hash b/package/rcw/rcw.hash index 
> 7de1ec659a..3fbb5d167f 100644
> --- a/package/rcw/rcw.hash
> +++ b/package/rcw/rcw.hash
> @@ -1,3 +1,2 @@
>  # Locally calculated
> -sha256 
> 1421ada9fec10b12ff21cd9ad82f0a835b191cb2dde80f03547764574b1346c3 
> rcw-LSDK-18.12.tar.gz
> -sha256 
> a531b3146425e592db17a51ff39c4801cb01fb4055ffdaada0572decc0655bcd 
> LICENSE

Why are you removing the hash of the license file here ?

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.com&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7C386c6a3dbcc941510fa508d76d8f9be5%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637098335879692477&amp;sdata=i4kLTZ4FkszCKJEZ7sBpbJ4h%2BcsrrFe5HbjJzB3jz1I%3D&amp;reserved=0

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

* [Buildroot] [EXT] Re: [PATCH 3/9] boot/arm-trusted-firmware: Add u-boot-dtb.bin support
  2019-11-20  7:37   ` Sergey Matyukevich
@ 2019-11-20  8:13     ` Jerry Huang
  2019-11-20  9:07     ` [Buildroot] " Thomas Petazzoni
  1 sibling, 0 replies; 39+ messages in thread
From: Jerry Huang @ 2019-11-20  8:13 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Sergey Matyukevich <geomatsi@gmail.com>
> Sent: Wednesday, November 20, 2019 3:38 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net
> Subject: [EXT] Re: [Buildroot] [PATCH 3/9] boot/arm-trusted-firmware: Add
> u-boot-dtb.bin support
> 
> Caution: EXT Email
> 
> > NXP Layerscape platforms use u-boot-dtb.bin to boot the board.
> >
> > Signed-off-by: Changming Huang <jerry.huang@nxp.com>
> > ---
> >  boot/arm-trusted-firmware/arm-trusted-firmware.mk | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > index e528686aa1..70d36fff73 100644
> > --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > @@ -70,7 +70,11 @@ endif
> >  endif # BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
> >
> >  ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33),y)
> > +ifeq ($(BR2_TARGET_UBOOT_FORMAT_DTB_BIN),y)
> > +ARM_TRUSTED_FIRMWARE_MAKE_OPTS +=
> BL33=$(BINARIES_DIR)/u-boot-dtb.bin
> > +else
> >  ARM_TRUSTED_FIRMWARE_MAKE_OPTS +=
> BL33=$(BINARIES_DIR)/u-boot.bin
> > +endif
> >  ARM_TRUSTED_FIRMWARE_DEPENDENCIES += uboot  endif
> 
> Hi Jerry, Thomas, and all
> 
> Looks good, but probably we could make it a little bit more future-proof.
> What do you think about using the same pattern-based approach here as
> implemented in commit e4d276c357fdf9f19f99f8 (buildroot next branch) for ATF
> firmware images.
> 
> In brief, to add option
> BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
> in arm-trusted-firmware Config.in and set its default value to u-boot.bin.
> Then u-boot-dtb.bin value could be specified in the board defconfig.
> 
> Thoughts ? Comments ?
>
That sound good for me.
May I draft the first version for that?

> Regards,
> Sergey

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

* [Buildroot] [EXT] Re: [PATCH 4/9] boot/arm-trusted-firmware: Add RCW support
  2019-11-20  7:50   ` Sergey Matyukevich
@ 2019-11-20  8:45     ` Jerry Huang
  2019-11-21  8:02       ` Sergey Matyukevich
  0 siblings, 1 reply; 39+ messages in thread
From: Jerry Huang @ 2019-11-20  8:45 UTC (permalink / raw)
  To: buildroot

Thanks a lot for your reply.
My comment in lines.

Best Regards
Jerry Huang

> -----Original Message-----
> From: Sergey Matyukevich <geomatsi@gmail.com>
> Sent: Wednesday, November 20, 2019 3:50 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net
> Subject: [EXT] Re: [Buildroot] [PATCH 4/9] boot/arm-trusted-firmware: Add RCW
> support
> 
> Caution: EXT Email
> 
> > diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > index 70d36fff73..6896d9a7aa 100644
> > --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > @@ -95,6 +95,15 @@ endif
> >
> >  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
> >
> > +RCW_BOOT_MODE = $(call
> qstrip,$(BR2_PACKAGE_HOST_RCW_BOOT_MODE))
> > +ifneq ($(RCW_BOOT_MODE),)
> > +RCW_PATH = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
> > +RCW_FILE = $(lastword $(subst /, ,$(RCW_PATH)))
> > +ARM_TRUSTED_FIRMWARE_MAKE_OPTS +=
> BOOT_MODE=$(RCW_BOOT_MODE)
> > +RCW=$(BINARIES_DIR)/$(RCW_FILE)
> ARM_TRUSTED_FIRMWARE_MAKE_TARGETS +=
> > +pbl ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-rcw endif
> > +
> >  ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)
> >  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += fip
> > ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-openssl
> 
> Hi Jerry and all,
> 
> Here arm-trusted-firmware build is modified when some host package with
> specific configuration is enabled in board config.
> 
> Shouldn't it be the other way around ? To be more specific: another Config.in
> option for arm-trusted-firmware which pulls required build time dependencies,
> e.g. see Marvell DDR options or FIP options.
1. If use another Config.in option for arm-trusted-firmware like Marvell DDR , need to mv package/rcw to boot/ directory.
2. Refer to FIP, add option like this BR2_PACKAGE_HOST_RCW_ATF in package/rcw/Config.in.host.
How do you think about the second way?

> Regards,
> Sergey

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

* [Buildroot] [PATCH 5/9] package/freescale-qoriq: new package directory
  2019-11-20  4:07 ` [Buildroot] [PATCH 5/9] package/freescale-qoriq: new package directory Changming Huang
@ 2019-11-20  8:57   ` Thomas Petazzoni
  0 siblings, 0 replies; 39+ messages in thread
From: Thomas Petazzoni @ 2019-11-20  8:57 UTC (permalink / raw)
  To: buildroot

Hello Jerry,

On Wed, 20 Nov 2019 12:07:21 +0800
Changming Huang <jerry.huang@nxp.com> wrote:

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

Do you really expect to have multiple package in this sub-directory ?
Your patch series is adding only one.

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

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

* [Buildroot] [PATCH 3/9] boot/arm-trusted-firmware: Add u-boot-dtb.bin support
  2019-11-20  7:37   ` Sergey Matyukevich
  2019-11-20  8:13     ` [Buildroot] [EXT] " Jerry Huang
@ 2019-11-20  9:07     ` Thomas Petazzoni
  1 sibling, 0 replies; 39+ messages in thread
From: Thomas Petazzoni @ 2019-11-20  9:07 UTC (permalink / raw)
  To: buildroot

Hello Sergey, Hello Jerry,

On Wed, 20 Nov 2019 10:37:54 +0300
Sergey Matyukevich <geomatsi@gmail.com> wrote:

> >  ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33),y)
> > +ifeq ($(BR2_TARGET_UBOOT_FORMAT_DTB_BIN),y)
> > +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/u-boot-dtb.bin
> > +else
> >  ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/u-boot.bin
> > +endif
> >  ARM_TRUSTED_FIRMWARE_DEPENDENCIES += uboot
> >  endif  
> 
> Hi Jerry, Thomas, and all
> 
> Looks good, but probably we could make it a little bit more future-proof.
> What do you think about using the same pattern-based approach here as
> implemented in commit e4d276c357fdf9f19f99f8 (buildroot next branch)
> for ATF firmware images.
> 
> In brief, to add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
> in arm-trusted-firmware Config.in and set its default value to u-boot.bin.
> Then u-boot-dtb.bin value could be specified in the board defconfig.

I was going to say that Jerry's solution looks better, as it's more
automatic for the user.

However, the selection of the U-Boot image format is not a Kconfig
"choice" in boot/uboot/Config.in: one can select multiple images. In
this case, how can ATF know which one to use ? Jerry's proposal is to
assume that if BR2_TARGET_UBOOT_FORMAT_DTB_BIN=y, then you want to use
u-boot-dtb.bin, but if there are multiple U-Boot images enabled, it's
indeed difficult to know which one to chose for ATF.

So, I agree with Sergey: probably the easiest is simply some free-form
string option, with a default to u-boot.bin to preserve backward
compatibility.

Best regards,

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

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

* [Buildroot] [PATCH 6/9] package/freescale-qoriq/cadence: new package
  2019-11-20  4:07 ` [Buildroot] [PATCH 6/9] package/freescale-qoriq/cadence: new package Changming Huang
@ 2019-11-20  9:13   ` Thomas Petazzoni
  2019-11-20  9:30     ` [Buildroot] [EXT] " Jerry Huang
  0 siblings, 1 reply; 39+ messages in thread
From: Thomas Petazzoni @ 2019-11-20  9:13 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 20 Nov 2019 12:07:22 +0800
Changming Huang <jerry.huang@nxp.com> wrote:

> This package provides the firmware for LS1028ARDB DP (display port).
> 
> Signed-off-by: Changming Huang <jerry.huang@nxp.com>
> ---
>  package/freescale-qoriq/Config.in          |  2 ++
>  package/freescale-qoriq/cadence/Config.in  |  9 +++++++++
>  package/freescale-qoriq/cadence/cadence.mk | 19 +++++++++++++++++++

We need an entry in the DEVELOPERS file for this package.

Also, "cadence" is not descriptive enough as a package name.
freescale-qoriq-cadence-dp-firmware perhaps? It's a bit long, but at
least it's descriptive.

>  3 files changed, 30 insertions(+)
>  create mode 100644 package/freescale-qoriq/cadence/Config.in
>  create mode 100644 package/freescale-qoriq/cadence/cadence.mk

The .hash file is missing.

> diff --git a/package/freescale-qoriq/cadence/Config.in b/package/freescale-qoriq/cadence/Config.in
> new file mode 100644
> index 0000000000..67292a799f
> --- /dev/null
> +++ b/package/freescale-qoriq/cadence/Config.in
> @@ -0,0 +1,9 @@
> +config BR2_PACKAGE_CADENCE
> +	bool "display port firmware"

This should be just the package name.

> +	help
> +	Display Port, a resident EL3 firmware.

Indentation is not correct, we also need a link to some upstream web
site that gives details about this firmware.

Just curious: the DisplayPort really needs a firmware that runs on the
main CPU, at EL3 ? This is pretty scary :-/ How does it get loaded ?

> +if BR2_PACKAGE_CADENCE
> +config BR2_PACKAGE_CADENCE_DP_BIN
> +	string "Custom DP Firmware BIN"

This is not needed, there is a single firmware image in the archive,
just hardcode it in the package.

> +endif
> diff --git a/package/freescale-qoriq/cadence/cadence.mk b/package/freescale-qoriq/cadence/cadence.mk
> new file mode 100644
> index 0000000000..dd78411e15
> --- /dev/null
> +++ b/package/freescale-qoriq/cadence/cadence.mk
> @@ -0,0 +1,19 @@
> +################################################################################
> +#
> +# DP firmware for NXP layerscape platforms

Just the name of the package.

> +#
> +################################################################################
> +CADENCE_INSTALL_IMAGES = YES

One empty line between the comment header and the first variable.

Also, please specify _INSTALL_TARGET = NO

> +DP_BIN = $(call qstrip,$(BR2_PACKAGE_CADENCE_DP_BIN))

As per the comment above, this is not needed.

> +
> +define CADENCE_BUILD_CMDS
> +	cd $(@D)/ && wget http://www.nxp.com/lgfiles/sdk/lsdk1909/firmware-cadence-lsdk1909.bin &&\

Urgh, this is horrible: you are completely bypassing Buildroot's
download infrastructure. Please use it:

<pkg>_VERSION = lsdk1909
<pkg>_SITE = http://www.nxp.com/lgfiles/sdk/lsdk1909/
<pkg>_SOURCE = firmware-cadence-$(<pkg>_VERSION).bin

define <pkg>_EXTRACT_CMDS
	cd $(@D); \
		sh $(<pkg>_DL_DIR)/$(<pkg>_SOURCE) --auto-accept
endef

> +define CADENCE_INSTALL_IMAGES_CMDS
> +	cp $(@D)/firmware-cadence-lsdk1909/dp/$(DP_BIN) $(BINARIES_DIR)/;

Use:

	$(INSTALL) -D -m 0644 $(@D)/firmware-cadence-lsdk1909/dp/ls1028a-dp-fw.bin $(BINARIES_DIR)/ls1028a-dp-fw.bin

Also, please add the appropriate licensing information, since there is
a COPYING file in the archive.

Thanks!

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

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

* [Buildroot] [PATCH 7/9] package/rcw: Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO
  2019-11-20  4:07 ` [Buildroot] [PATCH 7/9] package/rcw: Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO Changming Huang
@ 2019-11-20  9:14   ` Thomas Petazzoni
  2019-11-20  9:34     ` [Buildroot] [EXT] " Jerry Huang
  0 siblings, 1 reply; 39+ messages in thread
From: Thomas Petazzoni @ 2019-11-20  9:14 UTC (permalink / raw)
  To: buildroot

On Wed, 20 Nov 2019 12:07:23 +0800
Changming Huang <jerry.huang@nxp.com> wrote:

> 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: Changming Huang <jerry.huang@nxp.com>
> ---
>  ...5_PMUX-for-GPIO-function.patch.conditional | 42 +++++++++++++++++++
>  ...T_PMUX-for-GPIO-function.patch.conditional | 40 ++++++++++++++++++
>  package/rcw/rcw.mk                            |  7 ++++
>  3 files changed, 89 insertions(+)
>  create mode 100644 package/rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch.conditional
>  create mode 100644 package/rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patch.conditional

Sorry, but we really want to avoid conditional patches. Is there a
better solution than this ?

The patches modify only files in ls1028ardb/, and you apply them when
the board name is ls1028ardb, so basically, you could just as well
apply the patches unconditionally, no ?

> +ifeq ($(findstring ls1028ardb, $(BR2_TARGET_UBOOT_BOARDNAME)), ls1028ardb)

We really don't want to look at BR2_TARGET_UBOOT_BOARDNAME from package/rcw/.

Best regards,

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

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

* [Buildroot] [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09
  2019-11-20  4:07 ` [Buildroot] [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09 Changming Huang
  2019-11-20  7:59   ` Thomas Petazzoni
@ 2019-11-20  9:21   ` Michael Walle
  2019-11-20  9:32     ` Thomas Petazzoni
  1 sibling, 1 reply; 39+ messages in thread
From: Michael Walle @ 2019-11-20  9:21 UTC (permalink / raw)
  To: buildroot

Am 2019-11-20 05:07, schrieb Changming Huang:
> Change the RCW version to LSDK-19.09.
> 
> Signed-off-by: Changming Huang <jerry.huang@nxp.com>
> ---
>  package/rcw/rcw.hash | 3 +--
>  package/rcw/rcw.mk   | 2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/package/rcw/rcw.hash b/package/rcw/rcw.hash
> index 7de1ec659a..3fbb5d167f 100644
> --- a/package/rcw/rcw.hash
> +++ b/package/rcw/rcw.hash

sorry for missing the initial commit.. but IMHO the package name "rcw" 
is _really_ bad. because its too generic. what if another SoC also has a 
package rcw. So if it is still possible, could it be renamed to 
rcw-qoriq ?

-michael

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

* [Buildroot] [PATCH 2/9] package/rcw: add target rcw binary support
  2019-11-20  4:07 ` [Buildroot] [PATCH 2/9] package/rcw: add target rcw binary support Changming Huang
@ 2019-11-20  9:30   ` Matthew Weber
  0 siblings, 0 replies; 39+ messages in thread
From: Matthew Weber @ 2019-11-20  9:30 UTC (permalink / raw)
  To: buildroot

Changming ,


On Tue, Nov 19, 2019 at 10:14 PM Changming Huang <jerry.huang@nxp.com> wrote:
>
> For NXP QorIQ (PowerPC and Layerscape) platform,
> we need to specify the RCW file and build it to binary.
>
> Introduce BR2_PACKAGE_HOST_RCW_BIN to specify the RCW binary file
>
> Introduce BR2_PACKAGE_HOST_RCW_BOOT_MODE to define the boot mode.
> Because the RCW binary can be stored in different media, for example:
> SD card - RCW locate in SD card, boot the board from SD card
> eMMC    - RCW locate in eMMC chip, boot the board from eMMC chip
> flexSPI - RCW locate in flexSPI, boot the board from flexSPI Nor/Nand flash
> QSPI    - RCW locate in QSPI flash, boot the board from QSPI flash
>
> Signed-off-by: Changming Huang <jerry.huang@nxp.com>
> ---
>  package/rcw/Config.in.host |  6 ++++++
>  package/rcw/rcw.mk         | 11 +++++++++++
>  2 files changed, 17 insertions(+)
>
> diff --git a/package/rcw/Config.in.host b/package/rcw/Config.in.host
> index a9253958d9..a53392dd3a 100644
> --- a/package/rcw/Config.in.host
> +++ b/package/rcw/Config.in.host
> @@ -25,4 +25,10 @@ config BR2_PACKAGE_HOST_RCW_CUSTOM_PATH
>           included for use in the SDK or with post scripts but no
>           RCW binary will not be generated.
>
> +config BR2_PACKAGE_HOST_RCW_BIN
> +       string "Custom RCW"

Maybe instead of the word "Custom"  use "Vendor" as you're wanting to
specify a built in RCW build target that NXP is providing by default?

> +
> +config BR2_PACKAGE_HOST_RCW_BOOT_MODE
> +       string "Boot mode"

Since there is a definitive list of options, maybe provide them to the
user to select?  Also, where is  this used, is it just in the ATF
package?

> +
>  endif
> diff --git a/package/rcw/rcw.mk b/package/rcw/rcw.mk
> index 3a8cf5c444..b12e577e39 100644
> --- a/package/rcw/rcw.mk
> +++ b/package/rcw/rcw.mk
> @@ -37,6 +37,17 @@ endef
>  define HOST_RCW_INSTALL_DELIVERY_FILE
>         $(INSTALL) -D -m 0644 $(@D)/PBL.bin $(BINARIES_DIR)/PBL.bin
>  endef
> +else
> +RCW_BIN = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
> +RCW_PLATFORM = $(firstword $(subst /, ,$(RCW_BIN)))
> +
> +define HOST_RCW_BUILD_CMDS
> +       cd $(@D)/$(RCW_PLATFORM) && $(MAKE)
> +endef
> +
> +define HOST_RCW_INSTALL_DELIVERY_FILE
> +       $(INSTALL) -D -m 0644 $(@D)/$(RCW_BIN) $(BINARIES_DIR)/
> +endef
>  endif
>
>  # Copy source files and script into $(HOST_DIR)/share/rcw/ so a developer
> --
> 2.17.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot



-- 

Matthew Weber | Associate Director Software Engineer | Commercial Avionics

COLLINS AEROSPACE

400 Collins Road NE, Cedar Rapids, Iowa 52498, USA

Tel: +1 319 295 7349 | FAX: +1 319 263 6099

matthew.weber at collins.com | collinsaerospace.com



CONFIDENTIALITY WARNING: This message may contain proprietary and/or
privileged information of Collins Aerospace and its affiliated
companies. If you are not the intended recipient, please 1) Do not
disclose, copy, distribute or use this message or its contents. 2)
Advise the sender by return email. 3) Delete all copies (including all
attachments) from your computer. Your cooperation is greatly
appreciated.


Any export restricted material should be shared using my
matthew.weber at corp.rockwellcollins.com address.

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

* [Buildroot] [EXT] Re: [PATCH 6/9] package/freescale-qoriq/cadence: new package
  2019-11-20  9:13   ` Thomas Petazzoni
@ 2019-11-20  9:30     ` Jerry Huang
  2019-11-20  9:36       ` Thomas Petazzoni
  0 siblings, 1 reply; 39+ messages in thread
From: Jerry Huang @ 2019-11-20  9:30 UTC (permalink / raw)
  To: buildroot

Thanks a lot for your detail comments.
Mine in lines.

Best Regards
Jerry Huang

> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Wednesday, November 20, 2019 5:13 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net
> Subject: [EXT] Re: [Buildroot] [PATCH 6/9] package/freescale-qoriq/cadence:
> new package
> 
> Caution: EXT Email
> 
> Hello,
> 
> On Wed, 20 Nov 2019 12:07:22 +0800
> Changming Huang <jerry.huang@nxp.com> wrote:
> 
> > This package provides the firmware for LS1028ARDB DP (display port).
> >
> > Signed-off-by: Changming Huang <jerry.huang@nxp.com>
> > ---
> >  package/freescale-qoriq/Config.in          |  2 ++
> >  package/freescale-qoriq/cadence/Config.in  |  9 +++++++++
> > package/freescale-qoriq/cadence/cadence.mk | 19 +++++++++++++++++++
> 
> We need an entry in the DEVELOPERS file for this package.
Ok, I will add the entry in DEVELOPERS

> Also, "cadence" is not descriptive enough as a package name.
> freescale-qoriq-cadence-dp-firmware perhaps? It's a bit long, but at least it's
> descriptive.
I think "cadence-dp-firmware" can be used for its name.
Because it is under sub-directory " freescale-qoriq", 
we can remove the prefix " freescale-qoriq" from package name.

> >  3 files changed, 30 insertions(+)
> >  create mode 100644 package/freescale-qoriq/cadence/Config.in
> >  create mode 100644 package/freescale-qoriq/cadence/cadence.mk
> 
> The .hash file is missing.
I will add the hash file.

> > diff --git a/package/freescale-qoriq/cadence/Config.in
> > b/package/freescale-qoriq/cadence/Config.in
> > new file mode 100644
> > index 0000000000..67292a799f
> > --- /dev/null
> > +++ b/package/freescale-qoriq/cadence/Config.in
> > @@ -0,0 +1,9 @@
> > +config BR2_PACKAGE_CADENCE
> > +     bool "display port firmware"
> 
> This should be just the package name.
Ok

> > +     help
> > +     Display Port, a resident EL3 firmware.
> 
> Indentation is not correct, we also need a link to some upstream web site that
> gives details about this firmware.
Sure, I will adjust it.

> Just curious: the DisplayPort really needs a firmware that runs on the main CPU,
> at EL3 ? This is pretty scary :-/ How does it get loaded ?
Yes, LS1028ARDB need this firmware for display port.
We used the command "hdp load" in uboot before starting Linux kernel.

> > +if BR2_PACKAGE_CADENCE
> > +config BR2_PACKAGE_CADENCE_DP_BIN
> > +     string "Custom DP Firmware BIN"
> 
> This is not needed, there is a single firmware image in the archive, just hardcode
> it in the package.
ok

> > +endif
> > diff --git a/package/freescale-qoriq/cadence/cadence.mk
> > b/package/freescale-qoriq/cadence/cadence.mk
> > new file mode 100644
> > index 0000000000..dd78411e15
> > --- /dev/null
> > +++ b/package/freescale-qoriq/cadence/cadence.mk
> > @@ -0,0 +1,19 @@
> >
> +###############################################################
> ######
> > +###########
> > +#
> > +# DP firmware for NXP layerscape platforms
> 
> Just the name of the package.
> 
> > +#
> >
> +###############################################################
> ######
> > +###########
> > +CADENCE_INSTALL_IMAGES = YES
> 
> One empty line between the comment header and the first variable.
> 
> Also, please specify _INSTALL_TARGET = NO
> 
> > +DP_BIN = $(call qstrip,$(BR2_PACKAGE_CADENCE_DP_BIN))
> 
> As per the comment above, this is not needed.
> 
> > +
> > +define CADENCE_BUILD_CMDS
> > +     cd $(@D)/ && wget
> > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
> >
> +nxp.com%2Flgfiles%2Fsdk%2Flsdk1909%2Ffirmware-cadence-lsdk1909.bin&a
> m
> >
> +p;data=02%7C01%7Cjerry.huang%40nxp.com%7C9c92f3028db94a45041a08d
> 76d99
> >
> +e558%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637098380050
> 336719&
> >
> +amp;sdata=1f65%2B7j1t%2FuLicJMICfrV%2BrZpjme4a4YUtK88gDJF8g%3D&a
> mp;re
> > +served=0 &&\
> 
> Urgh, this is horrible: you are completely bypassing Buildroot's download
> infrastructure. Please use it:
> 
> <pkg>_VERSION = lsdk1909
> <pkg>_SITE =
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.nxp.
> com%2Flgfiles%2Fsdk%2Flsdk1909%2F&amp;data=02%7C01%7Cjerry.huang%4
> 0nxp.com%7C9c92f3028db94a45041a08d76d99e558%7C686ea1d3bc2b4c6fa9
> 2cd99c5c301635%7C0%7C0%7C637098380050336719&amp;sdata=NJTQlJNknn
> I3Dmi62e%2B06a%2BoI%2BzD8nT2DtXTS27c3SU%3D&amp;reserved=0
> <pkg>_SOURCE = firmware-cadence-$(<pkg>_VERSION).bin
> 
> define <pkg>_EXTRACT_CMDS
>         cd $(@D); \
>                 sh $(<pkg>_DL_DIR)/$(<pkg>_SOURCE) --auto-accept endef
> 
> > +define CADENCE_INSTALL_IMAGES_CMDS
> > +     cp $(@D)/firmware-cadence-lsdk1909/dp/$(DP_BIN)
> > +$(BINARIES_DIR)/;
> 
> Use:
> 
>         $(INSTALL) -D -m 0644
> $(@D)/firmware-cadence-lsdk1909/dp/ls1028a-dp-fw.bin
> $(BINARIES_DIR)/ls1028a-dp-fw.bin
? I will following the download infrastructure.

> Also, please add the appropriate licensing information, since there is a COPYING
> file in the archive.
Ok, will add the license information

> Thanks!
> 
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.c
> om&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7C9c92f3028db94a4504
> 1a08d76d99e558%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637
> 098380050336719&amp;sdata=1KYF0jJSSz75f%2FthSq5U3BPIoYst%2BqnqpVAe
> uYsMUD0%3D&amp;reserved=0

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

* [Buildroot] [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09
  2019-11-20  9:21   ` [Buildroot] " Michael Walle
@ 2019-11-20  9:32     ` Thomas Petazzoni
  2019-11-20  9:38       ` Matthew Weber
  0 siblings, 1 reply; 39+ messages in thread
From: Thomas Petazzoni @ 2019-11-20  9:32 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 20 Nov 2019 10:21:12 +0100
Michael Walle <michael@walle.cc> wrote:

> > diff --git a/package/rcw/rcw.hash b/package/rcw/rcw.hash
> > index 7de1ec659a..3fbb5d167f 100644
> > --- a/package/rcw/rcw.hash
> > +++ b/package/rcw/rcw.hash  
> 
> sorry for missing the initial commit.. but IMHO the package name "rcw" 
> is _really_ bad. because its too generic. what if another SoC also has a 
> package rcw. So if it is still possible, could it be renamed to 
> rcw-qoriq ?

True, rcw is very short and quite generic. Matt, what do you think?

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

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

* [Buildroot] [EXT] Re: [PATCH 7/9] package/rcw: Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO
  2019-11-20  9:14   ` Thomas Petazzoni
@ 2019-11-20  9:34     ` Jerry Huang
  2019-11-20  9:38       ` Thomas Petazzoni
  0 siblings, 1 reply; 39+ messages in thread
From: Jerry Huang @ 2019-11-20  9:34 UTC (permalink / raw)
  To: buildroot

Hi, Thomas,

Best Regards
Jerry Huang

> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Wednesday, November 20, 2019 5:15 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net
> Subject: [EXT] Re: [Buildroot] [PATCH 7/9] package/rcw: Enable IIC5_PMUX and
> CLK_OUT_PMUX for GPIO
> 
> Caution: EXT Email
> 
> On Wed, 20 Nov 2019 12:07:23 +0800
> Changming Huang <jerry.huang@nxp.com> wrote:
> 
> > 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: Changming Huang <jerry.huang@nxp.com>
> > ---
> >  ...5_PMUX-for-GPIO-function.patch.conditional | 42
> > +++++++++++++++++++  ...T_PMUX-for-GPIO-function.patch.conditional | 40
> ++++++++++++++++++
> >  package/rcw/rcw.mk                            |  7 ++++
> >  3 files changed, 89 insertions(+)
> >  create mode 100644
> > package/rcw/0001-ls1028ardb-Enable-IIC5_PMUX-for-GPIO-function.patch.c
> > onditional  create mode 100644
> >
> package/rcw/0002-ls1028ardb-Enable-CLK_OUT_PMUX-for-GPIO-function.patc
> > h.conditional
> 
> Sorry, but we really want to avoid conditional patches. Is there a better solution
> than this ?
> 
> The patches modify only files in ls1028ardb/, and you apply them when the
> board name is ls1028ardb, so basically, you could just as well apply the patches
> unconditionally, no ?
I can change it to apply the patch unconfitionally.

> > +ifeq ($(findstring ls1028ardb, $(BR2_TARGET_UBOOT_BOARDNAME)),
> > +ls1028ardb)
> 
> We really don't want to look at BR2_TARGET_UBOOT_BOARDNAME from
> package/rcw/.
> 
> Best regards,
> 
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.c
> om&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7C219d7748f90148ab5c
> d708d76d9a1a83%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637
> 098380943442208&amp;sdata=C7gIJmLs7J8o6A2%2BlYs5HiKzQzSBMqUBWPET
> TiW1iWY%3D&amp;reserved=0

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

* [Buildroot] [EXT] Re: [PATCH 6/9] package/freescale-qoriq/cadence: new package
  2019-11-20  9:30     ` [Buildroot] [EXT] " Jerry Huang
@ 2019-11-20  9:36       ` Thomas Petazzoni
  2019-11-20  9:47         ` Jerry Huang
  0 siblings, 1 reply; 39+ messages in thread
From: Thomas Petazzoni @ 2019-11-20  9:36 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 20 Nov 2019 09:30:26 +0000
Jerry Huang <jerry.huang@nxp.com> wrote:

> > Also, "cadence" is not descriptive enough as a package name.
> > freescale-qoriq-cadence-dp-firmware perhaps? It's a bit long, but at least it's
> > descriptive.  
> I think "cadence-dp-firmware" can be used for its name.
> Because it is under sub-directory " freescale-qoriq", 
> we can remove the prefix " freescale-qoriq" from package name.

Being inside the freescale-qoriq doesn't improve things in any way: the
namespace of package names (and therefore variables) is global in
Buildroot.

> > Indentation is not correct, we also need a link to some upstream web site that
> > gives details about this firmware.  
> Sure, I will adjust it.
> 
> > Just curious: the DisplayPort really needs a firmware that runs on the main CPU,
> > at EL3 ? This is pretty scary :-/ How does it get loaded ?  
> Yes, LS1028ARDB need this firmware for display port.
> We used the command "hdp load" in uboot before starting Linux kernel.

OK. Where is this firmware image stored? You just install it to
$(BINARIES_DIR). Should it be installed in the rootfs instead, so that
U-Boot can pick it up from there ?

Thanks,

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

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

* [Buildroot] [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09
  2019-11-20  9:32     ` Thomas Petazzoni
@ 2019-11-20  9:38       ` Matthew Weber
  2019-11-20  9:45         ` Thomas Petazzoni
  0 siblings, 1 reply; 39+ messages in thread
From: Matthew Weber @ 2019-11-20  9:38 UTC (permalink / raw)
  To: buildroot

Thomas, Michael,

On Wed, Nov 20, 2019 at 3:32 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> On Wed, 20 Nov 2019 10:21:12 +0100
> Michael Walle <michael@walle.cc> wrote:
>
> > > diff --git a/package/rcw/rcw.hash b/package/rcw/rcw.hash
> > > index 7de1ec659a..3fbb5d167f 100644
> > > --- a/package/rcw/rcw.hash
> > > +++ b/package/rcw/rcw.hash
> >
> > sorry for missing the initial commit.. but IMHO the package name "rcw"
> > is _really_ bad. because its too generic. what if another SoC also has a
> > package rcw. So if it is still possible, could it be renamed to
> > rcw-qoriq ?
>
> True, rcw is very short and quite generic. Matt, what do you think?
>

Michael, good points, maybe we could append a prefix to make it
freescale-qoriq-rcw?

Matt

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

* [Buildroot] [EXT] Re: [PATCH 7/9] package/rcw: Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO
  2019-11-20  9:34     ` [Buildroot] [EXT] " Jerry Huang
@ 2019-11-20  9:38       ` Thomas Petazzoni
  2019-11-20 10:22         ` Jerry Huang
  0 siblings, 1 reply; 39+ messages in thread
From: Thomas Petazzoni @ 2019-11-20  9:38 UTC (permalink / raw)
  To: buildroot

On Wed, 20 Nov 2019 09:34:13 +0000
Jerry Huang <jerry.huang@nxp.com> wrote:

> > The patches modify only files in ls1028ardb/, and you apply them when the
> > board name is ls1028ardb, so basically, you could just as well apply the patches
> > unconditionally, no ?  
> I can change it to apply the patch unconfitionally.

OK, thanks. Please make sure to submit the patch to the upstream rcw
project, so that ultimately, we can drop the patches.

Thanks,

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

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

* [Buildroot] [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09
  2019-11-20  9:38       ` Matthew Weber
@ 2019-11-20  9:45         ` Thomas Petazzoni
  2019-11-20  9:51           ` [Buildroot] [External] " Matthew Weber
  2019-11-20  9:54           ` [Buildroot] [EXT] " Jerry Huang
  0 siblings, 2 replies; 39+ messages in thread
From: Thomas Petazzoni @ 2019-11-20  9:45 UTC (permalink / raw)
  To: buildroot

On Wed, 20 Nov 2019 03:38:40 -0600
Matthew Weber <matthew.weber@collins.com> wrote:

> > True, rcw is very short and quite generic. Matt, what do you think?
> 
> Michael, good points, maybe we could append a prefix to make it
> freescale-qoriq-rcw?

Yes, freescale-qorqiq-rcw is good.

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

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

* [Buildroot] [EXT] Re: [PATCH 6/9] package/freescale-qoriq/cadence: new package
  2019-11-20  9:36       ` Thomas Petazzoni
@ 2019-11-20  9:47         ` Jerry Huang
  0 siblings, 0 replies; 39+ messages in thread
From: Jerry Huang @ 2019-11-20  9:47 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Wednesday, November 20, 2019 5:36 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net
> Subject: Re: [EXT] Re: [Buildroot] [PATCH 6/9] package/freescale-qoriq/cadence:
> new package
> 
> Caution: EXT Email
> 
> Hello,
> 
> On Wed, 20 Nov 2019 09:30:26 +0000
> Jerry Huang <jerry.huang@nxp.com> wrote:
> 
> > > Also, "cadence" is not descriptive enough as a package name.
> > > freescale-qoriq-cadence-dp-firmware perhaps? It's a bit long, but at
> > > least it's descriptive.
> > I think "cadence-dp-firmware" can be used for its name.
> > Because it is under sub-directory " freescale-qoriq", we can remove
> > the prefix " freescale-qoriq" from package name.
> 
> Being inside the freescale-qoriq doesn't improve things in any way: the
> namespace of package names (and therefore variables) is global in Buildroot.
> 
> > > Indentation is not correct, we also need a link to some upstream web
> > > site that gives details about this firmware.
> > Sure, I will adjust it.
> >
> > > Just curious: the DisplayPort really needs a firmware that runs on
> > > the main CPU, at EL3 ? This is pretty scary :-/ How does it get loaded ?
> > Yes, LS1028ARDB need this firmware for display port.
> > We used the command "hdp load" in uboot before starting Linux kernel.
> 
> OK. Where is this firmware image stored? You just install it to $(BINARIES_DIR).
> Should it be installed in the rootfs instead, so that U-Boot can pick it up from
> there ?
The post image scripts will create one full images including uboot, rcw, firmware, kernel ITB/rootfs.
This firmware is stored NOR flash if booting the board from QSPI/FlexSPI boot,
Or it is stored one partition on SD/eMMC when booting from SD card or eMMC chip.

Then, U-boot can pick it up from flash, SD or eMMC.

> Thanks,
> 
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.c
> om&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7C7af319f85d8c4ad276
> 4008d76d9d1d2e%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637
> 098393876225198&amp;sdata=%2F8LtHwidlTszcsesa9IwePY%2FUJQt7iuJQi%2F
> T%2BfSOu9w%3D&amp;reserved=0

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

* [Buildroot] [External] Re: [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09
  2019-11-20  9:45         ` Thomas Petazzoni
@ 2019-11-20  9:51           ` Matthew Weber
  2019-11-20  9:57             ` [Buildroot] [EXT] " Jerry Huang
  2019-11-20 10:00             ` [Buildroot] " Michael Walle
  2019-11-20  9:54           ` [Buildroot] [EXT] " Jerry Huang
  1 sibling, 2 replies; 39+ messages in thread
From: Matthew Weber @ 2019-11-20  9:51 UTC (permalink / raw)
  To: buildroot

Changming,

On Wed, Nov 20, 2019 at 3:45 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Wed, 20 Nov 2019 03:38:40 -0600
> Matthew Weber <matthew.weber@collins.com> wrote:
>
> > > True, rcw is very short and quite generic. Matt, what do you think?
> >
> > Michael, good points, maybe we could append a prefix to make it
> > freescale-qoriq-rcw?
>
> Yes, freescale-qorqiq-rcw is good.
>

I can send a patch, however do you want to add this rename as a patch
in your current layerscape devkit series as you touch lots of RCW
variables?  Let me know your plan, I can send it but I don't want to
do it in the middle of your work :).

Matt

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

* [Buildroot] [EXT] Re: [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09
  2019-11-20  9:45         ` Thomas Petazzoni
  2019-11-20  9:51           ` [Buildroot] [External] " Matthew Weber
@ 2019-11-20  9:54           ` Jerry Huang
  1 sibling, 0 replies; 39+ messages in thread
From: Jerry Huang @ 2019-11-20  9:54 UTC (permalink / raw)
  To: buildroot



Best Regards
Jerry Huang

> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Wednesday, November 20, 2019 5:46 PM
> To: Matthew Weber <matthew.weber@collins.com>
> Cc: Michael Walle <michael@walle.cc>; Jerry Huang <jerry.huang@nxp.com>;
> buildroot mailing list <buildroot@busybox.net>
> Subject: [EXT] Re: [Buildroot] [PATCH 1/9] package/rcw: upgrade the rcw version
> to LSDK-19.09
> 
> Caution: EXT Email
> 
> On Wed, 20 Nov 2019 03:38:40 -0600
> Matthew Weber <matthew.weber@collins.com> wrote:
> 
> > > True, rcw is very short and quite generic. Matt, what do you think?
> >
> > Michael, good points, maybe we could append a prefix to make it
> > freescale-qoriq-rcw?
> 
> Yes, freescale-qorqiq-rcw is good.
I create sub-directory " freescale-qoriq" in patch 0005-package-freescale-qoriq-xxx, so the RCW package can be moved into that?
Because RCW is related with hardware for QorIQ serial platforms.

> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.c
> om&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7Ca79baf082b6c4b3d45
> 3c08d76d9e67fa%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6370
> 98399419780949&amp;sdata=egdHxRKFOKtMuW2CusUxAU%2BLiAMXdZQ85m
> bUBJGCRPw%3D&amp;reserved=0

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

* [Buildroot] [EXT] Re: [External] Re: [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09
  2019-11-20  9:51           ` [Buildroot] [External] " Matthew Weber
@ 2019-11-20  9:57             ` Jerry Huang
  2019-11-20 10:00             ` [Buildroot] " Michael Walle
  1 sibling, 0 replies; 39+ messages in thread
From: Jerry Huang @ 2019-11-20  9:57 UTC (permalink / raw)
  To: buildroot

Hi, Matt,

Best Regards
Jerry Huang

> -----Original Message-----
> From: Matthew Weber <matthew.weber@collins.com>
> Sent: Wednesday, November 20, 2019 5:52 PM
> To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Michael Walle <michael@walle.cc>; Jerry Huang <jerry.huang@nxp.com>;
> buildroot mailing list <buildroot@busybox.net>
> Subject: [EXT] Re: [External] Re: [Buildroot] [PATCH 1/9] package/rcw: upgrade
> the rcw version to LSDK-19.09
> 
> Caution: EXT Email
> 
> Changming,
> 
> On Wed, Nov 20, 2019 at 3:45 AM Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> wrote:
> >
> > On Wed, 20 Nov 2019 03:38:40 -0600
> > Matthew Weber <matthew.weber@collins.com> wrote:
> >
> > > > True, rcw is very short and quite generic. Matt, what do you think?
> > >
> > > Michael, good points, maybe we could append a prefix to make it
> > > freescale-qoriq-rcw?
> >
> > Yes, freescale-qorqiq-rcw is good.
> >
> 
> I can send a patch, however do you want to add this rename as a patch in your
> current layerscape devkit series as you touch lots of RCW variables?  Let me
> know your plan, I can send it but I don't want to do it in the middle of your
> work :).
I can add this rename as a patch
I created one sub-directory " freescale-qoriq" for all hardware related,
So, can I move RCW after rename into this directory?

> Matt

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

* [Buildroot] [External] Re: [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09
  2019-11-20  9:51           ` [Buildroot] [External] " Matthew Weber
  2019-11-20  9:57             ` [Buildroot] [EXT] " Jerry Huang
@ 2019-11-20 10:00             ` Michael Walle
  2019-11-20 10:23               ` Matthew Weber
  1 sibling, 1 reply; 39+ messages in thread
From: Michael Walle @ 2019-11-20 10:00 UTC (permalink / raw)
  To: buildroot

Hi,

Am 2019-11-20 10:51, schrieb Matthew Weber:
> Changming,
> 
> On Wed, Nov 20, 2019 at 3:45 AM Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> wrote:
>> 
>> On Wed, 20 Nov 2019 03:38:40 -0600
>> Matthew Weber <matthew.weber@collins.com> wrote:
>> 
>> > > True, rcw is very short and quite generic. Matt, what do you think?
>> >
>> > Michael, good points, maybe we could append a prefix to make it
>> > freescale-qoriq-rcw?
>> 
>> Yes, freescale-qorqiq-rcw is good.

sounds good. but also see below.

>> 
> 
> I can send a patch, however do you want to add this rename as a patch
> in your current layerscape devkit series as you touch lots of RCW
> variables?  Let me know your plan, I can send it but I don't want to
> do it in the middle of your work :).

The RCW is really board dependent. I can imagine some OEMs are using the 
ones from freescale, but most likely they won't fit their boards. For 
example, we have our own RCW repository (although only binary for now) 
for our board. Therefore, wouldn't it be better to have different rcw 
config(s) in the board directories?

TBH I just had a quick look at the package makefile and saw that it 
copies the RCWs to /usr/share. Most likely, you (also?) need them in a 
flash/sdcard image, though.

-michael

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

* [Buildroot] [EXT] Re: [PATCH 7/9] package/rcw: Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO
  2019-11-20  9:38       ` Thomas Petazzoni
@ 2019-11-20 10:22         ` Jerry Huang
  0 siblings, 0 replies; 39+ messages in thread
From: Jerry Huang @ 2019-11-20 10:22 UTC (permalink / raw)
  To: buildroot

Thanks a lot for your suggestion.

Best Regards
Jerry Huang

> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Wednesday, November 20, 2019 5:39 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net
> Subject: Re: [EXT] Re: [Buildroot] [PATCH 7/9] package/rcw: Enable IIC5_PMUX
> and CLK_OUT_PMUX for GPIO
> 
> Caution: EXT Email
> 
> On Wed, 20 Nov 2019 09:34:13 +0000
> Jerry Huang <jerry.huang@nxp.com> wrote:
> 
> > > The patches modify only files in ls1028ardb/, and you apply them
> > > when the board name is ls1028ardb, so basically, you could just as
> > > well apply the patches unconditionally, no ?
> > I can change it to apply the patch unconfitionally.
> 
> OK, thanks. Please make sure to submit the patch to the upstream rcw project,
> so that ultimately, we can drop the patches.
> 
> Thanks,
> 
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.c
> om&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7Cb7d1e0c04eef467887
> dc08d76d9d7822%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637
> 098395434083898&amp;sdata=JUgNCv0ZuKrsxcp%2F9rdqyK6ZFQ11Ic3NacjPuK
> lB6hc%3D&amp;reserved=0

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

* [Buildroot] [External] Re: [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09
  2019-11-20 10:00             ` [Buildroot] " Michael Walle
@ 2019-11-20 10:23               ` Matthew Weber
  0 siblings, 0 replies; 39+ messages in thread
From: Matthew Weber @ 2019-11-20 10:23 UTC (permalink / raw)
  To: buildroot

Michael,


On Wed, Nov 20, 2019 at 4:00 AM Michael Walle <michael@walle.cc> wrote:
>
> Hi,
>
> Am 2019-11-20 10:51, schrieb Matthew Weber:
> > Changming,
> >
> > On Wed, Nov 20, 2019 at 3:45 AM Thomas Petazzoni
> > <thomas.petazzoni@bootlin.com> wrote:
> >>
> >> On Wed, 20 Nov 2019 03:38:40 -0600
> >> Matthew Weber <matthew.weber@collins.com> wrote:
> >>
> >> > > True, rcw is very short and quite generic. Matt, what do you think?
> >> >
> >> > Michael, good points, maybe we could append a prefix to make it
> >> > freescale-qoriq-rcw?
> >>
> >> Yes, freescale-qorqiq-rcw is good.
>
> sounds good. but also see below.

I see Changming's email about nesting this in the folder as well.  No
issue with that as long as the maintainers support it (similar to
freescale-imx)

>
> >>
> >
> > I can send a patch, however do you want to add this rename as a patch
> > in your current layerscape devkit series as you touch lots of RCW
> > variables?  Let me know your plan, I can send it but I don't want to
> > do it in the middle of your work :).
>
> The RCW is really board dependent. I can imagine some OEMs are using the
> ones from freescale, but most likely they won't fit their boards. For
> example, we have our own RCW repository (although only binary for now)
> for our board. Therefore, wouldn't it be better to have different rcw
> config(s) in the board directories?

On the next branch there is a patch applied that allows custom board
rcws to meet that need.

>
> TBH I just had a quick look at the package makefile and saw that it
> copies the RCWs to /usr/share. Most likely, you (also?) need them in a
> flash/sdcard image, though.

Agree, the package was originally setup to stage all the pieces the
user needs to use the tool outside of the build from a deployed SDK
for creating images (mainly a board bringup/hardware developer use
case).  REcently a patch was applied to Next that allows customized
boards and with Changming's patch you can stage pre-defined board rcw
binaries for use.

Matt

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

* [Buildroot] [EXT] Re: [PATCH 4/9] boot/arm-trusted-firmware: Add RCW support
  2019-11-20  8:45     ` [Buildroot] [EXT] " Jerry Huang
@ 2019-11-21  8:02       ` Sergey Matyukevich
  2019-11-21  8:37         ` Jerry Huang
  0 siblings, 1 reply; 39+ messages in thread
From: Sergey Matyukevich @ 2019-11-21  8:02 UTC (permalink / raw)
  To: buildroot

> > > diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > > b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > > index 70d36fff73..6896d9a7aa 100644
> > > --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > > +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > > @@ -95,6 +95,15 @@ endif
> > >
> > >  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
> > >
> > > +RCW_BOOT_MODE = $(call
> > qstrip,$(BR2_PACKAGE_HOST_RCW_BOOT_MODE))
> > > +ifneq ($(RCW_BOOT_MODE),)
> > > +RCW_PATH = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
> > > +RCW_FILE = $(lastword $(subst /, ,$(RCW_PATH)))
> > > +ARM_TRUSTED_FIRMWARE_MAKE_OPTS +=
> > BOOT_MODE=$(RCW_BOOT_MODE)
> > > +RCW=$(BINARIES_DIR)/$(RCW_FILE)
> > ARM_TRUSTED_FIRMWARE_MAKE_TARGETS +=
> > > +pbl ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-rcw endif
> > > +
> > >  ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)
> > >  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += fip
> > > ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-openssl
> > 
> > Hi Jerry and all,
> > 
> > Here arm-trusted-firmware build is modified when some host package with
> > specific configuration is enabled in board config.
> > 
> > Shouldn't it be the other way around ? To be more specific: another Config.in
> > option for arm-trusted-firmware which pulls required build time dependencies,
> > e.g. see Marvell DDR options or FIP options.
> 1. If use another Config.in option for arm-trusted-firmware like Marvell DDR , need to mv package/rcw to boot/ directory.
> 2. Refer to FIP, add option like this BR2_PACKAGE_HOST_RCW_ATF in package/rcw/Config.in.host.
> How do you think about the second way?

Hi Jerry, Thomas, and all

I think Marvell DDR was not a good example. In this case ATF does not
need any sources from RCW package, only its binary. So what about
the same approach as for BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33 ?
The idea is not to check whether RCW host package was selected, but
to request RCW as a build dependency and then use its binary.

To be more specific, instead of checking BR2_PACKAGE_HOST_RCW_BOOT_MODE,
just add BR2_TARGET_ARM_TRUSTED_FIRMWARE_FSL_QORIQ_RCW_BOOT_MODE
and do the following in arm-trusted-firmware.mk:

ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FSL_QORIQ_RCW_BOOT_MODE),y)
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-rcw
ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += pbl
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BOOT_MODE=... CW=...
endif

IIUC, you don't need to move host-rcw package to boot directory.
Or you need more flexibility when selecting boot mode
and CW params ?

Thoughts ? Comments ?

Regards,
Sergey

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

* [Buildroot] [EXT] Re: [PATCH 4/9] boot/arm-trusted-firmware: Add RCW support
  2019-11-21  8:02       ` Sergey Matyukevich
@ 2019-11-21  8:37         ` Jerry Huang
  2019-11-21  8:39           ` Jerry Huang
  0 siblings, 1 reply; 39+ messages in thread
From: Jerry Huang @ 2019-11-21  8:37 UTC (permalink / raw)
  To: buildroot

Hi, Sergey

Best Regards
Jerry Huang

> -----Original Message-----
> From: Sergey Matyukevich <geomatsi@gmail.com>
> Sent: Thursday, November 21, 2019 4:03 PM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net
> Subject: Re: [EXT] Re: [Buildroot] [PATCH 4/9] boot/arm-trusted-firmware: Add
> RCW support
> 
> Caution: EXT Email
> 
> > > > diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > > > b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > > > index 70d36fff73..6896d9a7aa 100644
> > > > --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > > > +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > > > @@ -95,6 +95,15 @@ endif
> > > >
> > > >  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
> > > >
> > > > +RCW_BOOT_MODE = $(call
> > > qstrip,$(BR2_PACKAGE_HOST_RCW_BOOT_MODE))
> > > > +ifneq ($(RCW_BOOT_MODE),)
> > > > +RCW_PATH = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
> > > > +RCW_FILE = $(lastword $(subst /, ,$(RCW_PATH)))
> > > > +ARM_TRUSTED_FIRMWARE_MAKE_OPTS +=
> > > BOOT_MODE=$(RCW_BOOT_MODE)
> > > > +RCW=$(BINARIES_DIR)/$(RCW_FILE)
> > > ARM_TRUSTED_FIRMWARE_MAKE_TARGETS +=
> > > > +pbl ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-rcw endif
> > > > +
> > > >  ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)
> > > >  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += fip
> > > > ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-openssl
> > >
> > > Hi Jerry and all,
> > >
> > > Here arm-trusted-firmware build is modified when some host package
> > > with specific configuration is enabled in board config.
> > >
> > > Shouldn't it be the other way around ? To be more specific: another
> > > Config.in option for arm-trusted-firmware which pulls required build
> > > time dependencies, e.g. see Marvell DDR options or FIP options.
> > 1. If use another Config.in option for arm-trusted-firmware like Marvell DDR ,
> need to mv package/rcw to boot/ directory.
> > 2. Refer to FIP, add option like this BR2_PACKAGE_HOST_RCW_ATF in
> package/rcw/Config.in.host.
> > How do you think about the second way?
> 
> Hi Jerry, Thomas, and all
> 
> I think Marvell DDR was not a good example. In this case ATF does not need any
> sources from RCW package, only its binary. So what about the same approach as
> for BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33 ?
> The idea is not to check whether RCW host package was selected, but to request
> RCW as a build dependency and then use its binary.
Agree with you, now I added option BR2_PACKAGE_HOST_RCW_ATF=y to select ATF for RCW.

> To be more specific, instead of checking
> BR2_PACKAGE_HOST_RCW_BOOT_MODE, just add
> BR2_TARGET_ARM_TRUSTED_FIRMWARE_FSL_QORIQ_RCW_BOOT_MODE
> and do the following in arm-trusted-firmware.mk:
> 
> ifeq
> ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FSL_QORIQ_RCW_BOOT_MODE)
> ,y)
> ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-rcw
> ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += pbl
> ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BOOT_MODE=... CW=...
> endif
Because there are different boot mode: sd, emmc, flexspi_nor, flexspi_nand,
So I define the option BR2_PACKAGE_HOST_RCW_BOOT_MODE to indicate it.
RCW=xxx is to indicate the location of RCW binary needed by ATF.

> IIUC, you don't need to move host-rcw package to boot directory.
> Or you need more flexibility when selecting boot mode and CW params ?
I plan to move package/rcw into package/freescale-qoriq/

> Thoughts ? Comments ?
> 
> Regards,
> Sergey

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

* [Buildroot] [EXT] Re: [PATCH 4/9] boot/arm-trusted-firmware: Add RCW support
  2019-11-21  8:37         ` Jerry Huang
@ 2019-11-21  8:39           ` Jerry Huang
  0 siblings, 0 replies; 39+ messages in thread
From: Jerry Huang @ 2019-11-21  8:39 UTC (permalink / raw)
  To: buildroot

Post the new codes:

ifeq ($(BR2_PACKAGE_HOST_RCW_ATF),y)
RCW_BOOT_MODE = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BOOT_MODE))
RCW_PATH = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
RCW_FILE = $(lastword $(subst /, ,$(RCW_PATH)))
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BOOT_MODE=$(RCW_BOOT_MODE) RCW=$(BINARIES_DIR)/$(RCW_FILE)
ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += pbl
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-fsl-qoriq-rcw
endif

Best Regards
Jerry Huang

> -----Original Message-----
> From: Jerry Huang
> Sent: Thursday, November 21, 2019 4:38 PM
> To: Sergey Matyukevich <geomatsi@gmail.com>
> Cc: buildroot at busybox.net
> Subject: RE: [EXT] Re: [Buildroot] [PATCH 4/9] boot/arm-trusted-firmware: Add
> RCW support
> 
> Hi, Sergey
> 
> Best Regards
> Jerry Huang
> 
> > -----Original Message-----
> > From: Sergey Matyukevich <geomatsi@gmail.com>
> > Sent: Thursday, November 21, 2019 4:03 PM
> > To: Jerry Huang <jerry.huang@nxp.com>
> > Cc: buildroot at busybox.net
> > Subject: Re: [EXT] Re: [Buildroot] [PATCH 4/9]
> > boot/arm-trusted-firmware: Add RCW support
> >
> > Caution: EXT Email
> >
> > > > > diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > > > > b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > > > > index 70d36fff73..6896d9a7aa 100644
> > > > > --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > > > > +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> > > > > @@ -95,6 +95,15 @@ endif
> > > > >
> > > > >  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
> > > > >
> > > > > +RCW_BOOT_MODE = $(call
> > > > qstrip,$(BR2_PACKAGE_HOST_RCW_BOOT_MODE))
> > > > > +ifneq ($(RCW_BOOT_MODE),)
> > > > > +RCW_PATH = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
> > > > > +RCW_FILE = $(lastword $(subst /, ,$(RCW_PATH)))
> > > > > +ARM_TRUSTED_FIRMWARE_MAKE_OPTS +=
> > > > BOOT_MODE=$(RCW_BOOT_MODE)
> > > > > +RCW=$(BINARIES_DIR)/$(RCW_FILE)
> > > > ARM_TRUSTED_FIRMWARE_MAKE_TARGETS +=
> > > > > +pbl ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-rcw endif
> > > > > +
> > > > >  ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)
> > > > >  ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += fip
> > > > > ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-openssl
> > > >
> > > > Hi Jerry and all,
> > > >
> > > > Here arm-trusted-firmware build is modified when some host package
> > > > with specific configuration is enabled in board config.
> > > >
> > > > Shouldn't it be the other way around ? To be more specific:
> > > > another Config.in option for arm-trusted-firmware which pulls
> > > > required build time dependencies, e.g. see Marvell DDR options or FIP
> options.
> > > 1. If use another Config.in option for arm-trusted-firmware like
> > > Marvell DDR ,
> > need to mv package/rcw to boot/ directory.
> > > 2. Refer to FIP, add option like this BR2_PACKAGE_HOST_RCW_ATF in
> > package/rcw/Config.in.host.
> > > How do you think about the second way?
> >
> > Hi Jerry, Thomas, and all
> >
> > I think Marvell DDR was not a good example. In this case ATF does not
> > need any sources from RCW package, only its binary. So what about the
> > same approach as for
> BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33 ?
> > The idea is not to check whether RCW host package was selected, but to
> > request RCW as a build dependency and then use its binary.
> Agree with you, now I added option BR2_PACKAGE_HOST_RCW_ATF=y to select
> ATF for RCW.
> 
> > To be more specific, instead of checking
> > BR2_PACKAGE_HOST_RCW_BOOT_MODE, just add
> > BR2_TARGET_ARM_TRUSTED_FIRMWARE_FSL_QORIQ_RCW_BOOT_MODE
> > and do the following in arm-trusted-firmware.mk:
> >
> > ifeq
> >
> ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FSL_QORIQ_RCW_BOOT_MODE)
> > ,y)
> > ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-rcw
> > ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += pbl
> > ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BOOT_MODE=... CW=...
> > endif
> Because there are different boot mode: sd, emmc, flexspi_nor, flexspi_nand, So I
> define the option BR2_PACKAGE_HOST_RCW_BOOT_MODE to indicate it.
> RCW=xxx is to indicate the location of RCW binary needed by ATF.
> 
> > IIUC, you don't need to move host-rcw package to boot directory.
> > Or you need more flexibility when selecting boot mode and CW params ?
> I plan to move package/rcw into package/freescale-qoriq/
> 
> > Thoughts ? Comments ?
> >
> > Regards,
> > Sergey

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

end of thread, other threads:[~2019-11-21  8:39 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-20  4:07 [Buildroot] [PATCH 0/9] new board ls1028ardb introduced Changming Huang
2019-11-20  4:07 ` [Buildroot] [PATCH 1/9] package/rcw: upgrade the rcw version to LSDK-19.09 Changming Huang
2019-11-20  7:59   ` Thomas Petazzoni
2019-11-20  8:04     ` [Buildroot] [EXT] " Jerry Huang
2019-11-20  9:21   ` [Buildroot] " Michael Walle
2019-11-20  9:32     ` Thomas Petazzoni
2019-11-20  9:38       ` Matthew Weber
2019-11-20  9:45         ` Thomas Petazzoni
2019-11-20  9:51           ` [Buildroot] [External] " Matthew Weber
2019-11-20  9:57             ` [Buildroot] [EXT] " Jerry Huang
2019-11-20 10:00             ` [Buildroot] " Michael Walle
2019-11-20 10:23               ` Matthew Weber
2019-11-20  9:54           ` [Buildroot] [EXT] " Jerry Huang
2019-11-20  4:07 ` [Buildroot] [PATCH 2/9] package/rcw: add target rcw binary support Changming Huang
2019-11-20  9:30   ` Matthew Weber
2019-11-20  4:07 ` [Buildroot] [PATCH 3/9] boot/arm-trusted-firmware: Add u-boot-dtb.bin support Changming Huang
2019-11-20  7:37   ` Sergey Matyukevich
2019-11-20  8:13     ` [Buildroot] [EXT] " Jerry Huang
2019-11-20  9:07     ` [Buildroot] " Thomas Petazzoni
2019-11-20  4:07 ` [Buildroot] [PATCH 4/9] boot/arm-trusted-firmware: Add RCW support Changming Huang
2019-11-20  7:50   ` Sergey Matyukevich
2019-11-20  8:45     ` [Buildroot] [EXT] " Jerry Huang
2019-11-21  8:02       ` Sergey Matyukevich
2019-11-21  8:37         ` Jerry Huang
2019-11-21  8:39           ` Jerry Huang
2019-11-20  4:07 ` [Buildroot] [PATCH 5/9] package/freescale-qoriq: new package directory Changming Huang
2019-11-20  8:57   ` Thomas Petazzoni
2019-11-20  4:07 ` [Buildroot] [PATCH 6/9] package/freescale-qoriq/cadence: new package Changming Huang
2019-11-20  9:13   ` Thomas Petazzoni
2019-11-20  9:30     ` [Buildroot] [EXT] " Jerry Huang
2019-11-20  9:36       ` Thomas Petazzoni
2019-11-20  9:47         ` Jerry Huang
2019-11-20  4:07 ` [Buildroot] [PATCH 7/9] package/rcw: Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO Changming Huang
2019-11-20  9:14   ` Thomas Petazzoni
2019-11-20  9:34     ` [Buildroot] [EXT] " Jerry Huang
2019-11-20  9:38       ` Thomas Petazzoni
2019-11-20 10:22         ` Jerry Huang
2019-11-20  4:07 ` [Buildroot] [PATCH 8/9] board/freescale/common/ls: Add standard post image script for Layerscape processors Changming Huang
2019-11-20  4:07 ` [Buildroot] [PATCH 9/9] configs/freescale_ls1028ardb*: new board Changming Huang

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