NixOS on ARM/ODROID-HC4
|Boot options||SD (SATA?)|
Mostly working, but some manual steps needed to get it running.
U-boot support in NixPkgs is currently in review: NixPkgs Pull Request #101454
Board-specific installation notes
Petitboot is installed on the SPI memory of the Odroid HC4 from factory. To be able to load an upstreamed version of U-Boot without having to press a hardware button at each boot, you may remove it. Please proceed with caution, this will make Hardkernel images unbootable!
From the Petitboot, go for “Exit to shell” and enter these commands to remove Petitboot:
flash_eraseall /dev/mtd0 flash_eraseall /dev/mtd1 flash_eraseall /dev/mtd2 flash_eraseall /dev/mtd3
This will make your SPI flash memory empty and the device will now start from SD on next boot.
See this Odroid forum topic to restore Petitboot.
- First follow the generic installation steps to get the 21.05 (Latest kernel) installer image.
- Uncompress the .zst file. One may use the
unzstdcommand (equivalent to
zstd -d) on supported machines. The zstd commands can be accessed from the
- Patch this image (.img file) with U-Boot for Odroid HC4.
# Clone content of pull request https://github.com/NixOS/nixpkgs/pull/101454 and build git clone https://github.com/arapov/nixpkgs --depth 1 -b hardkernel && cd nixpkgs nix-build -I "nixpkgs=$PWD" -A pkgsCross.aarch64-multiplatform.ubootOdroidC4 sudo dd if=result/u-boot.bin of=PATH/TO/nixos-sd-image-21.05.XXXX.XXXXXXXX-aarch64-linux.img conv=fsync,notrunc bs=512 seek=1
- Flash the modified SD image file (.img) to a microSD card. This will erase all the data on the card!
SATA is not working
SATA is working on Armbian with mainline kernel and u-boot but not on NixOS 21.05: lspci returns nothing. WIP