| 12 Jul 2023 |
Alex | The system is only meant to boot with the switches on "flash" | 17:28:53 |
Alex | In reply to @thefossguy:matrix.org Ah, so I'll need to build it myself? And figure out how to make it SDIO boot-compatible, if you want to go that way | 17:29:13 |
Pratham Patel | By flash, do you mean the QSPI flash on board? | 17:29:28 |
Alex | Yes, it's the setting called "flash" on the printout on the board itself. | 17:29:49 |
Pratham Patel | Okay I'll give it another go | 17:30:07 |
Alex | Honestly though, I'm amazed that you managed to boot misuzu's image at all after screwing with the partitions. | 17:30:55 |
Pratham Patel | I inserted an old SD card (which didn't manipulate the partitions) and now the console complains this:
switch to partitions #0, OK
mmc1 is current device
found device 1
bootmode flash device 1
Failed to load 'uEnv.txt'
Can't set block device
Hit any key to stop autoboot: 0
Failed to load '/uEnv.txt'
## Warning: defaulting to text format
switch to partitions #0, OK
mmc1 is current device
** Invalid partition 3 **
Couldn't find partition mmc 1:3
## Error: "bootcmd_mmc1" not defined
starfive_pcie pcie@2C000000: Starfive PCIe bus probed.
PCI: Failed autoconfig bar 10
ethernet@16030000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
phy_startup() failed: -110FAILED: -110ethernet@16040000 Waiting for PHY auto negotiation to complete....... done
| 17:31:19 |
Pratham Patel | I know why I did the partition makeover lol | 17:31:42 |
Alex | It looks to me like that's in SDIO boot mode? | 17:31:56 |
Pratham Patel | Nope, I'm booting from flash | 17:32:06 |
Alex | Switches on 0, 0?
Weird. | 17:32:31 |
Pratham Patel | U-Boot SPL 2021.10 (May 31 2023 - 16:54:00 +0800)
DDR version: dc2e84f0.
Trying to boot from SPI
| 17:32:32 |
Pratham Patel | In reply to @alex:tunstall.xyz Switches on 0, 0? Weird. Yep, 00 | 17:32:38 |
Pratham Patel | I don't know the Nix expression langauge, like, at all otherwise I would've sent in the PR to boot from SD. I hate the booting from SD card approach but since uboot is on SD card, we know what uboot the user is using. | 17:35:46 |
Alex | Latest from vendor should work.
Are you able to boot misuzu's image in SPI mode? | 17:36:30 |
Pratham Patel | I'll check the latest vendor firmware | 17:36:51 |
Pratham Patel | In reply to @alex:tunstall.xyz
Latest from vendor should work.
Are you able to boot misuzu's image in SPI mode? not in SPI mode (with the firmware flashed using nix run github:misuzu/nixos-vf2#flash-visionfive2-vendor /dev/ttyUSB0) | 17:37:07 |
Pratham Patel | I will recheck using the latest stock firmware | 17:38:41 |
Alex | You might need to flash the latest firmware in the vendor's Debian system.
The "upstream" kernel's DTB has a broken SPI partition table that is too small to flash all of the u-boot file. | 17:38:44 |
Pratham Patel | I don't understand what you mean by the last sentence... | 17:39:18 |
Alex | $ cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00001000 "spl"
mtd1: 00300000 00001000 "uboot"
mtd2: 00100000 00001000 "data"
mtd0 has a size of 128KiB, but the latest versions of u-boot exceed that. | 17:40:05 |
Alex | Sorry, I probably should've mentioned this sooner. | 17:40:40 |
Pratham Patel | That's why I prefer booting from SD Card for development purposes :) | 17:41:09 |
Pratham Patel | I belive they have switched their priorities to porting EDK2 | 17:41:27 |
Alex | This isn't a problem on the vendor's Debian, because the devel branch of the kernel has a different partition table. | 17:41:27 |
Alex | Can you describe what needs to be done to boot from SD?
I might be able to make the change. | 17:41:51 |
Pratham Patel | Just a sec | 17:42:10 |
Pratham Patel | I use this partition layout for the first two partitions
https://github.com/thefossguy/archlinux-visionfive2/blob/master/create-image.sh#L85 | 17:42:46 |
Pratham Patel | Then, you dd u-boot-spl.bin.normal.out to part1 and visionfive2_fw_payload.img to part2 | 17:44:13 |
Alex | So 4 partitions:
- SPL (u-boot metadata)
- u-boot (flat binary)
- boot (FAT)
- root
Makes sense. | 17:44:29 |