From: Victor Martinez Date: Tue, 9 Feb 2010 12:43:43 +0000 (+0000) Subject: Makefile: Added MAkefile to build kernel 2.6.16 snapshot version 20080323 for ipaq191x. X-Git-Url: http://gitweb/?a=commitdiff_plain;h=3f396f963a73d0b5105084aa383ffee1dfa7a4f8;p=kernel%2Fipaq191x.git Makefile: Added MAkefile to build kernel 2.6.16 snapshot version 20080323 for ipaq191x. --- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..769e47b --- /dev/null +++ b/Makefile @@ -0,0 +1,78 @@ +# +# src/kernel/Makefile +# + +TARGET = arm-unknown-linux-gnu + +TOPDIR = $(shell pwd) +WORK = $(PWD)/work +CROSSTOOLS = $(TOPDIR)/../../toolchain/crosstools + +KERNEL_VERSION = 2.6.16-ipaq191x_20080323 + +.PHONY: all clean image modules map config + +all: image modules map + +clean: image-clean modules-clean map-clean + +distclean: clean image-distclean modules-distclean map-distclean + rm -vrf $(WORK)/linux-$(KERNEL_VERSION) + +$(WORK)/linux-$(KERNEL_VERSION).tar.bz2: + wget -P $(WORK) http://crux-arm.nu/files/distfiles/linux-$(KERNEL_VERSION).tar.bz2 + +$(WORK)/linux-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION).tar.bz2 + tar -C $(WORK) -xvjf $(WORK)/linux-$(KERNEL_VERSION).tar.bz2 + touch $(WORK)/linux-$(KERNEL_VERSION) + +$(WORK)/zImage-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION) + cd $(WORK)/linux-$(KERNEL_VERSION) && \ + export PATH=$(CROSSTOOLS)/bin:$$PATH && \ + export LD_LIBRARY_PATH=$(CROSSTOOLS)/lib:$$LD_LIBRARY_PATH && \ + make pxa25x_defconfig ARCH=arm CROSS_COMPILE=$(TARGET)- zImage + cp -v $(WORK)/linux-$(KERNEL_VERSION)/arch/arm/boot/zImage $(WORK)/zImage-$(KERNEL_VERSION) + touch $(WORK)/zImage-$(KERNEL_VERSION) + +image: $(WORK)/zImage-$(KERNEL_VERSION) + +image-clean: + rm -vf $(WORK)/zImage-$(KERNEL_VERSION) + +image-distclean: image-clean + +$(WORK)/modules-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION) + cd $(WORK)/linux-$(KERNEL_VERSION) && \ + export PATH=$(CROSSTOOLS)/bin:$$PATH && \ + export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)/lib:$$LD_LIBRARY_PATH && \ + make ARCH=arm CROSS_COMPILE=$(TARGET)- modules && \ + make ARCH=arm CROSS_COMPILE=$(TARGET)- INSTALL_MOD_PATH=$(WORK)/modules-$(KERNEL_VERSION) modules_install + rm -f $(WORK)/modules-$(KERNEL_VERSION)/lib/modules/$(KERNEL_VERSION)/{source,build} + touch $(WORK)/modules-$(KERNEL_VERSION) + +modules: $(WORK)/modules-$(KERNEL_VERSION) + +modules-clean: + rm -vrf $(WORK)/modules-$(KERNEL_VERSION) + +modules-distclean: modules-clean + +$(WORK)/System.map-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION) + cp $(WORK)/linux-$(KERNEL_VERSION)/System.map $(WORK)/System.map-$(KERNEL_VERSION) + touch $(WORK)/System.map-$(KERNEL_VERSION) + +map: $(WORK)/System.map-$(KERNEL_VERSION) + +map-clean: + rm -vrf $(WORK)/System.map-$(KERNEL_VERSION) + +map-distclean: map-clean + +config: $(WORK)/linux-$(KERNEL_VERSION) + cd $(WORK)/linux-$(KERNEL_VERSION) && \ + export PATH=$(CROSSTOOLS)/bin:$$PATH && \ + export LD_LIBRARY_PATH=$(CROSSTOOLS)/lib:$$LD_LIBRARY_PATH && \ + make ARCH=arm CROSS_COMPILE=$(TARGET)- menuconfig + touch $(WORK)/linux-$(KERNEL_VERSION) + +# End of file