* [DistroKit] [PATCH 0/7] platform-v8a: cleanup firmware rules
@ 2023-06-02 14:59 Michael Olbrich
2023-06-02 14:59 ` [DistroKit] [PATCH 1/7] platform-v8a: cleanup barebox firmware handling Michael Olbrich
` (7 more replies)
0 siblings, 8 replies; 20+ messages in thread
From: Michael Olbrich @ 2023-06-02 14:59 UTC (permalink / raw)
To: distrokit; +Cc: Michael Olbrich
DistroKit is often used as example when creating a new BSP. So lets make
sure the it follows the best practices for PTXdist BSPs.
Regards,
Michael
Michael Olbrich (7):
platform-v8a: cleanup barebox firmware handling
firmware-imx: move to the correct section
platform-v8a: move platform menu files to platforms/
platform-v8a: simplify dts search path
firmware-imx: use foreach and ptx/nl
firmware-imx: make sure menuconfig works correctly
firmware-rockchip: make sure menuconfig works correctly
configs/platform-v8a/platformconfig | 12 +++++-----
.../{rules => platforms}/firmware-imx.in | 14 +++++------
.../{rules => platforms}/firmware-rockchip.in | 9 ++++----
.../platform-v8a/rules/barebox.rockchip.make | 12 ++++++++++
configs/platform-v8a/rules/firmware-imx.make | 23 +++++++++++++++----
.../platform-v8a/rules/firmware-rockchip.make | 10 ++++++++
.../rules/post/barebox-fixup.make | 16 -------------
7 files changed, 58 insertions(+), 38 deletions(-)
rename configs/platform-v8a/{rules => platforms}/firmware-imx.in (92%)
rename configs/platform-v8a/{rules => platforms}/firmware-rockchip.in (99%)
create mode 100644 configs/platform-v8a/rules/barebox.rockchip.make
delete mode 100644 configs/platform-v8a/rules/post/barebox-fixup.make
--
2.39.2
^ permalink raw reply [flat|nested] 20+ messages in thread
* [DistroKit] [PATCH 1/7] platform-v8a: cleanup barebox firmware handling
2023-06-02 14:59 [DistroKit] [PATCH 0/7] platform-v8a: cleanup firmware rules Michael Olbrich
@ 2023-06-02 14:59 ` Michael Olbrich
2023-06-02 16:40 ` Ahmad Fatoum
2023-06-02 14:59 ` [DistroKit] [PATCH 2/7] firmware-imx: move to the correct section Michael Olbrich
` (6 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: Michael Olbrich @ 2023-06-02 14:59 UTC (permalink / raw)
To: distrokit; +Cc: Michael Olbrich
BAREBOX_INJECT_FILES is explicitly designed in such a way that all
packages can add to it in their regular rules, so move the declarations
accordingly. And only add to BAREBOX_INJECT_FILES if the package is
acutally enabled.
imx/imx-usb-loader is already part of BAREBOX_PROGS_HOST, so no need to
add it.
Move rk-usb-loader to rules/barebox.rockchip.make (it's explicitly
loaded after rules/barebox.make) for now. This can be removed when this
is added upstream.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
configs/platform-v8a/rules/barebox.rockchip.make | 12 ++++++++++++
configs/platform-v8a/rules/firmware-imx.make | 13 +++++++++++++
.../platform-v8a/rules/firmware-rockchip.make | 10 ++++++++++
.../platform-v8a/rules/post/barebox-fixup.make | 16 ----------------
4 files changed, 35 insertions(+), 16 deletions(-)
create mode 100644 configs/platform-v8a/rules/barebox.rockchip.make
delete mode 100644 configs/platform-v8a/rules/post/barebox-fixup.make
diff --git a/configs/platform-v8a/rules/barebox.rockchip.make b/configs/platform-v8a/rules/barebox.rockchip.make
new file mode 100644
index 000000000000..17092a9b728c
--- /dev/null
+++ b/configs/platform-v8a/rules/barebox.rockchip.make
@@ -0,0 +1,12 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2023 by Michael Olbrich <m.olbrich@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+# TODO: remove this when it is added in PTXdist upstream
+BAREBOX_PROGS_HOST += rk-usb-loader
+
+# vim: syntax=make
diff --git a/configs/platform-v8a/rules/firmware-imx.make b/configs/platform-v8a/rules/firmware-imx.make
index fbdd93a15971..7bf1701b3ce1 100644
--- a/configs/platform-v8a/rules/firmware-imx.make
+++ b/configs/platform-v8a/rules/firmware-imx.make
@@ -25,6 +25,19 @@ FIRMWARE_IMX_LICENSE_FILES := \
file://$(FIRMWARE_IMX_PKGDIR)/COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9
FIRMWARE_IMX_SOURCE := $(SRCDIR)/$(FIRMWARE_IMX).$(FIRMWARE_IMX_SUFFIX)
+#
+# Firmware blobs for barebox
+#
+ifdef PTXCONF_FIRMWARE_IMX
+BAREBOX_INJECT_FILES += imx8mm-bl31.bin:firmware/imx8mm-bl31.bin
+BAREBOX_INJECT_FILES += imx8mp-bl31.bin:firmware/imx8mp-bl31.bin
+BAREBOX_INJECT_FILES += imx8mq-bl31.bin:firmware/imx8mq-bl31.bin
+BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_1d_dmem.bin:firmware/lpddr4_pmu_train_1d_dmem.bin
+BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_1d_imem.bin:firmware/lpddr4_pmu_train_1d_imem.bin
+BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_2d_dmem.bin:firmware/lpddr4_pmu_train_2d_dmem.bin
+BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_2d_imem.bin:firmware/lpddr4_pmu_train_2d_imem.bin
+endif
+
# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------
diff --git a/configs/platform-v8a/rules/firmware-rockchip.make b/configs/platform-v8a/rules/firmware-rockchip.make
index dd50c865a037..694914800ed1 100644
--- a/configs/platform-v8a/rules/firmware-rockchip.make
+++ b/configs/platform-v8a/rules/firmware-rockchip.make
@@ -20,6 +20,16 @@ FIRMWARE_ROCKCHIP_SOURCE := $(SRCDIR)/$(FIRMWARE_ROCKCHIP).$(FIRMWARE_ROCKCHIP_S
FIRMWARE_ROCKCHIP_DIR := $(BUILDDIR)/$(FIRMWARE_ROCKCHIP)
FIRMWARE_ROCKCHIP_LICENSE := proprietary
+#
+# Firmware blobs for barebox
+#
+ifdef PTXCONF_FIRMWARE_ROCKCHIP
+BAREBOX_INJECT_FILES += rk3568_bl31_v1.24.elf:firmware/rk3568-bl31.bin
+BAREBOX_INJECT_FILES += rk3568_bl32_v1.05.bin:firmware/rk3568-op-tee.bin
+BAREBOX_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/rockchip-rk3568-evb/sdram-init.bin
+BAREBOX_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/radxa-rock3/sdram-init.bin
+endif
+
# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------
diff --git a/configs/platform-v8a/rules/post/barebox-fixup.make b/configs/platform-v8a/rules/post/barebox-fixup.make
deleted file mode 100644
index 7c4ce40420ad..000000000000
--- a/configs/platform-v8a/rules/post/barebox-fixup.make
+++ /dev/null
@@ -1,16 +0,0 @@
-# Firmware blobs for Rockchip platforms
-BAREBOX_INJECT_FILES += rk3568_bl31_v1.24.elf:firmware/rk3568-bl31.bin
-BAREBOX_INJECT_FILES += rk3568_bl32_v1.05.bin:firmware/rk3568-op-tee.bin
-BAREBOX_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/rockchip-rk3568-evb/sdram-init.bin
-BAREBOX_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/radxa-rock3/sdram-init.bin
-BAREBOX_PROGS_HOST += rk-usb-loader
-
-# Firmware blobs for NXP i.MX8M platforms
-BAREBOX_INJECT_FILES += imx8mm-bl31.bin:firmware/imx8mm-bl31.bin
-BAREBOX_INJECT_FILES += imx8mp-bl31.bin:firmware/imx8mp-bl31.bin
-BAREBOX_INJECT_FILES += imx8mq-bl31.bin:firmware/imx8mq-bl31.bin
-BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_1d_dmem.bin:firmware/lpddr4_pmu_train_1d_dmem.bin
-BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_1d_imem.bin:firmware/lpddr4_pmu_train_1d_imem.bin
-BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_2d_dmem.bin:firmware/lpddr4_pmu_train_2d_dmem.bin
-BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_2d_imem.bin:firmware/lpddr4_pmu_train_2d_imem.bin
-BAREBOX_PROGS_HOST += imx/imx-usb-loader
--
2.39.2
^ permalink raw reply [flat|nested] 20+ messages in thread
* [DistroKit] [PATCH 2/7] firmware-imx: move to the correct section
2023-06-02 14:59 [DistroKit] [PATCH 0/7] platform-v8a: cleanup firmware rules Michael Olbrich
2023-06-02 14:59 ` [DistroKit] [PATCH 1/7] platform-v8a: cleanup barebox firmware handling Michael Olbrich
@ 2023-06-02 14:59 ` Michael Olbrich
2023-06-02 16:41 ` Ahmad Fatoum
2023-06-02 14:59 ` [DistroKit] [PATCH 3/7] platform-v8a: move platform menu files to platforms/ Michael Olbrich
` (5 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: Michael Olbrich @ 2023-06-02 14:59 UTC (permalink / raw)
To: distrokit; +Cc: Michael Olbrich
There is a non_free_firmware section, which is exactly for packages
like this.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
configs/platform-v8a/platformconfig | 8 ++++----
configs/platform-v8a/rules/firmware-imx.in | 3 +--
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig
index 4e479660f6b7..7ac44a8777bd 100644
--- a/configs/platform-v8a/platformconfig
+++ b/configs/platform-v8a/platformconfig
@@ -301,6 +301,10 @@ PTXCONF_HOST_M4=y
PTXCONF_HOST_OPENSSL=y
PTXCONF_HOST_SYSTEM_BC=y
PTXCONF_HOST_UTIL_LINUX=y
+
+#
+# non-free firmware blobs
+#
PTXCONF_FIRMWARE_IMX=y
# PTXCONF_FIRMWARE_IMX_VPU_IMX27 is not set
# PTXCONF_FIRMWARE_IMX_VPU_IMX51 is not set
@@ -308,10 +312,6 @@ PTXCONF_FIRMWARE_IMX=y
# PTXCONF_FIRMWARE_IMX_VPU_IMX6DL is not set
# PTXCONF_FIRMWARE_IMX_VPU_IMX6Q is not set
PTXCONF_FIRMWARE_IMX_BOOTIMAGE_IMX8=y
-
-#
-# non-free firmware blobs
-#
PTXCONF_FIRMWARE_ROCKCHIP=y
# PTXCONF_FIRMWARE_ROCKCHIP_RK3566_SDRAM is not set
PTXCONF_FIRMWARE_ROCKCHIP_RK3568_SDRAM=y
diff --git a/configs/platform-v8a/rules/firmware-imx.in b/configs/platform-v8a/rules/firmware-imx.in
index c756b963e5dc..8c76b693d257 100644
--- a/configs/platform-v8a/rules/firmware-imx.in
+++ b/configs/platform-v8a/rules/firmware-imx.in
@@ -1,5 +1,4 @@
-## SECTION=hosttools_platform
-# This should be in a firmware section, once we added that.
+## SECTION=non_free_firmware
menuconfig FIRMWARE_IMX
tristate
--
2.39.2
^ permalink raw reply [flat|nested] 20+ messages in thread
* [DistroKit] [PATCH 3/7] platform-v8a: move platform menu files to platforms/
2023-06-02 14:59 [DistroKit] [PATCH 0/7] platform-v8a: cleanup firmware rules Michael Olbrich
2023-06-02 14:59 ` [DistroKit] [PATCH 1/7] platform-v8a: cleanup barebox firmware handling Michael Olbrich
2023-06-02 14:59 ` [DistroKit] [PATCH 2/7] firmware-imx: move to the correct section Michael Olbrich
@ 2023-06-02 14:59 ` Michael Olbrich
2023-06-02 16:44 ` Ahmad Fatoum
2023-06-02 14:59 ` [DistroKit] [PATCH 4/7] platform-v8a: simplify dts search path Michael Olbrich
` (4 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: Michael Olbrich @ 2023-06-02 14:59 UTC (permalink / raw)
To: distrokit; +Cc: Michael Olbrich
Menu files that are only use for the platformconfig and not the
ptxconfig belong in platforms/.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
configs/platform-v8a/{rules => platforms}/firmware-imx.in | 0
configs/platform-v8a/{rules => platforms}/firmware-rockchip.in | 0
2 files changed, 0 insertions(+), 0 deletions(-)
rename configs/platform-v8a/{rules => platforms}/firmware-imx.in (100%)
rename configs/platform-v8a/{rules => platforms}/firmware-rockchip.in (100%)
diff --git a/configs/platform-v8a/rules/firmware-imx.in b/configs/platform-v8a/platforms/firmware-imx.in
similarity index 100%
rename from configs/platform-v8a/rules/firmware-imx.in
rename to configs/platform-v8a/platforms/firmware-imx.in
diff --git a/configs/platform-v8a/rules/firmware-rockchip.in b/configs/platform-v8a/platforms/firmware-rockchip.in
similarity index 100%
rename from configs/platform-v8a/rules/firmware-rockchip.in
rename to configs/platform-v8a/platforms/firmware-rockchip.in
--
2.39.2
^ permalink raw reply [flat|nested] 20+ messages in thread
* [DistroKit] [PATCH 4/7] platform-v8a: simplify dts search path
2023-06-02 14:59 [DistroKit] [PATCH 0/7] platform-v8a: cleanup firmware rules Michael Olbrich
` (2 preceding siblings ...)
2023-06-02 14:59 ` [DistroKit] [PATCH 3/7] platform-v8a: move platform menu files to platforms/ Michael Olbrich
@ 2023-06-02 14:59 ` Michael Olbrich
2023-06-02 16:44 ` Ahmad Fatoum
2023-06-02 14:59 ` [DistroKit] [PATCH 5/7] firmware-imx: use foreach and ptx/nl Michael Olbrich
` (3 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: Michael Olbrich @ 2023-06-02 14:59 UTC (permalink / raw)
To: distrokit; +Cc: Michael Olbrich
support for subdirs in PTXCONF_KERNEL_DTS was added some time ago.
So the long PTXCONF_KERNEL_DTS_PATH with an entry for each vendor is no
longer needed.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
configs/platform-v8a/platformconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig
index 7ac44a8777bd..2c8f85559e4d 100644
--- a/configs/platform-v8a/platformconfig
+++ b/configs/platform-v8a/platformconfig
@@ -133,8 +133,8 @@ PTXCONF_KERNEL_IMAGE_RAW=y
# PTXCONF_KERNEL_IMAGE_SIMPLE is not set
PTXCONF_KERNEL_IMAGE="Image"
PTXCONF_KERNEL_DTB=y
-PTXCONF_KERNEL_DTS_PATH="${PTXDIST_PLATFORMCONFIG_SUBDIR}/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts/freescale:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts/rockchip"
-PTXCONF_KERNEL_DTS="armada-3720-community.dts imx8mm-evk.dts imx8mp-evk.dts imx8mq-evk.dts rk3568-rock-3a.dts"
+PTXCONF_KERNEL_DTS_PATH="${PTXDIST_PLATFORMCONFIG_SUBDIR}/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts"
+PTXCONF_KERNEL_DTS="armada-3720-community.dts freescale/imx8mm-evk.dts freescale/imx8mp-evk.dts freescale/imx8mq-evk.dts rockchip/rk3568-rock-3a.dts"
# PTXCONF_KERNEL_DTBO is not set
# PTXCONF_KERNEL_CODE_SIGNING is not set
# PTXCONF_KERNEL_ZSTD is not set
--
2.39.2
^ permalink raw reply [flat|nested] 20+ messages in thread
* [DistroKit] [PATCH 5/7] firmware-imx: use foreach and ptx/nl
2023-06-02 14:59 [DistroKit] [PATCH 0/7] platform-v8a: cleanup firmware rules Michael Olbrich
` (3 preceding siblings ...)
2023-06-02 14:59 ` [DistroKit] [PATCH 4/7] platform-v8a: simplify dts search path Michael Olbrich
@ 2023-06-02 14:59 ` Michael Olbrich
2023-06-02 16:45 ` Ahmad Fatoum
2023-06-02 14:59 ` [DistroKit] [PATCH 6/7] firmware-imx: make sure menuconfig works correctly Michael Olbrich
` (2 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: Michael Olbrich @ 2023-06-02 14:59 UTC (permalink / raw)
To: distrokit; +Cc: Michael Olbrich
Combining multiple commands with ';' hides errors. So use $(foreach ...)
and $(ptx/nl) to create separate commands that are executed individually
and all errors are caught.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
configs/platform-v8a/rules/firmware-imx.make | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/configs/platform-v8a/rules/firmware-imx.make b/configs/platform-v8a/rules/firmware-imx.make
index 7bf1701b3ce1..56c8e24ecd69 100644
--- a/configs/platform-v8a/rules/firmware-imx.make
+++ b/configs/platform-v8a/rules/firmware-imx.make
@@ -59,11 +59,11 @@ ifdef PTXCONF_FIRMWARE_IMX_BOOTIMAGE_IMX8
@$(foreach f, lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_1d_imem.bin \
lpddr4_pmu_train_2d_dmem.bin lpddr4_pmu_train_2d_imem.bin, \
install -v -D -m644 $(FIRMWARE_IMX_PKGDIR)/firmware/ddr/synopsys/$(f) \
- $(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware/ddr/synopsys/$(f);)
+ $(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware/ddr/synopsys/$(f)$(ptx/nl))
@$(foreach f, signed_dp_imx8m.bin signed_hdmi_imx8m.bin, \
install -v -D -m644 $(FIRMWARE_IMX_PKGDIR)/firmware/hdmi/cadence/$(f) \
- $(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware/hdmi/cadence/$(f);)
+ $(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware/hdmi/cadence/$(f)$(ptx/nl))
endif
@$(call touch)
@@ -86,10 +86,10 @@ $(STATEDIR)/firmware-imx.targetinstall:
@$(call install_fixup, firmware-imx,SECTION,base)
@$(call install_fixup, firmware-imx,AUTHOR,"Philipp Zabel <p.zabel@pengutronix.de>")
@$(call install_fixup, firmware-imx,DESCRIPTION,missing)
- @for f in $(FIRMWARE_IMX_INSTALL-y); do \
+ @$(foreach f,$(FIRMWARE_IMX_INSTALL-y), \
$(call install_copy, firmware-imx, 0, 0, 0644, \
- $(FIRMWARE_IMX_PKGDIR)/firmware/vpu/$$f, /usr/lib/firmware/$$f); \
- done
+ $(FIRMWARE_IMX_PKGDIR)/firmware/vpu/$(f), \
+ /usr/lib/firmware/$(f))$(ptx/nl))
@$(call install_finish, firmware-imx)
@$(call touch)
--
2.39.2
^ permalink raw reply [flat|nested] 20+ messages in thread
* [DistroKit] [PATCH 6/7] firmware-imx: make sure menuconfig works correctly
2023-06-02 14:59 [DistroKit] [PATCH 0/7] platform-v8a: cleanup firmware rules Michael Olbrich
` (4 preceding siblings ...)
2023-06-02 14:59 ` [DistroKit] [PATCH 5/7] firmware-imx: use foreach and ptx/nl Michael Olbrich
@ 2023-06-02 14:59 ` Michael Olbrich
2023-06-02 16:38 ` Ahmad Fatoum
2023-06-02 14:59 ` [DistroKit] [PATCH 7/7] firmware-rockchip: " Michael Olbrich
2023-06-20 13:26 ` [DistroKit] [PATCH 0/7] platform-v8a: cleanup firmware rules Robert Schwebel
7 siblings, 1 reply; 20+ messages in thread
From: Michael Olbrich @ 2023-06-02 14:59 UTC (permalink / raw)
To: distrokit; +Cc: Michael Olbrich
Suboptions are only sorted into when:
- the suboptions depend on the menuconfig option
- the suboptions are listed immediately after the menuconfig option
The BAREBOX_DEPENDENCIES in the middle breaks this so move it to the
bottom of the file.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
configs/platform-v8a/platforms/firmware-imx.in | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/configs/platform-v8a/platforms/firmware-imx.in b/configs/platform-v8a/platforms/firmware-imx.in
index 8c76b693d257..19d89ace9821 100644
--- a/configs/platform-v8a/platforms/firmware-imx.in
+++ b/configs/platform-v8a/platforms/firmware-imx.in
@@ -6,11 +6,6 @@ menuconfig FIRMWARE_IMX
help
Install CODA VPU firmware files from the firmware-imx package.
-config BAREBOX_DEPENDENCIES
- tristate
- select FIRMWARE_IMX
- select TF_A
-
if FIRMWARE_IMX
config FIRMWARE_IMX_VPU_IMX27
@@ -51,3 +46,9 @@ config FIRMWARE_IMX_BOOTIMAGE_IMX8
firmware used to build a boot image.
endif
+
+config BAREBOX_DEPENDENCIES
+ tristate
+ select FIRMWARE_IMX
+ select TF_A
+
--
2.39.2
^ permalink raw reply [flat|nested] 20+ messages in thread
* [DistroKit] [PATCH 7/7] firmware-rockchip: make sure menuconfig works correctly
2023-06-02 14:59 [DistroKit] [PATCH 0/7] platform-v8a: cleanup firmware rules Michael Olbrich
` (5 preceding siblings ...)
2023-06-02 14:59 ` [DistroKit] [PATCH 6/7] firmware-imx: make sure menuconfig works correctly Michael Olbrich
@ 2023-06-02 14:59 ` Michael Olbrich
2023-06-20 13:26 ` [DistroKit] [PATCH 0/7] platform-v8a: cleanup firmware rules Robert Schwebel
7 siblings, 0 replies; 20+ messages in thread
From: Michael Olbrich @ 2023-06-02 14:59 UTC (permalink / raw)
To: distrokit; +Cc: Michael Olbrich
Suboptions are only sorted into when:
- the suboptions depend on the menuconfig option
- the suboptions are listed immediately after the menuconfig option
The BAREBOX_DEPENDENCIES in the middle breaks this so move it to the
bottom of the file.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
configs/platform-v8a/platforms/firmware-rockchip.in | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/configs/platform-v8a/platforms/firmware-rockchip.in b/configs/platform-v8a/platforms/firmware-rockchip.in
index 08b89f1af944..87a1490be0be 100644
--- a/configs/platform-v8a/platforms/firmware-rockchip.in
+++ b/configs/platform-v8a/platforms/firmware-rockchip.in
@@ -6,10 +6,6 @@ menuconfig FIRMWARE_ROCKCHIP
help
Rockchip prebuilt SDRAM initialization and TF-A binaries.
-config BAREBOX_DEPENDENCIES
- tristate
- select FIRMWARE_ROCKCHIP
-
if FIRMWARE_ROCKCHIP
config FIRMWARE_ROCKCHIP_RK3566_SDRAM
@@ -43,3 +39,8 @@ config FIRMWARE_ROCKCHIP_RK356x_BL32
and the Rockchip RK3568 EVB1 board.
endif
+
+config BAREBOX_DEPENDENCIES
+ tristate
+ select FIRMWARE_ROCKCHIP
+
--
2.39.2
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [DistroKit] [PATCH 6/7] firmware-imx: make sure menuconfig works correctly
2023-06-02 14:59 ` [DistroKit] [PATCH 6/7] firmware-imx: make sure menuconfig works correctly Michael Olbrich
@ 2023-06-02 16:38 ` Ahmad Fatoum
2023-06-08 9:25 ` [DistroKit] [PATCH v2] " Michael Olbrich
0 siblings, 1 reply; 20+ messages in thread
From: Ahmad Fatoum @ 2023-06-02 16:38 UTC (permalink / raw)
To: Michael Olbrich, distrokit
On 02.06.23 16:59, Michael Olbrich wrote:
> Suboptions are only sorted into when:
What do you mean with sorted into? This is just a cosmetic change, right?
> - the suboptions depend on the menuconfig option
> - the suboptions are listed immediately after the menuconfig option
>
> The BAREBOX_DEPENDENCIES in the middle breaks this so move it to the
> bottom of the file.
>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> ---
> configs/platform-v8a/platforms/firmware-imx.in | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/configs/platform-v8a/platforms/firmware-imx.in b/configs/platform-v8a/platforms/firmware-imx.in
> index 8c76b693d257..19d89ace9821 100644
> --- a/configs/platform-v8a/platforms/firmware-imx.in
> +++ b/configs/platform-v8a/platforms/firmware-imx.in
> @@ -6,11 +6,6 @@ menuconfig FIRMWARE_IMX
> help
> Install CODA VPU firmware files from the firmware-imx package.
>
> -config BAREBOX_DEPENDENCIES
> - tristate
> - select FIRMWARE_IMX
> - select TF_A
> -
> if FIRMWARE_IMX
>
> config FIRMWARE_IMX_VPU_IMX27
> @@ -51,3 +46,9 @@ config FIRMWARE_IMX_BOOTIMAGE_IMX8
> firmware used to build a boot image.
>
> endif
> +
> +config BAREBOX_DEPENDENCIES
> + tristate
> + select FIRMWARE_IMX
> + select TF_A
> +
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [DistroKit] [PATCH 1/7] platform-v8a: cleanup barebox firmware handling
2023-06-02 14:59 ` [DistroKit] [PATCH 1/7] platform-v8a: cleanup barebox firmware handling Michael Olbrich
@ 2023-06-02 16:40 ` Ahmad Fatoum
2023-06-08 9:19 ` Michael Olbrich
0 siblings, 1 reply; 20+ messages in thread
From: Ahmad Fatoum @ 2023-06-02 16:40 UTC (permalink / raw)
To: Michael Olbrich, distrokit
On 02.06.23 16:59, Michael Olbrich wrote:
> BAREBOX_INJECT_FILES is explicitly designed in such a way that all
> packages can add to it in their regular rules, so move the declarations
> accordingly. And only add to BAREBOX_INJECT_FILES if the package is
> acutally enabled.
>
> imx/imx-usb-loader is already part of BAREBOX_PROGS_HOST, so no need to
> add it.
>
> Move rk-usb-loader to rules/barebox.rockchip.make (it's explicitly
> loaded after rules/barebox.make) for now. This can be removed when this
> is added upstream.
>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> ---
> configs/platform-v8a/rules/barebox.rockchip.make | 12 ++++++++++++
> configs/platform-v8a/rules/firmware-imx.make | 13 +++++++++++++
> .../platform-v8a/rules/firmware-rockchip.make | 10 ++++++++++
> .../platform-v8a/rules/post/barebox-fixup.make | 16 ----------------
> 4 files changed, 35 insertions(+), 16 deletions(-)
> create mode 100644 configs/platform-v8a/rules/barebox.rockchip.make
> delete mode 100644 configs/platform-v8a/rules/post/barebox-fixup.make
>
> diff --git a/configs/platform-v8a/rules/barebox.rockchip.make b/configs/platform-v8a/rules/barebox.rockchip.make
> new file mode 100644
> index 000000000000..17092a9b728c
> --- /dev/null
> +++ b/configs/platform-v8a/rules/barebox.rockchip.make
What magic includes this file?
Patch looks fine though:
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> @@ -0,0 +1,12 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2023 by Michael Olbrich <m.olbrich@pengutronix.de>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +# TODO: remove this when it is added in PTXdist upstream
> +BAREBOX_PROGS_HOST += rk-usb-loader
> +
> +# vim: syntax=make
> diff --git a/configs/platform-v8a/rules/firmware-imx.make b/configs/platform-v8a/rules/firmware-imx.make
> index fbdd93a15971..7bf1701b3ce1 100644
> --- a/configs/platform-v8a/rules/firmware-imx.make
> +++ b/configs/platform-v8a/rules/firmware-imx.make
> @@ -25,6 +25,19 @@ FIRMWARE_IMX_LICENSE_FILES := \
> file://$(FIRMWARE_IMX_PKGDIR)/COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9
> FIRMWARE_IMX_SOURCE := $(SRCDIR)/$(FIRMWARE_IMX).$(FIRMWARE_IMX_SUFFIX)
>
> +#
> +# Firmware blobs for barebox
> +#
> +ifdef PTXCONF_FIRMWARE_IMX
> +BAREBOX_INJECT_FILES += imx8mm-bl31.bin:firmware/imx8mm-bl31.bin
> +BAREBOX_INJECT_FILES += imx8mp-bl31.bin:firmware/imx8mp-bl31.bin
> +BAREBOX_INJECT_FILES += imx8mq-bl31.bin:firmware/imx8mq-bl31.bin
> +BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_1d_dmem.bin:firmware/lpddr4_pmu_train_1d_dmem.bin
> +BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_1d_imem.bin:firmware/lpddr4_pmu_train_1d_imem.bin
> +BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_2d_dmem.bin:firmware/lpddr4_pmu_train_2d_dmem.bin
> +BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_2d_imem.bin:firmware/lpddr4_pmu_train_2d_imem.bin
> +endif
> +
> # ----------------------------------------------------------------------------
> # Extract
> # ----------------------------------------------------------------------------
> diff --git a/configs/platform-v8a/rules/firmware-rockchip.make b/configs/platform-v8a/rules/firmware-rockchip.make
> index dd50c865a037..694914800ed1 100644
> --- a/configs/platform-v8a/rules/firmware-rockchip.make
> +++ b/configs/platform-v8a/rules/firmware-rockchip.make
> @@ -20,6 +20,16 @@ FIRMWARE_ROCKCHIP_SOURCE := $(SRCDIR)/$(FIRMWARE_ROCKCHIP).$(FIRMWARE_ROCKCHIP_S
> FIRMWARE_ROCKCHIP_DIR := $(BUILDDIR)/$(FIRMWARE_ROCKCHIP)
> FIRMWARE_ROCKCHIP_LICENSE := proprietary
>
> +#
> +# Firmware blobs for barebox
> +#
> +ifdef PTXCONF_FIRMWARE_ROCKCHIP
> +BAREBOX_INJECT_FILES += rk3568_bl31_v1.24.elf:firmware/rk3568-bl31.bin
> +BAREBOX_INJECT_FILES += rk3568_bl32_v1.05.bin:firmware/rk3568-op-tee.bin
> +BAREBOX_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/rockchip-rk3568-evb/sdram-init.bin
> +BAREBOX_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/radxa-rock3/sdram-init.bin
> +endif
> +
> # ----------------------------------------------------------------------------
> # Prepare
> # ----------------------------------------------------------------------------
> diff --git a/configs/platform-v8a/rules/post/barebox-fixup.make b/configs/platform-v8a/rules/post/barebox-fixup.make
> deleted file mode 100644
> index 7c4ce40420ad..000000000000
> --- a/configs/platform-v8a/rules/post/barebox-fixup.make
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -# Firmware blobs for Rockchip platforms
> -BAREBOX_INJECT_FILES += rk3568_bl31_v1.24.elf:firmware/rk3568-bl31.bin
> -BAREBOX_INJECT_FILES += rk3568_bl32_v1.05.bin:firmware/rk3568-op-tee.bin
> -BAREBOX_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/rockchip-rk3568-evb/sdram-init.bin
> -BAREBOX_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/radxa-rock3/sdram-init.bin
> -BAREBOX_PROGS_HOST += rk-usb-loader
> -
> -# Firmware blobs for NXP i.MX8M platforms
> -BAREBOX_INJECT_FILES += imx8mm-bl31.bin:firmware/imx8mm-bl31.bin
> -BAREBOX_INJECT_FILES += imx8mp-bl31.bin:firmware/imx8mp-bl31.bin
> -BAREBOX_INJECT_FILES += imx8mq-bl31.bin:firmware/imx8mq-bl31.bin
> -BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_1d_dmem.bin:firmware/lpddr4_pmu_train_1d_dmem.bin
> -BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_1d_imem.bin:firmware/lpddr4_pmu_train_1d_imem.bin
> -BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_2d_dmem.bin:firmware/lpddr4_pmu_train_2d_dmem.bin
> -BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_2d_imem.bin:firmware/lpddr4_pmu_train_2d_imem.bin
> -BAREBOX_PROGS_HOST += imx/imx-usb-loader
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [DistroKit] [PATCH 2/7] firmware-imx: move to the correct section
2023-06-02 14:59 ` [DistroKit] [PATCH 2/7] firmware-imx: move to the correct section Michael Olbrich
@ 2023-06-02 16:41 ` Ahmad Fatoum
0 siblings, 0 replies; 20+ messages in thread
From: Ahmad Fatoum @ 2023-06-02 16:41 UTC (permalink / raw)
To: Michael Olbrich, distrokit
On 02.06.23 16:59, Michael Olbrich wrote:
> There is a non_free_firmware section, which is exactly for packages
> like this.
>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> configs/platform-v8a/platformconfig | 8 ++++----
> configs/platform-v8a/rules/firmware-imx.in | 3 +--
> 2 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig
> index 4e479660f6b7..7ac44a8777bd 100644
> --- a/configs/platform-v8a/platformconfig
> +++ b/configs/platform-v8a/platformconfig
> @@ -301,6 +301,10 @@ PTXCONF_HOST_M4=y
> PTXCONF_HOST_OPENSSL=y
> PTXCONF_HOST_SYSTEM_BC=y
> PTXCONF_HOST_UTIL_LINUX=y
> +
> +#
> +# non-free firmware blobs
> +#
> PTXCONF_FIRMWARE_IMX=y
> # PTXCONF_FIRMWARE_IMX_VPU_IMX27 is not set
> # PTXCONF_FIRMWARE_IMX_VPU_IMX51 is not set
> @@ -308,10 +312,6 @@ PTXCONF_FIRMWARE_IMX=y
> # PTXCONF_FIRMWARE_IMX_VPU_IMX6DL is not set
> # PTXCONF_FIRMWARE_IMX_VPU_IMX6Q is not set
> PTXCONF_FIRMWARE_IMX_BOOTIMAGE_IMX8=y
> -
> -#
> -# non-free firmware blobs
> -#
> PTXCONF_FIRMWARE_ROCKCHIP=y
> # PTXCONF_FIRMWARE_ROCKCHIP_RK3566_SDRAM is not set
> PTXCONF_FIRMWARE_ROCKCHIP_RK3568_SDRAM=y
> diff --git a/configs/platform-v8a/rules/firmware-imx.in b/configs/platform-v8a/rules/firmware-imx.in
> index c756b963e5dc..8c76b693d257 100644
> --- a/configs/platform-v8a/rules/firmware-imx.in
> +++ b/configs/platform-v8a/rules/firmware-imx.in
> @@ -1,5 +1,4 @@
> -## SECTION=hosttools_platform
> -# This should be in a firmware section, once we added that.
> +## SECTION=non_free_firmware
>
> menuconfig FIRMWARE_IMX
> tristate
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [DistroKit] [PATCH 3/7] platform-v8a: move platform menu files to platforms/
2023-06-02 14:59 ` [DistroKit] [PATCH 3/7] platform-v8a: move platform menu files to platforms/ Michael Olbrich
@ 2023-06-02 16:44 ` Ahmad Fatoum
2023-06-08 9:22 ` Michael Olbrich
0 siblings, 1 reply; 20+ messages in thread
From: Ahmad Fatoum @ 2023-06-02 16:44 UTC (permalink / raw)
To: Michael Olbrich, distrokit
On 02.06.23 16:59, Michael Olbrich wrote:
> Menu files that are only use for the platformconfig and not the
> ptxconfig belong in platforms/.
What functional change does this introduce?
>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> ---
> configs/platform-v8a/{rules => platforms}/firmware-imx.in | 0
> configs/platform-v8a/{rules => platforms}/firmware-rockchip.in | 0
> 2 files changed, 0 insertions(+), 0 deletions(-)
> rename configs/platform-v8a/{rules => platforms}/firmware-imx.in (100%)
> rename configs/platform-v8a/{rules => platforms}/firmware-rockchip.in (100%)
>
> diff --git a/configs/platform-v8a/rules/firmware-imx.in b/configs/platform-v8a/platforms/firmware-imx.in
> similarity index 100%
> rename from configs/platform-v8a/rules/firmware-imx.in
> rename to configs/platform-v8a/platforms/firmware-imx.in
> diff --git a/configs/platform-v8a/rules/firmware-rockchip.in b/configs/platform-v8a/platforms/firmware-rockchip.in
> similarity index 100%
> rename from configs/platform-v8a/rules/firmware-rockchip.in
> rename to configs/platform-v8a/platforms/firmware-rockchip.in
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [DistroKit] [PATCH 4/7] platform-v8a: simplify dts search path
2023-06-02 14:59 ` [DistroKit] [PATCH 4/7] platform-v8a: simplify dts search path Michael Olbrich
@ 2023-06-02 16:44 ` Ahmad Fatoum
0 siblings, 0 replies; 20+ messages in thread
From: Ahmad Fatoum @ 2023-06-02 16:44 UTC (permalink / raw)
To: Michael Olbrich, distrokit
On 02.06.23 16:59, Michael Olbrich wrote:
> support for subdirs in PTXCONF_KERNEL_DTS was added some time ago.
> So the long PTXCONF_KERNEL_DTS_PATH with an entry for each vendor is no
> longer needed.
>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> configs/platform-v8a/platformconfig | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig
> index 7ac44a8777bd..2c8f85559e4d 100644
> --- a/configs/platform-v8a/platformconfig
> +++ b/configs/platform-v8a/platformconfig
> @@ -133,8 +133,8 @@ PTXCONF_KERNEL_IMAGE_RAW=y
> # PTXCONF_KERNEL_IMAGE_SIMPLE is not set
> PTXCONF_KERNEL_IMAGE="Image"
> PTXCONF_KERNEL_DTB=y
> -PTXCONF_KERNEL_DTS_PATH="${PTXDIST_PLATFORMCONFIG_SUBDIR}/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts/freescale:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts/rockchip"
> -PTXCONF_KERNEL_DTS="armada-3720-community.dts imx8mm-evk.dts imx8mp-evk.dts imx8mq-evk.dts rk3568-rock-3a.dts"
> +PTXCONF_KERNEL_DTS_PATH="${PTXDIST_PLATFORMCONFIG_SUBDIR}/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts"
> +PTXCONF_KERNEL_DTS="armada-3720-community.dts freescale/imx8mm-evk.dts freescale/imx8mp-evk.dts freescale/imx8mq-evk.dts rockchip/rk3568-rock-3a.dts"
> # PTXCONF_KERNEL_DTBO is not set
> # PTXCONF_KERNEL_CODE_SIGNING is not set
> # PTXCONF_KERNEL_ZSTD is not set
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [DistroKit] [PATCH 5/7] firmware-imx: use foreach and ptx/nl
2023-06-02 14:59 ` [DistroKit] [PATCH 5/7] firmware-imx: use foreach and ptx/nl Michael Olbrich
@ 2023-06-02 16:45 ` Ahmad Fatoum
0 siblings, 0 replies; 20+ messages in thread
From: Ahmad Fatoum @ 2023-06-02 16:45 UTC (permalink / raw)
To: Michael Olbrich, distrokit
On 02.06.23 16:59, Michael Olbrich wrote:
> Combining multiple commands with ';' hides errors. So use $(foreach ...)
> and $(ptx/nl) to create separate commands that are executed individually
> and all errors are caught.
>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> configs/platform-v8a/rules/firmware-imx.make | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/configs/platform-v8a/rules/firmware-imx.make b/configs/platform-v8a/rules/firmware-imx.make
> index 7bf1701b3ce1..56c8e24ecd69 100644
> --- a/configs/platform-v8a/rules/firmware-imx.make
> +++ b/configs/platform-v8a/rules/firmware-imx.make
> @@ -59,11 +59,11 @@ ifdef PTXCONF_FIRMWARE_IMX_BOOTIMAGE_IMX8
> @$(foreach f, lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_1d_imem.bin \
> lpddr4_pmu_train_2d_dmem.bin lpddr4_pmu_train_2d_imem.bin, \
> install -v -D -m644 $(FIRMWARE_IMX_PKGDIR)/firmware/ddr/synopsys/$(f) \
> - $(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware/ddr/synopsys/$(f);)
> + $(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware/ddr/synopsys/$(f)$(ptx/nl))
>
> @$(foreach f, signed_dp_imx8m.bin signed_hdmi_imx8m.bin, \
> install -v -D -m644 $(FIRMWARE_IMX_PKGDIR)/firmware/hdmi/cadence/$(f) \
> - $(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware/hdmi/cadence/$(f);)
> + $(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware/hdmi/cadence/$(f)$(ptx/nl))
> endif
>
> @$(call touch)
> @@ -86,10 +86,10 @@ $(STATEDIR)/firmware-imx.targetinstall:
> @$(call install_fixup, firmware-imx,SECTION,base)
> @$(call install_fixup, firmware-imx,AUTHOR,"Philipp Zabel <p.zabel@pengutronix.de>")
> @$(call install_fixup, firmware-imx,DESCRIPTION,missing)
> - @for f in $(FIRMWARE_IMX_INSTALL-y); do \
> + @$(foreach f,$(FIRMWARE_IMX_INSTALL-y), \
> $(call install_copy, firmware-imx, 0, 0, 0644, \
> - $(FIRMWARE_IMX_PKGDIR)/firmware/vpu/$$f, /usr/lib/firmware/$$f); \
> - done
> + $(FIRMWARE_IMX_PKGDIR)/firmware/vpu/$(f), \
> + /usr/lib/firmware/$(f))$(ptx/nl))
> @$(call install_finish, firmware-imx)
>
> @$(call touch)
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [DistroKit] [PATCH 1/7] platform-v8a: cleanup barebox firmware handling
2023-06-02 16:40 ` Ahmad Fatoum
@ 2023-06-08 9:19 ` Michael Olbrich
0 siblings, 0 replies; 20+ messages in thread
From: Michael Olbrich @ 2023-06-08 9:19 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: distrokit
On Fri, Jun 02, 2023 at 06:40:55PM +0200, Ahmad Fatoum wrote:
> On 02.06.23 16:59, Michael Olbrich wrote:
> > BAREBOX_INJECT_FILES is explicitly designed in such a way that all
> > packages can add to it in their regular rules, so move the declarations
> > accordingly. And only add to BAREBOX_INJECT_FILES if the package is
> > acutally enabled.
> >
> > imx/imx-usb-loader is already part of BAREBOX_PROGS_HOST, so no need to
> > add it.
> >
> > Move rk-usb-loader to rules/barebox.rockchip.make (it's explicitly
> > loaded after rules/barebox.make) for now. This can be removed when this
> > is added upstream.
> >
> > Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> > ---
> > configs/platform-v8a/rules/barebox.rockchip.make | 12 ++++++++++++
> > configs/platform-v8a/rules/firmware-imx.make | 13 +++++++++++++
> > .../platform-v8a/rules/firmware-rockchip.make | 10 ++++++++++
> > .../platform-v8a/rules/post/barebox-fixup.make | 16 ----------------
> > 4 files changed, 35 insertions(+), 16 deletions(-)
> > create mode 100644 configs/platform-v8a/rules/barebox.rockchip.make
> > delete mode 100644 configs/platform-v8a/rules/post/barebox-fixup.make
> >
> > diff --git a/configs/platform-v8a/rules/barebox.rockchip.make b/configs/platform-v8a/rules/barebox.rockchip.make
> > new file mode 100644
> > index 000000000000..17092a9b728c
> > --- /dev/null
> > +++ b/configs/platform-v8a/rules/barebox.rockchip.make
>
> What magic includes this file?
I originally introduced this because I needed it to include generated
makefiles for cargo. So I added a generic mechanism to source all
<pkg>.<anything>.make files directly after <pkg>.make. This works for the
cargo use-case, but also to extend package rules in simple ways to avoid
copying the rule.
Michael
> Patch looks fine though:
>
> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>
> > @@ -0,0 +1,12 @@
> > +# -*-makefile-*-
> > +#
> > +# Copyright (C) 2023 by Michael Olbrich <m.olbrich@pengutronix.de>
> > +#
> > +# For further information about the PTXdist project and license conditions
> > +# see the README file.
> > +#
> > +
> > +# TODO: remove this when it is added in PTXdist upstream
> > +BAREBOX_PROGS_HOST += rk-usb-loader
> > +
> > +# vim: syntax=make
> > diff --git a/configs/platform-v8a/rules/firmware-imx.make b/configs/platform-v8a/rules/firmware-imx.make
> > index fbdd93a15971..7bf1701b3ce1 100644
> > --- a/configs/platform-v8a/rules/firmware-imx.make
> > +++ b/configs/platform-v8a/rules/firmware-imx.make
> > @@ -25,6 +25,19 @@ FIRMWARE_IMX_LICENSE_FILES := \
> > file://$(FIRMWARE_IMX_PKGDIR)/COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9
> > FIRMWARE_IMX_SOURCE := $(SRCDIR)/$(FIRMWARE_IMX).$(FIRMWARE_IMX_SUFFIX)
> >
> > +#
> > +# Firmware blobs for barebox
> > +#
> > +ifdef PTXCONF_FIRMWARE_IMX
> > +BAREBOX_INJECT_FILES += imx8mm-bl31.bin:firmware/imx8mm-bl31.bin
> > +BAREBOX_INJECT_FILES += imx8mp-bl31.bin:firmware/imx8mp-bl31.bin
> > +BAREBOX_INJECT_FILES += imx8mq-bl31.bin:firmware/imx8mq-bl31.bin
> > +BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_1d_dmem.bin:firmware/lpddr4_pmu_train_1d_dmem.bin
> > +BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_1d_imem.bin:firmware/lpddr4_pmu_train_1d_imem.bin
> > +BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_2d_dmem.bin:firmware/lpddr4_pmu_train_2d_dmem.bin
> > +BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_2d_imem.bin:firmware/lpddr4_pmu_train_2d_imem.bin
> > +endif
> > +
> > # ----------------------------------------------------------------------------
> > # Extract
> > # ----------------------------------------------------------------------------
> > diff --git a/configs/platform-v8a/rules/firmware-rockchip.make b/configs/platform-v8a/rules/firmware-rockchip.make
> > index dd50c865a037..694914800ed1 100644
> > --- a/configs/platform-v8a/rules/firmware-rockchip.make
> > +++ b/configs/platform-v8a/rules/firmware-rockchip.make
> > @@ -20,6 +20,16 @@ FIRMWARE_ROCKCHIP_SOURCE := $(SRCDIR)/$(FIRMWARE_ROCKCHIP).$(FIRMWARE_ROCKCHIP_S
> > FIRMWARE_ROCKCHIP_DIR := $(BUILDDIR)/$(FIRMWARE_ROCKCHIP)
> > FIRMWARE_ROCKCHIP_LICENSE := proprietary
> >
> > +#
> > +# Firmware blobs for barebox
> > +#
> > +ifdef PTXCONF_FIRMWARE_ROCKCHIP
> > +BAREBOX_INJECT_FILES += rk3568_bl31_v1.24.elf:firmware/rk3568-bl31.bin
> > +BAREBOX_INJECT_FILES += rk3568_bl32_v1.05.bin:firmware/rk3568-op-tee.bin
> > +BAREBOX_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/rockchip-rk3568-evb/sdram-init.bin
> > +BAREBOX_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/radxa-rock3/sdram-init.bin
> > +endif
> > +
> > # ----------------------------------------------------------------------------
> > # Prepare
> > # ----------------------------------------------------------------------------
> > diff --git a/configs/platform-v8a/rules/post/barebox-fixup.make b/configs/platform-v8a/rules/post/barebox-fixup.make
> > deleted file mode 100644
> > index 7c4ce40420ad..000000000000
> > --- a/configs/platform-v8a/rules/post/barebox-fixup.make
> > +++ /dev/null
> > @@ -1,16 +0,0 @@
> > -# Firmware blobs for Rockchip platforms
> > -BAREBOX_INJECT_FILES += rk3568_bl31_v1.24.elf:firmware/rk3568-bl31.bin
> > -BAREBOX_INJECT_FILES += rk3568_bl32_v1.05.bin:firmware/rk3568-op-tee.bin
> > -BAREBOX_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/rockchip-rk3568-evb/sdram-init.bin
> > -BAREBOX_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/radxa-rock3/sdram-init.bin
> > -BAREBOX_PROGS_HOST += rk-usb-loader
> > -
> > -# Firmware blobs for NXP i.MX8M platforms
> > -BAREBOX_INJECT_FILES += imx8mm-bl31.bin:firmware/imx8mm-bl31.bin
> > -BAREBOX_INJECT_FILES += imx8mp-bl31.bin:firmware/imx8mp-bl31.bin
> > -BAREBOX_INJECT_FILES += imx8mq-bl31.bin:firmware/imx8mq-bl31.bin
> > -BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_1d_dmem.bin:firmware/lpddr4_pmu_train_1d_dmem.bin
> > -BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_1d_imem.bin:firmware/lpddr4_pmu_train_1d_imem.bin
> > -BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_2d_dmem.bin:firmware/lpddr4_pmu_train_2d_dmem.bin
> > -BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_2d_imem.bin:firmware/lpddr4_pmu_train_2d_imem.bin
> > -BAREBOX_PROGS_HOST += imx/imx-usb-loader
>
> --
> Pengutronix e.K. | |
> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [DistroKit] [PATCH 3/7] platform-v8a: move platform menu files to platforms/
2023-06-02 16:44 ` Ahmad Fatoum
@ 2023-06-08 9:22 ` Michael Olbrich
2023-06-08 9:27 ` Ahmad Fatoum
0 siblings, 1 reply; 20+ messages in thread
From: Michael Olbrich @ 2023-06-08 9:22 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: distrokit
On Fri, Jun 02, 2023 at 06:44:36PM +0200, Ahmad Fatoum wrote:
> On 02.06.23 16:59, Michael Olbrich wrote:
> > Menu files that are only use for the platformconfig and not the
> > ptxconfig belong in platforms/.
>
> What functional change does this introduce?
No functional change. Originally, all menu files for the platformconfig
where in platforms/ and rules/ was not used. This changed at some point to
make it possible to depend on some host-tools in ptxconfig and
patformconfig.
So now it works both ways, but the policy still it to put anything that is
only used in the platformconfig in platforms/.
Michael
> >
> > Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> > ---
> > configs/platform-v8a/{rules => platforms}/firmware-imx.in | 0
> > configs/platform-v8a/{rules => platforms}/firmware-rockchip.in | 0
> > 2 files changed, 0 insertions(+), 0 deletions(-)
> > rename configs/platform-v8a/{rules => platforms}/firmware-imx.in (100%)
> > rename configs/platform-v8a/{rules => platforms}/firmware-rockchip.in (100%)
> >
> > diff --git a/configs/platform-v8a/rules/firmware-imx.in b/configs/platform-v8a/platforms/firmware-imx.in
> > similarity index 100%
> > rename from configs/platform-v8a/rules/firmware-imx.in
> > rename to configs/platform-v8a/platforms/firmware-imx.in
> > diff --git a/configs/platform-v8a/rules/firmware-rockchip.in b/configs/platform-v8a/platforms/firmware-rockchip.in
> > similarity index 100%
> > rename from configs/platform-v8a/rules/firmware-rockchip.in
> > rename to configs/platform-v8a/platforms/firmware-rockchip.in
>
> --
> Pengutronix e.K. | |
> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 20+ messages in thread
* [DistroKit] [PATCH v2] firmware-imx: make sure menuconfig works correctly
2023-06-02 16:38 ` Ahmad Fatoum
@ 2023-06-08 9:25 ` Michael Olbrich
2023-06-08 9:27 ` Ahmad Fatoum
0 siblings, 1 reply; 20+ messages in thread
From: Michael Olbrich @ 2023-06-08 9:25 UTC (permalink / raw)
To: distrokit, Ahmad Fatoum; +Cc: Michael Olbrich
Suboptions are only sorted into a submenu if:
- the suboptions depend on the menuconfig option
- the suboptions are listed immediately after the menuconfig option
The BAREBOX_DEPENDENCIES in the middle breaks this so move it to the
bottom of the file.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
I've updated the commit message. It should make more sense now.
Michael
configs/platform-v8a/platforms/firmware-imx.in | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/configs/platform-v8a/platforms/firmware-imx.in b/configs/platform-v8a/platforms/firmware-imx.in
index 8c76b693d257..19d89ace9821 100644
--- a/configs/platform-v8a/platforms/firmware-imx.in
+++ b/configs/platform-v8a/platforms/firmware-imx.in
@@ -6,11 +6,6 @@ menuconfig FIRMWARE_IMX
help
Install CODA VPU firmware files from the firmware-imx package.
-config BAREBOX_DEPENDENCIES
- tristate
- select FIRMWARE_IMX
- select TF_A
-
if FIRMWARE_IMX
config FIRMWARE_IMX_VPU_IMX27
@@ -51,3 +46,9 @@ config FIRMWARE_IMX_BOOTIMAGE_IMX8
firmware used to build a boot image.
endif
+
+config BAREBOX_DEPENDENCIES
+ tristate
+ select FIRMWARE_IMX
+ select TF_A
+
--
2.39.2
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [DistroKit] [PATCH v2] firmware-imx: make sure menuconfig works correctly
2023-06-08 9:25 ` [DistroKit] [PATCH v2] " Michael Olbrich
@ 2023-06-08 9:27 ` Ahmad Fatoum
0 siblings, 0 replies; 20+ messages in thread
From: Ahmad Fatoum @ 2023-06-08 9:27 UTC (permalink / raw)
To: Michael Olbrich, distrokit
On 08.06.23 11:25, Michael Olbrich wrote:
> Suboptions are only sorted into a submenu if:
> - the suboptions depend on the menuconfig option
> - the suboptions are listed immediately after the menuconfig option
>
> The BAREBOX_DEPENDENCIES in the middle breaks this so move it to the
> bottom of the file.
>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Thanks for the explanation!
> ---
>
> I've updated the commit message. It should make more sense now.
>
> Michael
>
> configs/platform-v8a/platforms/firmware-imx.in | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/configs/platform-v8a/platforms/firmware-imx.in b/configs/platform-v8a/platforms/firmware-imx.in
> index 8c76b693d257..19d89ace9821 100644
> --- a/configs/platform-v8a/platforms/firmware-imx.in
> +++ b/configs/platform-v8a/platforms/firmware-imx.in
> @@ -6,11 +6,6 @@ menuconfig FIRMWARE_IMX
> help
> Install CODA VPU firmware files from the firmware-imx package.
>
> -config BAREBOX_DEPENDENCIES
> - tristate
> - select FIRMWARE_IMX
> - select TF_A
> -
> if FIRMWARE_IMX
>
> config FIRMWARE_IMX_VPU_IMX27
> @@ -51,3 +46,9 @@ config FIRMWARE_IMX_BOOTIMAGE_IMX8
> firmware used to build a boot image.
>
> endif
> +
> +config BAREBOX_DEPENDENCIES
> + tristate
> + select FIRMWARE_IMX
> + select TF_A
> +
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [DistroKit] [PATCH 3/7] platform-v8a: move platform menu files to platforms/
2023-06-08 9:22 ` Michael Olbrich
@ 2023-06-08 9:27 ` Ahmad Fatoum
0 siblings, 0 replies; 20+ messages in thread
From: Ahmad Fatoum @ 2023-06-08 9:27 UTC (permalink / raw)
To: distrokit
On 08.06.23 11:22, Michael Olbrich wrote:
> On Fri, Jun 02, 2023 at 06:44:36PM +0200, Ahmad Fatoum wrote:
>> On 02.06.23 16:59, Michael Olbrich wrote:
>>> Menu files that are only use for the platformconfig and not the
>>> ptxconfig belong in platforms/.
>>
>> What functional change does this introduce?
>
> No functional change. Originally, all menu files for the platformconfig
> where in platforms/ and rules/ was not used. This changed at some point to
> make it possible to depend on some host-tools in ptxconfig and
> patformconfig.
> So now it works both ways, but the policy still it to put anything that is
> only used in the platformconfig in platforms/.
I see, thanks.
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>
> Michael
>
>>>
>>> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>>> ---
>>> configs/platform-v8a/{rules => platforms}/firmware-imx.in | 0
>>> configs/platform-v8a/{rules => platforms}/firmware-rockchip.in | 0
>>> 2 files changed, 0 insertions(+), 0 deletions(-)
>>> rename configs/platform-v8a/{rules => platforms}/firmware-imx.in (100%)
>>> rename configs/platform-v8a/{rules => platforms}/firmware-rockchip.in (100%)
>>>
>>> diff --git a/configs/platform-v8a/rules/firmware-imx.in b/configs/platform-v8a/platforms/firmware-imx.in
>>> similarity index 100%
>>> rename from configs/platform-v8a/rules/firmware-imx.in
>>> rename to configs/platform-v8a/platforms/firmware-imx.in
>>> diff --git a/configs/platform-v8a/rules/firmware-rockchip.in b/configs/platform-v8a/platforms/firmware-rockchip.in
>>> similarity index 100%
>>> rename from configs/platform-v8a/rules/firmware-rockchip.in
>>> rename to configs/platform-v8a/platforms/firmware-rockchip.in
>>
>> --
>> Pengutronix e.K. | |
>> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
>> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
>> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>>
>>
>>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [DistroKit] [PATCH 0/7] platform-v8a: cleanup firmware rules
2023-06-02 14:59 [DistroKit] [PATCH 0/7] platform-v8a: cleanup firmware rules Michael Olbrich
` (6 preceding siblings ...)
2023-06-02 14:59 ` [DistroKit] [PATCH 7/7] firmware-rockchip: " Michael Olbrich
@ 2023-06-20 13:26 ` Robert Schwebel
7 siblings, 0 replies; 20+ messages in thread
From: Robert Schwebel @ 2023-06-20 13:26 UTC (permalink / raw)
To: Michael Olbrich; +Cc: distrokit
Hi Michael,
On Fri, Jun 02, 2023 at 04:59:50PM +0200, Michael Olbrich wrote:
> DistroKit is often used as example when creating a new BSP. So lets make
> sure the it follows the best practices for PTXdist BSPs.
Could you rebase the series to current master?
It doesn't apply any more.
rsc
--
Pengutronix e.K. | Dipl.-Ing. Robert Schwebel |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2023-06-20 13:26 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-02 14:59 [DistroKit] [PATCH 0/7] platform-v8a: cleanup firmware rules Michael Olbrich
2023-06-02 14:59 ` [DistroKit] [PATCH 1/7] platform-v8a: cleanup barebox firmware handling Michael Olbrich
2023-06-02 16:40 ` Ahmad Fatoum
2023-06-08 9:19 ` Michael Olbrich
2023-06-02 14:59 ` [DistroKit] [PATCH 2/7] firmware-imx: move to the correct section Michael Olbrich
2023-06-02 16:41 ` Ahmad Fatoum
2023-06-02 14:59 ` [DistroKit] [PATCH 3/7] platform-v8a: move platform menu files to platforms/ Michael Olbrich
2023-06-02 16:44 ` Ahmad Fatoum
2023-06-08 9:22 ` Michael Olbrich
2023-06-08 9:27 ` Ahmad Fatoum
2023-06-02 14:59 ` [DistroKit] [PATCH 4/7] platform-v8a: simplify dts search path Michael Olbrich
2023-06-02 16:44 ` Ahmad Fatoum
2023-06-02 14:59 ` [DistroKit] [PATCH 5/7] firmware-imx: use foreach and ptx/nl Michael Olbrich
2023-06-02 16:45 ` Ahmad Fatoum
2023-06-02 14:59 ` [DistroKit] [PATCH 6/7] firmware-imx: make sure menuconfig works correctly Michael Olbrich
2023-06-02 16:38 ` Ahmad Fatoum
2023-06-08 9:25 ` [DistroKit] [PATCH v2] " Michael Olbrich
2023-06-08 9:27 ` Ahmad Fatoum
2023-06-02 14:59 ` [DistroKit] [PATCH 7/7] firmware-rockchip: " Michael Olbrich
2023-06-20 13:26 ` [DistroKit] [PATCH 0/7] platform-v8a: cleanup firmware rules Robert Schwebel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox