lkml.org 
[lkml]   [2011]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] deb-pkg: fix cross-compile build
On 05/10/2011 05:41 AM, maximilian attems wrote:
> On Mon, May 09, 2011 at 10:29:22PM -0700, Nuno Subtil wrote:
>> It looks like your patch duplicates the arch detection logic that's
>> already in create_package, except not completely. I think this is not
>> desirable.
>>
>> I modified your patch to isolate this logic into a separate function
>> and respect the KBUILD_DEBARCH override (which mostly means I moved
>> the original logic into a separate function). This should make your
>> case work as well, besides respecting the KBUILD_DEBARCH override.
>>
>> Maks, Michal, can you please take a look at this new patch?
> thanks doing right now.
>
> Michal please hold off until I have time to give it some runs.
>
I have tested this patch. It builds fine for arm with the following
command:
fakeroot make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- deb-pkg

However x86_64 fails (when using an i386 machine).
fakeroot make ARCH=x86_64 deb-pkg

The error occurs in scripts/package/builddeb
+ forcearch=-DArchitecture=amd64
+ dpkg-gencontrol -isp -DArchitecture=amd64 -plinux-headers-2.6.39-rc7+
-P/opt/kernel-linus/linux-2.6/debian/hdrtmp
dpkg-gencontrol: error: current host architecture 'i386' does not appear
in package's architecture list (amd64)

The debian/control file is as follows:
cat debian/control
Source: linux-upstream
Section: kernel
Priority: optional
Maintainer: Anonymous <root@robert-VGN-Z690Y>
Standards-Version: 3.8.4
Homepage: http://www.kernel.org/

Package: linux-image-2.6.39-rc7+
Provides: linux-image, linux-image-2.6, linux-modules-2.6.39-rc7+
Suggests: linux-firmware-image
Architecture: any
Description: Linux kernel, version 2.6.39-rc7+
This package contains the Linux kernel, modules and corresponding other
files, version: 2.6.39-rc7+.

Package: linux-headers-2.6.39-rc7+
Provides: linux-headers, linux-headers-2.6
Architecture: amd64
Description: Linux kernel headers for 2.6.39-rc7+ on amd64
This package provides kernel header files for 2.6.39-rc7+ on amd64
.
This is useful for people who need to build external modules



The debian/control file for an unpatched scripts/package/builddeb would
assign 'i386' instead of 'amd64'.

Regards,
Robert



\
 
 \ /
  Last update: 2011-05-12 16:03    [W:0.095 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site