8,367
edits
Changes
→Compile rootfs
# 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 '''Rootfs and all deb packages''' and press Enter</li></ol>
<div class="figure">
[[File:zero2w-img285.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>Then select the type of rootfs</li></ol>
[[File:zero2w-img286.png]]
</ol>
<ol start="6" 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="7" 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">
</div>
</ol>
<ol start="8" 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="9" style="list-style-type: decimal;">
<li><p>Then the compilation of rootfs will start. Some of the information prompted during compilation are as follows:</p>
<ol style="list-style-type: lower-alpha;">
<li>Type of rootfs</li></ol></li></ol>{| class="wikitable" style="width:800px;" |-|
[ o.k. ] local not found [ Creating new rootfs cache for '''bullseye''' ]
|}</ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li>The storage path of the compiled rootfs compressed package</li></ol>{| class="wikitable" style="width:800px;" |-|
[ o.k. ] Target directory [ '''orangepi-build/external/cache/rootfs''' ]
|}</ol>
<ol start="3" style="list-style-type: lower-alpha;">
<li>The name of the rootfs compressed package generated by compilation</li></ol>{| class="wikitable" style="width:800px;" |-|
[ o.k. ] File name [ '''bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4''' ]
|}</ol></li></ol>
<ol start="10" style="list-style-type: decimal;">
<li><p>View the compiled rootfs compressed package</p>
<ol style="list-style-type: lower-alpha;">
<li>'''bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4''' It is a compressed package of rootfs. The meaning of each field in the name is</li></ol></li></ol>
:b) '''xfce''' indicates that the rootfs is the desktop version, and if it is cli, it indicates the server version.
:c) '''arm64''' represents the architecture type of rootfs
:d) '''25250ec7002de9e81a41de169f1f89721''' is the MD5 hash value generated by the package names of all software packages installed by rootfs. As long as the list of software packages installed by rootfs is not modified, this value will not change. The compilation script will use this MD5 hash value. Determine whether rootfs needs to be recompiled</blockquoteol>
<ol start="2" style="list-style-type: lower-alpha;">
<li>'''bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4.list''' Lists the package names of all packages installed by rootfs</li></ol>{| class="wikitable" style="width:800px;" |-|
test@test:~/orangepi-build$ '''ls external/cache/rootfs/'''
bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4.list
|}</ol></li></ol>
<ol start="11" style="list-style-type: decimal;">
<li>If the required rootfs already exists under '''external/cache/rootfs''', then compiling the rootfs again will directly skip the compilation process and will not restart the compilation. When compiling the image, it will also go to '''external/cache/rootfs''' to check whether it already exists. There is a cached rootfs available. If it is available, use it directly. This can save a lot of download and compilation time.</li></ol>
<span id="compile-linux-image"></span>
== Compile linux image ==