CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Added more boot stuff for efikamx devices and fixed its Makefile
authorJose V Beneyto <sepen@crux.nu>
Tue, 5 Jun 2012 07:19:41 +0000 (07:19 +0000)
committerJose V Beneyto <sepen@crux.nu>
Tue, 5 Jun 2012 07:19:41 +0000 (07:19 +0000)
devices/efikamx/Makefile
devices/efikamx/boot-mmcblk.script [new file with mode: 0644]
devices/efikamx/boot-ram.script [new file with mode: 0644]
devices/efikamx/boot-sda.script [moved from devices/efikamx/boot.script with 100% similarity]

index a9c7e56cae70f93b6c0d09d1134166df306feb38..2c604f4f25b48a01b24bf3169e08a0c32aa81430 100644 (file)
@@ -7,13 +7,12 @@ WORK = $(PWD)/work
 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
 
@@ -30,16 +29,6 @@ uImage: $(WORK)/uImage
 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" \
@@ -50,4 +39,28 @@ uInitrd: $(WORK)/uInitrd
 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
diff --git a/devices/efikamx/boot-mmcblk.script b/devices/efikamx/boot-mmcblk.script
new file mode 100644 (file)
index 0000000..09d7161
--- /dev/null
@@ -0,0 +1,6 @@
+setenv kernel uImage;
+setenv bootargs console=ttymxc0,115200 root=/dev/mmcblk0p2 rootwait ro;
+${loadcmd} ${kerneladdr} ${kernel}
+if imi ${kerneladdr}; then
+  bootm ${kerneladdr}
+fi;
diff --git a/devices/efikamx/boot-ram.script b/devices/efikamx/boot-ram.script
new file mode 100644 (file)
index 0000000..94aef11
--- /dev/null
@@ -0,0 +1,12 @@
+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;