2017-04-23 15:20:58 +00:00
|
|
|
# Standard Boot-Script
|
|
|
|
# use only well-known variable names provided by U-Boot Distro boot
|
2018-02-14 16:34:38 +00:00
|
|
|
# This script assumes that there is a boot partition,
|
2017-04-23 15:20:58 +00:00
|
|
|
# and that the root partition is always the next one.
|
2016-08-09 13:23:24 +00:00
|
|
|
|
2017-10-19 07:22:11 +00:00
|
|
|
# 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
|
2016-08-09 13:23:24 +00:00
|
|
|
|
2017-10-19 07:22:11 +00:00
|
|
|
# generate bootargs (rootfs)
|
|
|
|
setenv bootargs ${bootargs} root=PARTUUID=${uuid} rootfstype=auto rootwait
|
2017-04-23 15:20:58 +00:00
|
|
|
|
|
|
|
# add console= option to bootargs, if any
|
|
|
|
if test -n "${console}"; then
|
|
|
|
setenv bootargs ${bootargs} console=${console}
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Booting Linux with ${bootargs}"
|
2019-05-11 17:37:30 +00:00
|
|
|
load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} @DTB@.dtb
|
2017-04-23 15:20:58 +00:00
|
|
|
load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} zImage
|
|
|
|
bootz ${kernel_addr_r} - ${fdt_addr_r}
|