Kernel 2.6.x support
authorFlorian Schirmer <jolt@tuxbox.org>
Wed, 11 May 2005 16:01:06 +0000 (16:01 +0000)
committerFlorian Schirmer <jolt@tuxbox.org>
Wed, 11 May 2005 16:01:06 +0000 (16:01 +0000)
SVN-Revision: 825

openwrt/toolchain/kernel-headers/Makefile
openwrt/toolchain/kernel-headers/kernel-headers26.mk [new file with mode: 0644]

index 2b590c8a09708f1f8e97dceeb8fdc7f8914d0749..878ab253eeb64e54819da975ddab34a53e5aacdf 100644 (file)
@@ -1,6 +1,10 @@
 include $(TOPDIR)/rules.mk
 
+ifeq ($(BR2_KERNEL_26),y)
+include ./kernel-headers26.mk
+else
 include ./kernel-headers.mk
+endif
 
 source: kernel-headers-source
 prepare: kernel-headers
diff --git a/openwrt/toolchain/kernel-headers/kernel-headers26.mk b/openwrt/toolchain/kernel-headers/kernel-headers26.mk
new file mode 100644 (file)
index 0000000..e03bc12
--- /dev/null
@@ -0,0 +1,37 @@
+# linux kernel headers for toolchain
+
+LINUX_HEADERS_VERSION=2.6.11.2
+LINUX_KERNEL_MD5SUM:=2d21d8e7ff641da74272b114c786464e
+LINUX_HEADERS_SITE=http://ep09.pld-linux.org/~mmazur/linux-libc-headers \
+                  http://mirrors.angelinacounty.net/pub/lfs/lfs-packages/conglomeration/linux-libc-headers
+LINUX_HEADERS_SOURCE=linux-libc-headers-$(LINUX_HEADERS_VERSION).tar.bz2
+LINUX_HEADERS_CONFIG=./linux26.config
+LINUX_HEADERS_ARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
+       -e 's/mipsel/mips/' \
+       -e 's/powerpc/ppc/' \
+       -e 's/sh[234]/sh/' \
+       )
+
+$(DL_DIR)/$(LINUX_HEADERS_SOURCE):
+       -mkdir -p $(DL_DIR)
+       $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_HEADERS_SOURCE) $(LINUX_KERNEL_MD5SUM) $(LINUX_HEADERS_SITE)
+
+$(LINUX_HEADERS_DIR)/.unpacked: $(DL_DIR)/$(LINUX_HEADERS_SOURCE)
+       mkdir -p $(TOOL_BUILD_DIR)
+       bzcat $(DL_DIR)/$(LINUX_HEADERS_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
+       ln -sf $(LINUX_HEADERS_DIR)-libc-headers-$(LINUX_HEADERS_VERSION) $(LINUX_HEADERS_DIR)
+       touch $(LINUX_HEADERS_DIR)/.unpacked
+
+$(LINUX_HEADERS_DIR)/.configured: $(LINUX_HEADERS_DIR)/.unpacked
+       ln -sf $(LINUX_HEADERS_DIR)-libc-headers-$(LINUX_HEADERS_VERSION)/include/asm-$(LINUX_HEADERS_ARCH) $(LINUX_HEADERS_DIR)/include/asm
+       touch $(LINUX_HEADERS_DIR)/.configured
+
+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-toolclean:
+       rm -rf $(LINUX_HEADERS_DIR)