kumquat-buildroot/toolchain/kernel-headers/kernel-headers.mk
Peter Korsgaard 79c9a433ed kernel-headers: make snapshot option more user friendly
Closes #751.

Make kernel headers snapshot more user friendly by making it more obvious
that it's about using a local kernel snapshot, and error out with a sensible
error message if the option is enabled but no linux-2.6.tar.bz2 is present
in DL_DIR, rather than trying to fetch it from kernel.org.

Furthermore fix the bug where it tried to use linux-2.6..tar.bz2 instead of
linux-2.6.tar.bz2.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-12-06 15:54:03 +01:00

44 lines
1.4 KiB
Makefile

#############################################################
#
# Setup the kernel headers. I include a generic package of
# kernel headers here, so you shouldn't need to include your
# own. Be aware these kernel headers _will_ get blown away
# by a 'make clean' so don't put anything sacred in here...
#
#############################################################
DEFAULT_KERNEL_HEADERS:=$(call qstrip,$(BR2_DEFAULT_KERNEL_HEADERS))
LINUX_HEADERS_SITE:=127.0.0.1
LINUX_HEADERS_SOURCE:=unspecified-kernel-headers
LINUX_HEADERS_UNPACK_DIR:=$(TOOLCHAIN_DIR)/linux-libc-headers-null
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/parisc64/parisc/ \
-e s/powerpc64/powerpc/ \
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
-e s/sh.*/sh/ -e s/nios2.*/nios2nommu/")
include toolchain/kernel-headers/kernel-headers-new.makefile
$(DL_DIR)/$(LINUX_HEADERS_SOURCE):
ifeq ($(BR2_KERNEL_HEADERS_SNAP),y)
$(error No local $@ found, cannot continue. Are you sure you wanted to enable BR2_KERNEL_HEADERS_SNAP?)
endif
$(call DOWNLOAD,$(LINUX_HEADERS_SITE),$(LINUX_HEADERS_SOURCE))
kernel-headers: $(LINUX_HEADERS_DIR)/.configured
kernel-headers-source: $(DL_DIR)/$(LINUX_HEADERS_SOURCE)
kernel-headers-clean: clean
rm -rf $(LINUX_HEADERS_DIR)
kernel-headers-dirclean:
rm -rf $(LINUX_HEADERS_DIR)
rm -rf $(LINUX_HEADERS_UNPACK_DIR)
.PHONY: kernel-headers