Last active
December 18, 2021 11:50
-
-
Save shimomura1004/4fe54ad0a74b2ee8e8c4fd18b911570f to your computer and use it in GitHub Desktop.
x86-64 の QEMU で arm64 の Linux カーネルを実行する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
まず arm64 用の Linux カーネルをビルドする | |
https://kasiviswanathanblog.wordpress.com/arm64-vanilla-kernel-in-qemu/ | |
実行には、カーネルをビルドしたときにできる start_qemu を参考にする | |
別途 yocto などで作った rootfs などを QEMU に渡して起動する | |
sudo qemu-system-aarch64 -M virt -cpu cortex-a53 -nographic -smp 1 -kernel Image -append "rootwait root=/dev/vda console=ttyAMA0" -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 -drive file=/dev/sdb2,if=none,format=raw,id=hd1 -device virtio-blk-device,drive=hd1 | |
Xen と併用するなら "-machine virtualization=true" を追加する | |
(https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions/qemu-system-aarch64) | |
yocto で作ったカーネルで /etc/resolv.conf が起動時に上書きされる問題、いつもどおり resolv.conf を書いて | |
cat /etc/resolv.conf | resolvconf -a eth0 | |
とすると設定が反映される |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
qemu aarch64 では graphics はサポートされていないので注意