5 TARGET
= arm-unknown-linux-gnu
9 CROSSTOOLS
= $(TOPDIR
)/..
/..
/toolchain
/crosstools
11 GIT_REPOSITORY
= git
://git.kernel.org
/pub
/scm
/linux
/kernel
/git
/kristoffer
/linux-hpc.git
12 KERNEL_VERSION
= 2.6.19
13 BRANCH_VERSION
= $(KERNEL_VERSION
)-hpc
15 .PHONY
: all clean image modules map config
17 all: image modules map
19 clean: image-clean modules-clean map-clean
21 distclean: clean image-distclean modules-distclean map-distclean
22 rm -vrf
$(WORK
)/linux-
$(KERNEL_VERSION
)
24 $(WORK
)/linux-
$(KERNEL_VERSION
): config-
$(KERNEL_VERSION
)
25 git clone
$(GIT_REPOSITORY
) $(WORK
)/linux-
$(KERNEL_VERSION
)
26 cd
$(WORK
)/linux-
$(KERNEL_VERSION
) && \
27 git checkout
--track
-b v
$(BRANCH_VERSION
) origin/v
$(BRANCH_VERSION
) && \
28 git checkout v
$(BRANCH_VERSION
) && \
30 cp
-v
$(TOPDIR
)/config-
$(KERNEL_VERSION
) .config
&& \
31 touch
$(WORK
)/linux-
$(KERNEL_VERSION
)
33 $(WORK
)/zImage-
$(KERNEL_VERSION
): $(WORK
)/linux-
$(KERNEL_VERSION
)
34 cd
$(WORK
)/linux-
$(KERNEL_VERSION
) && \
35 export PATH
=$(CROSSTOOLS
)/bin
:$$PATH && \
36 export LD_LIBRARY_PATH
=$(CROSSTOOLS
)/lib
:$$LD_LIBRARY_PATH && \
37 make ARCH
=arm CROSS_COMPILE
=$(TARGET
)- zImage
38 cp
-v
$(WORK
)/linux-
$(KERNEL_VERSION
)/arch
/arm
/boot
/zImage
$(WORK
)/zImage-
$(KERNEL_VERSION
)
39 touch
$(WORK
)/zImage-
$(KERNEL_VERSION
)
41 image
: $(WORK
)/zImage-
$(KERNEL_VERSION
)
44 rm -vf
$(WORK
)/zImage-
$(KERNEL_VERSION
)
46 image-distclean
: image-clean
48 $(WORK
)/modules-
$(KERNEL_VERSION
): $(WORK
)/linux-
$(KERNEL_VERSION
)
49 cd
$(WORK
)/linux-
$(KERNEL_VERSION
) && \
50 export PATH
=$(CROSSTOOLS
)/bin
:$$PATH && \
51 export LD_LIBRARY_PATH
=$(LD_LIBRARY_PATH
)/lib
:$$LD_LIBRARY_PATH && \
52 make ARCH
=arm CROSS_COMPILE
=$(TARGET
)- modules
&& \
53 make ARCH
=arm CROSS_COMPILE
=$(TARGET
)- INSTALL_MOD_PATH
=$(WORK
)/modules-
$(KERNEL_VERSION
) modules_install
54 rm -f
$(WORK
)/modules-
$(KERNEL_VERSION
)/lib
/modules
/$(KERNEL_VERSION
)/{source
,build
}
55 touch
$(WORK
)/modules-
$(KERNEL_VERSION
)
57 modules
: $(WORK
)/modules-
$(KERNEL_VERSION
)
60 rm -vrf
$(WORK
)/modules-
$(KERNEL_VERSION
)
62 modules-distclean
: modules-clean
64 $(WORK
)/System.map-
$(KERNEL_VERSION
): $(WORK
)/linux-
$(KERNEL_VERSION
)
65 cp
$(WORK
)/linux-
$(KERNEL_VERSION
)/System.map
$(WORK
)/System.map-
$(KERNEL_VERSION
)
66 touch
$(WORK
)/System.map-
$(KERNEL_VERSION
)
68 map
: $(WORK
)/System.map-
$(KERNEL_VERSION
)
71 rm -vrf
$(WORK
)/System.map-
$(KERNEL_VERSION
)
73 map-distclean
: map-clean
75 config
: $(WORK
)/linux-
$(KERNEL_VERSION
)
76 cd
$(WORK
)/linux-
$(KERNEL_VERSION
) && \
77 export PATH
=$(CROSSTOOLS
)/bin
:$$PATH && \
78 export LD_LIBRARY_PATH
=$(CROSSTOOLS
)/lib
:$$LD_LIBRARY_PATH && \
79 make ARCH
=arm CROSS_COMPILE
=$(TARGET
)- menuconfig
80 touch
$(WORK
)/linux-
$(KERNEL_VERSION
)