integrating dtc into the sim/ tree
Mike Frysinger
vapier@gentoo.org
Tue Aug 19 05:38:00 GMT 2014
On Mon 18 Aug 2014 17:14:52 Joel Sherrill wrote:
> gdb on the head has moxie-rtems fail like this:
>
> echo "/* generated by Makefile */" > tmp-hw.h
> /bin/sh ../../../binutils-gdb/sim/moxie/../common/create-version.sh
> ../../../binutils-gdb/sim/moxie/.. x86_64-unknown-linux-gnu
> moxie-rtems4.11 version.c
> sim_hw=""; \
> for hw in $sim_hw ; do \
> echo "extern const struct hw_descriptor dv_${hw}_descriptor[];" ; \
> done >> tmp-hw.h
> dtc -O dtb -o moxie-gdb.dtb ../../../binutils-gdb/sim/moxie/moxie-gdb.dts
> make[3]: dtc: Command not found
> echo "const struct hw_descriptor *hw_descriptors[] = {" >> tmp-hw.h
> make[3]: *** [moxie-gdb.dtb] Error 127
> make[3]: *** Waiting for unfinished jobs....
> sim_hw=""; \
> for hw in $sim_hw ; do \
>
> Is dtc a required tool that is not checked for? Is the output in the tree
> but not timestamped? maintainer only tool?
yeah, you need dtc for moxie. it's been this way forever ? for people
building from git, i think it's fine. it also leads me to a topic i've been
meaning to start for a while, so let's fork the thread.
what issues are there with making the sim use the existing dtc project ? the
dtc tool is licensed under the GPL-2 or later, and the libfdt library is dual
licensed (BSD-2 & GPL-2 or later).
http://www.devicetree.org/Device_Tree_Compiler
the reason i ask is that the existing sim code uses device tree style logic
heavily as it comes from the ppc sim import/commonization logic. afaik, this
codebase is somewhat a predecessor of the dtc codebase -- they both originated
at IBM, and the ppc sim is dated mid-1990's while dtc is dated mid-2000. i'm
not saying they necessarily share actual code, but they certainly have shared
lineage above that. at this point though, the syntax has diverged quite a
bit, so i'd love to just gut all the logic in sim and use the common dtc
package as that's what the rest of the world is using now. it'd also make it
easier to share device tree definitions between projects (sim/u-
boot/linux/etc...).
importing dtc in directly would be my preference, but iiuc, people would
prefer to only import FSF owned projects. i know that ship sailed long ago
with the sim codebase (large portions of it are not owned by the FSF), but
still the FSF seems to want to keep that from expanding further.
so i guess that leaves us with linking against a system copy. i'm fine with
that too. thoughts ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/gdb/attachments/20140819/edd84ff7/attachment.sig>
More information about the Gdb
mailing list