Building kernel natively
- To: firstname.lastname@example.org
- Subject: Building kernel natively
- From: Magnus Berg <Magnus@Emdev.se>
- Date: Thu, 03 Sep 2009 14:55:05 +0200
- Message-id: <4A9FBCA9.10601@Emdev.se>
- In-reply-to: <email@example.com>
- References: <firstname.lastname@example.org> <20090818182732.GD19413@deprecation.cyrius.com> <email@example.com> <20090829053116.GC16593@deprecation.cyrius.com> <firstname.lastname@example.org>
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
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?