30 May 2025 |
K900 | Uhh do you? | 16:54:23 |
K900 | I think dd worked for me | 16:54:27 |
K900 | But I don't remember at this point | 16:54:50 |
ElvishJerricco | I have flash_erase /dev/mtd0 0 0 followed by nandwrite --pad /dev/mtd0 ./uboot.img in my notes because it was booting if I just overwrote it | 16:54:53 |
ElvishJerricco | * I have flash_erase /dev/mtd0 0 0 followed by nandwrite --pad /dev/mtd0 ./uboot.img in my notes because it wasn't booting if I just overwrote it | 16:55:02 |
K900 | Did you write to /dev/mtd0 or /dev/mtdblock0 | 16:55:17 |
ElvishJerricco | mtd0 | 16:55:24 |
K900 | I think /dev/mtdblockN should automatically do the erase dance | 16:55:28 |
ElvishJerricco | ahh ok | 16:55:34 |
ElvishJerricco | anyway emily I did figure out how to format an SD card to get it booting off that instead of the NAND if you want | 16:56:36 |
emily | yeah I'm interested | 16:57:16 |
emily | I'll probably want to do NAND + M.2 long-term but right now I kinda just want to get something booting | 16:57:26 |
ElvishJerricco | basically build the tfa with "BOOT_DEVICE=sdmmc" , write the resulting bl2.img to a partition with the LegacyBIOSBootable GPT flag set, and write the resulting fip.bin to a partition with the GPT label fip | 16:59:00 |
ElvishJerricco | emily: I built the image with repart but it required a patch to repart because libfdisk is dumb. https://gist.github.com/ElvishJerricco/4b005a7235138225cead7205b72570f1 | 17:04:36 |
emily | wait the ROM surely doesn't parse GPT though right? | 17:05:18 |
emily | does it need to be at a specific offset or something? | 17:05:25 |
ElvishJerricco | it does | 17:05:26 |
ElvishJerricco | it parses GPT | 17:05:32 |
emily | wow | 17:05:34 |
emily | I don't know how to feel about that | 17:05:56 |
emily | so I guess you just flashed this image and started using it without a separate install? | 17:06:53 |
emily | or did you use it to boot the installer to RAM? | 17:07:06 |
ElvishJerricco | I did not use it to boot a nixos installer. I just started using it once that image booted. | 17:08:00 |
emily | right | 17:08:13 |
ElvishJerricco | pretty quickly wiped the ESP and just started doing nixos-rebuild --target-host to it though | 17:08:22 |
ElvishJerricco | oh, forgot to mention I cross compile the entire system | 17:08:59 |
emily | wait, what does wiping the ESP have to do with that? | 17:12:48 |
ElvishJerricco | not much; e.g. the UKI should be deleted if nixos is doing its normal systemd-boot stuff | 17:14:37 |
emily | right | 17:14:53 |
emily | why is the UKI there to begin with? | 17:15:00 |