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

本文详细介绍MTK X20开发板的Ubuntu系统安装、必要库文件安装、源代码下载与编译过程,并分享了X20开发板的系统更新及运行经验。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.youkuaiyun.com/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摄像头驱动做准备。





1,gxwz.fla 光线文字(33KB) 2,hrwz.zip 环绕旋转字(5KB) 3,kzfwz.zip 空中飞舞字(6KB) 4,sdwz.zip 闪电文字(6KB) 5,sjlz2.zip 数据流字(8KB) 6,twfz1.zip 天外飞字1(5KB) 7,twfz2.zip 天外飞字2(5KB) 8,fydwz.zip 发烟的文字(110KB) 9,szdwx.zip 水中的文字(5KB) 10,zzwz.zip 遮罩文字(4KB) 11,bdz.zip 飘动字(3KB) 12,ltz.zip 立体字(8KB) 13,jgz1.zip 激光字(7KB) 14,jgz1-2.zip 激光字2(7KB) 15,twfz3.zip 天外飞字3(4KB) 16,ycpz.zip 洋葱皮字(6KB) 17,fswz.zip 飞闪文字(17KB) 18,xzdwz.zip 旋转的文字(30KB) 19,bzz.zip 爆炸字(5KB) 20,cyz.zip 残影字(6KB) 21,dyz1.zip 叠影字(6KB) 22,fxz.zip 飞絮字(5KB) 23,fcz.zip 风吹字(4KB) 24,sbz.zip 水波字(6KB) 25,xwz.zip 旋涡字(5KB) 26,zgwz.zip 烛光文字(5KB) 27,3dgs.zip 3D跟随(9KB) 28,xxsb.zip 线性鼠标(5KB)<End. 29,scyw.zip 色彩烟雾(119KB) 30,bssb.zip 变色鼠标(5KB) 31,zzsb.zip 遮罩鼠标(4KB) 32,sbgs7.zip 文字跟随1(5KB) 33,wzgs.zip 文字跟随2(5KB) 34,kzgm.zip 控制光芒(6KB) 35,zlwz.zip 坠落文字(6KB) 36,shiny.zip 很cool的文字演示(109KB) 37,hekt.zip 又一款飞行文字,短小精悍,先看看吧;(5KB) 38,maskzoom.zip 一款流动的文字,做法简单,效果不错,值得推荐;(3KB) 39,wraptext.zip 转动文字 模拟文字围绕Y 轴作旋转,一个简单的动画;(3KB) 40,mech.zip 液晶文字 有点像是从液晶显示屏显示出来的文字效果,动感方面也做的不错;(9KB) 41,superholo.zip 3D文字 立体效果应该不是FLASH 做出来的,利用其他的软件把文体做好,然后再导入FLASH 里输出成动画;(103KB) 42,around.zip 旋转文字 一款文字围绕球体旋转,产生立体效果的动画;(4KB) 43,bigm.zip 摇摇字 其实是个3D立体字,背景文字的旋转效果很好看;(44KB) 44,wind.zip 风吹文字 文字随风而起,然后又落下,不要以为是SWISH 做的,看看源码就知道作者是花了不少心思的;(10KB) 45,emboss.zip 立体文字 教你怎么做一种立体文字的方法,源码内容是些简单的E 文;(4KB) 46,thematrix.zip 瀑布文字 一种简单,易做,效果又好的文字效果;用做背景相当不错;(10KB) 47,RotatingWords.zip 滚动文字 产生一种纵向的旋转效果,其实做法很简单,一看源码你就清楚啦;(4KB) 48,neontext.zip 霓虹文字效果;(3KB) 49,windblown.zip 风吹文字 类似SWISH 里面文字随风落下、随风飞起的效果,附带具体说明(不过是E文的);(12KB) 50,letters-Ehtesham.zip 立体字 旋转的立体文字,是利用其他软件制作好AI路径,然后导入FLASH中来完成动画;(50KB) 51,sparkletext.zip 速度文字 运用MASK 制作出来的一种运动文字效果,与瀑布文字有异曲同工之处;(24KB) 52,swirl.zip 扭曲 文字被强行扭曲180度的效果;(3KB) 53,textlights2.zip 大光灯文字 很棒的一种文字效果,文字被模拟成探照灯一样在夜空中扫来扫去,这款文字在晃动的过程中还会转换颜色;(5KB) 54,spheretext.zip 大光灯文字 很棒的一种文字效果,如同夜晚探照灯在夜空扫来扫去;(67KB) 55,shexian700-400-eff.zip 射线文字效果 文字出现的边缘有射线射出,很酷的效果(8KB) 56,fei.zip 飞行文字 动画中使用ACTION来控制键盘输入的文字,使文字按两种预设的效果来生成动画;(6KB) 57,input.zip 文字输入 在FLASH 的键盘里输入文字,然后将其变成动画的内容;(20KB) 58,scroltext400-300-app.zip 滚动文字 就象是按下网鼠中间的滑轮,上下滚动网页一样的效果(5KB) 59,200142102101.zip 字体辉光效果这是一个比较酷(炫)的特殊效果,最早出现在 Ray Of Light 网站,现在您也可以试一下辉光的效果了!快快动手吧(8KB) 60,2000121902101.zip Flash 5 点阵汉字特效这是一个用点阵方式的汉字实现的一些效果的集合,如果您自己动手会制作出惊人的东西(16KB) 61,2000121802102.zip 激光字 一个老的效果:用激光来写字,关心特殊效果的朋友一定要看看(6KB)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值