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

Re: Building kernel natively

On Thu, 2009-09-03 at 14:55 +0200, Magnus Berg wrote:
> Hi
> I've been having trouble building a kernel (2.6.30-6) for my QNAP TS-219 *on* my 
> TS-219. When I start the build process with make-kpkg, it starts by generating a 
> lot of files under debian/. In the file debian/ruleset/misc/defaults.mk, some 
> logic tries to determine which cross-compiler to use by interrogating 
> dpkg-architecture, but when building on the same architecture as the target, no 
> cross-compiler should be used.
> But when defaults.mk checks the current architecture, it compares DEB_BUILD_ARCH 
> with DEB_HOST_ARCH_CPU, and since those are different (armel vs. arm), it 
> insists on using a cross-compiler and prepends arm-linux-gnueabi- to all build 
> tools.
> The only solution I've found is to start the build process until it fails, then 
> edit the defaults.mk file so it makes a sane comparison and then restart the build.
> I'm not even sure how the debian/ directory are created by make-kpkg, haven't 
> dug into it. Is there a better way to build natively? Or is it a plain bug?

I've been doing something like the following. Although I'm not sure if
it's 100% correct, it does build a debian kernel-image package w/o
interruption for successful installation on my TS-219P.

make-kpkg kernel-image --initrd --arch arm --subarch kirkwood --cross-compile - --rootcmd fakeroot --append-to-version -bpo-pcie.1-kirkwood

Where '-bpo-pcie.1-kirkwood' should be replaced by something more
appropriate for your build.

> 	Magnus

John Holland


Cellent Finance Solutions AG

Firmensitz: Calwer Straße 33, 70173 Stuttgart
Registergericht: Amtsgericht Stuttgart, HRB 720743
Vorstand: Thomas Wild
Vorsitzender des Aufsichtsrats: Rudolf Zipf

Reply to: