NixOS on ARM/QEMU: Difference between revisions
imported>Samueldr m I don't understand mediawiki syntax |
imported>Samueldr m Add outdated notice |
||
| (3 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
{{ARM/breadcrumb}} | {{ARM/breadcrumb}} | ||
{{outdated|Information on this page needs to be updated. Support for OVMF, kvm and other use cases needs to be checked. Additionally, U-Boot support may have improved.}} | |||
== Status == | == Status == | ||
| Line 20: | Line 23: | ||
== Booting using qemu == | == Booting using qemu == | ||
The following command will boot QEMU's 'virt' machine with u-boot and the converted sdcard image, exposing four cpu cores | The following command will boot QEMU's 'virt' machine with u-boot and the converted sdcard image, exposing four cpu cores and 2GB of RAM: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
qemu-system-arm -machine virt,highmem=off -bios uboot-qemu_arm_defconfig-2018.03_u-boot.bin -drive if=none,file=sd-image-armv7l-linux.qcow2,id=mydisk -device ich9-ahci,id=ahci -device ide-drive,drive=mydisk,bus=ahci.0 -netdev user,id=net0 -device virtio-net-pci,netdev=net0 -nographic -smp | qemu-system-arm -machine virt,highmem=off -bios uboot-qemu_arm_defconfig-2018.03_u-boot.bin -drive if=none,file=sd-image-armv7l-linux.qcow2,id=mydisk -device ich9-ahci,id=ahci -device ide-drive,drive=mydisk,bus=ahci.0 -netdev user,id=net0 -device virtio-net-pci,netdev=net0 -nographic -smp 4 -m 2G | ||
U-Boot 2018.03 (Mar 13 2018 - 12:02:19 +0000) | U-Boot 2018.03 (Mar 13 2018 - 12:02:19 +0000) | ||
| Line 89: | Line 92: | ||
{{note| first boot might take a bit longer, due to the root file system being resized to the disk size.}} | {{note| first boot might take a bit longer, due to the root file system being resized to the disk size.}} | ||
== QEMU AArch64 == | |||
{{expansion}} | |||
<syntaxhighlight> | |||
$ nix-build -A pkgsCross.aarch64-multiplatform.ubootQemuAarch64 | |||
$ qemu-system-aarch64 -nographic \ | |||
-machine virt -cpu cortex-a57 \ | |||
-bios result/u-boot.bin \ | |||
./nixos-sd-image-21.03pre262561.581232454fd-aarch64-linux.img \ | |||
-m 4G | |||
</syntaxhighlight> | |||
[[Category:Virtualization]] | |||