CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Makefile: Added MAkefile to build kernel 2.6.16 snapshot version 20080323 for ipaq191x.
authorVictor Martinez <pitillo@ono.com>
Tue, 9 Feb 2010 12:43:43 +0000 (12:43 +0000)
committerVictor Martinez <pitillo@ono.com>
Tue, 9 Feb 2010 12:43:43 +0000 (12:43 +0000)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
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