CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Added files for Cubieboard device
authorVictor Martinez <pitillo@ono.com>
Tue, 6 Aug 2013 16:31:31 +0000 (18:31 +0200)
committerVictor Martinez <pitillo@ono.com>
Tue, 6 Aug 2013 16:31:31 +0000 (18:31 +0200)
Makefile
devices/cubieboard/Makefile [new file with mode: 0644]
devices/cubieboard/boot-mmc.script [new file with mode: 0644]

index eae697c51a18781711b486016746cbbb3c1e757e..2e6afb8dd88e5f2880d1b7fa02426c1bc89deb70 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,15 @@ mkimage-clean:
 mkimage-distclean: mkimage-clean
        rm -rf $(WORK)/u-boot-$(UBOOT_VERSION) $(WORK)/u-boot-$(UBOOT_VERSION).tar.bz2
 
+cubieboard: mkimage
+       make -C devices/cubieboard
+
+cubieboard-clean:
+       make -C devices/cubieboard clean
+
+cubieboard-distclean:
+       make -C devices/cubieboard distclean
+
 cubox: mkimage
        make -C devices/cubox
 
diff --git a/devices/cubieboard/Makefile b/devices/cubieboard/Makefile
new file mode 100644 (file)
index 0000000..88031bf
--- /dev/null
@@ -0,0 +1,75 @@
+#
+# uboot/devices/cubieboard/Makefile
+#
+
+PWD = $(shell pwd)
+WORK = $(PWD)/work
+MKIMAGE = $(PWD)/../../work/mkimage
+ZIMAGE = $(PWD)/../../../kernel/cubieboard/work/zImage
+INITRDGZ = $(PWD)/../../../initrd/work/initrd.gz
+INITRAMFS = $(PWD)/../../../initramfs/work/initramfs
+
+RAMDISK_TYPE = uInitrd # select between uInitramfs or uInitrd
+
+CONSOLE = tty0 # tty0 / ttyS0,115200
+
+.PHONY: all clean distclean kernel ramdisk bootscr
+
+all: kernel ramdisk bootscr
+
+clean: kernel-clean ramdisk-clean bootscr-clean
+
+distclean: clean
+
+$(WORK):
+       install -d $(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" \
+       -d $(ZIMAGE) $(WORK)/uImage
+
+kernel: $(WORK)/uImage
+
+kernel-clean:
+       rm -f $(WORK)/uImage
+
+$(WORK)/uInitrd: $(WORK) $(MKIMAGE) $(INITRDGZ)
+       $(MKIMAGE) -A arm -O linux -a 0 -e 0 \
+       -T ramdisk -C none -n "CRUX-ARM Initrd Image" \
+       -d $(INITRDGZ) $(WORK)/uInitrd
+
+uInitrd: $(WORK)/uInitrd
+
+uInitrd-clean:
+       rm -f $(WORK)/uInitrd
+
+$(WORK)/uInitramfs: $(WORK) $(MKIMAGE) $(INITRAMFS)
+       $(MKIMAGE) -A arm -O linux -a 0 -e 0 \
+       -T ramdisk -C none -n "CRUX-ARM Initramfs Image" \
+       -d $(INITRAMFS) $(WORK)/uInitramfs
+
+uInitramfs: $(WORK)/uInitramfs
+
+uInitramfs-clean:
+       rm -f $(WORK)/uInitramfs
+
+ramdisk: $(RAMDISK_TYPE)
+
+ramdisk-clean: uInitrd-clean uInitramfs-clean
+
+templates: $(PWD)/boot-mmc.script
+       sed "s|#CONSOLE#|$(CONSOLE)|" $(PWD)/boot-mmc.script > $(WORK)/boot-mmc.script
+
+$(WORK)/boot-mmc.scr: $(WORK) $(MKIMAGE)
+       $(MKIMAGE) -A arm -O linux -a 0 -e 0 \
+       -T script -C none -n "A10 Boot Script (mmc)" \
+       -d $(WORK)/boot-mmc.script \
+       $(WORK)/boot-mmc.scr
+
+bootscr: templates $(WORK)/boot-mmc.scr
+
+bootscr-clean:
+       rm -f $(WORK)/boot-*.scr*
+
+# End of file
diff --git a/devices/cubieboard/boot-mmc.script b/devices/cubieboard/boot-mmc.script
new file mode 100644 (file)
index 0000000..849ed00
--- /dev/null
@@ -0,0 +1,4 @@
+setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra}
+fatload mmc 0 0x43000000 script.bin
+fatload mmc 0 0x48000000 uImage
+bootm 0x48000000