UBOOT_VERSION = 2011.09
-.PHONY: all mkimage clean dist-clean
+.PHONY: all help mkimage clean dist-clean efikamx efikamx-clean efikamx-distclean
-all: mkimage
+all: help
-clean: mkimage-clean
+help:
+ @echo "Usage: make <target>"
+ @echo "Where targets available are:"
+ @echo " mkimage Build mkimage binary for your host"
+ @echo " <device> Where device specified should appear under"
+ @echo " devices's dir as for example efikamx, wm8505, ..."
+ @echo " clean Remove generated files"
+ @echo " distclean Remove generated files and temporary sources"
-dist-clean: mkimage-distclean
+clean: mkimage-clean efikamx-clean
+
+distclean: mkimage-distclean efikamx-distclean
$(WORK)/u-boot-$(UBOOT_VERSION).tar.bz2:
rm -f $(WORK)/mkimage mkimage
mkimage-distclean: mkimage-clean
+ rm -rf $(WORK)/u-boot-$(UBOOT_VERSION) $(WORK)/u-boot-$(UBOOT_VERSION).tar.bz2
+
+efikamx: mkimage
+ make -C devices/efikamx
+
+efikamx-clean:
+ make -C devices/efikamx clean
+
+efikamx-distclean:
+ make -C devices/efikamx distclean
+
+# End of file
README for uboot
+ Das U-Boot (or just "U-Boot" for short) is Open Source Firmware for
+ Embedded Power Architecture®, ARM, MIPS, x86 and other processors.
+
+ CRUX-ARM uses U-Boot as default bootloader for some devices, like
+ efikamx, wm8505, and maybe more in the future.
+
+ In this repository you'll find all required to convert kernel images
+ from zImage format to uImage, which used by U-Boot. To do that you
+ need to use mkimage, which can be built with the Makefile provided.
+ It's important to note that you must build mkimage with the compiler
+ flags for your host.
+ Also mkimage can convert files like initrd.gz to uInitrd in order to
+ be loaded it by U-Boot at boot stage.
+
+ To generate all the stuff required for a device you'll find a
+ directory for each one. Take a look in "./devices/<yourdevice>" for
+ more information related.
--- /dev/null
+#
+# uboot/devices/efikamx/Makefile
+#
+
+PWD = $(shell pwd)
+MKIMAGE = $(PWD)/../../work/mkimage
+INITRDGZ = $(PWD)/../../../initrd/work/initrd.gz
+
+.PHONY: all clean distclean uImage boot.scr uInitrd
+
+all: uImage boot.scr uInitrd
+
+clean: uImage-clean boot.scr-clean uInitrd-clean
+
+distclean: clean
+
+uImage: # TODO
+uImage-clean: # TODO
+
+boot.scr: $(MKIMAGE) boot.script
+ $(MKIMAGE) -A arm -O linux -a 0 -e 0 -T script -C none \
+ -n "EfikaMX Boot Script" -d boot.script boot.scr
+
+boot.scr-clean:
+ rm -f boot.scr
+
+initrd.gz: $(INITRDGZ)
+ cp $(INITRDGZ) .
+
+uInitrd: $(MKIMAGE) initrd.gz
+ $(MKIMAGE) -A arm -O linux -a 0 -e 0 -T ramdisk -C none \
+ -n "initrd" -d initrd.gz uInitrd
+
+uInitrd-clean:
+ rm -f uInitrd initrd.gz
+
+# End of file
--- /dev/null
+setenv kernel uImage;
+setenv bootargs console=ttymxc0,115200 root=/dev/sda1 rootwait ro;
+${loadcmd} ${kerneladdr} ${kernel}
+if imi ${kerneladdr}; then
+ bootm ${kerneladdr}
+fi;