Changes

Jump to: navigation, search

Orange Pi Zero 2W

237 bytes added, 11:55, 27 September 2023
Compile linux image
# Run the '''build.sh''' script, remember to add sudo permissions
::{| class="wikitable" style="width:800px;"
|-
|
test@test:~/orangepi-build$ '''sudo ./build.sh'''
|}
<ol start="2" style="list-style-type: decimal;">
<li>Select '''Full OS image for flashing''' and press Enter</li></ol>
<div class="figure">
[[File:zero2w-img292.png]]
</div></ol>
<ol start="3" style="list-style-type: decimal;">
<li>Then select the model of the development board</li></ol>
[[File:zero2w-img275.png]]
</ol>
<ol start="4" style="list-style-type: decimal;">
<li><p>Then select the branch type of the kernel source code. Different versions of the kernel source code maintain different rootfs types.</p>
<ol style="list-style-type: lower-alpha;">
<li><p>In the current branch, you can see three options: debian11, ubuntu20.04, and ubuntu22.04.</p></li>
<li><p>In the next branch, you can see three options: debian11, debian12, and ubuntu22.04.</p></li></ol></li></ol>
[[File:zero2w-img276.png]]
</ol></li></ol>
<ol start="5" style="list-style-type: decimal;">
<li><p>If you select the next branch, you will also be prompted to select the memory size, and you do not need to select the current branch.</p>
<p>[[File:zero2w-img277.png]]</p></li></ol>
</li>
<li><p>Then select the type of rootfs</p></li></ol>
[[File:zero2w-img286.png]]
</ol>
<ol start="7" style="list-style-type: decimal;">
<li><p>Then select the type of image</p>
<ol style="list-style-type: lower-alpha;">
<li><p>'''Image with console interface (server)''' Represents the image of the server version, which is relatively small in size.</p></li>
<li><p>'''Image with desktop environment'''Represents an image with a desktop, which is relatively large in size.</p></li></ol></li></ol>
<div class="figure">
[[File:zero2w-img287.png]]
</div></ol></li></ol>
<ol start="8" style="list-style-type: decimal;">
<li>If you are compiling the server version of the image, you can also choose to compile the Standard version or the Minimal version. The Minimal version will have much less pre-installed software than the Standard version ('''please do not choose the Minimal version without special needs, because many things are not pre-installed by default. Some functions may not be available''')</li></ol>
<div class="figure">
[[File:zero2w-img288.png]]
</div></ol>
<ol start="9" style="list-style-type: decimal;">
<li>If you are compiling a desktop version of the image, you also need to select the type of desktop environment. Currently, only XFCE is maintained, so please select an XFCE type desktop.</li></ol>
[[File:zero2w-img289.png]]
[[File:zero2w-img291.png]]
</ol>
<ol start="10" style="list-style-type: decimal;">
<li>Then the compilation of the linux image will begin. The general process of compilation is as follows</li></ol>
::a. Initialize the compilation environment of Ubuntu PC and install the software packages required for the compilation process.
::b. Download the source code of u-boot and linux kernel (if already cached, only update the code)
::c. Compile u-boot source code and generate u-boot deb package
::d. Compile linux source code and generate linux-related deb packages
::e. Make the deb package of linux firmware
::f. Make the deb package of orangepi-config tool
::g. Create a deb package with board-level support
::h. If you compile the desktop version image, you will also create a desktop-related deb package.
::i. Check whether rootfs has been cached. If not, re-create rootfs. If it has been cached, decompress it directly and use it.
::j. Install the deb package generated previously into rootfs
::k. Make some specific settings for different development boards and different types of images, such as pre-installing additional software packages, modifying system configurations, etc.
::l. Then create the image file and format the partition. The default type is ext4.
::m. Then copy the configured rootfs to the mirror partition.
::n. Then update initramfs o. Finally, write the bin file of u-boot into the image through the dd command.
::o. Finally, write the bin file of u-boot into the image through the dd command.
</ol>
<ol start="11" style="list-style-type: decimal;">
<li><p>After compiling the image, the following message will be displayed</p>
<ol style="list-style-type: lower-alpha;">
<li>The storage path of the compiled image</li></ol></li></ol>{| class="wikitable" style="width:800px;" |-|
[ o.k. ] Done building [ '''output/images/orangepizero2w_x.x.x_debian_bullseye_linux6.1.xx_xfce_desktop/orangepizero2w_x.x.x_debian_bullseye_linux6.1.xx_xfce_desktop.img''' ]
|}</ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li>Compilation time</li></ol>{| class="wikitable" style="width:800px;" |-|
'''[ o.k. ] Runtime [ 19 min ]'''
|}</ol>
<ol start="3" style="list-style-type: lower-alpha;">
<li>Repeat the command to compile the image. Use the following command to start compiling the image directly without selecting it through the graphical interface.</li></ol>{| class="wikitable" style="width:800px;" |-|
[ o.k. ] Repeat Build Options [ '''sudo ./build.sh BOARD=orangepizero2w BRANCH=next BUILD_OPT=image RELEASE=bullseye BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_CONFIGURE=yes''' ]
|}</ol></li></ol>
<span id="instructions-for-using-the-orange-pi-os-arch-system"></span>

Navigation menu