Skip to content

Commit 2fea451

Browse files
committed
[nrf fromlist] zephyr: Missing header and definitions in boot_serial extensions
Moved group definitions to extension source code. Upstream PR: mcu-tools/mcuboot#1551 Signed-off-by: Dominik Ermel <[email protected]> (cherry picked from commit 9d2f9b5)
1 parent d6c6170 commit 2fea451

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

boot/zephyr/boot_serial_extensions.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
/*
2-
* Copyright (c) 2021 Nordic Semiconductor ASA
2+
* Copyright (c) 2021-2022 Nordic Semiconductor ASA
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
#include <zephyr/kernel.h>
88
#include <zephyr/drivers/flash.h>
9-
#include <zephyr/mgmt/mcumgr/zephyr_groups.h>
109

1110
#include <flash_map_backend/flash_map_backend.h>
1211
#include <sysflash/sysflash.h>
@@ -21,6 +20,9 @@
2120

2221
BOOT_LOG_MODULE_DECLARE(mcuboot);
2322

23+
#define ZEPHYR_MGMT_GRP_BASIC (MGMT_GROUP_ID_PERUSER - 1)
24+
#define ZEPHYR_MGMT_GRP_BASIC_CMD_ERASE_STORAGE 0
25+
2426
#ifdef CONFIG_BOOT_MGMT_CUSTOM_STORAGE_ERASE
2527
static int bs_custom_storage_erase(zcbor_state_t *cs)
2628
{
@@ -140,7 +142,7 @@ int bs_peruser_system_specific(const struct nmgr_hdr *hdr, const char *buffer,
140142
{
141143
int mgmt_rc = MGMT_ERR_ENOTSUP;
142144

143-
if (hdr->nh_group == ZEPHYR_MGMT_GRP_BASE) {
145+
if (hdr->nh_group == ZEPHYR_MGMT_GRP_BASIC) {
144146
if (hdr->nh_op == NMGR_OP_WRITE) {
145147
#ifdef CONFIG_BOOT_MGMT_CUSTOM_STORAGE_ERASE
146148
if (hdr->nh_id == ZEPHYR_MGMT_GRP_BASIC_CMD_ERASE_STORAGE) {

0 commit comments

Comments
 (0)