ti-k3-r5-loader: support devicetree customisation
PATCH 1/1 ti-k3-r5-loader: support devicetree customisation
This is duplicated from the U-Boot makefile & Kconfig.
Similarly to U-Boot custom boards sometimes need to adjust the U-Boot devicetree. For example, the AM64x SDRAM controller supports inline ECC which needs to be enabled in the R5 loader devicetree.
Please note that some versions of U-Boot have broken external devicetree support and may require manual patching to build. See commit 3609e1dc5f4d4c238dcd23e045ba6223310feffa in the U-Boot tree.
--- boot/ti-k3-r5-loader/Config.in | 10 ++++++++++ boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 5 +++++ 2 files changed, 15 insertions(+)
boot/ti-k3-r5-loader/Config.in +10 -0
@@ -92,3 +92,13 @@ config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_CONFIG_FILE Path to the TI K3 R5 Loader configuration file. endif + +config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_DTS_PATH + string "Device Tree Source file paths" + help + Space-separated list of paths to device tree source files + that will be copied to arch/ARCH/dts/ before starting the + build. + + To use this device tree source file, the TI K3 R5 Loader + configuration file must refer to it.
(quoted diff) +0 -0
b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
index 8311e1b401..012f4ee52d 100644
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
@@ -77,7 +77,12 @@ TI_K3_R5_LOADER_MAKE_OPTS +=
TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
endif
endif
+TI_K3_R5_LOADER_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_DTS_PATH)) +
define TI_K3_R5_LOADER_BUILD_CMDS
+ $(if $(TI_K3_R5_LOADER_CUSTOM_DTS_PATH),
+ cp -f $(TI_K3_R5_LOADER_CUSTOM_DTS_PATH) $(@D)/arch/arm/dts/
+ )
$(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D)
$(TI_K3_R5_LOADER_MAKE_OPTS)
endef
Signature · 5 lines
2.41.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 11 lines · Patrick Oppenlander
This is duplicated from the U-Boot makefile &
Kconfig.Similarly to U-Boot custom boards sometimes need to adjust the U-Boot devicetree. For example, the AM64x SDRAM controller supports inline ECC which needs to be enabled in the R5 loader devicetree.
Please note that some versions of U-Boot have broken external devicetree support and may require manual patching to build. See commit
3609e1dc5f4d4c238dcd23e045ba6223310feffain the U-Boot tree.
Ping adding Andreas to cc.
Hi Andreas, could you take a look at this. For our project we need to enable inline ECC support, which requires customisation of the R5 loader devicetree.
Thanks,
Patrick
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Patrick,
Quoted 27 lines · On Wed, 5 Jul 2023 17:16:34 +1000 Patrick Oppenlander…
boot/ti-k3-r5-loader/Config.in +9
-0+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_DTS_PATH + string "Device Tree Source file paths" + help + Space-separated list of paths to device tree source files + that will be copied to arch/ARCH/dts/ before starting the + build. + + To use this device tree source file, the TI K3 R5 Loader + configuration file must refer to it.boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +5
-0@@ -77,7 +77,12 @@ TI_K3_R5_LOADER_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR) endif endif +TI_K3_R5_LOADER_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_DTS_PATH)) + define TI_K3_R5_LOADER_BUILD_CMDS + $(if $(TI_K3_R5_LOADER_CUSTOM_DTS_PATH), + cp -f $(TI_K3_R5_LOADER_CUSTOM_DTS_PATH) $(@D)/arch/arm/dts/ + ) $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D)
Quoted 3 lines
$(TI_K3_R5_LOADER_MAKE_OPTS)
endef
This patch is badly line-wrapped. Could you resend with "git send-email"?
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
From: Patrick Oppenlander <[email protected]>
Hi Thomas,
sorry about that. Resend below.
Patrick
--- boot/ti-k3-r5-loader/Config.in | 10 ++++++++++ boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 5 +++++ 2 files changed, 15 insertions(+)
boot/ti-k3-r5-loader/Config.in +10 -0
@@ -92,3 +92,13 @@ config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_CONFIG_FILE Path to the TI K3 R5 Loader configuration file. endif + +config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_DTS_PATH + string "Device Tree Source file paths" + help + Space-separated list of paths to device tree source files + that will be copied to arch/ARCH/dts/ before starting the + build. + + To use this device tree source file, the TI K3 R5 Loader + configuration file must refer to it.
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +5 -0
@@ -77,7 +77,12 @@ TI_K3_R5_LOADER_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR) endif endif +TI_K3_R5_LOADER_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_DTS_PATH)) + define TI_K3_R5_LOADER_BUILD_CMDS + $(if $(TI_K3_R5_LOADER_CUSTOM_DTS_PATH), + cp -f $(TI_K3_R5_LOADER_CUSTOM_DTS_PATH) $(@D)/arch/arm/dts/ + ) $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS) endef
Signature · 6 lines
2.42.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 7 lines · On Mon, 4 Sep 2023 09:06:09 +1000 [email protected] wrote:
From: Patrick Oppenlander <[email protected]>
Hi Thomas,
sorry about that. Resend below.
Patrick
This also doesn't work, because now your commit log would be:
=============================================================
Hi Thomas,
sorry about that. Resend below.
Patrick
=============================================================
Your commit log should be a proper commit log, which explains the change and its rationale.
Thanks a lot!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Thomas,
I messed that up, sorry. I'll send it again.
Patrick
Quoted 25 lines · Thomas Petazzoni
Quoted 7 lines · On Mon, 4 Sep 2023 09:06:09 +1000 [email protected] wrote:
From: Patrick Oppenlander <[email protected]>
Hi Thomas,
sorry about that. Resend below.
Patrick
This also doesn't work, because now your commit log would be:
=============================================================
Hi Thomas,sorry about that. Resend below.
Patrick
=============================================================Your commit log should be a proper commit log, which explains the change and its rationale.
Quoted 7 lines
Thanks a lot!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 1/1 ti-k3-r5-loader: support devicetree customisation
In reply to Thomas Petazzoni via buildrootFrom: Patrick Oppenlander <[email protected]>
This is duplicated from the U-Boot makefile & Kconfig.
Similarly to U-Boot custom boards sometimes need to adjust the U-Boot devicetree. For example, the AM64x SDRAM controller supports inline ECC which needs to be enabled in the R5 loader devicetree.
Please note that some versions of U-Boot have broken external devicetree support and may require manual patching to build. See commit 3609e1dc5f4d4c238dcd23e045ba6223310feffa in the U-Boot tree.
--- boot/ti-k3-r5-loader/Config.in | 10 ++++++++++ boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 5 +++++ 2 files changed, 15 insertions(+)
boot/ti-k3-r5-loader/Config.in +10 -0
@@ -92,3 +92,13 @@ config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_CONFIG_FILE Path to the TI K3 R5 Loader configuration file. endif + +config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_DTS_PATH + string "Device Tree Source file paths" + help + Space-separated list of paths to device tree source files + that will be copied to arch/ARCH/dts/ before starting the + build. + + To use this device tree source file, the TI K3 R5 Loader + configuration file must refer to it.
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +5 -0
@@ -77,7 +77,12 @@ TI_K3_R5_LOADER_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR) endif endif +TI_K3_R5_LOADER_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_DTS_PATH)) + define TI_K3_R5_LOADER_BUILD_CMDS + $(if $(TI_K3_R5_LOADER_CUSTOM_DTS_PATH), + cp -f $(TI_K3_R5_LOADER_CUSTOM_DTS_PATH) $(@D)/arch/arm/dts/ + ) $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS) endef
Signature · 6 lines
2.42.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Patrick,
Quoted 11 lines · On Tue, 5 Sep 2023 10:33:48 +1000 [email protected] wrote:
From: Patrick Oppenlander <[email protected]>
This is duplicated from the U-Boot makefile &
Kconfig.Similarly to U-Boot custom boards sometimes need to adjust the U-Boot devicetree. For example, the AM64x SDRAM controller supports inline ECC which needs to be enabled in the R5 loader devicetree.
Please note that some versions of U-Boot have broken external devicetree support and may require manual patching to build. See commit
3609e1dc5f4d4c238dcd23e045ba6223310feffain the U-Boot tree.
We're almost there! We now need you to add your Signed-off-by line...
... here!
Quoted 4 lines
--- boot/ti-k3-r5-loader/Config.in | 10 ++++++++++ boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 5 +++++ 2 files changed, 15 insertions(+)
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
From: Patrick Oppenlander <[email protected]>
This is duplicated from the U-Boot makefile & Kconfig.
Similarly to U-Boot custom boards sometimes need to adjust the U-Boot devicetree. For example, the AM64x SDRAM controller supports inline ECC which needs to be enabled in the R5 loader devicetree.
Please note that some versions of U-Boot have broken external devicetree support and may require manual patching to build. See commit 3609e1dc5f4d4c238dcd23e045ba6223310feffa in the U-Boot tree.
--- boot/ti-k3-r5-loader/Config.in | 10 ++++++++++ boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 5 +++++ 2 files changed, 15 insertions(+)
boot/ti-k3-r5-loader/Config.in +10 -0
@@ -92,3 +92,13 @@ config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_CONFIG_FILE Path to the TI K3 R5 Loader configuration file. endif + +config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_DTS_PATH + string "Device Tree Source file paths" + help + Space-separated list of paths to device tree source files + that will be copied to arch/ARCH/dts/ before starting the + build. + + To use this device tree source file, the TI K3 R5 Loader + configuration file must refer to it.
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +5 -0
@@ -77,7 +77,12 @@ TI_K3_R5_LOADER_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR) endif endif +TI_K3_R5_LOADER_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_DTS_PATH)) + define TI_K3_R5_LOADER_BUILD_CMDS + $(if $(TI_K3_R5_LOADER_CUSTOM_DTS_PATH), + cp -f $(TI_K3_R5_LOADER_CUSTOM_DTS_PATH) $(@D)/arch/arm/dts/ + ) $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS) endef
Signature · 6 lines
2.41.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/1 ti-k3-r5-loader: support devicetree customization
This is duplicated from the U-Boot makefile & Kconfig.
Similarly to U-Boot custom boards sometimes need to adjust the U-Boot devicetree. For example, the AM64x SDRAM controller supports inline ECC which needs to be enabled in the R5 loader devicetree.
Please note that some versions of U-Boot have broken external devicetree support and may require manual patching to build. See commit 3609e1dc5f4d4c238dcd23e045ba6223310feffa in the U-Boot tree.
---
v1 -> v2:
- make it apply on current master
- move the config option into if BR2_TARGET_TI_K3_R5_LOADER
- fix help string mentioning ARCH though it's fixed to arm in .mk
--- boot/ti-k3-r5-loader/Config.in | 10 ++++++++++ boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 5 +++++ 2 files changed, 15 insertions(+)
boot/ti-k3-r5-loader/Config.in +10 -0
@@ -95,6 +95,16 @@ config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_CONFIG_FILE help Path to the TI K3 R5 Loader configuration file. +config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_DTS_PATH + string "Device Tree Source file paths" + help + Space-separated list of paths to device tree source files + that will be copied to arch/arm/dts/ before starting the + build. + + To use this device tree source file, the U-Boot configuration + file must refer to it. + config BR2_TARGET_TI_K3_R5_LOADER_TIBOOT3_BIN string "tiboot3.bin binary name" default "tiboot3.bin"
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +5 -0
@@ -88,7 +88,12 @@ define TI_K3_R5_LOADER_INSTALL_SWSFW_ITB fi endef +TI_K3_R5_LOADER_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_DTS_PATH)) + define TI_K3_R5_LOADER_BUILD_CMDS + $(if $(TI_K3_R5_LOADER_CUSTOM_DTS_PATH), + cp -f $(TI_K3_R5_LOADER_CUSTOM_DTS_PATH) $(@D)/arch/arm/dts/ + ) $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS) endef
Signature · 27 lines
2.43.2 -- ––– grandcentrix GmbH | A Vodafone Company · Holzmarkt 1 · 50676 *Cologne* | Phoenixseestrasse 18 · 44263 *Dortmund* · Germany | in <https://www.linkedin.com/company/grandcentrix> | phone: +49-221-677-860-0 | email: [email protected] <mailto:[email protected]> grandcentrix cares about privacy <https://grandcentrix.net/de/pages/privacymail/> Amtsgericht Köln | HRB 70119 | Geschäftsführer: M. Krömer, R. Hänel | USt.-IdNr.: DE266333969 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2] ti-k3-r5-loader: support devicetree customization
Note: This is v2 for
[PATCH] ti-k3-r5-loader: support devicetree customisation
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
I think patchwork didn't catch that because I spelled the subject line differently.
Best,
Gero
Signature · 20 lines
--- grandcentrix GmbH | A Vodafone Company · Holzmarkt 1 · 50676 *Cologne* | Phoenixseestrasse 18 · 44263 *Dortmund* · Germany | in <https://www.linkedin.com/company/grandcentrix> | phone: +49-221-677-860-0 | email: [email protected] <mailto:[email protected]> grandcentrix cares about privacy <https://grandcentrix.net/de/pages/privacymail/> Amtsgericht Köln | HRB 70119 | Geschäftsführer: M. Krömer, R. Hänel | USt.-IdNr.: DE266333969 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Romain Naour
AppliedRe: [Buildroot] [PATCH v2] ti-k3-r5-loader: support devicetree customization
In reply to Gero Schwäricke via buildrootHello Gero,
Le 30/04/2024 à 15:37, Gero Schwäricke via buildroot a écrit :
Quoted 9 lines
This is duplicated from the U-Boot makefile &
Kconfig.Similarly to U-Boot custom boards sometimes need to adjust the U-Boot devicetree. For example, the AM64x SDRAM controller supports inline ECC which needs to be enabled in the R5 loader devicetree.
Please note that some versions of U-Boot have broken external devicetree support and may require manual patching to build. See commit
3609e1dc5f4d4c238dcd23e045ba6223310feffain the U-Boot tree.
I added the URL to gitlab instead:
https://source.denx.de/u-boot/u-boot/-/commit/3609e1dc5f4d4c238dcd23e045ba6223310feffa
Applied to master, thanks.
Best regards,
Romain
Quoted 41 lines
Signed-off-by Patrick Oppenlander <[email protected]>Signed-off-by Gero Schwäricke <[email protected]>---
v1 -> v2:
- make it apply on current master
- move the config option into ifBR2_TARGET_TI_K3_R5_LOADER
- fix help string mentioning ARCH though it's fixed to arm in .mk--- boot/ti-k3-r5-loader/Config.in | 10 ++++++++++ boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 5 +++++ 2 files changed, 15 insertions(+)boot/ti-k3-r5-loader/Config.in +10
-0@@ -95,6 +95,16 @@ config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_CONFIG_FILE help Path to the TI K3 R5 Loader configuration file. +config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_DTS_PATH + string "Device Tree Source file paths" + help + Space-separated list of paths to device tree source files + that will be copied to arch/arm/dts/ before starting the + build. + + To use this device tree source file, the U-Boot configuration + file must refer to it. + config BR2_TARGET_TI_K3_R5_LOADER_TIBOOT3_BIN string "tiboot3.bin binary name" default "tiboot3.bin"boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +0
-0@@ -88,7 +88,12 @@ define TI_K3_R5_LOADER_INSTALL_SWSFW_ITB fi endef
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk define TI_K3_R5_LOADER_INSTALL_SWSFW_ITB · line 99
Quoted 10 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +5
-0+TI_K3_R5_LOADER_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_DTS_PATH)) + define TI_K3_R5_LOADER_BUILD_CMDS + $(if $(TI_K3_R5_LOADER_CUSTOM_DTS_PATH), + cp -f $(TI_K3_R5_LOADER_CUSTOM_DTS_PATH) $(@D)/arch/arm/dts/ + ) $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS) endef
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot