* Building dtc etc. for packaging
@ 2008-11-11 17:29 Matt Sealey
2008-11-11 18:00 ` Nate Case
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Matt Sealey @ 2008-11-11 17:29 UTC (permalink / raw)
To: linuxppc-dev list
For some of what we're doing with SUSE now I've determined we should really
be packaging the device tree compiler (and libfdt) so that we can install and
script it, along with some other stuff from U-Boot (not for this mail).
I was wondering if the recommended way would be to use the dtc found in
the kernel-source or to use the git repo at git.jdl.com to grab it and
build it. The one in the kernel is seemingly impossible to build without
some tweaking around (I can't find a target for make that does it) so
I also wonder about a hint here on what to do to create it from the
kernel source so we can pull it out for a local system install.
(the other tool we need is mkimage from U-Boot, I noticed Debian uses this
same command name inside jigdo etc. too, sigh.. also you can't build the
tools without the rest of U-Boot which is hard to envision doing just to
get one command out of it - "make tools/mkimage" doesn't work and I got
tired of reverse engineering the chickenscratch..)
--
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Building dtc etc. for packaging
2008-11-11 17:29 Building dtc etc. for packaging Matt Sealey
@ 2008-11-11 18:00 ` Nate Case
2008-11-11 20:32 ` Simon Richter
2008-11-11 22:39 ` David Gibson
2 siblings, 0 replies; 5+ messages in thread
From: Nate Case @ 2008-11-11 18:00 UTC (permalink / raw)
To: Matt Sealey; +Cc: linuxppc-dev list
On Tue, 2008-11-11 at 11:29 -0600, Matt Sealey wrote:
> (the other tool we need is mkimage from U-Boot, I noticed Debian uses
> this
> same command name inside jigdo etc. too, sigh.. also you can't build
> the
> tools without the rest of U-Boot which is hard to envision doing just
> to
> get one command out of it - "make tools/mkimage" doesn't work and I
> got
> tired of reverse engineering the chickenscratch..)
This is a bit off-topic, but here is my ugly hack to compile a
statically linked 'mkimage' from the U-Boot tree:
Place this file, 'Makefile.mkimage' in u-boot/tools/
---[snip]---
CFLAGS = -O2 -static -I../include -DUSE_HOSTCC -I.
ASMDIR = ../include/asm
CFILES = ../lib_generic/crc32.c ../libfdt/fdt_strerror.c \
../lib_generic/sha1.c ../lib_generic/md5.c ../common/image.c \
../libfdt/fdt_wip.c ../libfdt/fdt.c ../libfdt/fdt_ro.c \
../libfdt/fdt_rw.c
mkimage: mkimage.c
mv $(ASMDIR) $(ASMDIR).back
ln -s $(ASMDIR)-i386 $(ASMDIR)
gcc $(CFLAGS) $(CFILES) mkimage.c -o mkimage
rm -f $(ASMDIR)
mv $(ASMDIR).back $(ASMDIR)
strip mkimage
default: mkimage
---[snip]---
Then just run 'make -f Makefile.mkimage' from within tools/. Of course
this uses some nasty tricks that will only work on i386 host. I don't
think I'm the first person to have this need, so others here may have
better solutions.
--
Nate Case <ncase@xes-inc.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Building dtc etc. for packaging
2008-11-11 17:29 Building dtc etc. for packaging Matt Sealey
2008-11-11 18:00 ` Nate Case
@ 2008-11-11 20:32 ` Simon Richter
2008-11-11 22:39 ` David Gibson
2 siblings, 0 replies; 5+ messages in thread
From: Simon Richter @ 2008-11-11 20:32 UTC (permalink / raw)
To: Matt Sealey; +Cc: linuxppc-dev list
Hi,
On Tue, Nov 11, 2008 at 11:29:57AM -0600, Matt Sealey wrote:
> (the other tool we need is mkimage from U-Boot, I noticed Debian uses this
> same command name inside jigdo etc. too, sigh.. also you can't build the
> tools without the rest of U-Boot which is hard to envision doing just to
> get one command out of it - "make tools/mkimage" doesn't work and I got
> tired of reverse engineering the chickenscratch..)
I have a Debian package that basically just builds the tools into one binary
package, and the source tarball into another.
Didn't upload it back then, but I can see if I can find the time to get it
up to date.
Simon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Building dtc etc. for packaging
2008-11-11 17:29 Building dtc etc. for packaging Matt Sealey
2008-11-11 18:00 ` Nate Case
2008-11-11 20:32 ` Simon Richter
@ 2008-11-11 22:39 ` David Gibson
2008-11-11 23:10 ` Jon Loeliger
2 siblings, 1 reply; 5+ messages in thread
From: David Gibson @ 2008-11-11 22:39 UTC (permalink / raw)
To: Matt Sealey; +Cc: linuxppc-dev list
On Tue, Nov 11, 2008 at 11:29:57AM -0600, Matt Sealey wrote:
> For some of what we're doing with SUSE now I've determined we should really
> be packaging the device tree compiler (and libfdt) so that we can install and
> script it, along with some other stuff from U-Boot (not for this mail).
>
> I was wondering if the recommended way would be to use the dtc found in
> the kernel-source or to use the git repo at git.jdl.com to grab it and
> build it. The one in the kernel is seemingly impossible to build without
> some tweaking around (I can't find a target for make that does it) so
> I also wonder about a hint here on what to do to create it from the
> kernel source so we can pull it out for a local system install.
Use the tree from jdl.org. Either the git tree if you really need an
up-to-date snahpshot, or one of the actual release tarballs.
Apart from being the official upstream version, the tree there has
make install targets, the full testsuite and other conveniences which
will help for packaging.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-11-11 23:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-11 17:29 Building dtc etc. for packaging Matt Sealey
2008-11-11 18:00 ` Nate Case
2008-11-11 20:32 ` Simon Richter
2008-11-11 22:39 ` David Gibson
2008-11-11 23:10 ` Jon Loeliger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).