NixOS on ARM: Difference between revisions

imported>Samueldr
m Re-orders devices table (and documents an abitrary order as a comment)
imported>Samueldr
m Begins splitting contents
Line 125: Line 125:


<syntaxhighlight lang="bash">sudo dd if=uboot-Linksprite_pcDuino3_Nano_defconfig-2015.07_u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8</syntaxhighlight>
<syntaxhighlight lang="bash">sudo dd if=uboot-Linksprite_pcDuino3_Nano_defconfig-2015.07_u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8</syntaxhighlight>
=== Raspberry Pi (1) ===
The ARMv6 image boots out-of-the-box.
=== Raspberry Pi 2 ===
The ARMv7 image should boot out-of-the-box, though the author hasn't personally tested this.
=== Raspberry Pi 3 ===
Both the AArch64 and ARMv7 images boot out-of-the-box. Using the 64-bit AArch64 image is highly recommended, as the availability of binaries is much better and allows the use of the 64-bit instruction set.
Use the following GPIO Pins with an USB-TTL connector:
<syntaxhighlight>
GND        - 3rd in top row, black cable
GPIO 14 TXD - 4th in top row, white cable
GPIO 15 RXD - 5th in top row, green cable
</syntaxhighlight>
Use <code>nix-shell -p screen --run "screen /dev/ttyUSB0 115200"</code> to connect to the console.
{{note|Right now (2017-10-08) wifi is not working out of the box on the Raspberrypi 3, you will need to use ethernet. Add the following to your configuration.nix. This requires linux kernel > 4.13.0 }}
<syntaxhighlight lang=nix>
{
  ...
  hardware.enableRedistributableFirmware = true;
  hardware.firmware = [
    (pkgs.stdenv.mkDerivation {
    name = "broadcom-rpi3-extra";
    src = pkgs.fetchurl {
    url = "https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/54bab3d/brcm80211/brcm/brcmfmac43430-sdio.txt";
    sha256 = "19bmdd7w0xzybfassn7x4rb30l70vynnw3c80nlapna2k57xwbw7";
    };
    phases = [ "installPhase" ];
    installPhase = ''
    mkdir -p $out/lib/firmware/brcm
    cp $src $out/lib/firmware/brcm/brcmfmac43430-sdio.txt
    '';
    })
  ];
  networking.wireless.enable = true;
}
</syntaxhighlight>


=== Wandboard ===
=== Wandboard ===
Line 294: Line 252:


USB keyboards and HDMI displays work perfectly. Also a 3.3v serial port via the 3-pin header works.
USB keyboards and HDMI displays work perfectly. Also a 3.3v serial port via the 3-pin header works.
=== Raspberry Pi (all versions) ===
USB keyboards and HDMI displays work perfectly. Using the 3.3v serial port via the pin headers (exact location depends on hardware version) should also work.


=== Wandboard ===
=== Wandboard ===
Line 350: Line 304:
* If your board's U-Boot configuration doesn't use the <code>extlinux.conf</code> format by default, create a patch to enable it. Some C hacking skills & U-Boot knowledge might be required. For some pointers, see this patch to enable it on the Versatile Express.
* If your board's U-Boot configuration doesn't use the <code>extlinux.conf</code> format by default, create a patch to enable it. Some C hacking skills & U-Boot knowledge might be required. For some pointers, see this patch to enable it on the Versatile Express.
* Make a pull request, also containing the board-specific instructions. Ping '''@dezgeg''' for review and for building & hosting the U-Boots at http://nixos-arm.dezgeg.me/installer.
* Make a pull request, also containing the board-specific instructions. Ping '''@dezgeg''' for review and for building & hosting the U-Boots at http://nixos-arm.dezgeg.me/installer.
== Resources ==
=== Subpages ===
The following is a list of all sub-pages of the ''NixOS on ARM'' topic.
{{Special:PrefixIndex/NixOS_on_ARM/}}