Skip to content

Commit f1a9459

Browse files
committed
tests: Align ref_smp_svr
Align the ref_smp_svr sample with the optimized merged slots. Signed-off-by: Tomasz Chyrowicz <[email protected]>
1 parent 385fcd3 commit f1a9459

File tree

5 files changed

+146
-0
lines changed

5 files changed

+146
-0
lines changed

tests/subsys/bootloader/upgrade/ref_smp_svr/Kconfig.sysbuild

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@ config SECURE_BOOT_SIGNING_KEY_FILE
1818
default "$ZEPHYR_BASE/../bootloader/mcuboot/root-ed25519.pem" if SECURE_BOOT_SIGNATURE_TYPE_ED25519
1919
default "$ZEPHYR_BASE/../bootloader/mcuboot/root-ec-p256.pem" if SECURE_BOOT_SIGNATURE_TYPE_ECDSA
2020

21+
config MCUBOOT_IMAGES_ROM_END_OFFSET_AUTO
22+
default "ipc_radio;ipc_radio_secondary_app" if MCUBOOT_SIGN_MERGED_BINARY
23+
2124
source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include "../sysbuild/nrf54h20dk_nrf54h20_memory_map_direct_xip.dtsi"
8+
9+
secondary_app_partition: &cpuapp_slot1_partition {};
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include "nrf54h20dk_nrf54h20_memory_map_direct_xip.dtsi"
8+
9+
secondary_app_partition: &cpurad_slot1_partition {};
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include "../../nrf54h20dk_nrf54h20_memory_map_direct_xip.dtsi"
8+
9+
/ {
10+
chosen {
11+
zephyr,code-partition = &boot_partition;
12+
};
13+
};
14+
15+
/*
16+
* Copy required overlay for mcuboot from bootloader/mcuboot.
17+
*
18+
* Required as the overlay in bootloader/mcuboot is ignored due to
19+
* board overlay in this test.
20+
*/
21+
22+
&gdpwr {
23+
status = "disabled";
24+
};
25+
26+
&gdpwr_fast_active_0 {
27+
status = "disabled";
28+
};
29+
30+
&gdpwr_fast_active_1 {
31+
status = "disabled";
32+
};
33+
34+
&gdpwr_fast_main {
35+
status = "disabled";
36+
};
37+
38+
&gdpwr_slow_active {
39+
status = "disabled";
40+
};
41+
42+
&gdpwr_slow_main {
43+
status = "disabled";
44+
};
45+
46+
&gpio_pad_group0 {
47+
status = "disabled";
48+
};
49+
50+
&gpio_pad_group1 {
51+
status = "disabled";
52+
};
53+
54+
&gpio_pad_group2 {
55+
status = "disabled";
56+
};
57+
58+
&gpio_pad_group6 {
59+
status = "disabled";
60+
};
61+
62+
&gpio_pad_group7 {
63+
status = "disabled";
64+
};
65+
66+
&gpio_pad_group9 {
67+
status = "disabled";
68+
};
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/* On nRF54H20 the Direct XIP mode is supported in the merged slot configuration
8+
* Extend slot0_partition and slot1_partition to cover both application and
9+
* radio images, as well as MCUboot image metadata (header and trailer).
10+
* Those partitions will be used by MCUboot to verify the merged image to boot.
11+
* Apart from that, they will be used by the MCUmgr subsystem to correctly
12+
* handle flags, stored inside the MCUboot image trailer.
13+
* Use cpu<app|rad>_slot<0|1>_partition as zephyr,code-partition, so the
14+
* application and radio sizes are correctly reported.
15+
*/
16+
/delete-node/&cpuapp_slot0_partition;
17+
/delete-node/&cpuapp_slot1_partition;
18+
/delete-node/&cpurad_slot0_partition;
19+
/delete-node/&cpurad_slot1_partition;
20+
21+
&mram1x {
22+
partitions {
23+
/* Merged partition used by the MCUboot (variant 0). */
24+
slot0_partition: partition@40000 {
25+
reg = <0x40000 DT_SIZE_K(656)>;
26+
};
27+
28+
/* Application code partition (variant 0).
29+
* Offset by the MCUboot header size (2048 bytes).
30+
*/
31+
cpuapp_slot0_partition: partition@40800 {
32+
reg = <0x40800 DT_SIZE_K(326)>;
33+
};
34+
35+
/* Radio code partition (variant 0). */
36+
cpurad_slot0_partition: partition@92000 {
37+
reg = <0x92000 DT_SIZE_K(328)>;
38+
};
39+
40+
/* Merged partition used by the MCUboot (variant 1). */
41+
slot1_partition: partition@100000 {
42+
reg = <0x100000 DT_SIZE_K(656)>;
43+
};
44+
45+
/* Application code partition (variant 1).
46+
* Offset by the MCUboot header size (2048 bytes).
47+
*/
48+
cpuapp_slot1_partition: partition@100800 {
49+
reg = <0x100800 DT_SIZE_K(326)>;
50+
};
51+
52+
/* Radio code partition (variant 1). */
53+
cpurad_slot1_partition: partition@152000 {
54+
reg = <0x152000 DT_SIZE_K(328)>;
55+
};
56+
};
57+
};

0 commit comments

Comments
 (0)