0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

Firefly-RK3399根文件系統(tǒng)介紹

firefly ? 來源:firefly ? 作者:firefly ? 2019-11-23 10:55 ? 次閱讀
創(chuàng)建 Ubuntu 根文件系統(tǒng)
準(zhǔn)備工作
安裝qemu

Linux PC主機(jī)上安裝模擬器:

sudo apt-get install qemu-user-static
下載和解壓 ubuntu-core

Firefly-rk3399 ubuntu根文件系統(tǒng)是基于Ubuntu base 16.04來創(chuàng)建的。用戶可以到ubuntu cdimg 下載,選擇下載ubuntu-base-16.04.1-base-arm64.tar.gz 。

下載完之后,創(chuàng)建臨時(shí)文件夾并解壓根文件系統(tǒng):

mkdir temp sudo tar -xpf ubuntu-base-16.04.1-base-arm64.tar.gz -C temp
修改根文件系統(tǒng)
準(zhǔn)備工作

準(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

安裝包的源沒有添加到/etc/apt/source.list中,導(dǎo)致無法識(shí)別安裝包,可以自行添加源,也可以使用下面給出的source.list覆蓋原來的/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
添加用戶及設(shè)置密碼

添加用戶

useradd -s '/bin/bash' -m -G adm,sudo firefly

給用戶設(shè)置密碼:

passwd firefly

給root用戶設(shè)置密碼:

passwd root

修改完自己的根文件系統(tǒng)就可以退出了。

exit
制作根文件系統(tǒng)

制作自己的根文件系統(tǒng),大小依據(jù)自己的根文件系統(tǒng)而定,注意依據(jù)temp文件夾的大小來修改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)映像文件了。

FAQs
根文件系統(tǒng)加載后,大小不正常,未占滿整個(gè)分區(qū):

在系統(tǒng)正確加載后執(zhí)行擴(kuò)展文件系統(tǒng)命令:

resize2fs /dev/mmcblk1p6 --> rootfs 分區(qū) 查看 parameter文件中,root= 節(jié)點(diǎn)設(shè)備

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • Linux
    +關(guān)注

    關(guān)注

    87

    文章

    11123

    瀏覽量

    207892
  • 嵌入式主板
    +關(guān)注

    關(guān)注

    7

    文章

    6081

    瀏覽量

    34936
  • Firefly
    +關(guān)注

    關(guān)注

    2

    文章

    538

    瀏覽量

    6929
收藏 人收藏

    評(píng)論

    相關(guān)推薦

    如何在Firefly-RK3399上編譯和移植Linux內(nèi)核和Ubuntu16.04 rootfs?

    Firefly-RK3399移植Ubuntu16.04的過程是怎樣的?如何在Firefly-RK3399上編譯和移植Linux內(nèi)核和Ubuntu16.04 rootfs?
    發(fā)表于 03-07 07:13

    Firefly-RK3399燒寫Ubuntu系統(tǒng)校驗(yàn)芯片和固件失敗怎么解決?

    Firefly-RK3399燒寫Ubuntu系統(tǒng)校驗(yàn)芯片和固件失敗怎么解決?
    發(fā)表于 03-07 07:24

    如何對(duì)Firefly-RK3399 Linux內(nèi)核進(jìn)行編譯呢

    如何對(duì)Firefly-RK3399 Linux內(nèi)核進(jìn)行編譯呢?有哪些基本流程?
    發(fā)表于 03-08 07:16

    如何對(duì)Firefly-RK3399進(jìn)行編譯呢

    如何對(duì)Firefly-RK3399進(jìn)行編譯呢?
    發(fā)表于 03-08 07:16

    [Firefly-RK3399] 網(wǎng)絡(luò)啟動(dòng)Kernel與Buildroot文件系統(tǒng)

    網(wǎng)絡(luò)啟動(dòng),是用 TFTP 在服務(wù)器下載內(nèi)核、dtb 文件到目標(biāo)機(jī)的內(nèi)存中,同時(shí)可以用 NFS 掛載網(wǎng)絡(luò)文件系統(tǒng)到目標(biāo)機(jī)上,實(shí)現(xiàn)目標(biāo)機(jī)的無盤啟動(dòng)。準(zhǔn)備工作:Firefly-RK3399
    發(fā)表于 04-07 15:16

    基于Firefly-RK3399板卡實(shí)現(xiàn)目標(biāo)機(jī)的無盤啟動(dòng)

    網(wǎng)絡(luò)啟動(dòng)網(wǎng)絡(luò)啟動(dòng),是用 TFTP 在服務(wù)器下載內(nèi)核、dtb 文件到目標(biāo)機(jī)的內(nèi)存中,同時(shí)可以用 NFS 掛載網(wǎng)絡(luò)文件系統(tǒng)到目標(biāo)機(jī)上,實(shí)現(xiàn)目標(biāo)機(jī)的無盤啟動(dòng)。以下基于 Firefly-RK3399
    發(fā)表于 05-05 16:50

    Firefly-RK3399板卡上電默認(rèn)啟動(dòng)Android系統(tǒng)

    ?! ∪?、上電  好了,廢話不多說,連上鍵盤、鼠標(biāo)和顯示器,接通電源。Firefly-RK3399板卡默認(rèn)已經(jīng)燒寫了Android和Ubuntu系統(tǒng)在板載的eMMC中,上電默認(rèn)啟動(dòng)Android系統(tǒng)
    發(fā)表于 06-21 10:05

    Firefly-RK3399平臺(tái)上的DDR動(dòng)態(tài)頻率驅(qū)動(dòng)調(diào)節(jié)

    1、Firefly-RK3399平臺(tái)上的DDR動(dòng)態(tài)頻率調(diào)節(jié)  OS: Android 7.1  Board: Firefly-RK3399  Kernel: v4.4.55  devfreq介紹
    發(fā)表于 11-24 18:03

    Firefly-RK3399--接口介紹

    Firefly-RK3399 提供了豐富的接口,主要包括:電源接口,
    的頭像 發(fā)表于 11-19 15:25 ?3620次閱讀
    <b class='flag-5'>Firefly-RK3399</b>--接口<b class='flag-5'>介紹</b>

    Firefly-RK3399--FAQs簡(jiǎn)介

    Firefly-RK3399 的 HDMI 能自動(dòng)識(shí)別顯示的分辨率。
    的頭像 發(fā)表于 11-19 15:27 ?3009次閱讀
    <b class='flag-5'>Firefly-RK3399</b>--FAQs簡(jiǎn)介

    Firefly-RK3399--LED 介紹

    標(biāo)準(zhǔn)的 Linux 專門為 LED 設(shè)備定義了 LED 子系統(tǒng)。 在 Firefly-RK3399 開發(fā)板中的兩個(gè) LED 均以設(shè)備的形式被定義。
    的頭像 發(fā)表于 11-22 10:13 ?3349次閱讀
    <b class='flag-5'>Firefly-RK3399</b>--LED <b class='flag-5'>介紹</b>

    Firefly-RK3399--LCD介紹

    Firefly-RK3399開發(fā)板外置了兩個(gè)LCD屏接口,一個(gè)是EDP,一個(gè)是MIPI
    的頭像 發(fā)表于 11-22 10:17 ?6227次閱讀
    <b class='flag-5'>Firefly-RK3399</b>--LCD<b class='flag-5'>介紹</b>

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

    Firefly-RK3399有靈活的啟動(dòng)方式。一般情況下,除非硬件損壞,Firefly-RK3399開發(fā)板是不會(huì)變磚的。
    的頭像 發(fā)表于 11-23 11:30 ?3261次閱讀
    <b class='flag-5'>Firefly-RK3399</b>開發(fā)板<b class='flag-5'>介紹</b>

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

    電子發(fā)燒友網(wǎng)站提供《ROC RK3399 PC Pro文件系統(tǒng)Linux文件系統(tǒng)鏡像(arm64/arm32).txt》資料免費(fèi)下載
    發(fā)表于 09-20 10:59 ?5次下載
    ROC <b class='flag-5'>RK3399</b> PC Pro<b class='flag-5'>文件系統(tǒng)</b>Linux<b class='flag-5'>根</b><b class='flag-5'>文件系統(tǒng)</b>鏡像(arm64/arm32)

    Firefly-RK3399產(chǎn)品規(guī)格書

    Firefly-RK3399產(chǎn)品規(guī)格書
    發(fā)表于 07-16 10:50 ?1次下載