#
-# uboot/devices/efikamx/Makefile
+# bootloader/devices/cubox/Makefile
#
PWD = $(shell pwd)
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
$(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
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
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}