Bug 1219 - kernel headers not correctly installed into toolchain/staging
Summary: kernel headers not correctly installed into toolchain/staging
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Windows
: P5 normal
Target Milestone: 2010.05
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-02 12:43 UTC by Will Wagner
Modified: 2010-04-03 08:31 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
Fix for copying kernel headers (3.24 KB, patch)
2010-03-02 12:46 UTC, Will Wagner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Will Wagner 2010-03-02 12:43:13 UTC
Currently not all the kernel headers are installed into staging. This is because of old code in uclibc.mk that relates to 2.4 kernels.

Looking at uclibc.mk, the problem seems to happen three times, first copying into $(TOOLCHAIN_DIR)/uClibc_dev/usr/include, then into $(STAGING_DIR)/usr/include and finally into $(TARGET_DIR)/usr/include (only if libc.a is on target)

All of these cases have different behavior depending on whether ifeq ($(LINUX_HEADERS_IS_KERNEL),y) is true. If it is it just copies all the files, otherwise it picks out a specific subset. However in a search of all the buildroot files LINUX_HEADERS_IS_KERNEL is never mentioned except in uclibc.mk

Looking back through earlier buildroot versions, Peter removed the last mention to LINUX_HEADERS_IS_KERNEL with this commit to remove 2.4.x kernel header support http://lists.busybox.net/pipermail/buildroot/2009-February/026144.html

It appears that before this LINUX_HEADERS_IS_KERNEL was set true for 2.6.x and false for 2.4.x. It looks to me like that change broke the copying of kernel headers for 2.6.x and left code in uclibc.mk that was meant for 2.4.x headers. 

This issue has come up on the list a number of times with people complaining about a lack of mtd/mtd.h

Attached patch fixes the issue.
Comment 1 Will Wagner 2010-03-02 12:46:06 UTC
Created attachment 1183 [details]
Fix for copying kernel headers

Helps if I attach the patch...
Comment 2 Thomas Petazzoni 2010-03-02 13:10:47 UTC
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Comment 3 Peter Korsgaard 2010-04-03 08:31:30 UTC
Committed, sorry for the slow response