【ZT】MTX20开发环境搭建,源代码下载、编译、xflash下载、运行!!!!

https://bbs.alpha-star.org/activity-release/%E3%80%90mediatek-x20%E5%BC%80%E5%8F%91%E6%9D%BF%E8%AF%95%E7%94%A8%E4%BD%93%E9%AA%8C%E3%80%912-mtx20%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA%EF%BC%8C%E6%BA%90%E4%BB%A3%E7%A0%81%E4%B8%8B

https://blog.csdn.net/panbiao1999/article/details/77339961

MTX20开发环境搭建,源代码下载、编译、xflash下载、运行

极客社区对于开发环境搭建,源代码下载、编译、xflash下载、运行都给出了详细的说明,我这里只是照着做一遍。
一)ubuntu系统安装,本着一切一样的原则,这次自己安装了开发板要求的ubuntu版本ubuntu14.04 64位。

然后是install一些必须的库文件。
 
二)源代码下载方法:可以任选一种,注意编译前安装要求将kernel和sla中的代码正确拷贝。

  1. 1. AOSP
  2. repo init -u   https://android.googlesource.com/platform/manifest   -b android-6.0.0_r1
  3. Repo sync –j16
  4. 2. Linux
  5. https://github.com/helio-x20/linux/tree/helio-x20
  6. 3. SLA
  7. https://builds.96boards.org/releases/helio-x20/mediatek/aosp/latest/
  8. 目录下的mediatek-x20-aosp-16.10-source.tar.xz文件(解压缩后会有SLA.tar.gz)。
  9. 编译方案:
  10. 1、将AOSP代码解压(如果是repo获得可以忽略此步骤)
  11. 2、获取Linux代码后mv到AOSP目录下重命名为kernel-3.18
  12. 3、解压开SLA,覆盖相应文件
  13. 即可获得全套可以编译X20-Board代码。
  14. 国内用户的福音
  15. 你还在为翻墙而烦恼吗?百度云Link来啦。
  16. 1、AOSP
  17. 链接: http://pan.baidu.com/s/1boAZqJt 密码:mooh
  18. 2、Kernel
  19. 链接: http://pan.baidu.com/s/1o8IuBUU 密码:9ys6
  20. 3、SLA
  21. https://builds.96boards.org/releases/helio-x20/mediatek/aosp/latest/
  22. 目录下的mediatek-x20-aosp-16.10-source.tar.xz文件(解压缩后会有SLA.tar.gz)

复制代码

三)源代码编译
 
 

 
 
 
将近3个小时,不能使用小型机每次完全编译android源代码的时间够长啊。
四)更新系统并运行
How-To-Download-By-Xflash.pdf文档说的很清楚,仔细参照文档来做应该没有问题。下面是更新的全部log。

  1. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win>xflash.exe
  2. enter-fastboot F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin
  3. win\FES\MT6797_Android_scatter.txt
  4. START.
  5. wait for device.
  6. connect boot rom.
  7. boot from preloader.
  8. download required partition images.
  9. #1 write to lk
  10. #2 write to logo
  11. #3 write to tee1
  12. jump to: tee1
  13. END.
  14. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win>cd F:\Medi
  15. TekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img
  16. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>xflash
  17. bat
  18. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>fastbo
  19. t devices
  20. 0123456789ABCDEF        fastboot
  21. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>fastbo
  22. t flash gpt PGPT
  23. target reported max download size of 134217728 bytes
  24. sending 'gpt' (16 KB)...
  25. OKAY [  0.138s]
  26. writing 'gpt'...
  27. OKAY [  0.050s]
  28. finished. total time: 0.191s
  29. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>fastbo
  30. t flash preloader preloader_amt6797_64_open.bin
  31. target reported max download size of 134217728 bytes
  32. sending 'preloader' (170 KB)...
  33. OKAY [  0.144s]
  34. writing 'preloader'...
  35. OKAY [  0.033s]
  36. finished. total time: 0.179s
  37. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>fastbo
  38. t flash recovery recovery.img
  39. target reported max download size of 134217728 bytes
  40. sending 'recovery' (10338 KB)...
  41. OKAY [  0.494s]
  42. writing 'recovery'...
  43. OKAY [  0.295s]
  44. finished. total time: 0.792s
  45. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>fastbo
  46. t flash scp1 tinysys-scp.bin
  47. target reported max download size of 134217728 bytes
  48. sending 'scp1' (50 KB)...
  49. OKAY [  0.139s]
  50. writing 'scp1'...
  51. OKAY [  0.014s]
  52. finished. total time: 0.158s
  53. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>fastbo
  54. t flash scp2 tinysys-scp.bin
  55. target reported max download size of 134217728 bytes
  56. sending 'scp2' (50 KB)...
  57. OKAY [  0.143s]
  58. writing 'scp2'...
  59. OKAY [  0.012s]
  60. finished. total time: 0.157s
  61. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>fastbo
  62. t flash lk lk.bin
  63. target reported max download size of 134217728 bytes
  64. sending 'lk' (433 KB)...
  65. OKAY [  0.152s]
  66. writing 'lk'...
  67. OKAY [  0.022s]
  68. finished. total time: 0.177s
  69. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>fastbo
  70. t flash lk2 lk.bin
  71. target reported max download size of 134217728 bytes
  72. sending 'lk2' (433 KB)...
  73. OKAY [  0.152s]
  74. writing 'lk2'...
  75. OKAY [  0.022s]
  76. finished. total time: 0.178s
  77. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>fastbo
  78. t flash boot boot.img
  79. target reported max download size of 134217728 bytes
  80. sending 'boot' (9290 KB)...
  81. OKAY [  0.459s]
  82. writing 'boot'...
  83. OKAY [  0.254s]
  84. finished. total time: 0.715s
  85. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>fastbo
  86. t flash logo logo.bin
  87. target reported max download size of 134217728 bytes
  88. sending 'logo' (1519 KB)...
  89. OKAY [  0.191s]
  90. writing 'logo'...
  91. OKAY [  0.050s]
  92. finished. total time: 0.244s
  93. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>fastbo
  94. t flash tee1 trustzone.bin
  95. target reported max download size of 134217728 bytes
  96. sending 'tee1' (80 KB)...
  97. OKAY [  0.140s]
  98. writing 'tee1'...
  99. OKAY [  0.010s]
  100. finished. total time: 0.153s
  101. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>fastbo
  102. t flash tee2 trustzone.bin
  103. target reported max download size of 134217728 bytes
  104. sending 'tee2' (80 KB)...
  105. OKAY [  0.142s]
  106. writing 'tee2'...
  107. OKAY [  0.010s]
  108. finished. total time: 0.155s
  109. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>fastbo
  110. t flash system system.img
  111. target reported max download size of 134217728 bytes
  112. erasing 'system'...
  113. OKAY [  0.378s]
  114. sending sparse 'system' (131067 KB)...
  115. OKAY [  5.404s]
  116. writing 'system'...
  117. OKAY [ 31.992s]
  118. sending sparse 'system' (128418 KB)...
  119. OKAY [  5.043s]
  120. writing 'system'...
  121. OKAY [ 12.043s]
  122. sending sparse 'system' (131046 KB)...
  123. OKAY [  5.119s]
  124. writing 'system'...
  125. OKAY [ 14.777s]
  126. sending sparse 'system' (125743 KB)...
  127. OKAY [  4.967s]
  128. writing 'system'...
  129. OKAY [ 16.741s]
  130. sending sparse 'system' (130638 KB)...
  131. OKAY [  5.302s]
  132. writing 'system'...
  133. OKAY [ 29.249s]
  134. sending sparse 'system' (32097 KB)...
  135. OKAY [  1.392s]
  136. writing 'system'...
  137. OKAY [  7.141s]
  138. finished. total time: 139.688s
  139. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>fastbo
  140. t flash cache cache.img
  141. target reported max download size of 134217728 bytes
  142. erasing 'cache'...
  143. OKAY [  0.078s]
  144. sending 'cache' (8832 KB)...
  145. OKAY [  0.432s]
  146. writing 'cache'...
  147. OKAY [  1.424s]
  148. finished. total time: 1.937s
  149. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>fastbo
  150. t flash userdata userdata.img
  151. target reported max download size of 134217728 bytes
  152. erasing 'userdata'...
  153. OKAY [  0.429s]
  154. sending 'userdata' (54109 KB)...
  155. OKAY [  2.099s]
  156. writing 'userdata'...
  157. OKAY [  6.081s]
  158. finished. total time: 8.634s
  159. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>fastbo
  160. t reboot
  161. rebooting...
  162. finished. total time: 0.003s
  163. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>pause
  164. 请按任意键继续. . .
  165. F:\MediaTekX20\mediatek-x20-aosp-16.10\Images\X-Flash\xflash\bin\win\img>

复制代码

系统成功后系统会自动进入系统,我这里没有触摸屏,所必须使用usb鼠标,所以更新完成后需要断电设置usb的模式。
https://bbs.alpha-star.org/hardware/helio-x20-development-board-usb%E9%80%9A%E9%81%93%E5%88%87%E6%8D%A2这个帖子说的很清楚,照着做就是。 
 
注意:需要下载的时间时候将3拨到红线方向,需要使用usb鼠标的时候将3拨到黄线方向。
这里吐槽一下,这种方式比那种按住某个按键(比如声音+按键)后可以进入fastboot的方式可操作性差了许多!
 
 
 
看一下设置的信息,验证运行中的系统是我们编译的img。
下面会先加载一个驱动到Kernel中,熟悉一下DTS方式下驱动如何在Android内核中编译和加载,为后面添加USB摄像头驱动做准备。





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值