mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] dtc: fix breakage of in-barebox libfdt
@ 2019-10-01  6:28 Ahmad Fatoum
  2019-10-01  6:28 ` [PATCH 1/2] lib: fdt: define INT32_MAX for in-barebox use Ahmad Fatoum
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2019-10-01  6:28 UTC (permalink / raw)
  To: barebox

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(-)

-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 1/2] lib: fdt: define INT32_MAX for in-barebox use
  2019-10-01  6:28 [PATCH 0/2] dtc: fix breakage of in-barebox libfdt Ahmad Fatoum
@ 2019-10-01  6:28 ` Ahmad Fatoum
  2019-10-01  6:28 ` [PATCH 2/2] fixup! Documentation: document barebox device tree handling Ahmad Fatoum
  2019-10-02  6:48 ` [PATCH 0/2] dtc: fix breakage of in-barebox libfdt Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2019-10-01  6:28 UTC (permalink / raw)
  To: barebox; +Cc: Rouven Czerwinski, Ahmad Fatoum

From: Ahmad Fatoum <a.fatoum@pengutronix.de>

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.

Reported-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/linux/libfdt_env.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/libfdt_env.h b/include/linux/libfdt_env.h
index edb0f0c30904..bac4670d6d7e 100644
--- a/include/linux/libfdt_env.h
+++ b/include/linux/libfdt_env.h
@@ -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 */
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 2/2] fixup! Documentation: document barebox device tree handling
  2019-10-01  6:28 [PATCH 0/2] dtc: fix breakage of in-barebox libfdt Ahmad Fatoum
  2019-10-01  6:28 ` [PATCH 1/2] lib: fdt: define INT32_MAX for in-barebox use Ahmad Fatoum
@ 2019-10-01  6:28 ` Ahmad Fatoum
  2019-10-02  6:48 ` [PATCH 0/2] dtc: fix breakage of in-barebox libfdt Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2019-10-01  6:28 UTC (permalink / raw)
  To: barebox

---
 Documentation/devicetree/index.rst | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/Documentation/devicetree/index.rst b/Documentation/devicetree/index.rst
index 3b911c5a9d42..908652642b9a 100644
--- a/Documentation/devicetree/index.rst
+++ b/Documentation/devicetree/index.rst
@@ -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
 -------------------------
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 0/2] dtc: fix breakage of in-barebox libfdt
  2019-10-01  6:28 [PATCH 0/2] dtc: fix breakage of in-barebox libfdt Ahmad Fatoum
  2019-10-01  6:28 ` [PATCH 1/2] lib: fdt: define INT32_MAX for in-barebox use Ahmad Fatoum
  2019-10-01  6:28 ` [PATCH 2/2] fixup! Documentation: document barebox device tree handling Ahmad Fatoum
@ 2019-10-02  6:48 ` Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2019-10-02  6:48 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Tue, Oct 01, 2019 at 08:28:51AM +0200, Ahmad Fatoum wrote:
> 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

Applied, thanks

Sascha

-- 
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2019-10-02  6:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-01  6:28 [PATCH 0/2] dtc: fix breakage of in-barebox libfdt Ahmad Fatoum
2019-10-01  6:28 ` [PATCH 1/2] lib: fdt: define INT32_MAX for in-barebox use Ahmad Fatoum
2019-10-01  6:28 ` [PATCH 2/2] fixup! Documentation: document barebox device tree handling Ahmad Fatoum
2019-10-02  6:48 ` [PATCH 0/2] dtc: fix breakage of in-barebox libfdt Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox