5f9bcd70ba74d224bb5d94bc9d1a687f5ba1b23f
[openwrt/openwrt.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 # generate bootargs for rootfs on MMC
11 if test "${devtype}" = "mmc"; then
12 setexpr lede_rootpart ${distro_bootpart} + 1
13 setenv bootargs ${bootargs} root=/dev/mmcblk${devnum}p${lede_rootpart} rootfstype=auto rootwait
14 fi
15
16 # here one could add logic for other rootfs device types such as scsi and usb
17
18 # add console= option to bootargs, if any
19 if test -n "${console}"; then
20 setenv bootargs ${bootargs} console=${console}
21 fi
22
23 echo "Booting Linux with ${bootargs}"
24 load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${fdtfile}
25 load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} zImage
26 bootz ${kernel_addr_r} - ${fdt_addr_r}