- burn two sd cards with latest image
- the one to be used in internal slot has to have at least u-boot
- put the latter into the pi
- put the other in a card reader connected via usb to pi
- connect keyboard and monitor
- power on pi
- try
help fatls
fatls usb 0:1
- try
printenv
run bootcmd_usb0
- on the booted nixos
mkdir .ssh ;
chmod 700 .ssh ;
touch .ssh/authorized_keys ;
chmod 600 .ssh/authorized_keys
- the new files are then on the card in the internal slot of the pi and you can add your ssh key for headless mode
- debug locating boot.scr
run scan_dev_for_scripts
(root of sd card fat partition) - boot.scr entries probably need trailing
;
? - https://hechao.li/2021/12/20/Boot-Raspberry-Pi-4-Using-uboot-and-Initramfs/
- qemu: https://krinkinmu.github.io/2023/11/19/u-boot-boot-script.html
- https://stackoverflow.com/questions/37079990/is-any-arm-platform-emulation-in-qemu-functional-enough-to-run-arm-v7-code-in-mu
- https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/749142017/Using+Distro+Boot+With+Xilinx+U-Boot#Using-the-boot.scr-Method
- https://krinkinmu.github.io/2023/11/19/u-boot-boot-script.html
- https://search.nixos.org/packages?channel=unstable&show=ubootTools&from=0&size=50&sort=relevance&type=packages&query=uboot
- https://unix.stackexchange.com/questions/120909/how-to-make-sd-card-as-default-boot-in-uboot
- https://discourse.nixos.org/t/nixos-failing-to-boot-from-sd-card-on-raspberry-pi-4b-2gb/14368/7
- https://github.com/tstat/raspberry-pi-nix
On my keys { and } are on Ü and *+~ respective. | I did not locate.
Discovered that only sd card internal slot alone also let's me run bootcmd_mmc0
.
Only issue, after I added my key to authorized_keys on the card I got an issue saying 'Kernel panic' in 'NixOS stage 2' boot sequence. Issue gone when using the other, untouched card internally.