analogdevicesinc / lnxdsp-u-boot

U-Boot for Analog Devices ADSP-SC5xx based EZ-KIT boards
3 stars 9 forks source link

Fix `saveenv` in U-Boot, on SC573. #35

Closed OliverGaskellADI closed 5 months ago

OliverGaskellADI commented 5 months ago

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.