login_to_dpp_server should only try to login, the decision to print
warning or not should be done outside this function basing on the output
of this function. Otherwise every time the function is being called the
warning could be printed too, which is not always wanted.
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
Before:
Something may be wrong with the DPP credentials or you may not
have access to Dasharo Firmware. If so, consider getting Dasharo
Subscription and improving security of your platform!
Now:
Something may be wrong with the DPP credentials or you may not
have access to Dasharo Firmware. If so, consider getting Dasharo
Subscription and improving security of your platform!
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
Cause of this patch: After I have added and integrated HAL - I have
added following line in dts-boot:
source $DTS_HAL
This was needed because I have used some fuctions from the HAL in the
script.
Inside DTS_HAL I had following line:
source $DTS_ENV
Because I have used some vars from the DTS_ENV in the HAL.
The problem was, that I had another line in DTS_ENV:
source $DTS_HAL
So, I got following boot workflow:
Boot
|
v
dts-boot
| /-------\
v v |
DTS_HAL->DTS_ENV
.
............
v
dts
Instead of sourcing some scripts and then launching dts script - I got a
loop betwee DTS_HAL and DTS_ENV. Therefore I decided to clean up
sourcing a bit.
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
"test -v" checks whether a variable has been declared, it does not check
its value. We sometimes use "unset" for some variables, and then check
again with "test -v". The problem is, "unset" erases variable value, but
the variable still exists, so the "test -v" will be true before, as well
as after the "unset".
We must use "test -n" (whether a variable holds non-zero length
string value) and "test -z" (whether a variable holds zero length string
value) to check string values of variables. This way the "unset" will
work.
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
Configurations of all supported platforms are done inside
board_config function as switch/case Bash statements. The list of
supported platforms has grown a lot since then, and the function became
unreadable, so adding and managing configurations became difficult and
error-prone.
This commit adds some default configuration values as well as tries to
reuse some configuration code.
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>