NixOS on ARM/ASUS Tinker Board
NixOS on TinkerBoard | |
---|---|
Manufacturer | ASUS |
Architecture | ARMv7 |
Bootloader | Upstream u-boot |
Maintainer | tomberek |
Status
@dezgeg's porting efforts to ARMv7 works on the TinkerBoard, with some modification for u-boot and DTB paths. Support for this board is a work in progress. Please contact me for comments/thoughts/feedback/etc.
Board-specific installation notes
First follow the generic installation steps to get the installer image on an SD card.
The Tinker Board seems to look for U-Boot at a specific offset rather than in a file. So copy the initial 4MB from the TinkerOS image and then copy it to the NixOS image while skipping the MBR/partition table in the first 512 bytes. It turns out the bootstrap section of the MBR is also needed, so copy that as well.
These commands may use either the /dev/sdX or the file images and later copied to SD cards - this was discovered iteratively, thus was performed on the sd cards directly. Use with caution. (Assumes /dev/sdc
is TinkerOS and /dev/sdb
is NixOS images or devices respectively).
dd if=/dev/sdc of=tinker_sector bs=512k count=8 status=progress # grab tinker initial sectors
dd if=tinker_sector of=/dev/sdb bs=512 skip=1 seek=1 count=8191 # copy the img and env blobs
dd of=/dev/sdb if=tinker_sector bs=428 count=1 # bootstrap code from begining of MBR
It turns out that getting into U-Boot using the TinkerOS image, halting the boot process, replacing SD cards with the NixOS image fails, but the error message suggests the extlinux merely has a different name for the DTB than NixOS has packaged. Simply copy from the nixos dtb file `/boot/nixos/<hash>-dtbs/rk3288-tinker.dtb` to `rockchip-tinker_rk3288.dtb` (possibly `rockchip-miniarm_rk3288.dtb`, TODO: examine U-Boot output to see what DTB it tries to read).
Then, install using the installation and configuration steps.
Serial console
Your configuration.nix will need to modify the default boot.kernelParams
configuration to use the serial console.
/etc/nixos/configuration.nix
boot.kernelParams = [
"console=ttymxc0,115200n8" # HDMI?
"console=tty0" # Primary Console?
"console=ttyS1,115200n8" # Serial port?
"console=ttyS2,115200n8" # Serial port pins 8+10
];
TODO
- Build U-boot from upstream
- upload images/blobs
- host binary cache