一、参考文档
https://qemu.readthedocs.io/en/latest/system/arm/orangepi.html
二、编译linux kernel
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make mrproper
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make sunxi_defconfig
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make menuconfig
支持usb
Device Drivers > USB support > USB Mass Storage support
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make -j 16
三、下载镜像文件
下载
https://mirrors.tuna.tsinghua.edu.cn/armbian-releases/orangepipc/archive/Armbian_21.05.1_Orangepipc_focal_current_5.10.34_xfce_desktop.img.xz
解压缩
xz -d Armbian_21.05.1_Orangepipc_focal_current_5.10.34_xfce_desktop.img.xz
制作4G SD卡
sudo dd if=Armbian_21.05.1_Orangepipc_focal_current_5.10.34_xfce_desktop.img of=device bs=4096M
四、运行
qemu-system-arm -M orangepi-pc -nic user -kernel zImage -append 'console=ttyS0,115200 root=/dev/mmcblk0p1' -dtb sun8i-h3-orangepi-pc.dtb -sd Armbian_21.05.1_Orangepipc_focal_current_5.10.34_xfce_desktop.img -nographic
五、u-boot
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make orangepi_pc_defconfig
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make meunconfig
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make -j 16
六、结果
[ OK ] Started Run system activit…ounting tool every 10 minutes.
[ OK ] Started Generate summary o…esterday's process accounting.
[ OK ] Reached target Timers.
[ OK ] Started LSB: Set sysfs variables from /etc/sysfs.conf.
Starting Network Manager Script Dispatcher Service...
[ OK ] Started Network Manager Script Dispatcher Service.
Armbian 21.05.2 Hirsute ttyS0
orangepipc login:
|