2003-09-14 13:38:35 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
2007-08-22 14:35:41 +02:00
|
|
|
# Setup the kernel headers. I include a generic package of
|
2003-09-14 13:38:35 +02:00
|
|
|
# kernel headers here, so you shouldn't need to include your
|
2007-08-22 14:35:41 +02:00
|
|
|
# own. Be aware these kernel headers _will_ get blown away
|
2003-09-14 13:38:35 +02:00
|
|
|
# by a 'make clean' so don't put anything sacred in here...
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-01-10 10:30:11 +01:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
|
|
|
|
DEFAULT_KERNEL_HEADERS:=$(strip $(subst ",, $(BR2_LINUX26_VERSION)))
|
|
|
|
#"))
|
|
|
|
else
|
2005-02-11 21:52:06 +01:00
|
|
|
DEFAULT_KERNEL_HEADERS:=$(strip $(subst ",, $(BR2_DEFAULT_KERNEL_HEADERS)))
|
2006-11-17 16:43:51 +01:00
|
|
|
#"))
|
2008-01-10 10:30:11 +01:00
|
|
|
endif
|
|
|
|
|
2004-10-05 09:16:53 +02:00
|
|
|
LINUX_HEADERS_SITE:=127.0.0.1
|
|
|
|
LINUX_HEADERS_SOURCE:=unspecified-kernel-headers
|
2006-07-19 02:06:06 +02:00
|
|
|
LINUX_HEADERS_UNPACK_DIR:=$(TOOL_BUILD_DIR)/linux-libc-headers-null
|
2004-09-03 02:49:43 +02:00
|
|
|
|
2006-10-11 13:36:57 +02:00
|
|
|
KERNEL_ARCH:=$(shell $(SHELL) -c "echo \"$(ARCH)\" | sed -e \"s/-.*//\" \
|
|
|
|
-e s/i.86/i386/ -e s/sun4u/sparc64/ \
|
|
|
|
-e s/arm.*/arm/ -e s/sa110/arm/ \
|
|
|
|
-e s/s390x/s390/ -e s/parisc64/parisc/ \
|
2007-09-11 21:07:12 +02:00
|
|
|
-e s/powerpc64/powerpc/ \
|
2006-12-13 17:56:59 +01:00
|
|
|
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
|
2007-11-09 10:52:26 +01:00
|
|
|
-e s/sh2.*/sh/ -e s/sh3.*/sh/ -e s/sh4.*/sh/ \
|
|
|
|
-e s/nios2.*/nios2nommu/")
|
2006-10-09 18:13:12 +02:00
|
|
|
|
2006-12-22 11:37:22 +01:00
|
|
|
# assume old manually sanitized kernel-headers
|
|
|
|
LINUX_HEADERS_IS_KERNEL=n
|
|
|
|
|
2007-11-26 15:54:15 +01:00
|
|
|
# this needs to be included before kernel-headers-new to set old-style mode
|
|
|
|
include toolchain/kernel-headers/kernel-headers-old-versions.makefile
|
2006-12-14 16:12:19 +01:00
|
|
|
include toolchain/kernel-headers/kernel-headers-new.makefile
|
|
|
|
include toolchain/kernel-headers/kernel-headers-old.makefile
|
2004-09-03 02:49:43 +02:00
|
|
|
|
2006-12-13 12:49:19 +01:00
|
|
|
$(DL_DIR)/$(LINUX_HEADERS_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(LINUX_HEADERS_SITE)/$(LINUX_HEADERS_SOURCE)
|
2003-09-14 13:38:35 +02:00
|
|
|
|
2004-10-05 09:10:07 +02:00
|
|
|
kernel-headers: $(LINUX_HEADERS_DIR)/.configured
|
2003-09-14 13:38:35 +02:00
|
|
|
|
2004-10-05 09:16:53 +02:00
|
|
|
kernel-headers-source: $(DL_DIR)/$(LINUX_HEADERS_SOURCE)
|
2003-11-12 10:31:12 +01:00
|
|
|
|
|
|
|
kernel-headers-clean: clean
|
2004-10-05 09:10:07 +02:00
|
|
|
rm -rf $(LINUX_HEADERS_DIR)
|
2003-09-14 13:38:35 +02:00
|
|
|
|
2003-11-12 10:31:12 +01:00
|
|
|
kernel-headers-dirclean:
|
2004-10-05 09:10:07 +02:00
|
|
|
rm -rf $(LINUX_HEADERS_DIR)
|
2007-08-24 07:36:46 +02:00
|
|
|
rm -rf $(LINUX_HEADERS_UNPACK_DIR)
|
2003-09-14 13:38:35 +02:00
|
|
|
|
2006-07-19 08:37:58 +02:00
|
|
|
.PHONY: kernel-headers
|