1 include $(TOPDIR
)/rules.mk
3 # linux kernel headers for toolchain
5 LINUX_HEADERS_VERSION
=2.4.32
6 LINUX_KERNEL_MD5SUM
:=38f4d0830e95a20f4bfed17622d5557c
8 http
://www.de.kernel.org
/pub
/linux
/kernel
/v2.4 \
9 http
://www.fi.kernel.org
/pub
/linux
/kernel
/v2.4 \
10 http
://www.fr.kernel.org
/pub
/linux
/kernel
/v2.4 \
11 http
://www.kernel.org
/pub
/linux
/kernel
/v2.4 \
13 LINUX_HEADERS_SOURCE
=linux-
$(LINUX_HEADERS_VERSION
).
tar.bz2
14 LINUX_HEADERS_ARCH
:=$(shell echo
$(ARCH
) | sed
-e
's/i[3-9]86/i386/' \
22 $(DL_DIR
)/$(LINUX_HEADERS_SOURCE
):
24 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(LINUX_HEADERS_SOURCE
) $(LINUX_KERNEL_MD5SUM
) $(LINUX_HEADERS_SITE
)
26 $(LINUX_HEADERS_DIR
)/.unpacked
: $(DL_DIR
)/$(LINUX_HEADERS_SOURCE
)
27 mkdir
-p
$(TOOL_BUILD_DIR
)
28 bzcat
$(DL_DIR
)/$(LINUX_HEADERS_SOURCE
) |
tar -C
$(TOOL_BUILD_DIR
) $(TAR_OPTIONS
) - \
29 linux-
$(LINUX_HEADERS_VERSION
)/include \
30 linux-
$(LINUX_HEADERS_VERSION
)/Makefile \
31 linux-
$(LINUX_HEADERS_VERSION
)/Rules.make \
32 linux-
$(LINUX_HEADERS_VERSION
)/arch
/$(LINUX_HEADERS_ARCH
)/Makefile \
33 linux-
$(LINUX_HEADERS_VERSION
)/scripts \
34 linux-
$(LINUX_HEADERS_VERSION
)/arch
/$(LINUX_HEADERS_ARCH
)/config
*.in \
35 linux-
$(LINUX_HEADERS_VERSION
)/*/*/Config.in \
36 linux-
$(LINUX_HEADERS_VERSION
)/*/Config.in
37 (cd
$(LINUX_HEADERS_DIR
)-$(LINUX_HEADERS_VERSION
) ; patch
-p1
< $(TOPDIR
)/toolchain
/kernel-headers
/patches
/include.patch
)
38 ln
-sf
$(LINUX_HEADERS_DIR
)-$(LINUX_HEADERS_VERSION
) $(LINUX_HEADERS_DIR
)
39 $(SED
) 's/@expr length/@-expr length/' $(LINUX_HEADERS_DIR
)/Makefile
40 touch
$(LINUX_HEADERS_DIR
)/.unpacked
42 $(LINUX_HEADERS_DIR
)/.configured
: $(LINUX_HEADERS_DIR
)/.unpacked
43 -$(CP
) .
/files
/config.
$(LINUX_HEADERS_ARCH
) $(LINUX_HEADERS_DIR
)/.config
44 $(MAKE
) -C
$(LINUX_HEADERS_DIR
) ARCH
=$(LINUX_HEADERS_ARCH
) oldconfig
include/linux
/version.h
45 touch
$(LINUX_HEADERS_DIR
)/.configured
47 source
: $(DL_DIR
)/$(LINUX_HEADERS_SOURCE
)
48 prepare
: $(LINUX_HEADERS_DIR
)/.configured
52 rm -rf
$(LINUX_HEADERS_DIR
)