2017-04-23 15:20:58 +00:00
|
|
|
# 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.
|
2017-04-06 18:13:31 +00:00
|
|
|
|
2017-04-23 15:20:58 +00:00
|
|
|
# Override DeviceTree for Clearfog Base
|
|
|
|
# removed once U-Boot is able to detect the board variant.
|
|
|
|
setenv fdtfile armada-388-clearfog-base.dtb
|
2017-04-06 18:13:31 +00:00
|
|
|
|
2017-04-23 15:20:58 +00:00
|
|
|
# generate bootargs for rootfs on MMC
|
|
|
|
if test "${devtype}" = "mmc"; then
|
2017-11-07 08:45:52 +00:00
|
|
|
setexpr openwrt_rootpart ${distro_bootpart} + 1
|
|
|
|
setenv bootargs ${bootargs} root=/dev/mmcblk${devnum}p${openwrt_rootpart} rootfstype=auto rootwait
|
2017-04-23 15:20:58 +00:00
|
|
|
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}
|