Bug 2707 - Can't compile linux kernel using buildroot + crosstool-ng
Summary: Can't compile linux kernel using buildroot + crosstool-ng
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-16 19:26 UTC by Pepiot Philippe
Modified: 2010-10-17 21:35 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments
fix missing include of kernel-headers when using crosstool-ng toolchain (890 bytes, patch)
2010-10-16 19:26 UTC, Pepiot Philippe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pepiot Philippe 2010-10-16 19:26:06 UTC
Created attachment 2605 [details]
fix missing include of kernel-headers when using crosstool-ng toolchain

linux/linux.mk need KERNEL_ARCH defined in toolchain/kernel-headers/kernel-headers.mk included usually by toolchain makefiles, crosstool-ng don't causing an error when we compile the linux kernel.

Fix attached.
Comment 1 Yann E. MORIN 2010-10-17 10:00:44 UTC
Philippe, All,

I believe the correct way would be to declare KERNEL_ARCH somewhere else.

First, the crosstool-NG backend does not need stuff from kernel-headers.mk, so there is no reason to include it.

Second, KERNEL_ARCH is not specific to the kernel-headers used to build the toolchain, even the internal toolchain backend. Indeed, it is used by a few other components: the kernel itself, but also U-Boot, barebox, linux-fusion, ltrace, lm-sensors, pciutils, and bizarely enough, busybox.

That's why I believe KERNEL_ARCH should be moved out of kernel-headers, and to a common place.

Regards,
Yann E. MORIN.
Comment 2 Peter Korsgaard 2010-10-17 21:35:05 UTC
Fixed by moving KERNEL_ARCH to the toplevel Makefile, thanks.