mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 01:11:14 +00:00
9f0d882680
fdt_addr and kernel_addr variables are getting obsolete in the mainline u-boot in favor of fdt_addr_r and kernel_addr_r. By checking if the new variables exist, we can make sure that devices with newer version of u-boot will work while not breaking support for the existing ones. Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr> Acked-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
25 lines
487 B
Plaintext
25 lines
487 B
Plaintext
setenv bootargs "root=PARTUUID=@ROOT@-02 rw rootwait"
|
|
|
|
if test -n "${console}"; then
|
|
setenv bootargs "${bootargs} ${console}"
|
|
fi
|
|
|
|
if mmc dev 0; then
|
|
setenv mmcdev 0
|
|
elif mmc dev 1; then
|
|
setenv mmcdev 1
|
|
fi
|
|
|
|
if test -n "${fdt_addr_r}"; then
|
|
setenv fdt_addr ${fdt_addr_r}
|
|
fi
|
|
|
|
if test -n "${kernel_addr_r}"; then
|
|
setenv kernel_addr ${kernel_addr_r}
|
|
fi
|
|
|
|
load mmc ${mmcdev}:1 ${fdt_addr} @DTB@.dtb
|
|
load mmc ${mmcdev}:1 ${kernel_addr} Image
|
|
|
|
booti ${kernel_addr} - ${fdt_addr}
|