0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

Firefly-RK3399根文件系统介绍

firefly 来源:firefly 作者:firefly 2019-11-23 10:55 次阅读
创建 Ubuntu 根文件系统
准备工作
安装qemu

Linux PC主机上安装模拟器:

sudo apt-get install qemu-user-static
下载和解压 ubuntu-core

Firefly-rk3399 ubuntu根文件系统是基于Ubuntu base 16.04来创建的。用户可以到ubuntu cdimg 下载,选择下载ubuntu-base-16.04.1-base-arm64.tar.gz 。

下载完之后,创建临时文件夹并解压根文件系统:

mkdir temp sudo tar -xpf ubuntu-base-16.04.1-base-arm64.tar.gz -C temp
修改根文件系统
准备工作

准备网络

sudo cp -b /etc/resolv.conf temp/etc/resolv.conf

准备qemu

sudo cp /usr/bin/qemu-aarch64-static temp/usr/bin/

进入根文件系统进行操作:

sudo chroot temp
更新及安装

更新:

apt update apt upgrade

安装自己需要的功能

apt install vim git ....(根据自己需求添加)

安装xubuntu

apt-get install xubuntu-desktop apt-get install udev

可能出现错误:

E: Unable to locate package xxxx

安装包的源没有添加到/etc/apt/source.list中,导致无法识别安装包,可以自行添加源,也可以使用下面给出的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
添加用户及设置密码

添加用户

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

给用户设置密码:

passwd firefly

给root用户设置密码:

passwd root

修改完自己的根文件系统就可以退出了。

exit
制作根文件系统

制作自己的根文件系统,大小依据自己的根文件系统而定,注意依据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 就是最终的根文件系统映像文件了。

FAQs
根文件系统加载后,大小不正常,未占满整个分区:

在系统正确加载后执行扩展文件系统命令:

resize2fs /dev/mmcblk1p6 --> rootfs 分区 查看 parameter文件中,root= 节点设备

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
  • Linux
    +关注

    关注

    87

    文章

    10987

    浏览量

    206723
  • 嵌入式主板
    +关注

    关注

    7

    文章

    6064

    浏览量

    34605
  • Firefly
    +关注

    关注

    2

    文章

    534

    浏览量

    6755
收藏 人收藏

    评论

    相关推荐

    如何在Firefly-RK3399上编译和移植Linux内核和Ubuntu16.04 rootfs?

    Firefly-RK3399移植Ubuntu16.04的过程是怎样的?如何在Firefly-RK3399上编译和移植Linux内核和Ubuntu16.04 rootfs?
    发表于 03-07 07:13

    Firefly-RK3399烧写Ubuntu系统校验芯片和固件失败怎么解决?

    Firefly-RK3399烧写Ubuntu系统校验芯片和固件失败怎么解决?
    发表于 03-07 07:24

    如何对Firefly-RK3399 Linux内核进行编译呢

    如何对Firefly-RK3399 Linux内核进行编译呢?有哪些基本流程?
    发表于 03-08 07:16

    如何对Firefly-RK3399进行编译呢

    如何对Firefly-RK3399进行编译呢?
    发表于 03-08 07:16

    [Firefly-RK3399] 网络启动Kernel与Buildroot文件系统

    网络启动,是用 TFTP 在服务器下载内核、dtb 文件到目标机的内存中,同时可以用 NFS 挂载网络文件系统到目标机上,实现目标机的无盘启动。准备工作:Firefly-RK3399
    发表于 04-07 15:16

    基于Firefly-RK3399板卡实现目标机的无盘启动

    网络启动网络启动,是用 TFTP 在服务器下载内核、dtb 文件到目标机的内存中,同时可以用 NFS 挂载网络文件系统到目标机上,实现目标机的无盘启动。以下基于 Firefly-RK3399
    发表于 05-05 16:50

    Firefly-RK3399板卡上电默认启动Android系统

    。  三、上电  好了,废话不多说,连上键盘、鼠标和显示器,接通电源。Firefly-RK3399板卡默认已经烧写了Android和Ubuntu系统在板载的eMMC中,上电默认启动Android系统
    发表于 06-21 10:05

    Firefly-RK3399平台上的DDR动态频率驱动调节

    1、Firefly-RK3399平台上的DDR动态频率调节  OS: Android 7.1  Board: Firefly-RK3399  Kernel: v4.4.55  devfreq介绍
    发表于 11-24 18:03

    Firefly-RK3399--接口介绍

    Firefly-RK3399 提供了丰富的接口,主要包括:电源接口,
    的头像 发表于 11-19 15:25 3275次阅读
    <b class='flag-5'>Firefly-RK3399</b>--接口<b class='flag-5'>介绍</b>

    Firefly-RK3399--FAQs简介

    Firefly-RK3399 的 HDMI 能自动识别显示的分辨率。
    的头像 发表于 11-19 15:27 2727次阅读
    <b class='flag-5'>Firefly-RK3399</b>--FAQs简介

    Firefly-RK3399开发板

    Firefly-RK3399 开发板分别带有两个MIPI,一个DVP摄像头接口,MIPI支持最高4K拍照,并支持 1080P 30fps以上视频录制。此外,开发板还支持 USB 摄像头。
    的头像 发表于 11-23 09:34 4280次阅读
    <b class='flag-5'>Firefly-RK3399</b>开发板

    Firefly-RK3399--LED 介绍

    标准的 Linux 专门为 LED 设备定义了 LED 子系统。 在 Firefly-RK3399 开发板中的两个 LED 均以设备的形式被定义。
    的头像 发表于 11-22 10:13 3138次阅读
    <b class='flag-5'>Firefly-RK3399</b>--LED <b class='flag-5'>介绍</b>

    Firefly-RK3399--LCD介绍

    Firefly-RK3399开发板外置了两个LCD屏接口,一个是EDP,一个是MIPI
    的头像 发表于 11-22 10:17 5891次阅读
    <b class='flag-5'>Firefly-RK3399</b>--LCD<b class='flag-5'>介绍</b>

    Firefly-RK3399--I2C开发板介绍

    Firefly-RK3399开发板上有 9 个片上 I2C 控制器,各个 I2C 的使用情况
    的头像 发表于 11-22 10:43 2176次阅读
    <b class='flag-5'>Firefly-RK3399</b>--I2C开发板<b class='flag-5'>介绍</b>

    Firefly-RK3399开发板介绍

    Firefly-RK3399有灵活的启动方式。一般情况下,除非硬件损坏,Firefly-RK3399开发板是不会变砖的。
    的头像 发表于 11-23 11:30 2965次阅读
    <b class='flag-5'>Firefly-RK3399</b>开发板<b class='flag-5'>介绍</b>