On 01/09/2025 at 04:51, [email protected] wrote:

Thanks for your interest in this issue.

Glad to see you are still interested in this.

if u-boot-install-sunxi had gained an "--alt-offset" feature I would have 
suggested using it to regenerate the sunxi arm64 installer images with U-Boot positioned 
at 128K rather than at 8K. As you've described on #1112448, currently the installer 
doesn't always produce a bootable system.

Note that debian-installer uses u-boot-install-sunxi to build SD card images only for arm64 platforms, not armhf ones.

So yes, automatically selecting a suitable offset seems a better way to go; a 
revised patch is below.

Looks good to me. Can you open a merge request in salsa ? Domenico's original one was closed. Just one comment:

+# Warn about boot priority
+if [ "$wroff" != "8K" ] && printf 'eGON.BT0' | cmp -s -i 0:8196 -n 8 - "$DEV"; 
then
+       echo >&2 "WARNING: device/image ($DEV) has boot program"
+       echo >&2 "         at offset 8K which might take priority"
+fi

Is warning enough ? If a boot loader is present at offset 8KiB, its part beyond offset 128KiB will be overwritten and boot will probably fail. Shouldn't the magic number be deleted too ? Or maybe u-boot-install-sunxi should require --force to proceed, or exit ?

Reply via email to