{"id":520,"date":"2023-10-22T15:24:03","date_gmt":"2023-10-22T07:24:03","guid":{"rendered":"https:\/\/vm1.go2see.me\/?p=520"},"modified":"2023-10-22T16:12:25","modified_gmt":"2023-10-22T08:12:25","slug":"t-head-%e7%9a%84android-13%e5%bb%ba%e6%a7%8b","status":"publish","type":"post","link":"https:\/\/vm1.go2see.me\/?p=520","title":{"rendered":"T-HEAD \u7684Android 13\u5efa\u69cb"},"content":{"rendered":"<h1>T-HEAD \u7684Android 13\u5efa\u69cb<\/h1>\n<blockquote>\n<p><a href=\"https:\/\/gitee.com\/thead-android\/thead-android\/blob\/master\/README.md\">https:\/\/gitee.com\/thead-android\/thead-android\/blob\/master\/README.md<\/a><\/p>\n<p><a href=\"https:\/\/item.taobao.com\/item.htm?spm=a21n57.1.0.0.30d8523cpAuhQq&amp;id=715508771884&amp;ns=1&amp;abbucket=12#detail\">https:\/\/item.taobao.com\/item.htm?spm=a21n57.1.0.0.30d8523cpAuhQq&#038;id=715508771884&#038;ns=1&#038;abbucket=12#detail<\/a><\/p>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=Na6PT4npsMg\">https:\/\/www.youtube.com\/watch?v=Na6PT4npsMg<\/a><\/p>\n<p>The Lichee Pi 4A Wiki is here: <a href=\"https:\/\/www.youtube.com\/redirect?event=video_description&amp;redir_token=QUFFLUhqbTRhdGZHX3JENEotUFlsNk4xLUllbGRQVE9LQXxBQ3Jtc0tsZWhhbG9BeTBqMGZ4TUgydmhEN3RKTGgwMzgwaEEyRENXQlF2b09xMURucG5uRkhaNWloUW1UTGRnQVJ2ZTZYb1pfT2cyVmVaWlNKRmJBY2gyQ0Q2RENoY3R3M0ZLeFFrdU5HQy05SDVrd2xtN2c3MA&amp;q=https%3A%2F%2Fwiki.sipeed.com%2Fhardware%2Fen%2Flichee%2Fth1520%2Flpi4a%2F1_intro.html&amp;v=Na6PT4npsMg\">https:\/\/wiki.sipeed.com\/hardware\/en\/l&#8230;<\/a> <\/p>\n<p>And the VisionFive 2 Debian June 2023 Wiki is here: <a href=\"https:\/\/www.youtube.com\/redirect?event=video_description&amp;redir_token=QUFFLUhqbE5CLUpEYkRlYjdTZDlZQzVHTk5OSmliX1dYd3xBQ3Jtc0tuX2F4ZkxxN3NiYi1NQ0hlczI4OVpDWW5QV3RadHktbURKazdicnpIV1JFNkpXY1EyUUR4c1hDN0ZaY0liNU8tdlYxWHBtb21KWnZkX2ZPWlAzUUZhdV9yVUtKTTFxNU91bEtaVm14N0FTQ1N1T3Exaw&amp;q=https%3A%2F%2Frvspace.org%2Fen%2Fproject%2FVisionFive2_Debian_Wiki_202306_Release&amp;v=Na6PT4npsMg\">https:\/\/rvspace.org\/en\/project\/Vision&#8230;<\/a> <\/p>\n<\/blockquote>\n<h2>1. \u53d6\u5f97Gitee\u5167\u7684\u5009\u5eab\uff1a<\/h2>\n<p>\u5c06\u5b89\u5353\u5f00\u6e90\u9879\u76ee(\u4e3b\u7ebf\u7248\u672c)\u548c\u5f00\u53d1\u677f\u652f\u6301\u6e90\u4ee3\u7801\u4e0b\u8f7d\u5230\u5de5\u4f5c\u76ee\u5f55,\u4f7f\u7528\u56fa\u5b9a\u7248\u672c\u4e0a\u6e38\u4ee3\u7801:<\/p>\n<blockquote>\n<p>cyue test 2023-9-4:  gitee 2023-7-7 \u7248\u672c\u53ef\u7de8\u8b6f\u6210\u529f\u3002<\/p>\n<\/blockquote>\n<pre><code class=\"language-shell\">mkdir riscv-android-src &amp;&amp; cd riscv-android-src\nrepo init -u https:\/\/gitee.com\/thead-android\/local_manifests.git -b main_2023_7_7\ngit clone https:\/\/gitee.com\/thead-android\/local_manifests.git .repo\/local_manifests -b thead-android-community\nrepo sync <\/code><\/pre>\n<p>\u4f7f\u7528\u6700\u65b0\u7248\u672c\u4e0a\u6e38\u4ee3\u7801\uff0c\u53ef\u80fd\u4f1a\u7531\u4e8e\u517c\u5bb9\u6027\u5bfc\u81f4\u4e00\u4e9b\u7f16\u8bd1\u95ee\u9898:<\/p>\n<blockquote>\n<p>cyue test: \u78ba\u5be6\u4f7f\u7528AOSP\u7121\u6cd5\u7de8\u8b6f\u904e\u3002<\/p>\n<\/blockquote>\n<pre><code class=\"language-shell\"># \u6a19\u6e96 AOSP master repo\nmkdir riscv-android-src &amp;&amp; cd riscv-android-src\nrepo init -u https:\/\/android.googlesource.com\/platform\/manifest -b master\n# \u6dfb\u52a0 THEAD source code repo\ngit clone https:\/\/gitee.com\/thead-android\/local_manifests.git .repo\/local_manifests -b thead-android-community\nrepo sync -j 20<\/code><\/pre>\n<p>(\u5927\u9678 git mirror)\u82e5\u65e0\u6cd5\u8fde\u63a5google\u6e90\u53ef\u4f7f\u7528\u6e05\u534e\u6e90\u955c\u50cf\uff1a<\/p>\n<pre><code class=\"language-shell\">export REPO_URL=&#039;https:\/\/mirrors.tuna.tsinghua.edu.cn\/git\/git-repo\/&#039;<\/code><\/pre>\n<h2>2. \u5b89\u88dd\u5230\u958b\u767c\u677f<\/h2>\n<h3>2.a \u4f7f\u7528 BeagleV Ahead \u958b\u767c\u677f<\/h3>\n<p>\u5b8c\u6210\u4e0b\u8f7d\u540e\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5bf9\u7cfb\u7edf\u8fdb\u884c\u6784\u5efa<\/p>\n<pre><code class=\"language-shell\">source build\/envsetup.sh\nlunch beaglev_ahead-userdebug\nm -j<\/code><\/pre>\n<p>\u7f16\u8bd1\u751f\u6210\u6587\u4ef6\u5982\u4e0b\u6240\u793a\uff0c\u53ef\u4ee5\u5c06\u9700\u8981\u7684\u6587\u4ef6\u62f7\u8d1d\u4f9bfastboot\u4f7f\u7528<\/p>\n<pre><code class=\"language-shell\">$ ls out\/target\/product\/beaglev_ahead\/*img\nout\/target\/product\/beaglev_ahead\/boot.img           out\/target\/product\/beaglev_ahead\/super_empty.img        out\/target\/product\/beaglev_ahead\/vendor_boot-debug.img\nout\/target\/product\/beaglev_ahead\/cache.img          out\/target\/product\/beaglev_ahead\/system.img             out\/target\/product\/beaglev_ahead\/vendor_boot-test-harness.img\nout\/target\/product\/beaglev_ahead\/dtb.img            out\/target\/product\/beaglev_ahead\/system_ext.img         out\/target\/product\/beaglev_ahead\/vendor_boot.img\nout\/target\/product\/beaglev_ahead\/dtbo-unsigned.img  out\/target\/product\/beaglev_ahead\/userdata.img           out\/target\/product\/beaglev_ahead\/vendor_ramdisk-debug.img\nout\/target\/product\/beaglev_ahead\/dtbo.img           out\/target\/product\/beaglev_ahead\/vbmeta.img             out\/target\/product\/beaglev_ahead\/vendor_ramdisk-test-harness.img\nout\/target\/product\/beaglev_ahead\/product.img        out\/target\/product\/beaglev_ahead\/vbmeta_system.img      out\/target\/product\/beaglev_ahead\/vendor_ramdisk.img\nout\/target\/product\/beaglev_ahead\/ramdisk.img        out\/target\/product\/beaglev_ahead\/vendor-bootconfig.img\nout\/target\/product\/beaglev_ahead\/super.img          out\/target\/product\/beaglev_ahead\/vendor.img\n\n$ mkdir fastboot\n$ cd out\/target\/product\/beaglev_ahead\/\n$ cp u-boot-with-spl.bin bootpart.ext4 boot.img super.img userdata.img vbmeta.img vbmeta_system.img vendor_boot.img ..\/..\/..\/..\/..\/fastboot\/<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/dav2.go2see.co\/md-pics\/beaglev-16979608133501.jpeg\" alt=\"beaglev\" \/><\/p>\n<h3>2.b \u4f7f\u7528 Lichee Pi 4A EVB \u958b\u767c\u677f<\/h3>\n<p>\u5b8c\u6210\u4e0b\u8f7d\u540e\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5bf9\u7cfb\u7edf\u8fdb\u884c\u6784\u5efa<\/p>\n<pre><code class=\"language-shell\">source build\/envsetup.sh\n#\u82e5\u4f7f\u7528Lichee Pi 4A\u5f00\u53d1\u677f\nlunch lichee_pi_4a-userdebug\nm -j<\/code><\/pre>\n<p>\u7f16\u8bd1\u751f\u6210\u6587\u4ef6\u5982\u4e0b\u6240\u793a\uff0c\u53ef\u4ee5\u5c06\u9700\u8981\u7684\u6587\u4ef6\u62f7\u8d1d\u4f9bfastboot\u4f7f\u7528<\/p>\n<pre><code class=\"language-shell\">$ ls out\/target\/product\/lichee_pi_4a\/*img\nout\/target\/product\/lichee_pi_4a\/boot.img           out\/target\/product\/lichee_pi_4a\/super_empty.img        out\/target\/product\/lichee_pi_4a\/vendor_boot-debug.img\nout\/target\/product\/lichee_pi_4a\/cache.img          out\/target\/product\/lichee_pi_4a\/system.img             out\/target\/product\/lichee_pi_4a\/vendor_boot-test-harness.img\nout\/target\/product\/lichee_pi_4a\/dtb.img            out\/target\/product\/lichee_pi_4a\/system_ext.img         out\/target\/product\/lichee_pi_4a\/vendor_boot.img\nout\/target\/product\/lichee_pi_4a\/dtbo-unsigned.img  out\/target\/product\/lichee_pi_4a\/userdata.img           out\/target\/product\/lichee_pi_4a\/vendor_ramdisk-debug.img\nout\/target\/product\/lichee_pi_4a\/dtbo.img           out\/target\/product\/lichee_pi_4a\/vbmeta.img             out\/target\/product\/lichee_pi_4a\/vendor_ramdisk-test-harness.img\nout\/target\/product\/lichee_pi_4a\/product.img        out\/target\/product\/lichee_pi_4a\/vbmeta_system.img      out\/target\/product\/lichee_pi_4a\/vendor_ramdisk.img\nout\/target\/product\/lichee_pi_4a\/ramdisk.img        out\/target\/product\/lichee_pi_4a\/vendor-bootconfig.img\nout\/target\/product\/lichee_pi_4a\/super.img          out\/target\/product\/lichee_pi_4a\/vendor.img\n\n$ mkdir fastboot\n$ cd out\/target\/product\/lichee_pi_4a\/\n$ mkdir fastboot\n$ cp bootpart.ext4 boot.img super.img userdata.img vbmeta.img vbmeta_system.img vendor_boot.img ..\/..\/..\/..\/..\/fastboot\/<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/dav2.go2see.co\/md-pics\/licheepi4a_connect.png\" alt=\"licheepi4a_connect\" \/><\/p>\n<p>\u56fe5. Lichee Pi 4A EVB \u8fde\u63a5<\/p>\n<p>\u5f00\u53d1\u677f\u4f7f\u7528\u4e3b\u8981\u9700\u8981\u8fde\u63a5\u7535\u6e90\u3001\u4e32\u53e3\u3001usb\u548c\u663e\u793a\uff1a<\/p>\n<ul>\n<li>\u4e32\u53e3\u4e3b\u8981\u7528\u4e8eU-boot\u548c\u5185\u6838\u4e2d\u7684\u547d\u4ee4\u4ea4\u4e92\uff0c\u53ef\u901a\u8fc7\u5e95\u677f\u4e0a GPIO \u7684 U0-RX \u548c U0-TX\u8fde\u63a5\uff0c\u6ce2\u7279\u7387\u4e3a115200<\/li>\n<li>USB Device\u63a5\u53e3\u4e3b\u8981\u7528\u4e8efastboot\u548cadb\u5de5\u5177\u7684\u8fde\u63a5<\/li>\n<li>MIPI DSI\/HDMI\u63a5\u53e3\u53ef\u4ee5\u4f7f\u7528\u4e8e\u8fde\u63a5\u5c4f\u5e55\u663e\u793aUI\u754c\u9762<\/li>\n<\/ul>\n<p>\u5bf9\u7cfb\u7edf\u8fdb\u884c\u5b8c\u6574\u70e7\u5199\u9700\u8981\u6309\u4f4f\u5f00\u53d1\u677f\u7684boot\u6309\u952e\u540c\u65f6\u6309\u590d\u4f4d\u952e\u8fdb\u5165boot\u70e7\u5199\u6a21\u5f0f\u3002<\/p>\n<p>\u4e4b\u540e\u4f7f\u7528fastboot\u5bf9\u7cfb\u7edf\u955c\u50cf\u8fdb\u884c\u70e7\u5199\uff0cadb\u548cfastboot\u5de5\u5177\u53ef\u4ee5\u8bbf\u95ee\u5b89\u5353\u5f00\u53d1\u8005\u7f51\u7ad9\u4e0b\u8f7d <a href=\"https:\/\/gitee.com\/link?target=https%3A%2F%2Fdeveloper.android.com%2Ftools%2Freleases%2Fplatform-tools\">https:\/\/developer.android.com\/tools\/releases\/platform-tools<\/a><\/p>\n<pre><code class=\"language-shell\">#\u70e7\u5f55uboot\u5e76\u521d\u59cb\u5316boot\u73af\u5883\u53d8\u91cf\nfastboot flash ram u-boot-with-spl.bin\nfastboot reboot\nfastboot flash uboot u-boot-with-spl.bin\n\n#\u70e7\u5f55\u5404\u4e2a\u5206\u533a\n#\u5728\u975eboot\u70e7\u5199\u6a21\u5f0f\uff0c\u53ef\u4ee5\u5728uboot\u7684\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u547d\u4ee4fastboot usb 0\uff0c\u5355\u72ec\u70e7\u5f55\u5206\u533a\nfastboot flash bootpart bootpart.ext4\nfastboot flash boot boot.img\nfastboot flash vendor_boot vendor_boot.img\nfastboot flash super super.img \nfastboot flash userdata userdata.img\nfastboot flash vbmeta vbmeta.img\nfastboot flash vbmeta_system vbmeta_system.img\n\n#\u521d\u59cb\u5316metadata\u548cmisc\u5206\u533a\nfastboot erase metadata \nfastboot erase misc<\/code><\/pre>\n<p>\u5f53\u5b8c\u6210\u70e7\u5199\u540e\u91cd\u65b0\u590d\u4f4d\u4e0a\u7535\u8fdb\u5165\u7cfb\u7edf\u542f\u52a8\u6a21\u5f0f,\u53ef\u4ee5\u901a\u8fc7\u4e32\u53e3\/ADB\u8bbf\u95ee\u7cfb\u7edf\u7684\u547d\u4ee4\u884c\uff0c\u5e76\u53ef\u901a\u8fc7\u89e6\u5c4f\u6216\u5916\u63a5HDMI\u663e\u793a\u7cfb\u7edf\u56fe\u50cf\u754c\u9762\u8fdb\u884c\u4ea4\u4e92\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/gitee.com\/thead-android\/thead-android\/raw\/master\/resources\/licheepi4a_aosp.png\" alt=\"licheepi4a_aosp\" \/><\/p>\n<p>\u56fe6.\u5728Lichee Pi 4A\u4e0a\u8fd0\u884cAOSP\u4e3b\u7ebf<\/p>\n<p>(\u5982\u9700\u66f4\u591a\u4f18\u5316\u53ca\u7a33\u5b9a\u8c03\u4f18\u7684\u7cfb\u7edf\u652f\u6301\u53ef\u8054\u7cfb\u6211\u4eec\u83b7\u53d6==\u5b89\u535312\u7248\u672c==\u652f\u6301\uff0c\u8be5\u7248\u672c\u5177\u6709\u8f83\u4e3a\u5b8c\u6574\u7684\u7cfb\u7edf\u7ec4\u4ef6\u548c\u5916\u8bbeHAL\u652f\u6301\uff0c\u9002\u914d\u4e86GPU\u3001VPU\u3001Camera\u3001Audio\u3001NPU\u7b49\u5916\u56f4\u786c\u4ef6\uff0c\u5e76\u8fdb\u884c\u4e86\u8f83\u4e3a\u5b8c\u5584\u7684XTS\u6d4b\u8bd5\u548c\u538b\u529b\u6d4b\u8bd5\u3002 \u53ef\u901a\u8fc7==\u5173\u4e8e\u6211\u4eec==\u5c0f\u8282\u4e2d\u7684==\u5de5\u5355\u7cfb\u7edf==\u83b7\u53d6\u76f8\u5173\u652f\u6301)<\/p>\n<ul>\n<li>\n<\/li>\n<\/ul>\n<h2>3. \u63d0\u4f9b\u8ca2\u737b<\/h2>\n<p>\u672c\u9879\u76ee\u4f7f\u7528Pull Requests\u63a5\u6536\u5916\u90e8\u8d21\u732e\uff0c\u53ef\u53c2\u8003\u4ee5\u4e0b\u6d41\u7a0b:<\/p>\n<ol>\n<li>\u5728\u4e2a\u4eba\u8d26\u6237\u4e2dFork\u9700\u8981\u4fee\u6539\u7684\u4ee3\u7801\u4ed3\u5e93\u3002<\/li>\n<li>\u521b\u5efa\u4e00\u4e2a\u5bf9\u5e94\u4e8e\u6539\u52a8\u7684\u5f00\u53d1\u5206\u652f\u3002<\/li>\n<li>\u7528\u4e2a\u4eba\u8d26\u6237\u4e0b\u7684\u4ee3\u7801\u4ed3\u5e93\u66ff\u6362\u539f\u59cb\u4ed3\u5e93\u6765\u6e90\u548c\u4fee\u8ba2\u7248\u672c\uff1a<\/li>\n<\/ol>\n<pre><code class=\"language-shell\">- &lt;project path=&quot;device\/thead\/common&quot; name=&quot;device-thead-common&quot; revision=&quot;alpha_0_2_0&quot; remote=&quot;thead&quot; \/&gt;\n+ &lt;project path=&quot;device\/thead\/common&quot; name=&quot;device-thead-common&quot; revision=&quot;alpha_0_2_0_xxx_support&quot; remote=&quot;your_personal_remote&quot; \/&gt;<\/code><\/pre>\n<ol>\n<li>\u6240\u6709\u65b0\u5de5\u4f5c\u90fd\u5e94\u57fa\u4e8e\u76f8\u5e94\u7684\u5f00\u53d1\u5206\u652f\u3002<\/li>\n<li>\u521b\u5efa\u63d0\u4ea4\u65f6\u9700\u8981\u5c3d\u91cf\u4fdd\u8bc1\u6539\u52a8\u7684\u72ec\u7acb\u548c\u5b8c\u6574\uff0c\u5e76\u586b\u5199\u9002\u5f53\u7684\u63d0\u4ea4\u6d88\u606f\u3002<\/li>\n<li>\u521b\u5efa\u6539\u52a8\u65f6\u6700\u597d\u5305\u542b\u76f8\u5173\u5355\u5143\u6d4b\u8bd5\u7ed3\u679c\u3002<\/li>\n<li>\u5c06\u5f00\u53d1\u5206\u652f\u63a8\u9001\u5230\u4f60\u5728 Gitee \u4e0a\u7684\u4e2a\u4eba\u5b58\u50a8\u5e93 Fork\u3002<\/li>\n<li>\u521b\u5efa\u4e00\u4e2a\u9488\u5bf9\u76f8\u5e94\u5f00\u53d1\u5206\u652f\u7684Gitee Pull Request\uff0c\u82e5\u8be5\u63d0\u4ea4\u4e3abug\u4fee\u590d\u8bf7\u5c06\u8be5\u63d0\u4ea4\u5173\u8054\u81f3\u95ee\u9898\u8ddf\u8e2a\u5668\u4e2d\u7684\u95ee\u9898\u3002<\/li>\n<\/ol>\n<h2>4. \u76f8\u5173\u94fe\u63a5<\/h2>\n<p>\u672c\u9879\u76ee\u95ee\u9898\u8ddf\u8e2a\u5668(\u751f\u6001\u677f\u652f\u6301\u5b89\u5353\u76f8\u5173\u95ee\u9898\u8bf7\u63d0\u4ea4\u81f3\u8be5\u8ddf\u8e2a\u5668):<\/p>\n<p><a href=\"https:\/\/gitee.com\/thead-android\/thead-android\/issues\">https:\/\/gitee.com\/thead-android\/thead-android\/issues<\/a><\/p>\n<p>\u5e73\u5934\u54e5\u5176\u4ed6\u5f00\u6e90\u8f6f\u4ef6\u9879\u76ee\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u94fe\u63a5\u8fdb\u884c\u8bbf\u95ee:<\/p>\n<p>T-HEAD Yocto Linux: <a href=\"https:\/\/gitee.com\/thead-yocto\">https:\/\/gitee.com\/thead-yocto<\/a><\/p>\n<p>YoC Open: <a href=\"https:\/\/gitee.com\/yocop\">https:\/\/gitee.com\/yocop<\/a><\/p>\n<p>\u82e5\u5e0c\u671b\u4e86\u89e3\u66f4\u591aTH1520\u539f\u5f62\u53ca\u65e0\u5251600\u5e73\u53f0\u4fe1\u606f\u53ef\u4ee5\u8bbf\u95ee:<\/p>\n<p><a href=\"https:\/\/gitee.com\/link?target=https%3A%2F%2Fxuantie.t-head.cn%2Fproduct%2Fwujian%2F4080405462988689408\">https:\/\/xuantie.t-head.cn\/product\/wujian\/4080405462988689408<\/a><\/p>\n<p>\u82e5\u5e0c\u671b\u4e86\u89e3\u66f4\u591aRISC-V\u67b6\u6784\u5b89\u5353\u652f\u6301\u7684\u52a8\u6001\uff0c\u53ef\u4ee5\u8ba2\u9605RISC-V Android SIG\u90ae\u4ef6\u5217\u8868\uff0c\u53c2\u4e0e\u793e\u533a\u8ba8\u8bba:<\/p>\n<p><a href=\"https:\/\/gitee.com\/link?target=https%3A%2F%2Flists.riscv.org%2Fg%2Fsig-android\">https:\/\/lists.riscv.org\/g\/sig-android<\/a><\/p>\n<p>\u82e5\u5bf9RISC-V\u67b6\u6784\u7684\u5b89\u5353\u652f\u6301\u6709\u4efb\u4f55\u7591\u95ee\uff0c\u53ef\u4ee5\u63d0\u4ea4\u95ee\u9898\u81f3Android-riscv64\u7684\u901a\u7528\u95ee\u9898\u8ddf\u8e2a:<\/p>\n<p><a href=\"https:\/\/gitee.com\/link?target=https%3A%2F%2Fgithub.com%2Fgoogle%2Fandroid-riscv64%2Fissues\">https:\/\/github.com\/google\/android-riscv64\/issues<\/a><\/p>\n<h2>5. \u8bb8\u53ef\u8bc1<\/h2>\n<p>\u6211\u4eec\u4e0d\u9700\u8981\u4efb\u4f55\u6b63\u5f0f\u7684\u7248\u6743\u8f6c\u8ba9\u6216\u8d21\u732e\u8005\u8bb8\u53ef\u534f\u8bae\u3002\u4efb\u4f55\u6709\u610f\u5411\u672c\u4ed3\u5e93\u63d0\u4ea4\u7684\u8d21\u732e\u90fd\u88ab\u8ba4\u4e3a\u662f\u6309\u7167Apache\u8bb8\u53ef\u8bc12.0\u6761\u6b3e\u63d0\u4f9b\u7684\u3002\u6709\u5173\u8be6\u7ec6\u4fe1\u606f\u8bf7\u53c2\u89c1LICENSE\u6587\u4ef6\u3002<\/p>\n<h2>6. \u5173\u4e8e\u6211\u4eec<\/h2>\n<p>\u8be5\u4ed3\u5e93\u7531\u963f\u91cc\u5df4\u5df4\u5e73\u5934\u54e5\u7ef4\u62a4\u3002<\/p>\n<p>\u82e5\u9700\u8981\u6280\u672f\u652f\u6301\u53ef\u4ee5\u901a\u8fc7OCC\u63d0\u4ea4\u5de5\u5355: <a href=\"https:\/\/gitee.com\/link?target=https%3A%2F%2Focc.t-head.cn%2Fpeople%2Fworkorder-submit\">https:\/\/occ.t-head.cn\/people\/workorder-submit<\/a><\/p>\n<p>\u4e5f\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8054\u7cfb\u6211\u4eec: \u90ae\u7bb1: <a href=\"mailto:occ_thead@service.alibaba.com\">occ_thead@service.alibaba.com<\/a><\/p>\n<hr \/>\n<h1>Lichee Pi 4A \u6027\u80fd\u53c3\u8003\u6bd4\u8f03<\/h1>\n<blockquote>\n<ul>\n<li>\u8207\u6a39\u6885\u6d3e4 \u548c StartFive VisionFive 2 \u5e73\u53f0\u6bd4\u8f03<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=Na6PT4npsMg\">https:\/\/www.youtube.com\/watch?v=Na6PT4npsMg<\/a><br \/>\n<a href=\"https:\/\/wiki.sipeed.com\/hardware\/en\/lichee\/th1520\/lpi4a\/1_intro.html\">https:\/\/wiki.sipeed.com\/hardware\/en\/lichee\/th1520\/lpi4a\/1_intro.html<\/a><\/p>\n<\/blockquote>\n<h2>1. GIMP<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/dav2.go2see.co\/md-pics\/image-20230903235738309.png\" alt=\"image-20230903235738309\" \/><\/p>\n<h2>2. Dhrytone<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/wiki.sipeed.com\/hardware\/zh\/lichee\/th1520\/lpi4a\/assets\/intro\/benchmark.png\" alt=\"benchmark\" \/><\/p>\n<h2>3. GeekBench5<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/wiki.sipeed.com\/hardware\/zh\/lichee\/th1520\/lpi4a\/assets\/intro\/geekbench5.png\" alt=\"geekbench5\" \/><\/p>\n<h1>AOSP build on ASUS Laptop<\/h1>\n<h2>0. Ubuntu on ASUS Laptop Problems<\/h2>\n<p>The very first problem is that the screem turned into black while install Ubuntu. It&#8217;s the Nvidia driver (open sourced) issue.<br \/>\nfollow the link:<br \/>\n<a href=\"https:\/\/www.youtube.com\/watch?v=zdE_4Kar_GU\">https:\/\/www.youtube.com\/watch?v=zdE_4Kar_GU<\/a><br \/>\nto resolve it.<br \/>\nMy workable driver is &quot;nvidia-driver-535&quot;, not the one with &quot;(open kernel)&quot; label&#8230;.<\/p>\n<p>The 2nd Problem is no audio. <\/p>\n<ul>\n<li>\n<p>Install the alsa-tools to get the tool first:<\/p>\n<pre><code class=\"language-sh\">sudo apt install alsa-tools<\/code><\/pre>\n<\/li>\n<li>\n<p>then, add 4 hda-verb command lines into \/etc\/rc.local.<\/p>\n<pre><code class=\"language-sh\">sudo pico \/etc\/rc.local<\/code><\/pre>\n<p>Since I have no rc.local before, my rc.local looks like:<\/p>\n<pre><code class=\"language-sh\">#!\/bin\/sh\n\/usr\/bin\/hda-verb \/dev\/snd\/hwC1D0 0x20 0x500 0xf\n\/usr\/bin\/hda-verb \/dev\/snd\/hwC1D0 0x20 0x400 0x7774\n\/usr\/bin\/hda-verb \/dev\/snd\/hwC1D0 0x20 0x500 0x45\n\/usr\/bin\/hda-verb \/dev\/snd\/hwC1D0 0x20 0x400 0x5289<\/code><\/pre>\n<p><code>hwC1D0<\/code> is the sound card which controlled my notebook speaker. The <code>hwC0D0<\/code> some guys had suggest is on my HDMI port.<\/p>\n<p>Then turn on the sound card speaker through insert 4 <code>hda-verb<\/code> calls in <code>\/etc\/rc.local<\/code>,  these command will turn on the audio before user login:<\/p>\n<\/li>\n<li>\n<p>Install Nvidia GPU may have several ways, command line is what I prefered:<\/p>\n<pre><code class=\"language-sh\"># 1. list nvidia drivers\nubuntu-drivers devices\n# 2. install the non open driver with max. version number, for ex., 535:\nsudo apt install nvidia-driver-535\n## This driver is good for me<\/code><\/pre>\n<p>ref: <a href=\"https:\/\/linuxconfig.org\/how-to-install-the-nvidia-drivers-on-ubuntu-20-04-focal-fossa-linux\">https:\/\/linuxconfig.org\/how-to-install-the-nvidia-drivers-on-ubuntu-20-04-focal-fossa-linux<\/a><\/p>\n<\/li>\n<\/ul>\n<p>Remember to reboot system after the audio &amp; video driver had been updated&#8230;<\/p>\n<h2>1. Envelopment Setup &amp; Tools<\/h2>\n<h3>1.1 ~\/.bin path for repo and python<\/h3>\n<pre><code class=\"language-sh\">mkdir -p ~\/.bin\nwget https:\/\/storage.googleapis.com\/git-repo-downloads\/repo &gt; ~\/.bin\/repo \nchmod a+rx ~\/.bin\/repo\n\nln -s \/usr\/bin\/python3 ~\/.bin python\n\necho &quot;\n########################## AOSP OUTPUT PATH\nPATH=\\${HOME}\/.bin:\\${PATH}\n# seperate path may cause unstable build, remark it...\n# export OUT_DIR=~\/aosp_out\n# export OUT_DIR_COMMON_BASE=xxx\n&quot; &gt;&gt; ~\/.bashrc<\/code><\/pre>\n<p>then reopen terminal.<\/p>\n<h3>1.2 get tools<\/h3>\n<pre><code class=\"language-sh\"># get tools\nsudo apt install git-core gnupg flex bison build-essential zip curl zlib1g-dev libc6-dev-i386 libncurses5 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig\n\n# usb control:\nsudo usermod -aG plugdev $LOGNAME\nsudo apt install android-sdk-platform-tools-common\n<\/code><\/pre>\n<h3>1.3 set git name &amp; email for android.googlesource.com<\/h3>\n<pre><code class=\"language-shell\">git config --global user.email &quot;cyue12@google.com&quot;\ngit config --global user.name &quot;cyue12&quot;  <\/code><\/pre>\n<h3>1.4  Gen. <code>android.googlesource.com<\/code> keys<\/h3>\n<ol>\n<li>browse &amp; login your google account :<\/li>\n<\/ol>\n<pre><code>https:\/\/android.googlesource.com\/new-password<\/code><\/pre>\n<ol start=\"2\">\n<li>get and execute your password script:<\/li>\n<\/ol>\n<pre><code>eval &#039;set +o history&#039; 2&gt;\/dev\/null || setopt HIST_IGNORE_SPACE 2&gt;\/dev\/null\n touch ~\/.gitcookies\n chmod 0600 ~\/.gitcookies\n\n git config --global http.cookiefile ~\/.gitcookies\n\n tr , \\\\t &lt;&lt;\\__END__ &gt;&gt;~\/.gitcookies\nandroid.googlesource.com,FALSE,\/,TRUE,2147483647,o,git-cyue12.gmail.com=1\/\/0g_qocQb1SED6CgYIARAAGBASNwF-L9IrNF3Ig-VWzWAvMP_Ve8jstFG-B2VhmNf6QeotHF9uaw86IxkITTqsAe0L2v_wQtLxApo\nandroid-review.googlesource.com,FALSE,\/,TRUE,2147483647,o,git-cyue12.gmail.com=1\/\/0g_qocQb1SED6CgYIARAAGBASNwF-L9IrNF3Ig-VWzWAvMP_Ve8jstFG-B2VhmNf6QeotHF9uaw86IxkITTqsAe0L2v_wQtLxApo\n__END__\neval &#039;set -o history&#039; 2&gt;\/dev\/null || unsetopt HIST_IGNORE_SPACE 2&gt;\/dev\/null\n<\/code><\/pre>\n<h3>1.5 GPG keys<\/h3>\n<h2>\u9a57\u8b49 Git \u6a19\u7c64<\/h2>\n<p>\u5c07\u4ee5\u4e0b\u516c\u9470\u52a0\u8f09\u5230\u60a8\u7684 GnuPG \u5bc6\u9470\u6578\u64da\u5eab\u4e2d\u3002\u8a72\u5bc6\u9470\u7528\u65bc\u7c3d\u7f72\u4ee3\u8868\u767c\u5e03\u7684\u5e36\u8a3b\u91cb\u7684\u6a19\u7c64\u3002<\/p>\n<pre><code>gpg --import<\/code><\/pre>\n<p>\u8907\u88fd\u4e26\u7c98\u8cbc\u4e0b\u9762\u7684\u5bc6\u9470\uff0c\u7136\u5f8c\u9375\u5165<code>EOF<\/code> ( <strong>Ctrl-D<\/strong> ) \u7d50\u675f\u8f38\u5165\u4e26\u8655\u7406\u5bc6\u9470\u3002<\/p>\n<pre><code>-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: GnuPG v1.4.2.2 (GNU\/Linux)\n\nmQGiBEnnWD4RBACt9\/h4v9xnnGDou13y3dvOx6\/t43LPPIxeJ8eX9WB+8LLuROSV\nlFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66\/TZmPewS4m782ndtw7\n8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD\nu4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z\nwNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq\n\/HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9\/I1S5\njU5SA\/9WwIps4SC84ielIXiGWEqq6i6\/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4\nMGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l\/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9\nb\/aF\/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGhlIEFuZHJv\naWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cmlidXRpb25AYW5k\ncm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX\ngAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tgCdFfQYiHpYngkI\n2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV\/0Bo9WiByJ9WJ5swMN36\/vAl\nQN4mWRhfzDOk\/Rosdb0csAO\/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up\nhisyEmmHv6U8gUb\/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L\/KvP5x+oCJIDbk\nC2b1TvVk9PryzmE4BPIQL\/NtgR1oLWm\/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX\nLWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71MnrF6fj+Udtb5+\nOgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf\/8AAwUIAJPWsB\/M\npK+KMs\/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDgpqt7Y7s\nKZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c\/KsjADtAuKW9\/d8phb\nN8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA\nvUXRwm\/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo\nG1S8fXgE0Lq3cdDM\/GJ4QXP\/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ\nhN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l\nEXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=\n=Wi5D\n-----END PGP PUBLIC KEY BLOCK-----<\/code><\/pre>\n<p>\u5c0e\u5165\u5bc6\u9470\u5f8c\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\u9a57\u8b49\u4efb\u4f55\u6a19\u7c64\uff1a<\/p>\n<pre><code>git tag -v TAG_NAME<\/code><\/pre>\n<h2><\/h2>\n<h2>2. Get AOSP repo<\/h2>\n<p>make aosp path:<\/p>\n<pre><code>mkdir aosp\ncd aosp<\/code><\/pre>\n<p><code>repo init<\/code> with <code>a<\/code> path for your account, then sync paralleling<\/p>\n<pre><code>repo init -u https:\/\/android.googlesource.com\/a\/platform\/manifest\nrepo init -u https:\/\/android.googlesource.com\/a\/platform\/manifest -c -b master\nrepo sync -c -j20<\/code><\/pre>\n<blockquote>\n<h6>hint: normal repo without account<\/h6>\n<pre><code class=\"language-sh\">repo init -u https:\/\/android.googlesource.com\/platform\/manifest -b master\nrepo sync -c -j20<\/code><\/pre>\n<p><strong>Test:<\/strong><\/p>\n<ul>\n<li>Office PC: i5-8500 6core 64GB RAM, 1000M ethernet, with -j12:<br \/>\nfetch 1259 jobs, 01:56:49 time.<br \/>\n55:46 checkout time<br \/>\n172507 MB total size<\/li>\n<li>624 make module, 161112 jobs, exec. <code>m -j<\/code> from 14:02 to&#8230;16:50 fail, &amp; retry<\/li>\n<li>12700H ASUS: with -j20 wifi fetching:&#8230;. <\/li>\n<\/ul>\n<p><strong>old tar:<\/strong><\/p>\n<pre><code class=\"language-sh\">repo sync -j20\nremote: Finding sources: 100% (6\/6)\nremote: Total 6 (delta 2), reused 6 (delta 2)\n\u5c55\u958b\u7269\u4ef6\u4e2d: 100% (6\/6), 82.94 KiB | 2.51 MiB\/s, \u5b8c\u6210.\nFetching: 98% (1244\/1260) 2:03 | 4 jobs | 2:02 platform\/prebuilts\/runtime @ prebuilts\/runtime\n\nFetching: 100% (1260\/1260), done in 3m35.043s\nprebuilts\/r8\/: discarding 1 commits\ndevice\/google\/cuttlefish_prebuilts\/: discarding 1 commits\nprebuilts\/runtime\/: discarding 1 commits\nChecking out: 100% (1259\/1259), done in 12.825s\nrepo sync has finished successfully.<\/code><\/pre>\n<\/blockquote>\n<h2>3. lunch &amp; build<\/h2>\n<pre><code class=\"language-sh\"># built setting\n. build\/envsetup.sh\n# select arch\nlunch 10\n### index 10 for riscv64, cuttlefish phone platform\n# clear previous binaries to make build better\nm clean\n\n# build with &#039;m&#039; for hyperspeed... but may hit resource hazzard\nm\n# hazzard happened, try with my cpu core count (6+8=14), (time take ~ 1:20)\nm -j14 all\n# build successfully on my 32GB 12700H, (time take ~ 1:39) Hooray!!<\/code><\/pre>\n<pre><code>...\n[ 99% 623\/624] finishing legacy Make module parsing ...\n...\n[  0% 817\/161107] \/\/external\/guava:guava-android-annotation-stubs javac [linux_glibc common] (priority: 153)\n...\n\n^c xxx \n...\n[ 99% 2225\/2226] finishing legacy Make module parsing ...\n...\n[  1% 2299\/161439] \/\/external\/turbine:turbine javac [linux_glibc common]\n<\/code><\/pre>\n<h2>4. Android Kernel( GKI2?)<\/h2>\n<pre><code>cd ~\nmkdir android-kernel &amp;&amp; cd android-kernel\nrepo init -u https:\/\/android.googlesource.com\/kernel\/manifest \nrepo sync<\/code><\/pre>\n<h2>5. Emulator (Try)<\/h2>\n<pre><code>sudo apt install qemu-system-riscv64<\/code><\/pre>\n<p>For non-graphical interface:<\/p>\n<pre><code>emulator -no-qt -show-kernel -noaudio -selinux permissive -qemu -smp 1 -m 3584M -bios kernel\/prebuilts\/5.10\/riscv64\/fw_jump.bin<\/code><\/pre>\n<p>For graphical interface:<\/p>\n<pre><code>emulator -verbose -no-boot-anim -show-kernel -noaudio -selinux permissive -qemu -smp 4 -m 8192M -bios kernel\/prebuilts\/5.10\/riscv64\/fw_jump.bin<\/code><\/pre>\n<p>Notice: Ubuntu 18.04 and 20.04 should work, but 22.04 may crash.<\/p>\n<hr \/>\n<pre><code class=\"language-sh\">mkdir prebuilts\/ndk\/current\/sources\/cxx-stl\/llvm-libc++\/libs\/riscv64 -p\n\n# link libc++\ncd \/aosp\/prebuilts\/ndk\/current\/sources\/cxx-stl\/llvm-libc++\/libs\/riscv64\nln -s ..\/..\/..\/..\/..\/..\/..\/clang\/host\/linux-x86\/clang-r498229\/android_libc++\/ndk\/riscv64\/lib\/libc++_shared.so libc++_shared.so\nln -s ..\/..\/..\/..\/..\/..\/..\/clang\/host\/linux-x86\/clang-r498229\/android_libc++\/ndk\/riscv64\/lib\/libc++_static.a libc++_static.a\n\nm target\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>T-HEAD \u7684Android 13\u5efa\u69cb https:\/\/gitee.com\/thead-android\/th&#8230; &raquo; <a class=\"read-more-link\" href=\"https:\/\/vm1.go2see.me\/?p=520\">\u95b1\u8b80\u5168\u6587<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,10,18],"tags":[],"class_list":["post-520","post","type-post","status-publish","format-standard","hentry","category-android","category-embedded","category-risc-v"],"_links":{"self":[{"href":"https:\/\/vm1.go2see.me\/index.php?rest_route=\/wp\/v2\/posts\/520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vm1.go2see.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vm1.go2see.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vm1.go2see.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vm1.go2see.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=520"}],"version-history":[{"count":6,"href":"https:\/\/vm1.go2see.me\/index.php?rest_route=\/wp\/v2\/posts\/520\/revisions"}],"predecessor-version":[{"id":526,"href":"https:\/\/vm1.go2see.me\/index.php?rest_route=\/wp\/v2\/posts\/520\/revisions\/526"}],"wp:attachment":[{"href":"https:\/\/vm1.go2see.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vm1.go2see.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vm1.go2see.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}