From: Jose V Beneyto Date: Thu, 3 Oct 2013 08:37:01 +0000 (+0000) Subject: Cleanup and fixed issues with boot templates X-Git-Url: http://gitweb/?a=commitdiff_plain;h=6224217bac3c7e825f445177024ca1899fa5ee02;p=bootloader.git Cleanup and fixed issues with boot templates --- diff --git a/devices/cubox/Makefile b/devices/cubox/Makefile index f532e32..292ca2e 100644 --- a/devices/cubox/Makefile +++ b/devices/cubox/Makefile @@ -1,5 +1,5 @@ # -# uboot/devices/efikamx/Makefile +# bootloader/devices/cubox/Makefile # PWD = $(shell pwd) @@ -8,6 +8,15 @@ MKIMAGE = $(PWD)/../../work/mkimage ZIMAGE = $(PWD)/../../../kernel/cubox/work/zImage INITRDGZ = $(PWD)/../../../initrd/work/initrd-hardfp.gz +KERNEL_VERSION_STRING = $(shell readlink $(ZIMAGE) | sed s/zImage-//) + +RAMDISK_TYPE = uInitrd +#RAMDISK_TYPE = uInitramfs + +CONSOLE_DEVICE = tty0 +#CONSOLE_DEVICE = ttymxc0,115200 + + .PHONY: all clean distclean uImage uInitrd bootscr all: uImage uInitrd bootscr @@ -21,7 +30,7 @@ $(WORK): $(WORK)/uImage: $(WORK) $(MKIMAGE) $(ZIMAGE) $(MKIMAGE) -A arm -O linux -a 0x1a000000 -e 0x1a000000 \ - -T kernel -C none -n "Linux-3.5.3-cubox" \ + -T kernel -C none -n "Linux-$(KERNEL_VERSION_STRING)" \ -d $(ZIMAGE) $(WORK)/uImage uImage: $(WORK)/uImage @@ -39,15 +48,17 @@ uInitrd: $(WORK)/uInitrd uInitrd-clean: rm -f $(WORK)/uInitrd + + $(WORK)/boot-ram.scr: $(WORK) $(MKIMAGE) $(PWD)/boot-ram.script $(MKIMAGE) -A arm -O linux -a 0 -e 0 \ - -T script -C none -n "CuBox Boot Script (ram)" \ + -T script -C none -n "CuBox Boot Script (ramdisk)" \ -d $(PWD)/boot-ram.script \ $(WORK)/boot-ram.scr $(WORK)/boot-mmcblk.scr: $(WORK) $(MKIMAGE) $(PWD)/boot-mmcblk.script $(MKIMAGE) -A arm -O linux -a 0 -e 0 \ - -T script -C none -n "CuBox Boot Script (mmcblk)" \ + -T script -C none -n "CuBox Boot Script (mmc)" \ -d $(PWD)/boot-mmcblk.script \ $(WORK)/boot-mmcblk.scr diff --git a/devices/cubox/boot-mmcblk.script b/devices/cubox/boot-mmc.script.in similarity index 50% rename from devices/cubox/boot-mmcblk.script rename to devices/cubox/boot-mmc.script.in index a398134..8a62a6d 100644 --- a/devices/cubox/boot-mmcblk.script +++ b/devices/cubox/boot-mmc.script.in @@ -1,7 +1,7 @@ setenv kernel uImage; setenv loadcmd ext2load mmc 0:1 setenv kerneladdr 0x16000000; -setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 ro rootwait vmalloc=384M video=dovefb:lcd0:1920x1080-32@60-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0; +setenv bootargs console=@@CONSOLE_DEVICE@@ root=/dev/mmcblk0p2 ro rootwait vmalloc=384M video=dovefb:lcd0:1920x1080-32@60-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0; ${loadcmd} ${kerneladdr} ${kernel} if imi ${kerneladdr}; then bootm ${kerneladdr} diff --git a/devices/cubox/boot-ram.script b/devices/cubox/boot-ramdisk.script.in similarity index 93% rename from devices/cubox/boot-ram.script rename to devices/cubox/boot-ramdisk.script.in index 07ff307..9353a78 100644 --- a/devices/cubox/boot-ram.script +++ b/devices/cubox/boot-ramdisk.script.in @@ -1,5 +1,5 @@ setenv loadcmd ext2load usb 0:1; -setenv ramdisk uInitrd; +setenv ramdisk @@RAMDISK_TYPE@@; setenv ramdiskaddr 0x18000000; setenv kernel uImage; setenv kerneladdr 0x16000000; diff --git a/devices/efikamx/README b/devices/efikamx/README index 7a94fe0..cdaae08 100644 --- a/devices/efikamx/README +++ b/devices/efikamx/README @@ -8,7 +8,7 @@ README for efikamx different media types you will use. To build the kernel image: - $ make uImage + $ make kernel To build the ramdisk (uInitrd): $ make ramdisk