This is to allow using some functions in source `$DTS_FUNCTIONS`
without entering dts-boot first e.g. board_config.
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
That way there won't be duplication which we might forgot to update.
Before this change, sourcing "$DTS_ENV" in shell connected to via ssh
wasn't possible as "$DTS_HAL" was empty, which resulted in ssh session
ending.
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
Add wrapper function for transition and recovery workflows that detects
if fd is being flashed, and if so, runs dedicated flashrom job for FD
flashing.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
For the scheduling to work reliably, the parameters must be stored as
arrays, not as strings. Use dynamic arrays for adding flashrom
parameters. Additionally improve fd flashing detection mechanism.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
Use progress bar for flashrom jobs instead of printing messages. Add
scheduling info for remaining fobs.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
If FD is to be flashed, flash the FD before flashing anything else. The
reason is regions are FD dependent.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
Instead of executing flashrom in place, schedule them and execute one
after another. This is basically a workaround for fragmented flashrom
parameter logic. This way we know all flashrom jobs before executing
them.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
Trying to use flashrom with both `--fmap` and `--ifd` results in:
```
Error: --fmap and --ifd both specified. Aborting
```
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
Less code duplication, add recovery information, in the future we can
add automatic recovery attempt (try to flash backup)
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>