Advertisement
Guest User

Untitled

a guest
Nov 16th, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. boot script
  2. setenv bootargs ''
  3.  
  4. a_script=0x10800000
  5. a_zImage=0x10800000
  6. a_fdt=0x13000000
  7. a_ramdisk=0x13800000
  8. a_initrd=0x13a00000
  9.  
  10. setenv initrd_high 0xffffffff
  11. if itest.s x6SX == "x${cpu}" ; then
  12. a_script=0x80800000
  13. a_zImage=0x80800000
  14. a_fdt=0x83000000
  15. a_ramdisk=0x83800000
  16. a_initrd=0x83a00000
  17. fi
  18.  
  19. if itest.s "x" == "x${dtbname}" ; then
  20. if itest.s x6SOLO == "x${cpu}" ; then
  21. dtbname=imx6dl-${board}.dtb;
  22. elif itest.s x6DL == "x${cpu}" ; then
  23. dtbname=imx6dl-${board}.dtb;
  24. elif itest.s x6SX == "x${cpu}" ; then
  25. dtbname=imx6sx-${board}.dtb;
  26. else
  27. dtbname=imx6q-${board}.dtb;
  28. fi
  29. fi
  30.  
  31.  
  32. if load ${dtype} ${disk}:1 ${a_script} uEnv.txt ; then
  33. env import -t ${a_script} ${filesize}
  34. fi
  35.  
  36. if itest.s x == x${bootdir} ; then
  37. bootdir=/
  38. fi
  39.  
  40. if itest.s x${bootpart} == x ; then
  41. bootpart=1
  42. fi
  43.  
  44. if load ${dtype} ${disk}:${bootpart} ${a_fdt} ${bootdir}${dtbname} ; then
  45. fdt addr ${a_fdt}
  46. setenv fdt_high 0xffffffff
  47. else
  48. echo "!!!! Error loading ${bootdir}${dtbname}";
  49. exit;
  50. fi
  51.  
  52.  
  53. # first enable tfp410
  54. i2c dev 1
  55. i2c mw 38 8.1 bd
  56.  
  57.  
  58. cmd_xxx_present=
  59. fdt resize
  60. if itest.s "x" != "x${cmd_custom}" ; then
  61. run cmd_custom
  62. cmd_xxx_present=1;
  63. fi
  64.  
  65. if itest.s "x" != "x${cmd_hdmi}" ; then
  66. run cmd_hdmi
  67. cmd_xxx_present=1;
  68. if itest.s x == x${allow_noncea} ; then
  69. setenv bootargs ${bootargs} mxc_hdmi.only_cea=1;
  70. echo "only CEA modes allowed on HDMI port";
  71. else
  72. setenv bootargs ${bootargs} mxc_hdmi.only_cea=0;
  73. echo "non-CEA modes allowed on HDMI, audio may be affected";
  74. fi
  75. fi
  76.  
  77. if itest.s "x" != "x${cmd_lcd}" ; then
  78. run cmd_lcd
  79. cmd_xxx_present=1;
  80. fi
  81. if itest.s "x" != "x${cmd_lvds}" ; then
  82. run cmd_lvds
  83. cmd_xxx_present=1;
  84. fi
  85. if itest.s "x" != "x${cmd_lvds2}" ; then
  86. run cmd_lvds2
  87. cmd_xxx_present=1;
  88. fi
  89.  
  90. if itest.s "x" == "x${cmd_xxx_present}" ; then
  91. echo "!!!!!!!!!!!!!!!!"
  92. echo "warning: your u-boot may be outdated, please upgrade"
  93. echo "!!!!!!!!!!!!!!!!"
  94. fi
  95.  
  96. setenv bootargs "${bootargs} console=${console},115200 vmalloc=400M consoleblank=0 rootwait fixrtc"
  97.  
  98.  
  99. bpart=2
  100.  
  101. if test "sata" = "${dtype}" ; then
  102. setenv bootargs "${bootargs} root=/dev/sda${bpart}" ;
  103. elif test "usb" = "${dtype}" ; then
  104. setenv bootargs "${bootargs} root=/dev/sda${bpart}" ;
  105. else
  106. setenv bootargs "${bootargs} root=/dev/mmcblk${disk}p${bpart}"
  107. fi
  108.  
  109. if itest.s "x" != "x${disable_giga}" ; then
  110. setenv bootargs ${bootargs} fec.disable_giga=1
  111. fi
  112.  
  113. if itest.s "x" != "x${wlmac}" ; then
  114. setenv bootargs ${bootargs} wlcore.mac=${wlmac}
  115. fi
  116.  
  117. if itest.s "x" != "x${gpumem}" ; then
  118. setenv bootargs ${bootargs} galcore.contiguousSize=${gpumem}
  119. fi
  120.  
  121. if itest.s "x" != "x${cma}" ; then
  122. setenv bootargs ${bootargs} cma=${cma}
  123. fi
  124.  
  125. if itest.s "x" != "x${show_fdt}" ; then
  126. fdt print /
  127. fi
  128.  
  129. if itest.s "x" != "x${show_env}" ; then
  130. printenv
  131. fi
  132.  
  133. if load ${dtype} ${disk}:${bootpart} ${a_zImage} /zImage ; then
  134. bootz ${a_zImage} - ${a_fdt}
  135. fi
  136. echo "Error loading kernel image"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement