6ab6e363bc7ea0fec70fecdcaeb155cd1c2aa588
[openwrt/staging/wigyori.git] / target / linux / mvebu / image / cfbase-boot.script
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 # Override DeviceTree for Clearfog Base
7 # removed once U-Boot is able to detect the board variant.
8 setenv fdtfile armada-388-clearfog-base.dtb
9
10 # rootfs is always on the next partition
11 setexpr openwrt_rootpart ${distro_bootpart} + 1
12
13 # figure out partition uuid to pass to the kernel as root=
14 part uuid ${devtype} ${devnum}:${openwrt_rootpart} uuid
15
16 # generate bootargs (rootfs)
17 setenv bootargs ${bootargs} root=PARTUUID=${uuid} rootfstype=auto rootwait
18
19 # add console= option to bootargs, if any
20 if test -n "${console}"; then
21 setenv bootargs ${bootargs} console=${console}
22 fi
23
24 echo "Booting Linux with ${bootargs}"
25 load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${fdtfile}
26 load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} zImage
27 bootz ${kernel_addr_r} - ${fdt_addr_r}