CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Kernel update to 3.2.27
[kernel/raspberrypi.git] / Makefile
index bab247a139a12e2126b31c2b42320d13cff08070..2c6048efd7debe183572cc656eabba3c30a78ece 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ PWD = $(shell pwd)
 WORK = $(PWD)/work
 CROSSTOOLS = $(PWD)/../../toolchain/crosstools
 
-KERNEL_VERSION = 3.1.9-raspberrypi_20120803
+KERNEL_VERSION = 3.2.27-raspberrypi_20121213
 
 .PHONY: all clean image modules map config
 
@@ -18,11 +18,16 @@ clean: image-clean modules-clean map-clean
 
 distclean: clean image-distclean modules-distclean map-distclean
 
-$(WORK)/linux-$(KERNEL_VERSION).tar.bz2:
-       wget -P $(WORK) http://crux-arm.nu/files/distfiles/raspberrypi/linux-$(KERNEL_VERSION).tar.bz2
+$(WORK)/linux-$(KERNEL_VERSION).tar.xz:
+       wget -P $(WORK) http://crux-arm.nu/files/distfiles/raspberrypi/linux-$(KERNEL_VERSION).tar.xz
+       wget --no-check-certificate -P $(WORK) https://raw.github.com/raspberrypi/tools/master/mkimage/imagetool-uncompressed.py
+       wget --no-check-certificate -P $(WORK) https://github.com/raspberrypi/tools/raw/master/mkimage/first32k.bin
+       wget --no-check-certificate -P $(WORK) https://github.com/raspberrypi/tools/raw/master/mkimage/boot-uncompressed.txt
+       wget --no-check-certificate -P $(WORK) https://github.com/raspberrypi/tools/raw/master/mkimage/args-uncompressed.txt
 
-$(WORK)/linux-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION).tar.bz2 $(PWD)/config-$(KERNEL_VERSION)
-       tar -C $(WORK) -xvjf $(WORK)/linux-$(KERNEL_VERSION).tar.bz2
+$(WORK)/linux-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION).tar.xz $(PWD)/config-$(KERNEL_VERSION)
+       tar -C $(WORK) -xvf $(WORK)/linux-$(KERNEL_VERSION).tar.xz
+       sed -e 's|LINUX_COMPILE_BY=.*|LINUX_COMPILE_BY=devel|' -e 's|LINUX_COMPILE_HOST=.*|LINUX_COMPILE_HOST=crux-arm.nu|' -i $(WORK)/linux-$(KERNEL_VERSION)/scripts/mkcompile_h
        cp -v $(PWD)/config-$(KERNEL_VERSION) $(WORK)/linux-$(KERNEL_VERSION)/.config
        touch $(WORK)/linux-$(KERNEL_VERSION)
 
@@ -36,10 +41,6 @@ $(WORK)/zImage-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION)
        touch $(WORK)/zImage-$(KERNEL_VERSION)
 
 $(WORK)/kernel.img: $(WORK)/zImage-$(KERNEL_VERSION)
-       wget --no-check-certificate -P $(WORK) https://raw.github.com/raspberrypi/tools/master/mkimage/imagetool-uncompressed.py
-       wget --no-check-certificate -P $(WORK) https://github.com/raspberrypi/tools/raw/master/mkimage/first32k.bin
-       wget --no-check-certificate -P $(WORK) https://github.com/raspberrypi/tools/raw/master/mkimage/boot-uncompressed.txt
-       wget --no-check-certificate -P $(WORK) https://github.com/raspberrypi/tools/raw/master/mkimage/args-uncompressed.txt
        cd $(WORK)/ && \
                python imagetool-uncompressed.py zImage-$(KERNEL_VERSION)
 
@@ -49,7 +50,7 @@ image-clean:
        rm -vf $(WORK)/zImage-$(KERNEL_VERSION) $(WORK)/kernel.img
 
 image-distclean: image-clean
-       rm -vrf $(WORK)/linux-$(KERNEL_VERSION) $(WORK)/linux-$(KERNEL_VERSION).tar.bz2
+       rm -vrf $(WORK)/linux-$(KERNEL_VERSION) $(WORK)/linux-$(KERNEL_VERSION).tar.xz
        rm -vf $(WORK)/imagetool-uncompressed.py $(WORK)/first32k.bin $(WORK)/boot-uncompressed.txt $(WORK)/args-uncompressed.txt
 
 $(WORK)/modules-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION)
@@ -61,10 +62,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