diff options
author | Luis Machado <luis.machado@linaro.org> | 2021-04-07 16:20:44 -0300 |
---|---|---|
committer | Luis Machado <luis.machado@linaro.org> | 2021-04-08 15:02:14 -0300 |
commit | b7f507caf082212ea1aa62897bb26d0f3b59b5c4 (patch) | |
tree | ec04cab949f0346f1318b9cc6eadb402fbe274a7 | |
parent | 2b8d134be46071f6869ed45ebbf521d91c93fb66 (diff) | |
download | fsf-binutils-gdb-b7f507caf082212ea1aa62897bb26d0f3b59b5c4.zip fsf-binutils-gdb-b7f507caf082212ea1aa62897bb26d0f3b59b5c4.tar.gz fsf-binutils-gdb-b7f507caf082212ea1aa62897bb26d0f3b59b5c4.tar.bz2 |
Fix DTB generation mechanism and build failure
I ran into a build failure with --enable-targets=all due to the fact that
the moxie sim expects to be able to use the dtc tool. If it isn't available,
the builds fails.
The following patch adds a prebuilt dtb file to the tree. That file is the one
that is used for installations.
The patch also enables (re-)generation of the dtb file through maintainer
mode, if it needs to be updated due to a change in the dts file.
Tested on aarch64-linux/x86_64-linux.
sim/moxie/ChangeLog:
2021-04-08 Luis Machado <luis.machado@linaro.org>
* Makefile.in (moxie-gdb.dtb): Add maintainer mode dependency.
(install-dtb): Install prebuilt dtb file.
* moxie-gdb.dtb: New prebuilt file.
-rw-r--r-- | sim/moxie/ChangeLog | 6 | ||||
-rw-r--r-- | sim/moxie/Makefile.in | 16 | ||||
-rw-r--r-- | sim/moxie/moxie-gdb.dtb | bin | 0 -> 519 bytes |
3 files changed, 19 insertions, 3 deletions
diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index b73cfab..95ddb4f 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,3 +1,9 @@ +2021-04-08 Luis Machado <luis.machado@linaro.org> + + * Makefile.in (moxie-gdb.dtb): Add maintainer mode dependency. + (install-dtb): Install prebuilt dtb file. + * moxie-gdb.dtb: New prebuilt file. + 2021-04-02 Mike Frysinger <vapier@gentoo.org> * aclocal.m4, configure: Regenerate. diff --git a/sim/moxie/Makefile.in b/sim/moxie/Makefile.in index ee51386..bd58074 100644 --- a/sim/moxie/Makefile.in +++ b/sim/moxie/Makefile.in @@ -17,6 +17,8 @@ ## COMMON_PRE_CONFIG_FRAG +DTC = @DTC@ + dtbdir = @datadir@/gdb/dtb SIM_OBJS = \ @@ -32,9 +34,17 @@ SIM_EXTRA_CFLAGS = -DDTB="\"$(dtbdir)/moxie-gdb.dtb\"" all: moxie-gdb.dtb -moxie-gdb.dtb: moxie-gdb.dts - dtc -O dtb -o moxie-gdb.dtb ${srcdir}/moxie-gdb.dts +moxie-gdb.dtb: @MAINTAINER_MODE_TRUE@ moxie-gdb.dts + @echo Regenerating moxie-gdb.dtb + if test "x$(DTC)" != x; then \ + $(DTC) -O dtb -o moxie-gdb.dtb ${srcdir}/moxie-gdb.dts || exit 1; \ + $(SHELL) $(srcroot)/move-if-change moxie-gdb.dtb ${srcdir}/moxie-gdb.dtb || exit 1; \ + else \ + echo "Could not update the moxie-gdb.dtb file because the device "; \ + echo "tree compiler tool (dtc) is missing. Install the tool to "; \ + echo "update the device tree blob."; \ + fi install-dtb: moxie-gdb.dtb $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(dtbdir) - $(INSTALL_DATA) moxie-gdb.dtb $(DESTDIR)$(dtbdir)/moxie-gdb.dtb + $(INSTALL_DATA) $(srcdir)/moxie-gdb.dtb $(DESTDIR)$(dtbdir)/moxie-gdb.dtb diff --git a/sim/moxie/moxie-gdb.dtb b/sim/moxie/moxie-gdb.dtb Binary files differnew file mode 100644 index 0000000..4c7e457 --- /dev/null +++ b/sim/moxie/moxie-gdb.dtb |