NixOS on ARM: Difference between revisions

imported>Fadenb
m replace html entities
imported>Samueldr
Remove QEMU instructions as they cannot be completed
Line 45: Line 45:
|}
|}


Additionally, emulation is supported via QEMU's vexpress-a9 target.
QEMU emulation is not supported as of right now.


=== Installation ===
=== Installation ===
Line 72: Line 72:


The ARMv6 image boots out-of-the-box! Note that Raspberry Pi 2 is not yet supported by these images, but in the future the ARMv7 image will work.
The ARMv6 image boots out-of-the-box! Note that Raspberry Pi 2 is not yet supported by these images, but in the future the ARMv7 image will work.
=== Versatile Express (Cortex-A9) in QEMU ===
First, convert the downloaded sd-image-armv7l-linux.img to a new qcow2 formatted disk image (for example, arm-vm.qcow2) and resize it to the desired size (for example, 2.5G):
<syntaxhighlight lang="bash">qemu-img convert -O qcow2 sd-image-armv7l-linux.img arm-vm.qcow2
qemu-img resize arm-vm.qcow2 2.5G</syntaxhighlight>
Then, to boot the VM, download U-Boot for the Versatile board (uboot-vexpress_ca9x4_defconfig-2015.07_u-boot) and run:
<syntaxhighlight lang="bash">qemu-system-arm -kernel uboot-vexpress_ca9x4_defconfig-2015.07_u-boot -M vexpress-a9 -serial stdio -sd arm-vm.qcow2 -m 512</syntaxhighlight>
The amount of memory (-m 512) should be at least 512 megabytes, or you will get all sorts of funny behaviour if/when U-Boot tries to access nonexistent RAM. Unfortunately, the maximum amount of memory is limited to 1024 megabytes.


== NixOS installation & configuration ==
== NixOS installation & configuration ==
Line 146: Line 135:


HDMI displays work, but sadly USB keyboards don't. A 3.3v serial port is via the 26-pin connector works.
HDMI displays work, but sadly USB keyboards don't. A 3.3v serial port is via the 26-pin connector works.
=== Versatile Express (Cortex-A9) in QEMU ===
The emulated serial port (connected to QEMU's stdin/stdout) works.


== Porting NixOS to new boards ==
== Porting NixOS to new boards ==