n8henrie
I wanted to try to get NixOS running on the Quadra. As NixOS has good support for aarch64-linux systems I suspect it could work.
 
However, I'm not having any luck trying to boot the installer image, which I've downloaded from < https://channels.nixos.org/nixos-23.05/latest-nixos-minimal-aarch64-linux.iso> and put on an SD card.
 
From what I've read, just putting in the SD card should be sufficient to attempt to boot from that image, correct?
 
I've tried holding / pressing various key combinations during startup (shift, delete, F1) to try to get a bootloader menu, but every time it just boots to the Quadra's desktop.
 
It looks like the board has a "uboot recovery" solder point -- do I need to ground this to get to uboot?
 
Thanks for any suggestions!
Michael Burmeister-Brown inovato
If the image is compatible with the Quadra, it will just boot from the SD card.  The Quadra always tries to boot from SD first.  
 
Typically, images have to be built for the exact hardware they will run not, not just the processor family.  So it is unlikely that an image not built for the Quadra can work.  
Reply 0 0
n8henrie
Thanks for the response!
Typically, images have to be built for the exact hardware they will run
I remain optimistic; I usually find that installer ISOs are built with pretty broad hardware support given their intended purpose, and I can usually at least get the live image to load (even if installation doesn't work or hardware peripherals don't function correctly).
 
Is there any way for me to see the u-boot log / messages on startup? I'm just getting a blank screen until the armbian boots, with no ability to use the u-boot CLI to investigate; I'm hoping to interrupt the boot process to try to manually boot from the SD card (and see if I get an error message as to why it isn't trying). The usual keyboard sequences don't seem to work.
 
I see the `sunxi64` uboot config at `boot/config-6.1.45-current-sunxi64` and `usr/lib/linux-u-boot-current-inovato-quadra_22.08.0-trunk_arm64/u-boot-sunxi-with-spl.bin` -- I'll keep tinkering and report back if I get something to boot.
Reply 0 0
n8henrie
With a proper u-boot, the NixOS image boots fine, it just doesn't output to HDMI or have network connectivity so I couldn't tell. Hooking up the serial ports at 115200 works great and gets me to a login prompt.
 
My basic process so far, running from an x86 arch linux host:
 
1. clone u-boot (I'm currently using `9a0cf3993f71043ba08c315572c54622de42d447`)
2. Run the script below to create `u-boot-sunxi-with-spl.bin`
 
 
#!/usr/bin/env bash
 
set -Eeuf -o pipefail
shopt -s inherit_errexit
set -x
 
main() {
    make clean
    rm -f .config
    make tanix_tx6_defconfig
    ./scripts/kconfig/ merge_config.sh .config .custom_config
    make -j"$(nproc)" CROSS_COMPILE=aarch64-linux-gnu-
}
main "$@"
 
 
 
 
#!/usr/bin/env bash
# https://u-boot.readthedocs.io/en/latest/board/allwinner/sunxi.html#installing-u-boot
 
readonly DEVICE=/dev/disk/by-id/usb-TS-RDF5_SD_Transcend_000000000039-0:0
 
log() {
    printf '%s\n' "$*" > /dev/stderr
}
 
err() {
    log "$*"
    exit 1
}
main() {
    [[ -b "${DEVICE}" ]] || err "device not found: ${DEVICE}"
 
    if [[ "${EUID}" -ne 0 ]]; then
        sudo bash "$0" "$@"
        exit $?
    fi
 
    dd if=/mnt/storage/iso/nixos-sd-image-23.05.1994.af8279f65fe-aarch64-linux.img of="${DEVICE}" bs=4M status=progress conv=fsync
    dd if=u-boot-sunxi-with-spl.bin of="${DEVICE}" bs=1k seek=128 status=progress conv=fsync
}
main "$@"
 
Hopefully I'll be able to decipher your armbian patch enough to figure out ethernet next.
 
Reply 0 0
Reply