aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/image/armada-388-clearfog-pro.bootscript
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/mvebu/image/armada-388-clearfog-pro.bootscript')
-rw-r--r--target/linux/mvebu/image/armada-388-clearfog-pro.bootscript23
1 files changed, 23 insertions, 0 deletions
diff --git a/target/linux/mvebu/image/armada-388-clearfog-pro.bootscript b/target/linux/mvebu/image/armada-388-clearfog-pro.bootscript
new file mode 100644
index 0000000000..4cc206dbf3
--- /dev/null
+++ b/target/linux/mvebu/image/armada-388-clearfog-pro.bootscript
@@ -0,0 +1,23 @@
+# Standard Boot-Script
+# use only well-known variable names provided by U-Boot Distro boot
+# This script assumes that there is a boot partition,
+# and that the root partition is always the next one.
+
+# rootfs is always on the next partition
+setexpr openwrt_rootpart ${distro_bootpart} + 1
+
+# figure out partition uuid to pass to the kernel as root=
+part uuid ${devtype} ${devnum}:${openwrt_rootpart} uuid
+
+# generate bootargs (rootfs)
+setenv bootargs ${bootargs} root=PARTUUID=${uuid} rootfstype=auto rootwait
+
+# add console= option to bootargs, if any
+if test -n "${console}"; then
+ setenv bootargs ${bootargs} console=${console}
+fi
+
+echo "Booting Linux with ${bootargs}"
+load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${fdtfile}
+load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} zImage
+bootz ${kernel_addr_r} - ${fdt_addr_r}