Skip to content

Commit ed479bf

Browse files
committed
samples: cellular: lwm2m_carrier: Disable Partition Manager
Add Devicetree partitions and disable partition manager. Signed-off-by: Lucas van der Ploeg <lucas.vanderploeg@nordicsemi.no>
1 parent a241352 commit ed479bf

10 files changed

Lines changed: 401 additions & 0 deletions
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# Copyright (c) 2026 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
config PARTITION_MANAGER
8+
default n
9+
10+
source "share/sysbuild/Kconfig"
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/ {
8+
chosen {
9+
nordic,lwm2m-carrier-partition = &lwm2m_carrier_partition;
10+
zephyr,settings-partition = &settings_storage_partition;
11+
};
12+
};
13+
14+
/delete-node/ &boot_partition;
15+
/delete-node/ &slot0_partition;
16+
/delete-node/ &slot1_partition;
17+
/delete-node/ &tfm_ps_partition;
18+
/delete-node/ &tfm_its_partition;
19+
/delete-node/ &tfm_otp_partition;
20+
/delete-node/ &storage_partition;
21+
22+
&flash0 {
23+
/*
24+
* 0x0000_0000 Primary area (1008 kB)
25+
* 0x0000_0000 Primary secure image ( 32 kB)
26+
* 0x0000_8000 Primary non-secure image ( 976 kB)
27+
* 0x000f_c000 Carrier library storage ( 8 kB)
28+
* 0x000f_e000 Settings storage ( 8 kB)
29+
*/
30+
partitions {
31+
ranges;
32+
#address-cells = <1>;
33+
#size-cells = <1>;
34+
35+
slot0_partition: partition@0 {
36+
compatible = "zephyr,mapped-partition";
37+
label = "image-0";
38+
reg = <0x0 0xfc000>;
39+
ranges = <0x0 0x0 0xfc000>;
40+
#address-cells = <1>;
41+
#size-cells = <1>;
42+
43+
slot0_s_partition: partition@0 {
44+
compatible = "zephyr,mapped-partition";
45+
label = "image-0-secure";
46+
reg = <0x0 0x8000>;
47+
};
48+
49+
slot0_ns_partition: partition@8000 {
50+
compatible = "zephyr,mapped-partition";
51+
label = "image-0-nonsecure";
52+
reg = <0x8000 0xf4000>;
53+
};
54+
};
55+
56+
storage_partition: partition@fc000 {
57+
compatible = "zephyr,mapped-partition";
58+
label = "storage";
59+
reg = <0xfc000 0x4000>;
60+
ranges = <0x0 0xfc000 0x4000>;
61+
#address-cells = <1>;
62+
#size-cells = <1>;
63+
64+
lwm2m_carrier_partition: partition@0 {
65+
compatible = "zephyr,mapped-partition";
66+
label = "lwm2m-carrier";
67+
reg = <0x0 0x2000>;
68+
};
69+
70+
settings_storage_partition: partition@2000 {
71+
compatible = "zephyr,mapped-partition";
72+
label = "settings-storage";
73+
reg = <0x2000 0x2000>;
74+
};
75+
};
76+
};
77+
};
78+
79+
#include <samples/cellular/nrf91_sram_partitions.dtsi>
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/ {
8+
chosen {
9+
lwm2m_carrier = &lwm2m_carrier_partition;
10+
zephyr_settings_partition = &settings_storage_partition;
11+
};
12+
};
13+
14+
/delete-node/ &boot_partition;
15+
/delete-node/ &slot0_partition;
16+
/delete-node/ &slot1_partition;
17+
/delete-node/ &tfm_ps_partition;
18+
/delete-node/ &tfm_its_partition;
19+
/delete-node/ &tfm_otp_partition;
20+
/delete-node/ &storage_partition;
21+
22+
&flash0 {
23+
/*
24+
* 0x0000_0000 Primary area (1008 kB)
25+
* 0x0000_0000 Primary secure image ( 32 kB)
26+
* 0x0000_8000 Primary non-secure image ( 976 kB)
27+
* 0x000f_c000 Carrier library storage ( 8 kB)
28+
* 0x000f_e000 Settings storage ( 8 kB)
29+
*/
30+
partitions {
31+
ranges;
32+
#address-cells = <1>;
33+
#size-cells = <1>;
34+
35+
slot0_partition: partition@0 {
36+
compatible = "zephyr,mapped-partition";
37+
label = "image-0";
38+
reg = <0x0 0xfc000>;
39+
ranges = <0x0 0x0 0xfc000>;
40+
#address-cells = <1>;
41+
#size-cells = <1>;
42+
43+
slot0_s_partition: partition@0 {
44+
compatible = "zephyr,mapped-partition";
45+
label = "image-0-secure";
46+
reg = <0x0 0x8000>;
47+
};
48+
49+
slot0_ns_partition: partition@8000 {
50+
compatible = "zephyr,mapped-partition";
51+
label = "image-0-nonsecure";
52+
reg = <0x8000 0xf4000>;
53+
};
54+
};
55+
56+
storage_partition: partition@fc000 {
57+
compatible = "zephyr,mapped-partition";
58+
label = "storage";
59+
reg = <0xfc000 0x4000>;
60+
ranges = <0x0 0xfc000 0x4000>;
61+
#address-cells = <1>;
62+
#size-cells = <1>;
63+
64+
lwm2m_carrier_partition: partition@0 {
65+
compatible = "zephyr,mapped-partition";
66+
label = "lwm2m-carrier";
67+
reg = <0x0 0x2000>;
68+
};
69+
70+
settings_storage_partition: partition@2000 {
71+
compatible = "zephyr,mapped-partition";
72+
label = "settings-storage";
73+
reg = <0x2000 0x2000>;
74+
};
75+
};
76+
};
77+
};
78+
79+
#include <samples/cellular/nrf91_sram_partitions.dtsi>
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/ {
8+
chosen {
9+
lwm2m_carrier = &lwm2m_carrier_partition;
10+
zephyr_settings_partition = &settings_storage_partition;
11+
};
12+
};
13+
14+
/delete-node/ &boot_partition;
15+
/delete-node/ &slot0_partition;
16+
/delete-node/ &slot1_partition;
17+
/delete-node/ &tfm_ps_partition;
18+
/delete-node/ &tfm_its_partition;
19+
/delete-node/ &tfm_otp_partition;
20+
/delete-node/ &storage_partition;
21+
22+
&flash0 {
23+
/*
24+
* 0x0000_0000 Primary area (1008 kB)
25+
* 0x0000_0000 Primary secure image ( 32 kB)
26+
* 0x0000_8000 Primary non-secure image ( 976 kB)
27+
* 0x000f_c000 Carrier library storage ( 8 kB)
28+
* 0x000f_e000 Settings storage ( 8 kB)
29+
*/
30+
partitions {
31+
ranges;
32+
#address-cells = <1>;
33+
#size-cells = <1>;
34+
35+
slot0_partition: partition@0 {
36+
compatible = "zephyr,mapped-partition";
37+
label = "image-0";
38+
reg = <0x0 0xfc000>;
39+
ranges = <0x0 0x0 0xfc000>;
40+
#address-cells = <1>;
41+
#size-cells = <1>;
42+
43+
slot0_s_partition: partition@0 {
44+
compatible = "zephyr,mapped-partition";
45+
label = "image-0-secure";
46+
reg = <0x0 0x8000>;
47+
};
48+
49+
slot0_ns_partition: partition@8000 {
50+
compatible = "zephyr,mapped-partition";
51+
label = "image-0-nonsecure";
52+
reg = <0x8000 0xf4000>;
53+
};
54+
};
55+
56+
storage_partition: partition@fc000 {
57+
compatible = "zephyr,mapped-partition";
58+
label = "storage";
59+
reg = <0xfc000 0x4000>;
60+
ranges = <0x0 0xfc000 0x4000>;
61+
#address-cells = <1>;
62+
#size-cells = <1>;
63+
64+
lwm2m_carrier_partition: partition@0 {
65+
compatible = "zephyr,mapped-partition";
66+
label = "lwm2m-carrier";
67+
reg = <0x0 0x2000>;
68+
};
69+
70+
settings_storage_partition: partition@2000 {
71+
compatible = "zephyr,mapped-partition";
72+
label = "settings-storage";
73+
reg = <0x2000 0x2000>;
74+
};
75+
};
76+
};
77+
};
78+
79+
#include <samples/cellular/nrf91_sram_partitions.dtsi>
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/delete-node/ &slot0_partition;
8+
9+
&flash0 {
10+
/*
11+
* Replace single slot0 with boot, slot0 and slot1. (Keep storage_partition the same).
12+
*
13+
* 0x0000_0000 MCUboot ( 65 kB)
14+
* 0x0000_c000 Primary area (448 kB)
15+
* 0x0000_c000 Primary secure image ( 32 kB)
16+
* 0x0001_8000 Primary non-secure image (416 kB)
17+
* 0x0007_5000 Secondary area (448 kB)
18+
* 0x0007_5000 Secondary secure image ( 32 kB)
19+
* 0x0008_1000 Secondary non-secure image (416 kB)
20+
*/
21+
partitions {
22+
ranges;
23+
#address-cells = <1>;
24+
#size-cells = <1>;
25+
26+
boot_partition: partition@0 {
27+
compatible = "zephyr,mapped-partition";
28+
label = "mcuboot";
29+
reg = <0x00000000 0x10000>;
30+
};
31+
32+
slot0_partition: partition@10000 {
33+
compatible = "zephyr,mapped-partition";
34+
label = "image-0";
35+
reg = <0x10000 0x70000>;
36+
ranges = <0x0 0x10000 0x70000>;
37+
#address-cells = <1>;
38+
#size-cells = <1>;
39+
40+
slot0_s_partition: partition@0 {
41+
compatible = "zephyr,mapped-partition";
42+
label = "image-0-secure";
43+
reg = <0x0 0x8000>;
44+
};
45+
46+
slot0_ns_partition: partition@8000 {
47+
compatible = "zephyr,mapped-partition";
48+
label = "image-0-nonsecure";
49+
reg = <0x8000 0x68000>;
50+
};
51+
};
52+
53+
slot1_partition: partition@80000 {
54+
compatible = "zephyr,mapped-partition";
55+
label = "image-1";
56+
reg = <0x80000 0x70000>;
57+
ranges = <0x0 0x80000 0x70000>;
58+
#address-cells = <1>;
59+
#size-cells = <1>;
60+
61+
slot1_s_partition: partition@0 {
62+
compatible = "zephyr,mapped-partition";
63+
label = "image-1-secure";
64+
reg = <0x0 0x8000>;
65+
};
66+
67+
slot1_ns_partition: partition@8000 {
68+
compatible = "zephyr,mapped-partition";
69+
label = "image-1-nonsecure";
70+
reg = <0x8000 0x68000>;
71+
};
72+
};
73+
};
74+
};

samples/cellular/lwm2m_carrier/sample.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ tests:
4242
extra_args:
4343
- EXTRA_CONF_FILE="overlay-softbank.conf"
4444
- SB_EXTRA_CONF_FILE="sysbuild-softbank.conf"
45+
- EXTRA_DTC_OVERLAY_FILE="bootloader.overlay"
4546
tags:
4647
- ci_build
4748
- sysbuild
@@ -58,6 +59,7 @@ tests:
5859
extra_args:
5960
- EXTRA_CONF_FILE="overlay-lgu.conf"
6061
- SB_EXTRA_CONF_FILE="sysbuild-lgu.conf"
62+
- EXTRA_DTC_OVERLAY_FILE="bootloader.overlay"
6163
tags:
6264
- ci_build
6365
- sysbuild
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include "../../../boards/nrf9151dk_nrf9151_ns.overlay"
8+
#include "../../../bootloader.overlay"
9+
10+
/ {
11+
chosen {
12+
zephyr,code-partition = &boot_partition;
13+
};
14+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include "../../../boards/nrf9160dk_nrf9160_ns.overlay"
8+
#include "../../../bootloader.overlay"
9+
10+
/ {
11+
chosen {
12+
zephyr,code-partition = &boot_partition;
13+
};
14+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include "../../../boards/nrf9161dk_nrf9161_ns.overlay"
8+
#include "../../../bootloader.overlay"
9+
10+
/ {
11+
chosen {
12+
zephyr,code-partition = &boot_partition;
13+
};
14+
};

0 commit comments

Comments
 (0)