Open main menu

Wiki-Orange Pi β

Changes

Orange Pi Zero 3

603 bytes added, 20:14, 11 July 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 '''U-boot package''', 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 [ '''v2021.07''' ]</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 11''' ]</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-next-orangepizero3_x.x.x_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=orangepizero3 BRANCH=next BUILD_OPT=u-boot''' ]</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-next-orangepizero3_x.x.x_arm64.deb'''</p>|}</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 '''(This function needs to be fully compiled once u-boot, otherwise it will prompt that the source code of u-boot cannot be found)''', otherwise the changes made will be restored, the method is as follows:</p>
<p>Set the IGNORE_UPDATES variable in '''userpatches/config-default.conf''' to &quot;yes&quot;</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>test@test:~/orangepi-build$ '''vim userpatches/config-default.conf'''</p>
<p>......</p>
<p>IGNORE_UPDATES=&quot;'''yes'''&quot;</p>
<p>......</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>First upload the compiled u-boot deb package to the linux system &gt; of 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-next-orangepizero3_x.x.x_arm64.deb [mailto:root@192.168.1.xxx:/root root@192.168.1.xxx:/root]'''</p>|}</li>
<li><p>Install the new u-boot deb package just uploaded</p>
{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo dpkg -i''' '''linux-u-boot-next-orangepizero3_x.x.x_arm64.deb'''</p>|}</li>
<li><p>Then run the nand-sata-install script</p>
{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo nand-sata-install'''</p>|}</li>
<li><p>Then select '''5 Install/Update the bootloader on SD/eMMC'''</p>
<p>[[File:media/image299.png|320x174px]]</p></li>
<span id="compile-the-linux-kernel"></span>
 
== Compile the linux kernel ==