boot/uboot: missing dtc build dependency
PATCH v2 1/1 boot/uboot: missing dtc build dependency
When trying to include multiple DTBs in a FIT image for u-boot, the device tree compiler (dtc) is not build as expected and fails with the following error:
DTC arch/arm/dts/foo.dtb/bin/sh: ./scripts/dtc/dtc: No such file or directory make[4]: *** [scripts/Makefile.lib:329: arch/arm/dts/foo.dtb] Error 127
Using host-dtc instead leads to more problems than it solves and is kept to support older versions of u-boot where dtc support were not provided.
So better to keep using the U-Boot provided dtc and add a patch to fix this issue by adding a dependency on OF_CONTROL for OF_LIST and by selecting DTC for MULTI_DTB_FIT in dts/Kconfig.
---
v2: Add patch to fix the dependencies in Kconfig as noticed by Arnout
v1: Tried to use HOST_DTC
--- .../0001-missing-dtc-dependency-in-kconfig.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 boot/uboot/2018.01/0001-missing-dtc-dependency-in-kconfig.patch
boot/uboot/2018.01/0001-missing-dtc-dependency-in-kconfig.patch new file +19 -0
@@ -0,0 +1,19 @@ +diff -ru a/dts/Kconfig b/dts/Kconfig +--- a/dts/Kconfig 2018-01-09 02:25:29.000000000 +0100 ++++ b/dts/Kconfig 2018-08-01 15:35:57.676153869 +0200 +@@ -113,6 +113,7 @@ + + config OF_LIST + string "List of device tree files to include for DT control" ++ depends on OF_CONTROL + depends on SPL_LOAD_FIT || MULTI_DTB_FIT + default DEFAULT_DEVICE_TREE + help +@@ -135,6 +136,7 @@ + + config MULTI_DTB_FIT + bool "Support embedding several DTBs in a FIT image for u-boot" ++ select DTC + help + This option provides hooks to allow U-boot to parse an + appended FIT image and enable board specific code to then select
Signature · 1 line
2.13.6
PATCH v2 1/1 boot/uboot: missing dtc build dependency
Hello,
boot/uboot/2018.01/0001-missing-dtc-dependency-in-kconfig.patch
Quoted 1 line · David De Grave (Essensium/Mind)
boot/uboot/2018.01/0001-missing-dtc-dependency-in-kconfig.patch +0
-0
This is only going to fix the problem for U-Boot 2018.01, which isn't even our default U-Boot version. I'm not sure it makes sense to carry a patch for that particular U-Boot version.
In addition, we require all patches to have a description + Signed-off-by.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 1/1 boot/uboot: missing dtc build dependency
In reply to David De Grave (Essensium/Mind)Hi David,
Quoted 8 lines · David De Grave (Essensium/Mind)
When trying to include multiple DTBs in a FIT image for u-boot, the device tree compiler (dtc) is not build as expected and fails with the following error:
DTC
arch/arm/dts/foo.dtb/bin/sh:./scripts/dtc/dtc: No such file or directory make[4]: *** [scripts/Makefile.lib:329:arch/arm/dts/foo.dtb] Error 127
Quoted 7 lines
Using host-dtc instead leads to more problems than it solves and is kept to support older versions of u-boot where dtc support were not provided.
So better to keep using the U-Boot provided dtc and add a patch to fix this issue by adding a dependency on
OF_CONTROLforOF_LISTand by selecting DTC forMULTI_DTB_FITin dts/Kconfig.
Unfortunately, since the U-Boot version is user-selectable, adding patches for
some random version doesn't make a whole lot of sense.
In this particular case, it's easily solvable by adding CONFIG_OF_CONTROL=y to
your custom config fragment. Still, it would be good to send the patch below upstream to U-Boot itself, because it's still not fixed in the latest version AFAICS.
boot/uboot/2018.01/0001-missing-dtc-dependency-in-kconfig.patch
Quoted 17 lines
Signed-off-by David De Grave (Essensium/Mind) <[email protected]>---
v2: Add patch to fix the dependencies inKconfigas noticed by Arnout
v1: Tried to useHOST_DTC--- .../0001-missing-dtc-dependency-in-kconfig.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 boot/uboot/2018.01/0001-missing-dtc-dependency-in-kconfig.patchboot/uboot/2018.01/0001-missing-dtc-dependency-in-kconfig.patch new file +0
-0@@ -0,0 +1,19 @@
You should use a git-formatted patch, i.e. clone the U-Boot git repo, check out
the particular version you want to patch, commit your modification, and make sure there is a proper commit message + SoB.
For sure, the patch *must* have a description and a SoB line.
Regards,
Arnout
Quoted 20 lines
boot/uboot/2018.01/0001-missing-dtc-dependency-in-kconfig.patch new file +19
-0+diff -ru a/dts/Kconfig b/dts/Kconfig +--- a/dts/Kconfig 2018-01-09 02:25:29.000000000 +0100 ++++ b/dts/Kconfig 2018-08-01 15:35:57.676153869 +0200 +@@ -113,6 +113,7 @@ + + config OF_LIST + string "List of device tree files to include for DT control" ++ depends on OF_CONTROL + depends on SPL_LOAD_FIT || MULTI_DTB_FIT + default DEFAULT_DEVICE_TREE + help +@@ -135,6 +136,7 @@ + + config MULTI_DTB_FIT + bool "Support embedding several DTBs in a FIT image for u-boot" ++ select DTC + help + This option provides hooks to allow U-boot to parse an + appended FIT image and enable board specific code to then select
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
PATCH v2 1/1 boot/uboot: missing dtc build dependency
Hi Arnout,
Quoted 9 lines · Arnout Vandecappelle
Quoted 4 lines
So better to keep using the U-Boot provided dtc and add a patch to fix this issue by adding a dependency on
OF_CONTROLforOF_LISTand by selecting DTC forMULTI_DTB_FITin dts/Kconfig.Unfortunately, since the U-Boot version is user-selectable, adding
patches for
some random version doesn't make a whole lot of sense.
Quoted 8 lines
In this particular case, it's easily solvable by adding
CONFIG_OF_CONTROL=yto
your custom config fragment. Still, it would be good to send the patch below
upstream to U-Boot itself, because it's still not fixed in the latest version
AFAICS.
Indeed, I tested the last version and there is the same problem... Ok so, just forget about this patch then.
Quoted 10 lines
boot/uboot/2018.01/0001-missing-dtc-dependency-in-kconfig.patch
Quoted 3 lines
boot/uboot/2018.01/0001-missing-dtc-dependency-in-kconfig.patch new file +0
-0@@ -0,0 +1,19 @@You should use a git-formatted patch, i.e. clone the U-Boot git repo,
check out
the particular version you want to patch, commit your modification, and make
sure there is a proper commit message + SoB.
Quoted 2 lines
For sure, the patch *must* have a description and a SoB line.
Ok thanks to point this out, I didn't know.
I will do it that way next time such a case happens. Thx.
Regards,
David.
Signature · 8 lines
*David De Grave* Senior Embedded Software Developer Gsm : +32(0)496.364.960 | Tel : +32-16-28.65.00 | Fax : +32-16-28a.65.01 Essensium-Mind <https://www.mind.be/> - Gaston Geenslaan 9, B-3001 Leuven, Belgium -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180802/3dcb9003/attachment.html>