saveenv was writing to the wrong place in SPI, so was overwriting U-Boot itself and rendering the system unbootable, requiring a reflash from the debug environment.
The error was simply that the offset for the env specified in the defconfig was overwritten in sc_adi_common.h. Removed the lines that overwrote the relevant config options and it now works fine.
Note that currently, env load doesn't seem to be enabled so while saveenv works, it is effectively useless. Currently working on enabling that, and will push it to this branch once it's done.
Edit: after discussion with vas, env load being disabled is expected behaviour, however the environment should still be loaded on startup, which it isn't. Going to put this up for merging for now, and will hopefully make a new PR once that is fixed.
saveenv
was writing to the wrong place in SPI, so was overwriting U-Boot itself and rendering the system unbootable, requiring a reflash from the debug environment.The error was simply that the offset for the env specified in the defconfig was overwritten in
sc_adi_common.h
. Removed the lines that overwrote the relevant config options and it now works fine.Note that currently,
env load
doesn't seem to be enabled so whilesaveenv
works, it is effectively useless. Currently working on enabling that, and will push it to this branch once it's done. Edit: after discussion with vas,env load
being disabled is expected behaviour, however the environment should still be loaded on startup, which it isn't. Going to put this up for merging for now, and will hopefully make a new PR once that is fixed.