
13 Nov
2018
13 Nov
'18
6:57 p.m.
Hi Simon,
On 13/11/18 18:43, Simon Goldschmidt wrote:
Am Di., 13. Nov. 2018, 17:53 hat Stefano Babic <sbabic@denx.de mailto:sbabic@denx.de> geschrieben:
On 13/11/18 17:07, Simon Goldschmidt wrote: > On 13.11.2018 17:00, Wolfgang Denk wrote: >> Dear Simon, >> >> In message >> <CAAh8qsxB3YNoDruZnmcPvkygc7HXVOcf=PNdA4xRp=PjmQANsw@mail.gmail.com <mailto:PjmQANsw@mail.gmail.com>> >> you wrote: >>> My idea was to let SPL implement a dedicated boot counter/watchdog >>> that detects problems starting U-Boot and using a backup copy if it >>> fails multiple times. Of course you need an SPL on your board to do >>> this. Plus you end up with the same problem for updating SPL, but I'm >>> lucky here that my platform (socfpga gen5) has redundant storage for >>> SPL and implements a startup watchdog mechanism for the SPL. >> In other words, you are just adding enough additional complexity to >> SPL to make it reasonably likely that there will be bugs that need >> to be fixed later, i. e. you have to update the SPL. >> >> And then? >> >> You are just moving the problem, not solving it. > > That's not how I see it. As I see it, I have to implement an upgrade > option for SPL. This is partly due to bad design of the socfpga_gen5 > platform. But also I have read multiple times on this list that you > should use SPL from the same version as U-Boot as they might work > combined and U-Boot might depend on SPL to do things that might change > over time. Right. It is not guaranteed that mixing versions works. > So is it really a good idea to upgrade U-Boot without > upgrading SPL at the same time? IMHO it is a bad idea, and it forgets that the bootloader is really SPL + u-boot.img else just u-boot.img. It is also questionable if it makes sense to provide an update mechanism for u-boot when most of critical parts like clocks, DDR initialisation, etc. are in SPL. > It seems to me this would require > thorough testing of different version mixes... > Agree, and this becomes a mess. > So given that SPL must be upgradable, how is it more complex to detect > U-Boot failure from SPL than from U-Boot itself? I do not get the question - if SPL fails, it can be at any time before you get the control. There sould be a mechanism to switch to a previous copy of SPL, generally this is not available in hw.
Unless I'm mistaken, the socfpga gen5 bootrom implements a timer and loads SPL from secondary storage of it does not register as successful after some time.
That means you *have* hardware support, then.
I am not aware there is such as feature on i.MX6.
That's my arch only, of course...
Regards, Stefano
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================