mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
18 lines
633 B
Plaintext
18 lines
633 B
Plaintext
|
# Determine root device
|
||
|
setexpr rootpart ${distro_bootpart} + 1
|
||
|
if test ${devtype} = mmc -a ${devnum} = 0; then
|
||
|
setenv rootdev /dev/mmcblk0p${rootpart}
|
||
|
elif test ${devtype} = scsi -a ${devnum} = 0; then
|
||
|
setenv rootdev /dev/sda${rootpart}
|
||
|
else
|
||
|
# New U-Boot only
|
||
|
part uuid ${devtype} ${devnum}:${rootpart} uuid
|
||
|
setenv rootdev PARTUUID=${uuid}
|
||
|
fi
|
||
|
setenv bootargs earlyprintk console=ttyS0,115200 root=${rootdev} rootfstype=auto rootwait
|
||
|
|
||
|
# Load and boot
|
||
|
load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} @DTB@.dtb
|
||
|
load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} zImage
|
||
|
bootz ${kernel_addr_r} - ${fdt_addr_r}
|