TARGET = arm-crux-linux-gnueabi
-TOPDIR = $(shell pwd)
+PWD = $(shell pwd)
WORK = $(PWD)/work
-CROSSTOOLS = $(TOPDIR)/../../toolchain/crosstools
+CROSSTOOLS = $(PWD)/../../toolchain/crosstools
KERNEL_VERSION = 2.6.31.14.27-efikamx_20111026
clean: image-clean modules-clean map-clean
distclean: clean image-distclean modules-distclean map-distclean
- rm -vrf $(WORK)/linux-$(KERNEL_VERSION)
-
-$(WORK)/mkimage:
- wget -P $(WORK) http://crux-arm.nu/files/distfiles/mkimage
- chmod u+x $(WORK)/mkimage
$(WORK)/linux-$(KERNEL_VERSION).tar.bz2:
wget -P $(WORK) http://crux-arm.nu/files/distfiles/efikamx/linux-$(KERNEL_VERSION).tar.bz2
-$(WORK)/linux-$(KERNEL_VERSION): $(TOPDIR)/config-$(KERNEL_VERSION) $(WORK)/mkimage $(WORK)/linux-$(KERNEL_VERSION).tar.bz2
+$(WORK)/linux-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION).tar.bz2 $(PWD)/config-$(KERNEL_VERSION)
tar -C $(WORK) -xvjf $(WORK)/linux-$(KERNEL_VERSION).tar.bz2
- cp -v $(TOPDIR)/config-$(KERNEL_VERSION) $(WORK)/linux-$(KERNEL_VERSION)/.config
+ cp -v $(PWD)/config-$(KERNEL_VERSION) $(WORK)/linux-$(KERNEL_VERSION)/.config
touch $(WORK)/linux-$(KERNEL_VERSION)
-$(WORK)/uImage-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION)
+$(WORK)/zImage-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION)
cd $(WORK)/linux-$(KERNEL_VERSION) && \
- export PATH=$(CROSSTOOLS)/bin:$(WORK):$$PATH && \
+ export PATH=$(CROSSTOOLS)/bin:$$PATH && \
export LD_LIBRARY_PATH=$(CROSSTOOLS)/lib:$$LD_LIBRARY_PATH && \
- make uImage ARCH=arm CROSS_COMPILE=$(TARGET)-
- cp -v $(WORK)/linux-$(KERNEL_VERSION)/arch/arm/boot/uImage $(WORK)/uImage-$(KERNEL_VERSION)
- touch $(WORK)/uImage-$(KERNEL_VERSION)
+ make zImage ARCH=arm CROSS_COMPILE=$(TARGET)-
+ cp -v $(WORK)/linux-$(KERNEL_VERSION)/arch/arm/boot/zImage $(WORK)/zImage-$(KERNEL_VERSION)
+ ln -sf zImage-$(KERNEL_VERSION) $(WORK)/zImage
+ touch $(WORK)/zImage-$(KERNEL_VERSION)
-image: $(WORK)/uImage-$(KERNEL_VERSION)
+image: $(WORK)/zImage-$(KERNEL_VERSION)
image-clean:
- rm -vf $(WORK)/uImage-$(KERNEL_VERSION)
+ rm -vf $(WORK)/zImage-$(KERNEL_VERSION)
image-distclean: image-clean
+ rm -vrf $(WORK)/linux-$(KERNEL_VERSION) $(WORK)/linux-$(KERNEL_VERSION).tar.bz2
$(WORK)/modules-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION)
cd $(WORK)/linux-$(KERNEL_VERSION) && \