Commit Graph

19 Commits

Author SHA1 Message Date
Michał Iwanicki 8188a91b5f dts-subscription.sh: shellcheck fixes
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
2024-12-05 10:22:46 +01:00
Pawel Langowski 23c6ed7f2a Use uppercase Enter
Signed-off-by: Pawel Langowski <pawel.langowski@3mdeb.com>
2024-11-21 14:28:16 +01:00
Daniil Klimuk 472ab6fff2 include: dts-subscription: move warning print outside login_to_dpp_server
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>
2024-11-20 12:52:07 +01:00
Daniil Klimuk 0cd3f0a534 Ask only for enter to continue
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-20 12:52:01 +01:00
Daniil Klimuk adb410e65e include: dts-subscription: print warning instead of error
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-18 17:43:06 +01:00
Daniil Klimuk 7087b789e0 include: dts-subscription: add UEFI Capsule Update
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-18 17:42:54 +01:00
Daniil Klimuk 183ae6ad0f include: dts-subscription.sh: fix creds problem warning printing
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>
2024-11-18 16:52:46 +01:00
Daniil Klimuk 5d310535f5 fix sourcing libs
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>
2024-11-18 16:17:36 +01:00
Daniil Klimuk cee2d5b41f use test -n instead of test -v
"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>
2024-11-14 10:39:36 +01:00
Daniil Klimuk 423221471d include: dts-functions: clean up platforms configuration
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>
2024-11-14 10:39:30 +01:00
Pawel Langowski 35afe437e4 include/dts-subscription.sh: Redirect mc error to error file and print message
Signed-off-by: Pawel Langowski <pawel.langowski@3mdeb.com>
2024-10-22 11:58:44 +02:00
Maciej Pijanowski 084d27d939 tests: port from meta-dts
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2024-07-25 22:22:33 +02:00
Maciej Pijanowski 3529517c2a port pcengines + seabios deploy changes
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2024-07-25 22:11:25 +02:00
Daniil Klimuk db23885453 Use DPP instead of DES
According to:
https://github.com/Dasharo/presentations/blob/main/dug_6_shameless_plug.md#dasharo-cooperation-models

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-07-22 16:52:27 +02:00
Daniil Klimuk 2d75486d7f include: check for firmware bianaries instead of credentials
Previous function check_des_creds was designed to verify both platform
compatibility and firmware binaries availability. If the platform was
compatible but the credentials did not have access to the firmware
binaries - the function will state that the credentials are corrupted
and save standart credentials instead.

It is not a case anymore, because after introducing package management
system the credentials may not have access to the firmware but to some
packages, so it is not correct to make any assumptions on the credentials
while checking for firmware.

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-07-22 16:45:06 +02:00
Daniil Klimuk 2b60ebfc6a include: dts-subscription: use dnf for proper dependency handling
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-07-22 16:45:06 +02:00
Daniil Klimuk d80465ed56 add DES submenu
This commit adds dynamically rendered submenu for functionality
implemented by private DES packages installed from Dasharo server.
Every installed package extends the submenu accroding to its needs.

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-07-22 16:45:06 +02:00
Daniil Klimuk 18dc2760fb rework check_network_connection function
Split the function into two parts and name them accordingly.

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-07-22 16:45:06 +02:00
Daniil Klimuk 6e2ba4b9ca add package managment
This commit adds package management functionality: downloading and
installing packages from Dasharo server. The packages are private, the
access is granted after entering DES credentials.

Additionally this commit reworks codebase a bit, to make it more clear.

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-07-22 16:45:05 +02:00