8,460
个编辑
更改
→编译rootfs
<ol style="list-style-type: decimal;">
<li><p>运行build.sh脚本,记得加sudo权限</p>
{| class="wikitable" style="width:800px;" |-| <p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p>|}</li><li><p>选择'''Rootfs and all deb packages''',然后回车</p></li></ol>
<div class="figure">
[[File:media/image402.png|576x119px|选区_241]]
</div></ol>
<ol start="3" style="list-style-type: decimal;">
<li><p>接着选择开发板的型号</p>
<ol style="list-style-type: lower-alpha;">
<li><p>rootfs的类型</p>
{| class="wikitable" style="width:800px;" |-| <p>[ o.k. ] local not found [ Creating new rootfs cache for '''jammy''']</p>|}</li>
<li><p>编译生成的rootfs压缩包的存放路径</p>
{| class="wikitable" style="width:800px;" |-| <p>[ o.k. ] Target directory [ '''external/cache/rootfs''' ]</p>|}</li>
<li><p>编译生成的rootfs压缩包的名字</p>
{| class="wikitable" style="width:800px;" |-| <p>[ o.k. ] File name [ '''jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4''' ]</p>|}</li>
<li><p>编译使用的时间</p>
{| class="wikitable" style="width:800px;" |-| <p>[ o.k. ] Runtime [ '''13 min''' ]</p>|}</li></ol>
</li>
<li><p>查看编译生成的rootfs压缩包</p>
</li>
<li><p>'''jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4.list'''列出了rootfs安装的所有软件包的包名</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>test@test:~/orangepi-build$ '''ls external/cache/rootfs/'''</p>
<p>'''jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4'''</p>
<p>jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4.current</p>
<p>jammy-xfce-arm64.f930ff6ebbac1a72108a2e100762b18f.tar.lz4.list</p>|}</li></ol>
</li>
<li><p>如果需要的rootfs在'''external/cache/rootfs'''下已经存在,那么再次编译rootfs就会直接跳过编译过程,不会重新开始编译,编译镜像的时候也会去'''external/cache/rootfs'''下查找是否已经有缓存可用的rootfs,如果有就直接使用,这样可以节省大量的下载编译时间。</p></li></ol>
<span id="编译linux镜像"></span>
== 编译Linux镜像 ==