CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Modified cubieboard's Makefile to get kernel version string instead of hardcode values
authorJose V Beneyto <sepen@crux.nu>
Tue, 27 Aug 2013 18:12:03 +0000 (18:12 +0000)
committerJose V Beneyto <sepen@crux.nu>
Tue, 27 Aug 2013 18:12:03 +0000 (18:12 +0000)
devices/cubieboard/Makefile

index 9bfcde378455fe1fa61f9ac97a15534e3eb5b443..8f2773174f1d9dae71ff28e9f3e2d211a59532eb 100644 (file)
@@ -9,6 +9,8 @@ ZIMAGE = $(PWD)/../../../kernel/cubieboard/work/zImage
 INITRDGZ = $(PWD)/../../../initrd/work/initrd.gz
 INITRAMFS = $(PWD)/../../../initramfs/work/initramfs
 
+KERNEL_VERSION_STRING = $(shell readlink $(ZIMAGE) | sed s/zImage-//)
+
 RAMDISK_TYPE = uInitrd
 #RAMDISK_TYPE = uInitramfs
 
@@ -28,7 +30,7 @@ $(WORK):
 
 $(WORK)/uImage: $(WORK) $(MKIMAGE) $(ZIMAGE)
        $(MKIMAGE) -A arm -O linux -a 0x40008000 -e 0x40008000 \
-       -T kernel -C none -n "Linux-3.0.76-cubieboard" \
+       -T kernel -C none -n "Linux-$(KERNEL_VERSION_STRING)" \
        -d $(ZIMAGE) $(WORK)/uImage
 
 kernel: $(WORK)/uImage