CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Fixed modules packagement
[kernel/versatile.git] / Makefile
index 110a61679828a71366b15b4b89225e3ccde298b0..13c6b1048343feffc429dc3b1ea9a55d36d7845b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,11 +4,11 @@
 
 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.30.5
+KERNEL_VERSION = 3.5.4
 
 .PHONY: all clean image modules map config
 
@@ -19,13 +19,14 @@ clean: image-clean modules-clean map-clean
 distclean: clean image-distclean modules-distclean map-distclean
 
 $(WORK)/linux-$(KERNEL_VERSION).tar.bz2:
-       wget -P $(WORK) ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$(KERNEL_VERSION).tar.bz2
+       wget -P $(WORK) ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-$(KERNEL_VERSION).tar.bz2
 
 $(WORK)/linux-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION).tar.bz2 config-$(KERNEL_VERSION)
        tar -C $(WORK) -xvjf $(WORK)/linux-$(KERNEL_VERSION).tar.bz2
+       sed -e 's|LINUX_COMPILE_BY=.*|LINUX_COMPILE_BY=devel|g' -e 's|`hostname`|crux-arm.nu|g' -i $(WORK)/linux-$(KERNEL_VERSION)/scripts/mkcompile_h
        cd $(WORK)/linux-$(KERNEL_VERSION) && \
                make mrproper && \
-               cp -v $(TOPDIR)/config-$(KERNEL_VERSION) .config && \
+               cp -v $(PWD)/config-$(KERNEL_VERSION) .config && \
        touch $(WORK)/linux-$(KERNEL_VERSION)
 
 $(WORK)/zImage-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION)
@@ -52,10 +53,15 @@ $(WORK)/modules-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION)
        rm -f $(WORK)/modules-$(KERNEL_VERSION)/lib/modules/$(KERNEL_VERSION)/{source,build}
        touch $(WORK)/modules-$(KERNEL_VERSION)
 
-modules: $(WORK)/modules-$(KERNEL_VERSION)
+$(WORK)/modules-$(KERNEL_VERSION).tar.xz: $(WORK)/modules-$(KERNEL_VERSION)
+       cd $(WORK)/modules-$(KERNEL_VERSION) && \
+               tar cvJf $(WORK)/modules-$(KERNEL_VERSION).tar.xz *
+       touch $(WORK)/modules-$(KERNEL_VERSION).tar.xz
+
+modules: $(WORK)/modules-$(KERNEL_VERSION).tar.xz
 
 modules-clean:
-       rm -vrf $(WORK)/modules-$(KERNEL_VERSION)
+       rm -vrf $(WORK)/modules-$(KERNEL_VERSION) $(WORK)/modules-$(KERNEL_VERSION).tar.xz
 
 modules-distclean: modules-clean