dtc: fix breakage of in-barebox libfdt
cover dtc: fix breakage of in-barebox libfdt
I missed that I have to test CONFIG_BOARD_ARM_GENERIC_DT as well when updating dtc. Please apply the first commit before the ("scripts/dtc: Update to upstream version v1.5.1") commit, so it's not intermittently broken.
Also attached is a fixup to the documentation that makes note of this.
Ahmad Fatoum (2):
lib: fdt: define INT32_MAX for in-barebox use fixup! Documentation: document barebox device tree handling
Documentation/devicetree/index.rst | 17 ++++++++++------- include/linux/libfdt_env.h | 2 ++ 2 files changed, 12 insertions(+), 7 deletions(-)
Signature · 7 lines
2.20.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/2 lib: fdt: define INT32_MAX for in-barebox use
From: Ahmad Fatoum <[email protected]>
The upcoming v1.5.1 version of libfdt adds a dependency on the C99 INT32_MAX symbol.
This is ok for use in the host tool, but libfdt can also be embedded into barebox, where it would fail as we don't define this anywhere.
Fix this by providing an appropriate definition.
--- include/linux/libfdt_env.h | 2 ++ 1 file changed, 2 insertions(+)
include/linux/libfdt_env.h +2 -0
@@ -16,4 +16,6 @@ typedef __be64 fdt64_t;#define fdt64_to_cpu (x) be64_to_cpu(x)#define cpu_to_fdt64 (x) cpu_to_be64(x) +#define INT32_MAX 2147483647 +#endif /* LIBFDT_ENV_H */
Signature · 7 lines
2.20.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/2 fixup! Documentation: document barebox device tree handling
In reply to Ahmad Fatoum--- Documentation/devicetree/index.rst | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
Documentation/devicetree/index.rst +10 -7
@@ -20,7 +20,7 @@ They are located under the top-level ``dts/`` directory. Patches against ``dts/`` and its subdirectories are not accepted upstream. -.. _kernel.org device-tree repository: https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/ +.. _kernel.org Split device-tree repository: https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/ barebox Device Trees --------------------
@@ -34,21 +34,24 @@ environment or boot-time device configuration. Device Tree Compiler -------------------- -barebox makes use of the ``dtc`` and ``fdtget`` utilities from the `Device-Tree -Compiler`_ project. +barebox makes use of the ``dtc`` and ``fdtget`` and the underlying ``libfdt`` +from the `Device-Tree Compiler`_ project. .. _Device-Tree Compiler: https://git.kernel.org/pub/scm/utils/dtc/dtc.git -These utilities are built as part of the barebox build process. +These utilities are built as part of the barebox build process. Additionally, +libfdt is compiled once more as part of the ``CONFIG_BOARD_ARM_GENERIC_DT`` +if selected. -Steps to update ``dtc``: +Steps to update ``scripts/dtc``: * Place a ``git-checkout`` of the upstream ``dtc`` directory in the parent directory of your barebox ``git-checkout``. * Run ``scripts/dtc/update-dtc-source.sh`` from the top-level barebox directory. * Wait till ``dtc`` build, test, install and commit conclude. -* If ``scripts/dtc/Makefile`` changes are necessary, apply them manually in - a commit preceding the ``dtc`` update. +* Compile-test with ``CONFIG_BOARD_ARM_GENERIC_DT=y``. +* If ``scripts/dtc/Makefile`` or barebox include file changes are necessary, + apply them manually in a commit preceding the ``dtc`` update. barebox-specific Bindings -------------------------
Signature · 7 lines
2.20.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 10 lines · Ahmad Fatoum
I missed that I have to test
CONFIG_BOARD_ARM_GENERIC_DTas well when updating dtc. Please apply the first commit before the ("scripts/dtc: Update to upstream version v1.5.1") commit, so it's not intermittently broken.Also attached is a fixup to the documentation that makes note of this.
Ahmad Fatoum (2):
lib: fdt: defineINT32_MAXfor in-barebox use fixup! Documentation: document barebox device tree handling
Applied, thanks
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox