Firefly开源社区

rk3399 ubuntu rootfs制作(原文地址更多精彩)

582

积分

10

威望

8

贡献

技术大神

Rank: 3Rank: 3

积分
582
QQ
发表于 2017-4-9 18:32:33     
本帖最后由 54zw 于 2017-4-9 18:50 编辑

rk3399 ubuntu rootfs制作原文地址

Ubuntu根文件系统制作(在PC主机上操作)下载ubuntu base
mkdir tempsudo tar -xpf ubuntu-base-16.04.1-base-arm64.tar.gz -C temp拷贝DNS信息
cp -L /etc/resolv.conf temp/etc/resolv.confQemu static user
sudo cp /usr/bin/qemu-aarch64 temp/usr/bin/进入根文件系统进行操作
sudo chroot temp更新及安装必要软件
apt updateapt-get install console-setup iputils-ping sudo vim net-tools其中console-setup encoding选的是utf-8(该软件不安装串口无法输入)这里并不需要/etc/init/目录下有类似ttyFIQ0.conf的文件
添加用户
useradd -s '/bin/bash' -m -G adm,sudo zeroway给用户设置密码
passwd zeroway修改/etc/sudoers
zeroway    ALL=(ALL:ALL) ALL设置分区信息(/etc/fstab,推荐这种方法)
/dev/mmcblk0p5  /  ext4      defaults,noatime,errors=remount-ro   0      1或者用下面这种
ln -fs /proc/self/mounts /etc/mtab将根文件系统制作成镜像这里制作一个8G的ext4格式的镜像文件
dd if=/dev/zero of=linuxroot.img bs=1M count=8192sudo  mkfs.ext4  linuxroot.imgmkdir  rootfssudo mount linuxroot.img rootfs/sudo cp -rfp temp/*  rootfs/sudo umount rootfs/e2fsck -p -f linuxroot.imgresize2fs  -M linuxroot.img烧写制作好的gentoo文件系统
rkflashtool w linuxroot < linuxroot.img
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表