準(zhǔn)備網(wǎng)絡(luò):
sudo cp -b /etc/resolv.conf temp/etc/resolv.conf
準(zhǔn)備qemu
sudo cp /usr/bin/qemu-aarch64-static temp/usr/bin/
進(jìn)入根文件系統(tǒng)進(jìn)行操作:
sudo chroot temp
更新:
apt update apt upgrade
安裝自己需要的功能
apt install vim git ....(根據(jù)自己需求添加)
安裝xubuntu
apt-get install xubuntu-desktop apt-get install udev
可能出現(xiàn)錯(cuò)誤:
E: Unable to locate package xxxx
安裝包的源沒(méi)有添加到/etc/apt/source.list
中,導(dǎo)致無(wú)法識(shí)別安裝包,可以自行添加源,也可以使用下面給出的source.list
覆蓋原來(lái)的/etc/apt/source.list
文件:
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted ## Uncomment the following two lines to add software from the 'universe' ## repository. ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://ports.ubuntu.com/ubuntu-ports/ xenial universe deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial universe deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates universe deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates universe ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security universe deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security universe deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security multiverse deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security multiverse
添加用戶
useradd -s '/bin/bash' -m -G adm,sudo firefly
給用戶設(shè)置密碼:
passwd firefly
給root用戶設(shè)置密碼:
passwd root
修改完自己的根文件系統(tǒng)就可以退出了。
exit
制作自己的根文件系統(tǒng),大小依據(jù)自己的根文件系統(tǒng)而定,注意依據(jù)temp文件夾的大小來(lái)修改count值
mkdir rootfs dd if=/dev/zero of=linuxroot.img bs=1M count=4000 mkfs.ext4 linuxroot.img sudo mount linuxroot.img rootfs/ sudo cp -rfp temp/* rootfs/ sudo umount rootfs/ e2fsck -p -f linuxroot.img resize2fs -M linuxroot.img
這樣 linuxroot.img 就是最終的根文件系統(tǒng)映像文件了。
在系統(tǒng)正確加載后執(zhí)行擴(kuò)展文件系統(tǒng)命令:
resize2fs /dev/mmcblk1p6 --> rootfs 分區(qū) 查看 parameter文件中,root= 節(jié)點(diǎn)設(shè)備
-
Linux
+關(guān)注
關(guān)注
88文章
11576瀏覽量
216792 -
嵌入式主板
+關(guān)注
關(guān)注
7文章
6107瀏覽量
36779 -
Firefly
+關(guān)注
關(guān)注
2文章
544瀏覽量
8898
發(fā)布評(píng)論請(qǐng)先 登錄
如何在Firefly-RK3399上編譯和移植Linux內(nèi)核和Ubuntu16.04 rootfs?
Firefly-RK3399燒寫(xiě)Ubuntu系統(tǒng)校驗(yàn)芯片和固件失敗怎么解決?
如何對(duì)Firefly-RK3399 Linux內(nèi)核進(jìn)行編譯呢
[Firefly-RK3399] 網(wǎng)絡(luò)啟動(dòng)Kernel與Buildroot文件系統(tǒng)
基于Firefly-RK3399板卡實(shí)現(xiàn)目標(biāo)機(jī)的無(wú)盤啟動(dòng)
Firefly-RK3399板卡上電默認(rèn)啟動(dòng)Android系統(tǒng)
Firefly-RK3399平臺(tái)上的DDR動(dòng)態(tài)頻率驅(qū)動(dòng)調(diào)節(jié)
Firefly-RK3399--LED 介紹

Firefly-RK3399開(kāi)發(fā)板介紹

ROC RK3399 PC Pro文件系統(tǒng)Linux根文件系統(tǒng)鏡像(arm64/arm32)

評(píng)論