[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Creating debs using a cross-build envronment?



On Thu, 2012-02-23 at 10:38 +0000, Neil Williams wrote:
> On Thu, 23 Feb 2012 10:53:13 +0100
> Svante Signell <svante.signell@telia.com> wrote:
> 
> > Hi,
> > 
> > I found some Debian tools to create .deb packages available, like
> > pdebuild-cross, buildcross, xapt, xdeb, dpkg-cross, most of them
> > developed by emdebian. According to your web pages all these tools seems
> > to create GNU/Linux packages for a specific CPU using GNU/Linux as
> > build/host environment. Are there tools available also for another OS,
> > in my case GNU/Hurd. 
> 
> A change of kernel is a change of architecture. However, there has been
> no testing of cross-compiling on anything other than i386-linux,
> amd64-linux and powerpc-linux. i.e. whatever cross targets are
> available from Emdebian, they are all Linux build & host.

OK, got it.

> There is no hurd support in either Debian or Emdebian except hurd-i386.

Right!

> > Up til now I have created a cross build environment with gcc-4.4,
> > eglibc-2.13, gnumach and hurd libraries, etc. Next step would be to
> > create .debs for the target architecture.
> 
> What is the target architecture? arm-linux-gnueabi (armel) ?

Target architecture is hurd-i386. Nothing new here.

> Are you trying to invent an ARM Hurd architecture? This is NOT
> supported by dpkg currently.

No!

> # Bidirectional mapping between a Debian triplet and a Debian arch.
> #
> # Supported variables: <cpu>
> #
> # <Debian triplet>      <Debian arch>

> gnu-hurd-<cpu>          hurd-<cpu>

This is the one.

> Debian only supports Hurd for i386 (hurd-i386).

I know.

> Are you trying to create hurd-arm ? If so, look at the dpkg sources and
> work out what the architecture values would need to be. Which ARM CPU
> are you targeting?

No, still the old i386.

> > I know most packages can be
> > built natively, but not all, like gnat, etc.
> 
> Those which don't build natively for hurd have zero chance of
> cross-building for hurd and might not even cross-build on hurd for
> a linux target. 

Well, I'm on the way of getting the gnat tools and libraries built and
ported to GNU/Hurd to be able to build all ADA-related packages for
GNU/Hurd natively.

> > - what is missing from the built toolset so far (binutils, etc)
> > - any emdebian tools usable for this, i.e. for cross OS package
> > building?
> 
> It's not cross-OS, it's a kernel & architecture issue and that comes
> down to whether the cross-compiler can be a) built with the alternative
> kernel headers

Yes!

>  and b) use those headers in preference to the other
> kernel within a cross-build and 

Yes!

> c) whether dpkg can recognise the new
> architecture.

Yes, see above!

So the emdebian cross tools are only cross CPU, not cross OS, right?

> What are you trying to do?
> 
> 0: Use a GNU/Hurd machine to cross-build for devices running linux?
> Which CPU?

No!

> 1: Use a linux machine to cross-build for devices running Hurd? (No
> idea whether Hurd even runs on machines which would be the target of a
> cross-build). Again, which CPU?

Yes, and CPU is i386. Haven't tried a cross-built boot of Hurd, that
requires much more work than I've done so far. Hurd runs natively on x86
boxes, where the hardware is supported, and in VMs, like qemu/kvm I use.

a) I just asked about creating target .debs using the cross built tools
instead of just binaries. 
b) And to enable support for gnat in GNU/Hurd, either as a deb or
binaries created by the cross-build environment and copied to the target
for native .deb builds there.

> 2: Use a Hurd machine to cross-build for devices running Hurd. See 1.

No!

> 3: Natively build Hurd packages on a Hurd machine - in which case, you
> don't need anything from Emdebian.

No!

Thanks for your prompt reply :)



Reply to: