[BPI-R64] Boot env bug in OpenWrt and boot question

First of all, there seems to be a bug in OpenWrt for the BPI-R64 where even on sdcard images that OpenWrt’s uboot env commands are set up to use the uboot environment of the eMMC:

# cat /etc/fw_env.config 
/dev/mmcblk0p2 0x0 0x80000 0x80000 1
/dev/mmcblk0p2 0x80000 0x80000 0x80000 1

I believe this is automatically generated on first boot in OpenWrt. It seems it’s being generated wrong when booting off sdcard. I just looked and it seems to generate correctly on the R2 for sdcard boots.

Secondly, I’m curious what the actual boot progression is on the R64. Specifically, what is it looking for to decide if an sdcard is present to boot from? I am having some issues where after resizing my overlay (in the way I always have) that the sdcard is no longer being detected as bootable.

As a note, has anyone else noticed that the sdcard slot on the R64 is really slow?

I’ve confirmed this is only the case in snapshot and not 22.03

Did you try saving the first sector on the card before and restoring it after the operation?

I noticed that I needed to restore the first sector after using parted on any partition.

That makes sense. When they switched to gpt partition tables I began to use parted as it was easier to rename and retain all the UID information and partition label (since you have to delete and remake the partition in fdisk to resize it). Using fdisk works

maybe my new way to create the gpt helps here

but i’m unsure if this works with openwrt too…