1Unlike other architectures, riscv64 is not supported by mainline yet 2(see b/286551985#comment6 for reasons why). Therefore we have to follow a 3semi-manual update process described below. 4 5This is not a fully correct process, as the prebuilts are taken from an 6arbitrary local build, and only for riscv64. Common architecture-independent 7parts of the SDKs such as headers are not updated, as that would affect 8architectures other than riscv64. One can only hope they did not diverge too 9much from the previous update. 10 11For conscrypt and statsd, we (the ART team) don't have the ownership to commit 12the updates in their proper repositories, prebuilts/module_sdk/conscrypt and 13prebuilts/module_sdk/StatsD. Therefore as a temporary workaround these prebuilts 14are committed in prebuilts/runtime/mainline/local_riscv64. Before the build 15starts, they are copied to their proper places by the art/tools/buildbot-*.sh 16scripts. 17 18To update: 19 201. On aosp/main (full manifest): 21 22 1. Cherry pick https://r.android.com/2647900 (this is necessary for the SDK 23 build in step 4). 24 25 2. Build implementation libs: 26 ``` 27 $ lunch aosp_riscv64-trunk_staging-userdebug 28 $ m dist 29 ``` 30 31 3. Build apexes: 32 ``` 33 $ banchan \ 34 com.android.runtime \ 35 com.android.tzdata \ 36 com.android.os.statsd \ 37 com.android.conscrypt \ 38 com.android.i18n \ 39 riscv64 40 $ m DIST_DIR=out/dist/mainline_modules_riscv64 dist 41 ``` 42 43 4. Build module SDKs: 44 ``` 45 $ packages/modules/common/build/mainline_modules_sdks.sh \ 46 --build-release latest \ 47 --build-platform-sdks-for-mainline 48 ``` 49 502. On aosp/master-art branch (reduced manifest): 51 52 1. Run: 53 ``` 54 $ prebuilts/runtime/mainline/update.py \ 55 --local-dist-riscv64 <root-of-aosp-tree>/out/dist 56 ``` 57 58 2. Manually inspect the updated Android.bp files and revert any sections not 59 related to riscv64 (it may be necessary to revert the entire file). Then try 60 to build with `lunch riscv64 && art/tools/buildbot-build.sh`, you may find 61 that further tweaking is needed. Make sure that the build succeeds. 62 63 3. Update the commit (use `lunch riscv64 && art/tools/buildbot-build.sh` as a 64 validation step in commit message). Be sure to set mast@ as reviewer. 65