summaryrefslogtreecommitdiff
path: root/target/linux/mvebu/image/cfpro-boot.script
blob: e1523f8fb37fb235474ce331f2bfa8b175c07791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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.

# generate bootargs for rootfs on MMC
if test "${devtype}" = "mmc"; then
	setexpr lede_rootpart ${distro_bootpart} + 1
	setenv bootargs ${bootargs} root=/dev/mmcblk${devnum}p${lede_rootpart} rootfstype=auto rootwait
fi

# here one could add logic for other rootfs device types such as scsi and usb

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