MKIMAGE = $(PWD)/../../work/mkimage
ZIMAGE = $(PWD)/../../../kernel/efikamx/work/zImage
INITRDGZ = $(PWD)/../../../initrd/work/initrd.gz
-BOOTSCRIPT = $(PWD)/boot.script
-.PHONY: all clean distclean uImage boot.scr uInitrd
+.PHONY: all clean distclean uImage uInitrd bootscr
-all: uImage bootscr uInitrd
+all: uImage uInitrd bootscr
-clean: uImage-clean bootscr-clean uInitrd-clean
+clean: uImage-clean uInitrd-clean bootscr-clean
distclean: clean
uImage-clean:
rm -f $(WORK)/uImage
-$(WORK)/boot.scr: $(WORK) $(MKIMAGE) $(BOOTSCRIPT)
- $(MKIMAGE) -A arm -O linux -a 0 -e 0 \
- -T script -C none -n "EfikaMX Boot Script" \
- -d $(BOOTSCRIPT) $(WORK)/boot.scr
-
-bootscr: $(WORK)/boot.scr
-
-bootscr-clean:
- rm -f $(WORK)/boot.scr
-
$(WORK)/uInitrd: $(WORK) $(MKIMAGE) $(INITRDGZ)
$(MKIMAGE) -A arm -O linux -a 0 -e 0 \
-T ramdisk -C none -n "CRUX-ARM Initrd Image" \
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 "EfikaMX Boot Script (ram)" \
+ -d $(PWD)/boot-ram.script \
+ $(WORK)/boot-ram.scr
+
+$(WORK)/boot-sda.scr: $(WORK) $(MKIMAGE) $(PWD)/boot-sda.script
+ $(MKIMAGE) -A arm -O linux -a 0 -e 0 \
+ -T script -C none -n "EfikaMX Boot Script (sda)" \
+ -d $(PWD)/boot-sda.script \
+ $(WORK)/boot-sda.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 "EfikaMX Boot Script (mmcblk)" \
+ -d $(PWD)/boot-mmcblk.script \
+ $(WORK)/boot-mmcblk.scr
+
+bootscr: $(WORK)/boot-ram.scr $(WORK)/boot-sda.scr $(WORK)/boot-mmcblk.scr
+
+bootscr-clean:
+ rm -f $(WORK)/boot-*.scr
+
+
# End of file
--- /dev/null
+setenv ramdisk uInitrd;
+setenv kernel uImage;
+setenv bootargs console=ttymxc0,115200 root=/dev/ram0 rootwait ro;
+${loadcmd} ${ramdiskaddr} ${ramdisk};
+if imi ${ramdiskaddr}; then; else
+ setenv bootargs ${bootargs} noinitrd;
+ setenv ramdiskaddr "";
+fi;
+${loadcmd} ${kerneladdr} ${kernel}
+if imi ${kerneladdr}; then
+ bootm ${kerneladdr} ${ramdiskaddr}
+fi;