I’m a bit confused. Radxa’s github repo still contains only 0.2.2-1 with a last commit yesterday, so is this a build from a different tree ? Maybe from CIX ? But their tree doesn’t even seem as up to date as Radxa’s. Or was only the version changed ?
Also I found that PM v2.6 as found in the latest repo doesn’t seem to be producing working OPP tables. Whatever I change there is ignored and the output format seems to differ a bit. There’s a nice feature in the new csupm_config tool that allows to read a csu_pm_config.bin file and dump its settings, but running it on a working file produced by a previous version just emits garbage and segfaults. As such if the formats are incompatible, I suspect that any PM tables produced by that tool are just not properly understood by the init code.
I also noticed that the checksum isn’t located at the same place between the old and new tools, which could also explain why the new tables are ignored:
// checksum
- (void)double_check_sum(&g_config, sizeof(g_config) - 8, &ck, false);
+ (void)double_check_sum(&g_config, sizeof(g_config), &ck, false);
g_config.crc1 = ck >> 32;
g_config.crc2 = (uint32_t)(ck & (0xFFFFFFFFull));
Anyway, reverting the pm_config tool to v2.1 doesn’t produce a working setup either with that BIOS, so it’s difficult to figure where the issue is given that I still don’t understand what blobs consume the csu_pm_config block.
I’ll give a try to that new BIOS, to see what it looks like, but I still feel like manipulating a black box.
@RadxaYuntian do you know if there is a way to access the SPI from Linux ? I failed to find any MTD device for now. It would make BIOS upgrades much simpler during development, we could just use flash_write to /dev/mtd0 instead of having to boot three times. Also, is the FlashUpdate.efi utility limited to flashing the whole image or can it also flash a selected part ? It doesn’t have any help available, and “strings” on the binary doesn’t reveal anything useful.