Open main menu

Wiki-Orange Pi β

Changes

Orange Pi CM4

315 bytes added, 15:02, 19 September 2023
Compile rootfs
# Run the build.sh script, remember to add sudo permission
::{| 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''', then enter</li></ol>
<div class="figure">
[[File:cm4-img401.png]]
</div></ol>
<ol start="3" style="list-style-type: decimal;">
<li>Then select the model of the development board</li></ol>
<div class="figure">
[[File:cm4-img393.png]]
</div></ol>
<ol start="4" style="list-style-type: decimal;">
<li>Then select the type of rootfs</li></ol>
[[File:cm4-img402.png]]
</ol>
<ol start="5" 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)''' Indicates the image of the server version, which is relatively small</p></li>
<li><p>'''Image with desktop environment''' Indicates a image with a desktop, which is relatively large</p></li></ol></li></ol>
<div class="figure">
[[File:cm4-img403.png]]
</div></ol></li></ol>
<ol start="6" style="list-style-type: decimal;">
<li>If you are compiling the image of the server version, you can also choose to compile the Standard version or the Minimal version. The pre-installed software of the Minimal version will be much less than that of the Standard version '''(please do not choose the Minimal version if there is no special requirement, because many things are not pre-installed by default. Some functions may not be available)'''</li></ol>
<div class="figure">
[[File:cm4-img404.png]]
</div></ol>
<ol start="7" style="list-style-type: decimal;">
<li>If you are compiling the image of the desktop version, you also need to select the type of desktop environment. Currently, Ubuntu Jammy mainly maintains XFCE and Gnome desktops, Ubuntu Focal only maintains XFCE desktops, and Debian Bullseye mainly maintains XFCE and KDE desktops</li></ol>
<div class="figure">
[[File:cm4-img407.png]]
</ol>
<ol start="8" style="list-style-type: decimal;">
<li><p>Then it will start to compile rootfs, and some of the information prompted during compilation are as follows</p>
<ol style="list-style-type: lower-alpha;">
<li>The type of rootfs</li></ol></li></ol>{| class="wikitable" style="width:800px;" |-|
[ o.k. ] local not found [ Creating new rootfs cache for '''jammy''']
|}</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 [ '''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 [ '''jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4''' ]
|}</ol>
<ol start="4" style="list-style-type: lower-alpha;">
<li>The time used for compilation</li></ol>{| class="wikitable" style="width:800px;" |-|
[ o.k. ] Runtime [ '''13 min''' ]
|}</ol></li></ol>
<ol start="9" style="list-style-type: decimal;">
<li><p>View the rootfs compressed package generated by compilation</p>
<ol style="list-style-type: lower-alpha;">
<li><p>'''jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4''' is the rootfs compressed package, the meaning of each field of the name is</p>
<ol style="list-style-type: lower-alphanone;"><li><p>a) '''jammy''' indicates the type of Linux distribution of rootfs</p></li><li><p>b) '''xfce''' means rootfs is the type of desktop version, if it is '''cli''', it means the type of server version</p></li><li><p>c) '''arm64''' represents the architecture type of rootfs</p></li><li><p>d) '''f930ff6ebbac1a72108a2e100762b18f''' 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 to generate Determine whether rootfs needs to be recompiled</p></li></ol>
</li>
<li><p>'''jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4.list''' lists the package names of all packages installed by rootfs</p></li></ol></li></ol>{| class="wikitable" style="width:800px;" |-|
test@test:~/orangepi-build$ '''ls external/cache/rootfs/'''
jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4.list
|}</ol></li></ol>
<ol start="10" style="list-style-type: decimal;">
<li>If the required rootfs already exists under '''external/cache/rootfs''', then compiling 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 find out whether it has If there is rootfs available in the cache, use it directly, which can save a lot of download and compilation time.</li></ol>
<span id="compile-linux-image"></span>
 
== Compile Linux image ==