zephyr/subsys
Martijn Stommels 49cb6537be usb: dfu: add permanent download and automatic reboot
This commit adds the USB_DFU_PERMANENT_DOWNLOAD and USB_DFU_REBOOT and
symbols.When the permanent download symbol is enabled, slot 1 will be
marked as confirmed. With the reboot symbol enabled, the devices
automatically reboots after the download is completed.

The functionality is split into two symbols to allow the automatic
reboot without confirming the image. This enables image confirmation via
another channel. For example via the shell’s Mcuboot commands.

This functionality allows downloading an image to the device without the
user having to interact with the device. It is useful in cases where
ease of use is more important then safety. For example  when using USB
download for daily development. This is especially applicable for
devices with a closed case.

The changes were tested on an nrf52840dk. The following line can be used
to build the USB DFU example with the symbols enabled.

west build -b nrf52840dk_nrf52840 zephyr/samples/subsys/usb/dfu \
-d build-dfu -- -DCONFIG_BOOTLOADER_MCUBOOT=y \
-DOVERLAY_CONFIG=overlay-reboot-permanent.conf \
-DCONFIG_MCUBOOT_SIGNATURE_KEY_FILE\
=\"bootloader/mcuboot/root-rsa-2048.pem\"

Fixes #41921

Signed-off-by: Martijn Stommels <martijn@martijnpc.nl>
2022-03-31 15:33:16 +02:00
..
bluetooth Bluetooth: Controller: Workaround nRF5340 Revision 1 Errata 117 2022-03-31 13:43:57 +02:00
canbus drivers: can: add struct device argument to callback functions 2022-03-19 14:31:22 -04:00
console
cpp kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
debug debug: Revert ASSERT options dependency 2022-03-29 12:29:55 -07:00
demand_paging
dfu kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
disk everywhere: fix typos 2022-03-18 13:24:08 -04:00
emul everywhere: fix typos 2022-03-18 13:24:08 -04:00
fb everywhere: fix typos 2022-03-18 13:24:08 -04:00
fs fs: littlefs: Use flash map macro in automount 2022-03-26 12:15:09 +01:00
ipc ipc_service: Automatically include source files for backends 2022-03-29 12:30:50 -07:00
jwt
logging logging: Adapt logging to use new cbprintf feature 2022-03-30 16:16:40 -04:00
lorawan lorawan: allow setting of DevNonce for OTAA re-join 2022-03-19 14:29:01 -04:00
mgmt subsys/mgmt/hawkbit: Check the hash of stored firmware 2022-03-31 10:28:22 +02:00
modbus modbus: stop bits can now be set individually in client mode 2022-03-24 08:23:17 -04:00
net net: lwm2m: Fix address length at connect 2022-03-31 10:31:01 +02:00
pm pm: policy: allow to get notifief when maximum latency changes 2022-03-16 15:26:47 +01:00
portability
random random: rand32_ctr_drbg: fix bug preventing initialization 2022-03-23 07:42:34 -05:00
settings settings: Add support for overriding settings partition 2022-03-24 08:16:46 -04:00
shell everywhere: fix typos 2022-03-18 13:24:08 -04:00
stats
storage everywhere: fix typos 2022-03-18 13:24:08 -04:00
task_wdt task_wdt: fix overflow in current_ticks making wdt get stuck 2021-11-22 20:22:11 -05:00
testsuite kernel: Remove idle thread cpu index on single-core devices 2022-03-30 10:08:48 -04:00
timing
tracing everywhere: fix typos 2022-03-18 13:24:08 -04:00
usb usb: dfu: add permanent download and automatic reboot 2022-03-31 15:33:16 +02:00
CMakeLists.txt
Kconfig