8,367
edits
Changes
→Compile the source code of Android 11
<ol style="list-style-type: decimal;">
<li><p>First install the software packages required to compile the Android11 source code</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>test@test:~$ '''sudo apt-get update'''</p>
<p>test@test:~$ '''sudo apt-get install -y git gnupg flex bison gperf build-essential \'''</p>
<p>'''zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 libncurses5 \'''</p>
<p>'''lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev ccache \'''</p>
<p>'''libgl1-mesa-dev libxml2-utils xsltproc unzip liblz4-tool'''</p>|}</li>
<li><p>There is a build.sh compilation script in the source code, and the compilation parameters are as follows</p>
<ol style="list-style-type: lower-alpha;">
<li><p>-'''U''':Compile uboot</p></li><li><p>-'''K''':Compile kernel</p></li><li><p>-'''A''':compile android</p></li><li><p>-'''u''':Package and generate update.img and update_spi_nvme.img</p></li><li><p>-'''o''':Compile OTA package</p></li><li><p>-'''d''':Specify kernel dts</p></li></ol>
</li>
<li><p>Compile uboot, kernel, android and package them into update.img</p>
<ol style="list-style-type: lower-alpha;">
<li><p>The command to compile and support HDMI 4K display mirroring > (LCD is turned off by default) is as follows:</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>test@test:~$ '''cd RK356X_Android11'''</p>
<p>test@test:~/ RK356X_Android11$ '''export BOARD=orangepi3b'''</p>
<p>test@test:~/ RK356X_Android11$ '''source build/envsetup.sh'''</p>
<p>test@test:~/ RK356X_Android11$ '''lunch rk3566_r-userdebug'''</p>
<p>test@test:~/ RK356X_Android11$ '''./build.sh -AUKu'''</p>|}</li>
<li><p>The command to compile and support LCD display mirroring (HDMI > is disabled by default) is as follows:</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>test@test:~$ '''cd RK356X_Android11'''</p>
<p>test@test:~/ RK356X_Android11$ '''export BOARD=orangepi3b'''</p>
<p>test@test:~/ RK356X_Android11$ '''source build/envsetup.sh'''</p>
<p>test@test:~/ RK356X_Android11$ '''lunch rk3566_r-userdebug'''</p>
<p>test@test:~/ RK356X_Android11$ '''./build.sh -AUKu'''</p>|}</li></ol>
</li>
<li><p>After the compilation is complete, the following information will be printed</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>********rkImageMaker ver 2.1********</p>
<p>Generating new image, please wait...</p>
<p>Making update_spi_nvme.img OK.</p>
<p>Make update image ok!</p>
<p>/wspace3/RK3566/RK356X_Android11</p>|}</li>
<li><p>The final image file will be placed in the '''rockdev/Image-rk3566_r/''' directory. Among them, '''update.img''' is the boot image that supports TF card and eMMC, and '''update_spi_nvme.img''' is the boot image of NVME SSD</p>
{| class="wikitable" style="width:800px;" |-| <p>[mailto:test@test:~OrangePi_4/rk3399-android-8.1$ test@test:~/RK356X_Android11$] '''cd rockdev/Image-rk3566_r'''</p><p>[mailto:test@test:~OrangePi_4/rk3399-android-8.1$ test@test:~/RK356X_Android11/rockdev/Image-rk3566_r $] '''ls update*'''</p><p>update.img update_spi_nvme.img</p>|}</li></ol>
<span id="appendix"></span>