bootscript-solidrun_cubox-i 970 B

12345678910111213141516171819202122232425262728293031
  1. echo "CuBox OpenWrt Boot script"
  2. # Set console variable for both UART and HDMI
  3. setenv console console=ttymxc0,115200 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32
  4. # Find correct dtb
  5. if test ${board_rev} = MX6DL; then
  6. setenv fdt_soc_type imx6dl;
  7. elif test ${board_rev} = MX6Q; then
  8. setenv fdt_soc_type imx6q;
  9. fi
  10. if test ${board_name} = CUBOXI; then
  11. setenv fdt_name ${fdt_soc_type}-cubox-i.dtb;
  12. elif test ${board_name} = HUMMINGBOARD; then
  13. setenv fdt_name ${fdt_soc_type}-hummingboard.dtb;
  14. fi
  15. # Set correct devtype and partition
  16. if test ${devtype} != mmc; then setenv devtype mmc; fi
  17. if mmc dev 0; then
  18. setenv mmcdev 0
  19. elif mmc dev 1; then
  20. setenv mmcdev 1
  21. fi
  22. # Boot from the SD card is supported at the moment
  23. setenv bootargs "${console} root=/dev/mmcblk1p2 rw rootwait"
  24. mmc dev ${mmcdev}
  25. load ${devtype} ${mmcdev}:${devplist} ${kernel_addr_r} /uImage
  26. load ${devtype} ${mmcdev}:${devplist} ${fdt_addr_r} /${fdt_name}
  27. bootz ${kernel_addr_r} - ${fdt_addr_r}