mvebu: unify boot.scr creation
[openwrt/staging/wigyori.git] / target / linux / mvebu / image / armada-388-clearfog-pro.bootscript
1 # Standard Boot-Script
2 # use only well-known variable names provided by U-Boot Distro boot
3 # This script assumes that there is a boot partition,
4 # and that the root partition is always the next one.
5
6 # rootfs is always on the next partition
7 setexpr openwrt_rootpart ${distro_bootpart} + 1
8
9 # figure out partition uuid to pass to the kernel as root=
10 part uuid ${devtype} ${devnum}:${openwrt_rootpart} uuid
11
12 # generate bootargs (rootfs)
13 setenv bootargs ${bootargs} root=PARTUUID=${uuid} rootfstype=auto rootwait
14
15 # add console= option to bootargs, if any
16 if test -n "${console}"; then
17 setenv bootargs ${bootargs} console=${console}
18 fi
19
20 echo "Booting Linux with ${bootargs}"
21 load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${fdtfile}
22 load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} zImage
23 bootz ${kernel_addr_r} - ${fdt_addr_r}