NixOS on ARM: Difference between revisions

imported>Samueldr
imported>Samueldr
m NixOS_on_ARM/BeagleBone_Black + fixes to text related to moving contents.
Line 52: Line 52:
|-
|-
| BeagleBoard.org
| BeagleBoard.org
| Beaglebone Black
| [[NixOS_on_ARM/BeagleBone_Black|BeagleBone Black]]
| TI AM335x
| TI AM335x
| ARMv7
| ARMv7
Line 131: Line 131:
== Board-specific installation notes ==
== Board-specific installation notes ==


Depending on the board, some additional preparation steps might be needed to make the SD card bootable on your device.
Depending on the board, some additional preparation steps might be needed to make the SD card bootable on your device. All of the board-specific installation notes are now found on their respective pages.
 
=== Beaglebone Black ===
 
U-Boot and its SPL (called the MLO) need to be copied to specific sectors on the microSD card with dd. Download U-Boot & MLO for the board (<code>uboot-am335x_boneblack_defconfig-2017.03_u-boot.img</code>, <code>uboot-am335x_boneblack_defconfig-2017.03_MLO</code>), and copy them to the correct location with (again, replace /dev/sdX with the correct path to the SD card device):
 
<syntaxhighlight lang="bash">
sudo dd if=uboot-am335x_boneblack_defconfig-2017.03_MLO        of=/dev/sdX count=1 seek=1 bs=128k
sudo dd if=uboot-am335x_boneblack_defconfig-2017.03_u-boot.img of=/dev/sdX count=2 seek=1 bs=384k
</syntaxhighlight>
 
In case there is a valid boot loader on the eMMC of the board and the NixOS U-Boot isn't getting launched, try holding the button labeled 'S2' when resetting the board. Also the boot ROM might have a size limitation on the microSD cards used for booting; the author wasn't able to get a 64 GB SDXC card working but a 8 GB SDHC card worked.


== Enable UART ==
== Enable UART ==
Line 217: Line 206:
On NixOS, all ARM boards use the popular U-Boot as the bootloader and [https://github.com/u-boot/u-boot/blob/master/doc/README.distro U-Boot's Generic Distro Configuration Concept] as the mechanism to communicate boot information (such as path to kernel zImage, initrd, DTB, command line arguments). For a quick TL;DR about the generic distro configuration support: U-Boot is scripted to scan all attached storage devices & partitions and look for a file named <code>/extlinux/extlinux.conf</code> or <code>/boot/extlinux/extlinux.conf</code> (which will be generated by NixOS, just like <code>/boot/grub/grub.cfg</code> is generated on PCs).
On NixOS, all ARM boards use the popular U-Boot as the bootloader and [https://github.com/u-boot/u-boot/blob/master/doc/README.distro U-Boot's Generic Distro Configuration Concept] as the mechanism to communicate boot information (such as path to kernel zImage, initrd, DTB, command line arguments). For a quick TL;DR about the generic distro configuration support: U-Boot is scripted to scan all attached storage devices & partitions and look for a file named <code>/extlinux/extlinux.conf</code> or <code>/boot/extlinux/extlinux.conf</code> (which will be generated by NixOS, just like <code>/boot/grub/grub.cfg</code> is generated on PCs).


U-Boot also provides an interactive shell and the generation selection menu (just like GRUB). However, support for input or display devices varies greatly, depending on the board:
U-Boot also provides an interactive shell and the generation selection menu (just like GRUB). However, support for input or display devices varies greatly, depending on the board. Details for what the boards support in relationship to the boot process are detailed in their respective pages.
 
=== Beaglebone Black ===
 
Only serial console (via the 6-pin FTDI pin header) is supported.


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