From: Victor Martinez Date: Tue, 6 Aug 2013 16:31:31 +0000 (+0200) Subject: Added files for Cubieboard device X-Git-Url: http://gitweb/?a=commitdiff_plain;h=84ada7d4a2002e3fe70260668ecc78579756be8a;p=bootloader.git Added files for Cubieboard device --- diff --git a/Makefile b/Makefile index eae697c..2e6afb8 100644 --- 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 index 0000000..88031bf --- /dev/null +++ b/devices/cubieboard/Makefile @@ -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 index 0000000..849ed00 --- /dev/null +++ b/devices/cubieboard/boot-mmc.script @@ -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