1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/tinyusb
bors[bot] 9ff9704fe5
Merge #19010 #19149
19010: bootloaders/riotboot: add tinyUSB DFU support r=benpicco a=gschorcht

### Contribution description

This PR provides
- the tinyUSB DFU and DFU Runtime support and
- the `riotboot_tinyusb_dfu` bootloader that uses the tinyUSB DFU mode to flash new application images.

~This PR includes PR #18983 for now to be compilable.~

### Testing procedure

1. Use any board that supports the `riotboot´ and `tinyusb_device` features and flash the bootloader first, for example
   ```
   BOARD=nucleo-f767zi make -C bootloaders/riotboot_tinyusb_dfu flash
   ```
   and check that the `riotboot_tinyusb_dfu` bootloader is in DFU mode:
   ```
   dfu-util --list
   ```
3. Flash a first application using the following command:
    ```
   FEATURES_REQUIRED=riotboot USEMODULE=tinyusb_dfu BOARD=nucleo-f767zi \
   make -C tests/saul PROGRAMMER=dfu-util riotboot/flash-slot0
   ```
   and check that the application starts and is seen as upgradable:
   ```
   dfu-util --list
   ```
4. Restart the node in bootloader DFU mode by:
   ```
   dfu-util -e
   ```
   Flash a second application, for example
   ```
   FEATURES_REQUIRED=riotboot USEMODULE=tinyusb_dfu BOARD=nucleo-f767zi \
   make -C tests/shell PROGRAMMER=dfu-util riotboot/flash-slot1
   ```
   and check that the second application starts and is seen as upgradable:
   ```
   dfu-util --list
   ```
   
### Issues/PRs references

~Depends on PR #18983~

19149: SECURITY: Describe that declassification is an option r=benpicco a=chrysn

### Contribution description

Our security policy does not contain provisions for the case when what is reported is not what we consider an actual security issue. As it is described now, everything reported through security@ would go through the full treatment, including a point release.

I'm not sure it belongs into the text itself (as it's more about how security reporters interact with the project than internals), but declassification should IMO be backed at least by 3 maintainers, and no strong NACK.

### Issues/PRs references

#19141 followed that procedure after some chat on it on the maintainers channel. (In the discussion, I proposed declassification, with 2.5 people supporting it and one "I was about to, but can we be sure nobody is using it?" voice).

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: chrysn <chrysn@fsfe.org>
2023-01-15 23:31:00 +00:00
..
cdc_acm_stdio core/init: call vfs_bind_stdio() in early_init() 2023-01-08 22:26:13 +01:00
contrib Merge #19010 #19149 2023-01-15 23:31:00 +00:00
dfu pkg/tinyusb: add DFU and DFU_RT device class implementation 2023-01-15 18:09:55 +01:00
hw pkg/tinyusb/hw: use pm_block only if module pm_layered is enabled 2023-01-15 18:09:55 +01:00
patches pkg/tinyusb: add SAM0-based MCU support 2022-10-05 19:23:37 +02:00
doc.txt Merge #19010 #19149 2023-01-15 23:31:00 +00:00
Kconfig pkg/tinyusb: add DFU and DFU_RT device class implementation 2023-01-15 18:09:55 +01:00
Kconfig.cdc pkg/tinyusb: some cleanup of configuration and descriptors 2022-12-04 17:06:48 +01:00
Kconfig.hid pkg/tinyusb: add Kconfig variables for common tinyUSB descriptors 2022-11-09 06:57:55 +01:00
Kconfig.msc pkg/tinyusb: some cleanup of configuration and descriptors 2022-12-04 17:06:48 +01:00
Makefile pkg/tinyusb: add DFU and DFU_RT device class implementation 2023-01-15 18:09:55 +01:00
Makefile.dep pkg/tinyusb: add DFU and DFU_RT device class implementation 2023-01-15 18:09:55 +01:00
Makefile.include pkg/tinyusb: add DFU and DFU_RT device class implementation 2023-01-15 18:09:55 +01:00
Makefile.nrf52 pkg/tinyusb: add nRF52 support 2022-10-21 18:09:38 +02:00