| 11 Mar 2024 |
Steven Keuchel | so to boot from SPI you would have to flash from an existing image first | 19:32:37 |
Mic92 | S. Reimers: order some sdcard :) | 19:32:53 |
S. Reimers | I think we have one (: | 19:33:16 |
Steven Keuchel | best grab the bootloader from https://github.com/sophgo/bootloader-riscv/actions | 19:33:17 |
Steven Keuchel | the sophgo-bootloader-single build artifact is what you want.
(-multi is for some multisocket board) | 19:34:23 |
Steven Keuchel | it contains a .bin to flash to SPI and an SD .img that contains just one partition with all the boot stages | 19:35:02 |
Steven Keuchel | I hope you got the box though, not just the bare board, because by default the bootloader does not output the bootmenu on serial :( | 19:35:51 |
Mic92 | We have the case | 19:36:05 |
Mic92 | USB-C serial works | 19:36:16 |
Mic92 | I am going to chatgpt some docs out of this conversation. | 19:37:05 |
Steven Keuchel | with that on an sdcard, you can simply cross-compile nixos to a second partition.
or to a USB, SATA, or NVME drive . | 19:37:08 |
Steven Keuchel | oh and I'm running this kernel now https://github.com/sophgo/linux-riscv/tree/sg2042-dev-6.6 | 19:39:48 |
Mic92 | How does the boodloader than find the nixos on the second partition i.e. the kernel, initrd and so on? | 19:40:47 |
Steven Keuchel | LinuxBoot is a bit generic and scans for extlinux, grub.cfg, etc. | 19:41:10 |
Steven Keuchel | you can also EFI boot | 19:41:44 |
Steven Keuchel | but that does not work from SD | 19:41:50 |
Steven Keuchel | SD has to be mbr, because the zsbl does not support gpt for some reason | 19:42:18 |
Steven Keuchel | even though the Arm TF and the FAT code inside zsbl do support gpt. | 19:43:04 |
Mic92 | Steven Keuchel: so you just went the grub route to have a /boot/grub.cfg? | 19:44:35 |
Steven Keuchel | no I started with extlinux and then eventually switched to efi boot | 19:45:06 |
Steven Keuchel | I think grub cross-compilation failed | 19:45:20 |
Mic92 | So you updated the firmware on spi flash and than boot with EFI from the nvme? | 19:45:59 |
Steven Keuchel | yes | 19:46:11 |
Mic92 | Also sounds like an option. | 19:46:19 |
Steven Keuchel | https://github.com/sophgo/sophgo-doc/blob/main/SG2042/HowTo/Configuration%20Info%20in%20INI%20file.rst | 19:46:54 |
Mic92 | To flash the spi, do I dd the .bin to an sd card? | 19:47:00 |
Steven Keuchel | says how to switch to edk2 and how to flash | 19:47:02 |
Mic92 | Ah no you probably did this from a linux linux | 19:47:34 |
Steven Keuchel | the only documentation about flashing to SPI I found is just via mtd-utils in linux | 19:47:39 |
Steven Keuchel | no idea if you can flash over UART | 19:47:49 |