6x_bootscript.txt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. setenv bootargs ''
  2. if itest.s x6SX == "x${cpu}" || itest.s x7D == "x${cpu}"; then
  3. a_script=0x80800000
  4. a_zImage=0x80800000
  5. a_fdt=0x83000000
  6. m4=''
  7. if itest.s "x1" == "x$m4enabled" ; then
  8. run m4boot;
  9. m4='-m4';
  10. fi
  11. else
  12. a_script=0x10800000
  13. a_zImage=0x10800000
  14. a_fdt=0x13000000
  15. fi
  16. setenv initrd_high 0xffffffff
  17. if itest.s "x" == "x${dtbname}" ; then
  18. if itest.s x6SOLO == "x${cpu}" ; then
  19. dtbname=imx6dl-${board}.dtb;
  20. elif itest.s x6DL == "x${cpu}" ; then
  21. dtbname=imx6dl-${board}.dtb;
  22. elif itest.s x6QP == "x${cpu}" ; then
  23. dtbname=imx6qp-${board}.dtb;
  24. elif itest.s x6SX == "x${cpu}" ; then
  25. dtbname=imx6sx-${board}${m4}.dtb;
  26. elif itest.s x7D == "x${cpu}" ; then
  27. dtbname=imx7d-${board}${m4}.dtb;
  28. else
  29. dtbname=imx6q-${board}.dtb;
  30. fi
  31. fi
  32. if load ${dtype} ${disk}:1 ${a_script} uEnv.txt ; then
  33. env import -t ${a_script} ${filesize}
  34. fi
  35. if itest.s x == x${bootdir} ; then
  36. bootdir=/boot/
  37. fi
  38. if itest.s x${bootpart} == x ; then
  39. bootpart=1
  40. fi
  41. if load ${dtype} ${disk}:${bootpart} ${a_fdt} ${bootdir}${dtbname} ; then
  42. fdt addr ${a_fdt}
  43. setenv fdt_high 0xffffffff
  44. else
  45. echo "!!!! Error loading ${bootdir}${dtbname}";
  46. exit;
  47. fi
  48. cmd_xxx_present=
  49. fdt resize
  50. if itest.s "x" != "x${cmd_custom}" ; then
  51. run cmd_custom
  52. cmd_xxx_present=1;
  53. fi
  54. if itest.s "x" != "x${cmd_hdmi}" ; then
  55. run cmd_hdmi
  56. cmd_xxx_present=1;
  57. if itest.s x == x${allow_noncea} ; then
  58. setenv bootargs ${bootargs} mxc_hdmi.only_cea=1;
  59. echo "only CEA modes allowed on HDMI port";
  60. else
  61. setenv bootargs ${bootargs} mxc_hdmi.only_cea=0;
  62. echo "non-CEA modes allowed on HDMI, audio may be affected";
  63. fi
  64. fi
  65. if itest.s "x" != "x${cmd_lcd}" ; then
  66. run cmd_lcd
  67. cmd_xxx_present=1;
  68. fi
  69. if itest.s "x" != "x${cmd_lvds}" ; then
  70. run cmd_lvds
  71. cmd_xxx_present=1;
  72. fi
  73. if itest.s "x" != "x${cmd_lvds2}" ; then
  74. run cmd_lvds2
  75. cmd_xxx_present=1;
  76. fi
  77. if itest.s "x" == "x${cmd_xxx_present}" ; then
  78. echo "!!!!!!!!!!!!!!!!"
  79. echo "warning: your u-boot may be outdated, please upgrade"
  80. echo "!!!!!!!!!!!!!!!!"
  81. fi
  82. setenv bootargs "${bootargs} console=${console},115200 vmalloc=400M consoleblank=0 rootwait fixrtc"
  83. bpart=1
  84. if test "sata" = "${dtype}" ; then
  85. setenv bootargs "${bootargs} root=/dev/sda${bpart}" ;
  86. elif test "usb" = "${dtype}" ; then
  87. setenv bootargs "${bootargs} root=/dev/sda${bpart}" ;
  88. else
  89. setenv bootargs "${bootargs} root=/dev/mmcblk${disk}p${bpart}"
  90. fi
  91. if itest.s "x" != "x${disable_giga}" ; then
  92. setenv bootargs ${bootargs} fec.disable_giga=1
  93. fi
  94. if itest.s "x" != "x${wlmac}" ; then
  95. setenv bootargs ${bootargs} wlcore.mac=${wlmac}
  96. fi
  97. if itest.s "x" != "x${gpumem}" ; then
  98. setenv bootargs ${bootargs} galcore.contiguousSize=${gpumem}
  99. fi
  100. if itest.s "x" != "x${cma}" ; then
  101. setenv bootargs ${bootargs} cma=${cma}
  102. fi
  103. if itest.s "x" != "x${show_fdt}" ; then
  104. fdt print /
  105. fi
  106. if itest.s "x" != "x${show_env}" ; then
  107. printenv
  108. fi
  109. if load ${dtype} ${disk}:${bootpart} ${a_zImage} ${bootdir}/zImage ; then
  110. bootz ${a_zImage} - ${a_fdt}
  111. fi
  112. echo "Error loading kernel image"