qemu模拟aarch64

it2022-05-05  146

brew install qemu下载linux内核linux-4.14.35.tar.gzmake ARCH=arm64 defconfigmake ARCH=arm64 CROSS_COMPILE=aarch64-linux-制作文件系统 mv rootfs.cpio.gz ./tmp cd ./tmp gunzip rootfs.cpio.gz mkdir -p ./rootfs cd ./rootfs cpio -ivmd < ../rootfs.cpio rm ../rootfs.cpio cp /P2PLive ./bin cp ../../video.h264 ./root/ cp ../../audio.aac ./root/ cp ../../run.sh ./root/ find . | cpio -o --format=newc > ../rootfs.cpio cd .. rm -r ./rootfs gzip -c ./rootfs.cpio > ../rootfs.cpio.gz rm ./rootfs.cpio cd .. 执行 qemu-system-aarch64 -machine virt -cpu cortex-a57 \ -m 300M \ -kernel ../linux-4.14.35//arch/arm64/boot/Image \ -initrd ./rootfs.cpio.gz \ -append "console=ttyAMA0 root=/dev/ram rdinit=/init" \ -nographic

最新回复(0)