support jffs2 root filesystem
[openwrt.git] / toolchain / kernel-headers / kernel-headers.mk
1 # linux kernel headers for toolchain
2
3 LINUX_HEADERS_VERSION=2.4.29
4 LINUX_HEADERS_SITE=http://www.kernel.org/pub/linux/kernel/v2.4
5 LINUX_HEADERS_SOURCE=linux-$(LINUX_HEADERS_VERSION).tar.bz2
6 LINUX_HEADERS_CONFIG=toolchain/kernel-headers/linux.config
7 LINUX_HEADERS_DIR=$(TOOL_BUILD_DIR)/linux-$(LINUX_HEADERS_VERSION)
8 LINUX_HEADERS_ARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
9 -e 's/mipsel/mips/' \
10 -e 's/powerpc/ppc/' \
11 -e 's/sh[234]/sh/' \
12 )
13
14 $(DL_DIR)/$(LINUX_HEADERS_SOURCE):
15 -mkdir -p $(DL_DIR)
16 $(WGET) -P $(DL_DIR) $(LINUX_HEADERS_SITE)/$(LINUX_HEADERS_SOURCE)
17
18 $(LINUX_HEADERS_DIR)/.unpacked: $(DL_DIR)/$(LINUX_HEADERS_SOURCE)
19 mkdir -p $(TOOL_BUILD_DIR)
20 bzcat $(DL_DIR)/$(LINUX_HEADERS_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - \
21 linux-$(LINUX_HEADERS_VERSION)/include \
22 linux-$(LINUX_HEADERS_VERSION)/Makefile \
23 linux-$(LINUX_HEADERS_VERSION)/Rules.make \
24 linux-$(LINUX_HEADERS_VERSION)/arch/$(LINUX_HEADERS_ARCH)/Makefile \
25 linux-$(LINUX_HEADERS_VERSION)/scripts \
26 linux-$(LINUX_HEADERS_VERSION)/arch/$(LINUX_HEADERS_ARCH)/config*.in \
27 linux-$(LINUX_HEADERS_VERSION)/*/*/Config.in \
28 linux-$(LINUX_HEADERS_VERSION)/*/Config.in
29 touch $(LINUX_HEADERS_DIR)/.unpacked
30
31 $(LINUX_HEADERS_DIR)/.configured: $(LINUX_HEADERS_DIR)/.unpacked
32 -cp -af $(LINUX_HEADERS_CONFIG) $(LINUX_HEADERS_DIR)/.config
33 $(MAKE) -C $(LINUX_HEADERS_DIR) ARCH=$(LINUX_HEADERS_ARCH) oldconfig include/linux/version.h
34 touch $(LINUX_HEADERS_DIR)/.configured
35
36 kernel-headers: $(LINUX_HEADERS_DIR)/.configured
37
38 kernel-headers-source: $(DL_DIR)/$(LINUX_HEADERS_SOURCE)
39
40 kernel-headers-clean: clean
41 rm -rf $(LINUX_HEADERS_DIR)
42
43 kernel-headers-dirclean:
44 rm -rf $(LINUX_HEADERS_DIR)
This page took 0.054132 seconds and 5 git commands to generate.