Skip to content

Commit 0dd7cc7

Browse files
SylwesterKonczyktomchy
authored andcommitted
suit: Logs correction
Misleading logs corrected. Signed-off-by: Sylwester Konczyk <[email protected]>
1 parent c607576 commit 0dd7cc7

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

subsys/mgmt/suitfu/src/suitfu_mgmt.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ LOG_MODULE_REGISTER(suitfu_mgmt, CONFIG_MGMT_SUITFU_LOG_LEVEL);
2424

2525
#define SYSTEM_UPDATE_WORKER_STACK_SIZE 2048
2626

27-
K_THREAD_STACK_DEFINE(system_update_stack_area, SYSTEM_UPDATE_WORKER_STACK_SIZE);
27+
static K_THREAD_STACK_DEFINE(system_update_stack_area, SYSTEM_UPDATE_WORKER_STACK_SIZE);
2828

2929
struct system_update_work {
3030
struct k_work_delayable work;
3131
/* Other data to pass to the workqueue might go here */
3232
};
3333

34-
struct k_work_q system_update_work_queue;
34+
static struct k_work_q system_update_work_queue;
3535

3636
static void update_failure(void)
3737
{
@@ -40,7 +40,7 @@ static void update_failure(void)
4040
}
4141
}
4242

43-
static void schedule_system_update(struct k_work *item)
43+
static void schedule_envelope_processing(struct k_work *item)
4444
{
4545
int ret = suit_dfu_candidate_preprocess();
4646

@@ -85,8 +85,8 @@ int suitfu_mgmt_candidate_envelope_process(void)
8585
{
8686
static struct system_update_work suw;
8787

88-
LOG_INF("Schedule system reboot");
89-
k_work_init_delayable(&suw.work, schedule_system_update);
88+
LOG_INF("Schedule envelope processing");
89+
k_work_init_delayable(&suw.work, schedule_envelope_processing);
9090

9191
int ret = k_work_schedule_for_queue(&system_update_work_queue, &suw.work, K_NO_WAIT);
9292

subsys/sdfw_services/services/suit_service/suit_ipuc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ suit_plat_err_t suit_ipuc_get_info(size_t idx, struct zcbor_string *component_id
102102
*role = rsp_data->SSF_SUIT_RSP_ARG(get_ipuc_info, role);
103103
ssf_client_decode_done(rsp_pkt);
104104

105-
#if defined(CONFIG_SUIT_LOG_LEVEL_INF) || defined(CONFIG_SUIT_LOG_LEVEL_DBG)
105+
#if defined(CONFIG_SSF_SUIT_SERVICE_LOG_LEVEL_INF) || defined(CONFIG_SSF_SUIT_SERVICE_LOG_LEVEL_DBG)
106106
suit_component_type_t component_type = SUIT_COMPONENT_TYPE_UNSUPPORTED;
107107

108108
suit_plat_decode_component_type(component_id, &component_type);

subsys/suit/orchestrator_app/src/suit_orchestrator_app.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <dfu/suit_dfu.h>
88

9+
#include <zephyr/kernel.h>
910
#include <zephyr/logging/log.h>
1011
#include <zephyr/logging/log_ctrl.h>
1112

@@ -266,6 +267,20 @@ int suit_dfu_update_start(void)
266267
update_regions_count++;
267268
}
268269
#endif /* CONFIG_SUIT_CACHE_APP_IPUC_ID */
270+
#endif
271+
for (size_t i = 0; i < update_regions_count; i++) {
272+
LOG_INF("Update region %d/%d, 0x%08X, %d", i + 1, update_regions_count,
273+
(uint32_t)update_candidate[i].mem, update_candidate[i].size);
274+
}
275+
276+
#if defined(CONFIG_SUIT_LOG_LEVEL_INF) || defined(CONFIG_SUIT_LOG_LEVEL_DBG)
277+
/* Display empty line prior to reboot
278+
*/
279+
printk("\n");
280+
281+
/* Give a chance to display a log prior to reboot
282+
*/
283+
k_msleep(100);
269284
#endif
270285

271286
return suit_trigger_update(update_candidate, update_regions_count);

0 commit comments

Comments
 (0)