完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
1、下载ARM64根文件系统 ubuntu-base-18.04.5-base-arm64.tar.gz
http://cdimage.ubuntu.com/ubuntu-base/releases/18.04/release/ 2、制作根文件系统
sudo apt-get install qemu-user-static
mkdir rootfs tar -xvf ubuntu-base-18.04.5-base-arm64.tar.gz -C rootfs/
sudo cp /usr/bin/qemu-aarch64-static rootfs/usr/bin/
sudo cp -b /etc/resolv.conf rootfs/etc/resolv.conf
#!/bin/bash function mnt() { echo "MOUNTING" sudo mount -t proc /proc ${2}/proc sudo mount -t sysfs /sys ${2}/sys sudo mount -o bind /dev ${2}/dev sudo chroot ${2} } function umnt() { echo "UNMOUNTING" sudo umount ${2}/proc sudo umount ${2}/sys sudo umount ${2}/dev } if [ "$1" == "-m" ] && [ -n "$2" ] ; then mnt $1 $2 elif [ "$1" == "-u" ] && [ -n "$2" ]; then umnt $1 $2 else echo "" echo "Either 1'st, 2'nd or both parameters were missing" echo "" echo "1'st parameter can be one of these: -m(mount) OR -u(umount)" echo "2'nd parameter is the full path of rootfs directory(with trailing '/')" echo "" echo "For example: ch-mount -m /media/sdcard/" echo "" echo 1st parameter : ${1} echo 2nd parameter : ${2} fi
sudo bash rootfs-mount.sh -m rootfs
deb http://mirrors.huaweicloud.com/ubuntu-ports/ bionic main multiverse restricted universe deb http://mirrors.huaweicloud.com/ubuntu-ports/ bionic-backports main multiverse restricted universe deb http://mirrors.huaweicloud.com/ubuntu-ports/ bionic-proposed main multiverse restricted universe deb http://mirrors.huaweicloud.com/ubuntu-ports/ bionic-security main multiverse restricted universe deb http://mirrors.huaweicloud.com/ubuntu-ports/ bionic-updates main multiverse restricted universe deb-src http://mirrors.huaweicloud.com/ubuntu-ports/ bionic main multiverse restricted universe deb-src http://mirrors.huaweicloud.com/ubuntu-ports/ bionic-backports main multiverse restricted universe deb-src http://mirrors.huaweicloud.com/ubuntu-ports/ bionic-proposed main multiverse restricted universe deb-src http://mirrors.huaweicloud.com/ubuntu-ports/ bionic-security main multiverse restricted universe deb-src http://mirrors.huaweicloud.com/ubuntu-ports/ bionic-updates main multiverse restricted universe apt-get update
apt-get install language-pack-en-base sudo ssh net-tools ethtool wireless-tools ifupdown network-manager iputils-ping rsyslog bash-completion htop --no-install-recommends
useradd -s '/bin/bash' -m -G adm,sudo ubuntu
passwd ubuntu
passwd root
exit
dd if=/dev/zero of=linuxroot.img bs=1M count=1024 sudo mkfs.ext4 linuxroot.img mkdir hyrootfs sudo mount linuxroot.img hyrootfs/ sudo cp -rfp rootfs/* hyrootfs/ sudo umount hyrootfs/ e2fsck -p -f linuxroot.img resize2fs -M linuxroot.img 这样 linuxroot.img 就是最终的根文件系统映像文件了。 |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
基于米尔瑞芯微RK3576核心板/开发板的人脸疲劳检测应用方案
458 浏览 0 评论
716 浏览 1 评论
620 浏览 1 评论
1850 浏览 1 评论
3099 浏览 1 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-20 18:07 , Processed in 0.591496 second(s), Total 72, Slave 56 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号