summaryrefslogtreecommitdiff
path: root/target/linux/mvebu/image/armada-388-clearfog-base.bootscript
blob: 1755203dc5afba1a168a8f3fe091a863d12f62f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 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.

# Override DeviceTree for Clearfog Base
# removed once U-Boot is able to detect the board variant.
setenv fdtfile armada-388-clearfog-base.dtb

# 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}