Well, this is all I got for now.
I'll attach a Dockerfile (edit: please remove the .txt extension, it didn't allow me to upload with the real name) if I can, which seems to be able to cross-compile an MLO, but I can't test the resulting MLO.
The problem I've had is that gcc 12 didn't want to compile the old U-Boot, and I have to change KBUILD_CFLAGS to add -msoft-float to have it compile.
I don't think it's very likely to do harm, but it seems less than optimal.
It's probably better to try
this patch, but I haven't. I don't know if we want it, or want to compile as close to possible to the known good source.
Edit: or maybe before starting to cherry pick patches from later on U-Boot history, we may prefer to rebase somehow to a newer U-Boot, but that should be done by someone who can test it.
Edit: version2: just corrected some comments and moved some exported variables in a script, nothing of much consequence.
Edit: version3. Corrected more comments. Left the typo bookworn/bookworm, because I'm too lazy to rebuild the images and retest and after all, the Pyra is something you can "wear" like a book (ok, carry), isn't it ?