Commit 2d8e634
committed
feat: support Zephyr 4.2.0
* replace deprecated swap mode option
From https://docs.zephyrproject.org/latest/releases/migration-guide-4.1.html:
```
The Kconfig ``SB_CONFIG_MCUBOOT_MODE_SWAP_WITHOUT_SCRATCH`` has been deprecated and replaced
with ``SB_CONFIG_MCUBOOT_MODE_SWAP_USING_MOVE``, applications should be updated to select this
new symbol if they were selecting the old symbol.
```
Note that this will still allow us to build with older versions, as the
MCUboot options set in mender-mcu's Kconfig are merely there for verbosity
* return int in response callbacks
This is needed in order to use Zephyr 4.2.0
From https://docs.zephyrproject.org/latest/releases/migration-guide-4.2.html:
```
The http_response_cb_t HTTP client response callback signature has changed.
The callback function now returns int instead of void. This allows the
application to abort the HTTP connection. Existing applications need to
update their response callback implementations. To retain current behavior,
simply return 0 from the callback.
```
In order to not break backwards compatibility we use Zephyr's `ZEPHYR_VERSION`
and `ZEPHYR_VERSION_CODE` to define macros that return void on versions
below 4.2.0 and int on newer versions.
Ticket: MEN-8638
Changelog: Title
Signed-off-by: Daniel Skinstad Drabitzius <daniel.drabitzius@northern.tech>1 parent 5a79399 commit 2d8e634
3 files changed
+24
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
| 155 | + | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
30 | 39 | | |
31 | 40 | | |
32 | 41 | | |
| |||
58 | 67 | | |
59 | 68 | | |
60 | 69 | | |
| 70 | + | |
61 | 71 | | |
62 | | - | |
| 72 | + | |
63 | 73 | | |
64 | 74 | | |
65 | 75 | | |
66 | 76 | | |
67 | 77 | | |
68 | 78 | | |
| 79 | + | |
69 | 80 | | |
70 | | - | |
| 81 | + | |
71 | 82 | | |
72 | 83 | | |
73 | 84 | | |
| |||
352 | 363 | | |
353 | 364 | | |
354 | 365 | | |
355 | | - | |
| 366 | + | |
356 | 367 | | |
357 | 368 | | |
358 | 369 | | |
| |||
370 | 381 | | |
371 | 382 | | |
372 | 383 | | |
| 384 | + | |
373 | 385 | | |
374 | 386 | | |
375 | | - | |
| 387 | + | |
376 | 388 | | |
377 | 389 | | |
378 | 390 | | |
| |||
390 | 402 | | |
391 | 403 | | |
392 | 404 | | |
| 405 | + | |
393 | 406 | | |
394 | 407 | | |
395 | 408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
| |||
0 commit comments