Re: Building kernel natively
- To: Magnus Berg <Magnus@Emdev.se>
- Cc: debian-arm@lists.debian.org
- Subject: Re: Building kernel natively
- From: John Holland <john.holland@cellent-fs.de>
- Date: Thu, 03 Sep 2009 15:46:52 +0200
- Message-id: <1251985612.3652.5.camel@oklahoma>
- In-reply-to: <4A9FBCA9.10601@Emdev.se>
- References: <8763cogcdy.fsf@pindar.marcbrockschmidt.de> <20090818182732.GD19413@deprecation.cyrius.com> <97a0a9ac0908270933rdfbcbfav56fe25cfb1697ddf@mail.gmail.com> <20090829053116.GC16593@deprecation.cyrius.com> <56d259a00908290313o31e5b9d2v3a8d258eece9b6e7@mail.gmail.com> <4A9FBCA9.10601@Emdev.se>
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: