fireflyAIO-3399J-创建Ubuntu根文件系统简介

创建 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 install xubuntu-desktop
可能出现错误:
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值
dd if=/dev/zero of=linuxroot.img bs=1m count=2048 sudo mkfs.ext4 linuxroot.img mkdir rootfs 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/mtd/by-name/linuxroot

高频电感的特点及使用
叶面积仪的操作方法以及注意事项的详细说明
破解DS28E25解密DS28E25
拜登获胜结束美国分裂,泥潭中的科技巨头迎来曙光
人工智能或将是解决停车难的唯一手段
fireflyAIO-3399J-创建Ubuntu根文件系统简介
逛展指南 | 2023 全球必逛工业展,都在这了!
泡沫挤破后,VR由小众走向大众,爱奇艺想做市场领导者,靠谱吗?
在IOT网络上构建语音控制并与完成自动化操作集成
智能电表的无线技术
考虑光刻中厚掩模效应的边界层模型
华为mate10什么时候上市?华为mate10最新消息:比起荣耀9我们更期待华为mate10,麒麟970+徕卡摄像头+曲面屏
雷达领域SCI期刊最新影响因子
藏在首台Android机内部芯片电路设计的秘密
PCB行业资本市场有哪四件大事情
德索连接器厂家分享M16连接器的基本性能
敏芯股份入选上市公司数字化转型典型案例
Awesome 工具如何更好地管理Kubernetes
如何将BusyBox移植到RT-Thread Smart下
液晶面板价格持续走低 彩电市场销量不确定性增加