Changes

Jump to: navigation, search

Orange Pi 5 Plus

544 bytes added, 13:48, 7 June 2023
Compile u-boot
<ol style="list-style-type: decimal;">
<li><p>Run the build.sh script, remember to add sudo permission</p>
{| class="wikitable" style="width:800px;" |-|<p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p>|}</li>
<li><p>Select '''<span class="mark">U-boot package</span>''', then press Enter</p>
<div class="figure">
<ol style="list-style-type: lower-alpha;">
<li><p>u-boot source code version</p>
{| class="wikitable" style="width:800px;" |-|<p>[ o.k. ] Compiling u-boot [ '''v2017.09''' ]</p>|}</li>
<li><p>The version of the cross-compilation toolchain</p>
{| class="wikitable" style="width:800px;" |-|<p>[ o.k. ] Compiler version [ '''aarch64-linux-gnu-gcc 7.4.1''' ]</p>|}</li>
<li><p>Path to the generated u-boot deb package</p>
{| class="wikitable" style="width:800px;" |-|<p>[ o.k. ] Target directory [ '''orangepi-build/output/debs/u-boot''' ]</p>|}</li>
<li><p>The package name of the generated u-boot deb package</p>
{| class="wikitable" style="width:800px;" |-|<p>[ o.k. ] File name [ '''linux-u-boot-legacy-orangepi5plus_1.0.0_arm64.deb''' ]</p>|}</li>
<li><p>Compilation time</p>
{| class="wikitable" style="width:800px;" |-|<p>[ o.k. ] Runtime [ '''1 min''' ]</p>|}</li><li><p>Repeat the command to compile u-boot, use the following command &gt; to start compiling u-boot directly without selecting through &gt; the graphical interface</p>{| class="wikitable" style="width:800px;" |-|<p>[ o.k. ] Repeat Build Options [ '''sudo ./build.sh BOARD=orangepi5plus BRANCH=legacy BUILD_OPT=u-boot KERNEL_CONFIGURE=no''' ]</p>|}</li></ol>
</li>
<li><p>View the u-boot deb package generated by compilation</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>test@test:~/orangepi-build$ '''ls output/debs/u-boot/'''</p>
<p>linux-u-boot-legacy-orangepi5plus_1.0.0_arm64.deb</p>|}</li>
<li><p>The files contained in the generated u-boot deb package are as follows</p>
<ol style="list-style-type: lower-alpha;">
<li><p>Use the following command to decompress the deb package</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>test@test:~/orangepi-build$ '''cd output/debs/u-boot'''</p>
<p>test@test:~/orangepi_build/output/debs/u-boot$ $ '''sudo dpkg -x''' \</p>
<p>'''linux-u-boot-legacy-orangepi5plus_1.0.0_arm64.deb . (Note that there is a &quot;.&quot; at the end of the command)'''</p>
<p>test@test:~/orangepi_build/output/debs/u-boot$ '''ls'''</p>
<p>linux-u-boot-legacy-orangepi5plus_1.0.0_arm64.deb '''usr'''</p>|}</li>
<li><p>The decompressed file is as follows</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>test@test:~/orangepi-build/output/debs/u-boot$ '''tree usr'''</p>
<p>usr</p>
<p>└── lib</p>
:<p>├── linux-u-boot-legacy-orangepi5plus_1.0.0_arm64</p>:<p>│   ├── idbloader.img</p>:<p>│   ├── rkspi_loader.img</p>:<p>│   └── u-boot.itb</p>:<p>└── u-boot</p>::<p>├── LICENSE</p>::<p>├── orangepi_5_plus_defconfig</p>::<p>└── platform_install.sh</p>  <p>3 directories, 6 files</p>|}</li></ol>
</li>
<li><p>When the orangepi-bulid compilation system compiles the u-boot source code, it will first synchronize the u-boot source code with the u-boot source code of the github server, so if you want to modify the u-boot source code, you first need to turn off the download and update function of the source code '''(need This function can only be turned off after u-boot has been fully compiled, otherwise it will prompt that the source code of u-boot cannot be found. If the source code compressed package is downloaded from Google Drive, there is no such problem because the source code of u-boot cached)''', otherwise the changes made will be restored, the method is as follows:</p>
<p>Set the IGNORE_UPDATES variable in <span class="mark">userpatches/config-default.conf</span> to &quot;yes&quot;</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>test@test:~/orangepi-build$ '''vim userpatches/config-default.conf'''</p>
<p>IGNORE_UPDATES=&quot;'''<span style="color:#FF0000">yes</span>'''&quot;</p>|}</li>
<li><p>When debugging u-boot code, you can use the following method to update u-boot in the linux image for testing</p>
<ol style="list-style-type: lower-alpha;">
<li><p>Upload the compiled u-boot deb package to the linux system of &gt; the development board</p>{| class="wikitable" style="width:800px;" |-|
<p>test@test:~/orangepi-build$ '''cd output/debs/u-boot'''</p>
<p>test@test:~/orangepi_build/output/debs/u-boot$ '''scp \'''</p>
<p>'''linux-u-boot-legacy-orangepi5plus_1.0.0_arm64.deb [mailto:[email protected]:/root [email protected]:/root]'''</p>|}</li><li><p>Then log in to the development board and uninstall the deb &gt; package of u-boot installed</p>{| class="wikitable" style="width:800px;" |-|<p>root@orangepi:~# '''apt purge -y linux-u-boot-orangepi5plus-legacy'''</p>|}</li>
<li><p>Install the new u-boot deb package just uploaded</p>
{| class="wikitable" style="width:800px;" |-|<p>root@orangepi:~# '''dpkg -i''' '''linux-u-boot-legacy-orangepi5plus_1.0.0_arm64.deb'''</p>|}</li>
<li><p>Then run the nand-sata-install script</p>
{| class="wikitable" style="width:800px;" |-|<p>root@orangepi:~# '''nand-sata-install'''</p>|}</li>
<li><p>Then select '''<span class="mark">5 Install/Update the bootloader on SD/eMM</span>''' to update the u-boot in the TF card or '''<span class="mark">7 Install/Update the bootloader on SPI Flash</span>''' to update the u-boot in the SPI Flash</p>
<p>[[File:media/image539.png|317x154px]]</p></li>
<li><p>After pressing the Enter key, a Warning will pop up first</p>
<p>[[File:media/image540.png|314x170px]]</p></li>
<li><p>Press the Enter key again to start updating u-boot, and the &gt; following information will be displayed after the update is &gt; completed</p>
<p>[[File:media/image541.png|223x125px]]</p></li>
<li><p>Then you can restart the development board to test whether the &gt; modification of u-boot takes effect</p></li></ol>
</li>
<li><p>Other useful information</p>
<ol style="list-style-type: lower-alpha;">
<li><p>u-boot 2017.09 source code, the defconfig configuration file &gt; used by the development board is</p></li><li><p>[https{| class="wikitable" style="width://github.com/orangepi800px;" |-xunlong/u-boot-orangepi/blob/v2017.09-rk3588/configs/orangepi_5_plus_defconfig |'''orangepi-build/u-boot/v2017.09-rk3588/configs/orangepi_5_plus_defconfig''']|}<li><p>u-boot &gt; 2017.09 source code, the dts file used by the development &gt; board is</p></li>{| class="wikitable" style="width:800px;" |-|'''orangepi-build/u-boot/v2017.09-rk3588/arch/arm/dts/rk3588-orangepi-5-plus.dts'''|}</ol>
</li></ol>
<span id="orangepi-buildu-bootv2017.09-rk3588archarmdtsrk3588-orangepi-5-plus.dtscompile-the-linux-kernel"></span>
[https://github.com/orangepi-xunlong/u-boot-orangepi/blob/v2017.09-rk3588/arch/arm/dts/rk3588-orangepi-5-plus.dts '''orangepi-build/u-boot/v2017.09-rk3588/arch/arm/dts/rk3588-orangepi-5-plus.dts'''
<span id="_Toc31297" class="anchor"></span>]

Navigation menu