2018-07-09 09:09:53 +00:00
|
|
|
echo "CuBox OpenWrt Boot script"
|
|
|
|
|
|
|
|
# Set console variable for both UART and HDMI
|
|
|
|
setenv console console=ttymxc0,115200 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32
|
|
|
|
|
|
|
|
# Find correct dtb
|
2018-08-26 18:04:08 +00:00
|
|
|
if test ${board_rev} = MX6DL; then
|
|
|
|
setenv fdt_soc_type imx6dl;
|
|
|
|
elif test ${board_rev} = MX6Q; then
|
|
|
|
setenv fdt_soc_type imx6q;
|
|
|
|
fi
|
|
|
|
if test ${board_name} = CUBOXI; then
|
|
|
|
setenv fdt_name ${fdt_soc_type}-cubox-i.dtb;
|
|
|
|
elif test ${board_name} = HUMMINGBOARD; then
|
|
|
|
setenv fdt_name ${fdt_soc_type}-hummingboard.dtb;
|
2018-07-09 09:09:53 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Set correct devtype and partition
|
|
|
|
if test ${devtype} != mmc; then setenv devtype mmc; fi
|
|
|
|
if mmc dev 0; then
|
|
|
|
setenv mmcdev 0
|
|
|
|
elif mmc dev 1; then
|
|
|
|
setenv mmcdev 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Boot from the SD card is supported at the moment
|
2018-08-26 18:04:08 +00:00
|
|
|
setenv bootargs "${console} root=/dev/mmcblk1p2 rw rootwait"
|
2018-07-09 09:09:53 +00:00
|
|
|
mmc dev ${mmcdev}
|
2018-08-26 18:04:08 +00:00
|
|
|
load ${devtype} ${mmcdev}:${devplist} ${kernel_addr_r} /uImage
|
|
|
|
load ${devtype} ${mmcdev}:${devplist} ${fdt_addr_r} /${fdt_name}
|
2018-07-09 09:09:53 +00:00
|
|
|
bootz ${kernel_addr_r} - ${fdt_addr_r}
|