1 #############################################################
3 # Setup the kernel headers. I include a generic package of
4 # kernel headers here, so you shouldn't need to include your
5 # own. Be aware these kernel headers _will_ get blown away
6 # by a 'make clean' so don't put anything sacred in here...
8 #############################################################
9 ifneq ($(filter $(TARGETS
),kernel-headers
),)
14 LINUX_SITE
:=http
://www.uclibc.org
/downloads
/toolchain
15 LINUX_SOURCE
:=kernel-headers-2.4
.25.
tar.bz2
16 LINUX_UNPACK_DIR
:=$(TOOL_BUILD_DIR
)/linux
19 # Uncomment this for 2.6.x kernel header files
23 #LINUX_SITE:=http://ep09.pld-linux.org/~mmazur/linux-libc-headers/
24 #LINUX_SOURCE:=linux-libc-headers-2.6.5.0.tar.bz2
25 #LINUX_UNPACK_DIR:=$(TOOL_BUILD_DIR)/linux-libc-headers-2.6.5.0
29 LINUX_DIR
:=$(TOOL_BUILD_DIR
)/linux
31 $(DL_DIR
)/$(LINUX_SOURCE
):
32 $(WGET
) -P
$(DL_DIR
) $(LINUX_SITE
)/$(LINUX_SOURCE
)
34 $(LINUX_DIR
)/.unpacked
: $(DL_DIR
)/$(LINUX_SOURCE
)
35 mkdir
-p
$(TOOL_BUILD_DIR
)
36 bzcat
$(DL_DIR
)/$(LINUX_SOURCE
) |
tar -C
$(TOOL_BUILD_DIR
) -xvf
-
37 ifneq ($(LINUX_UNPACK_DIR
),$(LINUX_DIR
))
38 mv
$(LINUX_UNPACK_DIR
) $(LINUX_DIR
)
40 touch
$(LINUX_DIR
)/.unpacked
42 $(LINUX_DIR
)/.configured
: $(LINUX_DIR
)/.unpacked
43 rm -f
$(LINUX_DIR
)/include/asm
44 @if
[ ! -f
$(LINUX_DIR
)/Makefile
] ; then \
45 echo
-e
"VERSION = $(VERSION)\nPATCHLEVEL = $(PATCHLEVEL)\n" > \
46 $(LINUX_DIR
)/Makefile
; \
47 echo
-e
"SUBLEVEL = $(SUBLEVEL)\nEXTRAVERSION =\n" > \
48 $(LINUX_DIR
)/Makefile
; \
49 echo
-e
"KERNELRELEASE=\$$(VERSION).\$$(PATCHLEVEL).\$$(SUBLEVEL)\$$(EXTRAVERSION)" >> \
50 $(LINUX_DIR
)/Makefile
; \
52 @if
[ "$(ARCH)" = "powerpc" ];then \
53 (cd
$(LINUX_DIR
)/include; ln
-fs asm-ppc
$(NOMMU
) asm
;) \
54 elif
[ "$(ARCH)" = "mips" ];then \
55 (cd
$(LINUX_DIR
)/include; ln
-fs asm-mips
$(NOMMU
) asm
;) \
56 elif
[ "$(ARCH)" = "mipsel" ];then \
57 (cd
$(LINUX_DIR
)/include; ln
-fs asm-mips
$(NOMMU
) asm
;) \
58 elif
[ "$(ARCH)" = "arm" ];then \
59 (cd
$(LINUX_DIR
)/include; ln
-fs asm-arm
$(NOMMU
) asm
; \
61 if
[ ! -L proc
] ; then \
62 ln
-fs proc-armv proc
; \
63 ln
-fs arch-ebsa285 arch
; fi
); \
64 elif
[ "$(ARCH)" = "cris" ];then \
65 (cd
$(LINUX_DIR
)/include; ln
-fs asm-cris asm
;) \
67 (cd
$(LINUX_DIR
)/include; ln
-fs asm-
$(ARCH
)$(NOMMU
) asm
;) \
69 touch
$(LINUX_DIR
)/include/linux
/autoconf.h
;
70 touch
$(LINUX_DIR
)/.configured
72 $(LINUX_KERNEL
): $(LINUX_DIR
)/.configured
74 kernel-headers
: $(LINUX_DIR
)/.configured
76 kernel-headers-source
: $(DL_DIR
)/$(LINUX_SOURCE
)
78 kernel-headers-clean
: clean
82 kernel-headers-dirclean
:
This page took 0.052111 seconds and 5 git commands to generate.