FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 09-29-2010, 04:33 PM
Tim Gardner
 
Default Override dh_gencontrol architecture

I'm working on building in ARM cross compile support to the Ubuntu
kernel packaging. I am encountering the following error:

fakeroot debian/rules binary-omap arch=armel
.....
dh_gencontrol -plinux-image-2.6.35-22-omap
dpkg-gencontrol: error: current host architecture 'amd64' does not
appear in package's architecture list (armel)
dh_gencontrol: dpkg-gencontrol -plinux-image-2.6.35-22-omap
-ldebian/changelog -Tdebian/linux-image-2.6.35-22-omap.substvars
-Pdebian/linux-image-2.6.35-22-omap returned exit code 255
make: *** [binary-omap] Error 9

I have not successfully found a way to override the architecture. Anyone
have any ideas? I've tried the various forms of

dh_gencontrol -p$(pkgimg) -a$(arch)
dh_gencontrol -p$(pkgimg) -- -a$(arch)
export DH_OPTIONS="-a$(arch)" && dh_gencontrol -p$(pkgimg)

rtg
--
Tim Gardner tim.gardner@canonical.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 09-29-2010, 04:59 PM
Steve Langasek
 
Default Override dh_gencontrol architecture

On Wed, Sep 29, 2010 at 10:33:59AM -0600, Tim Gardner wrote:
> I'm working on building in ARM cross compile support to the Ubuntu
> kernel packaging. I am encountering the following error:

> fakeroot debian/rules binary-omap arch=armel
> .....
> dh_gencontrol -plinux-image-2.6.35-22-omap
> dpkg-gencontrol: error: current host architecture 'amd64' does not
> appear in package's architecture list (armel)
> dh_gencontrol: dpkg-gencontrol -plinux-image-2.6.35-22-omap
> -ldebian/changelog -Tdebian/linux-image-2.6.35-22-omap.substvars
> -Pdebian/linux-image-2.6.35-22-omap returned exit code 255
> make: *** [binary-omap] Error 9

> I have not successfully found a way to override the architecture. Anyone
> have any ideas? I've tried the various forms of

> dh_gencontrol -p$(pkgimg) -a$(arch)
> dh_gencontrol -p$(pkgimg) -- -a$(arch)
> export DH_OPTIONS="-a$(arch)" && dh_gencontrol -p$(pkgimg)

Cross-building of Debian packages is meant to be handled by using the
'dpkg-buildpackage -a${target_arch}' interface. This sets the environment
variables shown in the output of 'dpkg-architecture -a${target_arch}'.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek@ubuntu.com vorlon@debian.org
--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 09-29-2010, 05:22 PM
Tim Gardner
 
Default Override dh_gencontrol architecture

On 09/29/2010 10:59 AM, Steve Langasek wrote:
> On Wed, Sep 29, 2010 at 10:33:59AM -0600, Tim Gardner wrote:
>> I'm working on building in ARM cross compile support to the Ubuntu
>> kernel packaging. I am encountering the following error:
>
>> fakeroot debian/rules binary-omap arch=armel
>> .....
>> dh_gencontrol -plinux-image-2.6.35-22-omap
>> dpkg-gencontrol: error: current host architecture 'amd64' does not
>> appear in package's architecture list (armel)
>> dh_gencontrol: dpkg-gencontrol -plinux-image-2.6.35-22-omap
>> -ldebian/changelog -Tdebian/linux-image-2.6.35-22-omap.substvars
>> -Pdebian/linux-image-2.6.35-22-omap returned exit code 255
>> make: *** [binary-omap] Error 9
>
>> I have not successfully found a way to override the architecture. Anyone
>> have any ideas? I've tried the various forms of
>
>> dh_gencontrol -p$(pkgimg) -a$(arch)
>> dh_gencontrol -p$(pkgimg) -- -a$(arch)
>> export DH_OPTIONS="-a$(arch)"&& dh_gencontrol -p$(pkgimg)
>
> Cross-building of Debian packages is meant to be handled by using the
> 'dpkg-buildpackage -a${target_arch}' interface. This sets the environment
> variables shown in the output of 'dpkg-architecture -a${target_arch}'.
>
>
>
>
> _______________________________________________
> linaro-dev mailing list
> linaro-dev@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev

Do you have an example of a package that correctly cross builds? The
issue I'm having with the kernel is that there are some native gcc steps
that compile tools executed during the build as well as some cross
compile steps. If I can correctly determine the schroot host arch as
well as the target arch, then I think I can accommodate the various
compile steps.

rtg
--
Tim Gardner tim.gardner@canonical.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 09-29-2010, 06:11 PM
Loc Minier
 
Default Override dh_gencontrol architecture

On Wed, Sep 29, 2010, Tim Gardner wrote:
> Do you have an example of a package that correctly cross builds? The
> issue I'm having with the kernel is that there are some native gcc steps
> that compile tools executed during the build as well as some cross
> compile steps. If I can correctly determine the schroot host arch as
> well as the target arch, then I think I can accommodate the various
> compile steps.

lucid's x-loader should be relatively similar to the kernel's needs:
http://archive.ubuntu.com/ubuntu/pool/universe/x/x-loader/x-loader_1.4.3git20100305-0ubuntu5.dsc
(I don't explain why my fixes were dropped in maverick, will chase
that)

The key bit is this rules snippet:
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

CROSS_COMPILE := $(DEB_HOST_GNU_TYPE)-
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CROSS_COMPILE :=
endif

You have to "export CROSS_COMPILE" or pass it to the kernel $(MAKE) call.

--
Loc Minier

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 09-29-2010, 06:24 PM
Steve Langasek
 
Default Override dh_gencontrol architecture

On Wed, Sep 29, 2010 at 11:22:52AM -0600, Tim Gardner wrote:
> >Cross-building of Debian packages is meant to be handled by using the
> >'dpkg-buildpackage -a${target_arch}' interface. This sets the environment
> >variables shown in the output of 'dpkg-architecture -a${target_arch}'.

> Do you have an example of a package that correctly cross builds?

Sure, u-boot-linaro is one. Many other packages do also, requiring nothing
more than passing $(DEB_HOST_GNU_TYPE) to ./configure. I guess the kernel
case is a bit more complex.

> The issue I'm having with the kernel is that there are some native gcc
> steps that compile tools executed during the build as well as some cross
> compile steps. If I can correctly determine the schroot host arch as well
> as the target arch, then I think I can accommodate the various compile
> steps.

I would be surprised if you need to pass the native architecture into the
kernel build anywhere, since for the compile tools we should just use gcc.
Probably just checking for equality between the host and build archs is
sufficient? So something like

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
archs=$(DEB_HOST_GNU_TYPE)
endif

in debian/rules - but that's not quite right, and I can't see at a glance
where the $(arch) variable used in debian/rules is being set.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek@ubuntu.com vorlon@debian.org
--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 08:13 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org