From 2631675ba7109b444ad1fe617945405e8cc91867 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 4 Dec 2023 21:28:55 +0000 Subject: [PATCH] fix: Add fix for bootloader behavior. * Until boards move to bootmode via retention subsystem, enable `NRF_STORE_REBOOT_TYPE_GPREGRET` by default. --- app/boards/arm/adv360pro/adv360pro_left_defconfig | 3 +++ app/boards/arm/adv360pro/adv360pro_right_defconfig | 3 +++ app/boards/arm/bluemicro840/bluemicro840_v1_defconfig | 3 +++ app/boards/arm/bt60/bt60_v1_defconfig | 3 +++ app/boards/arm/bt60/bt60_v1_hs_defconfig | 3 +++ app/boards/arm/ckp/bt60_v2_defconfig | 3 +++ app/boards/arm/ckp/bt65_v1_defconfig | 3 +++ app/boards/arm/ckp/bt75_v1_defconfig | 3 +++ app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig | 3 +++ app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig | 3 +++ app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig | 3 +++ app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig | 3 +++ app/boards/arm/glove80/glove80_lh_defconfig | 3 +++ app/boards/arm/glove80/glove80_rh_defconfig | 3 +++ app/boards/arm/mikoto/mikoto_520_defconfig | 3 +++ app/boards/arm/nice_nano/nice_nano_defconfig | 3 +++ app/boards/arm/nice_nano/nice_nano_v2_defconfig | 6 +++++- app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig | 3 +++ app/boards/arm/nrfmicro/nrfmicro_11_defconfig | 5 ++++- app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig | 3 +++ app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig | 3 +++ app/boards/arm/nrfmicro/nrfmicro_13_defconfig | 3 +++ app/boards/arm/pillbug/pillbug_defconfig | 3 +++ app/boards/arm/puchi_ble/puchi_ble_v1_defconfig | 3 +++ app/boards/arm/s40nc/s40nc_defconfig | 3 +++ app/boards/seeeduino_xiao_ble.conf | 3 +++ 26 files changed, 81 insertions(+), 2 deletions(-) diff --git a/app/boards/arm/adv360pro/adv360pro_left_defconfig b/app/boards/arm/adv360pro/adv360pro_left_defconfig index 6eb5a8d042af..1bfcece4e932 100644 --- a/app/boards/arm/adv360pro/adv360pro_left_defconfig +++ b/app/boards/arm/adv360pro/adv360pro_left_defconfig @@ -18,6 +18,9 @@ CONFIG_PINCTRL=y CONFIG_SPI=y CONFIG_SPI_NRFX=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + # Enable writing to flash CONFIG_USE_DT_CODE_PARTITION=y CONFIG_MPU_ALLOW_FLASH_WRITE=y diff --git a/app/boards/arm/adv360pro/adv360pro_right_defconfig b/app/boards/arm/adv360pro/adv360pro_right_defconfig index b5174549ea47..2e7f0f5cb3fb 100644 --- a/app/boards/arm/adv360pro/adv360pro_right_defconfig +++ b/app/boards/arm/adv360pro/adv360pro_right_defconfig @@ -18,6 +18,9 @@ CONFIG_PINCTRL=y CONFIG_SPI=y CONFIG_SPI_NRFX=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + # Enable writing to flash CONFIG_USE_DT_CODE_PARTITION=y CONFIG_MPU_ALLOW_FLASH_WRITE=y diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig b/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig index 3e13e77d0b5e..15c4d9441bec 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig +++ b/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig @@ -12,6 +12,9 @@ CONFIG_PINCTRL=y # enable GPIO CONFIG_GPIO=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/bt60/bt60_v1_defconfig b/app/boards/arm/bt60/bt60_v1_defconfig index 04adb8a3cd81..38bfeef652b1 100644 --- a/app/boards/arm/bt60/bt60_v1_defconfig +++ b/app/boards/arm/bt60/bt60_v1_defconfig @@ -14,6 +14,9 @@ CONFIG_GPIO=y CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/bt60/bt60_v1_hs_defconfig b/app/boards/arm/bt60/bt60_v1_hs_defconfig index f16d82ac41d7..e7f1ffc88b64 100644 --- a/app/boards/arm/bt60/bt60_v1_hs_defconfig +++ b/app/boards/arm/bt60/bt60_v1_hs_defconfig @@ -14,6 +14,9 @@ CONFIG_GPIO=y CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/ckp/bt60_v2_defconfig b/app/boards/arm/ckp/bt60_v2_defconfig index fd1ae985995c..ffc0b4864717 100644 --- a/app/boards/arm/ckp/bt60_v2_defconfig +++ b/app/boards/arm/ckp/bt60_v2_defconfig @@ -15,6 +15,9 @@ CONFIG_PINCTRL=y CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_PWM=y CONFIG_LED_PWM=y diff --git a/app/boards/arm/ckp/bt65_v1_defconfig b/app/boards/arm/ckp/bt65_v1_defconfig index be5f17eb54fe..58441085d14f 100644 --- a/app/boards/arm/ckp/bt65_v1_defconfig +++ b/app/boards/arm/ckp/bt65_v1_defconfig @@ -15,6 +15,9 @@ CONFIG_PINCTRL=y CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_PWM=y CONFIG_LED_PWM=y diff --git a/app/boards/arm/ckp/bt75_v1_defconfig b/app/boards/arm/ckp/bt75_v1_defconfig index b4d85338aec0..193e3188fb57 100644 --- a/app/boards/arm/ckp/bt75_v1_defconfig +++ b/app/boards/arm/ckp/bt75_v1_defconfig @@ -15,6 +15,9 @@ CONFIG_PINCTRL=y CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_PWM=y CONFIG_LED_PWM=y diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig b/app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig index d738255601bb..c733e96b5651 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig @@ -25,6 +25,9 @@ CONFIG_I2C_NRFX=y # Enable SPI CONFIG_SPI_NRFX=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + # Enable writing to flash CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig b/app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig index 5284159d83ff..41baee5cf4ad 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig @@ -25,6 +25,9 @@ CONFIG_I2C_NRFX=y # Enable SPI CONFIG_SPI_NRFX=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + # Enable writing to flash CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig b/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig index 29a5f878ac24..cf914b0fbba6 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig @@ -21,6 +21,9 @@ CONFIG_GPIO=y # Enable SPI CONFIG_SPI_NRFX=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + # Enable writing to flash CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig b/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig index 506aa67e1b12..1fa83dd56395 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig @@ -21,6 +21,9 @@ CONFIG_GPIO=y # Enable SPI CONFIG_SPI_NRFX=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + # Enable writing to flash CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/glove80/glove80_lh_defconfig b/app/boards/arm/glove80/glove80_lh_defconfig index a93f27cd8f22..e8bb27488a97 100644 --- a/app/boards/arm/glove80/glove80_lh_defconfig +++ b/app/boards/arm/glove80/glove80_lh_defconfig @@ -32,6 +32,9 @@ CONFIG_ARM_MPU=y # Enable GPIO CONFIG_GPIO=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + # Build configurations CONFIG_BUILD_OUTPUT_UF2=y CONFIG_BUILD_OUTPUT_UF2_FAMILY_ID="0x9807B007" diff --git a/app/boards/arm/glove80/glove80_rh_defconfig b/app/boards/arm/glove80/glove80_rh_defconfig index ef29d682a54a..2dbdb3ba77ca 100644 --- a/app/boards/arm/glove80/glove80_rh_defconfig +++ b/app/boards/arm/glove80/glove80_rh_defconfig @@ -29,6 +29,9 @@ CONFIG_ARM_MPU=y # Enable GPIO CONFIG_GPIO=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + # Build configurations CONFIG_BUILD_OUTPUT_UF2=y CONFIG_BUILD_OUTPUT_UF2_FAMILY_ID="0x9808B007" diff --git a/app/boards/arm/mikoto/mikoto_520_defconfig b/app/boards/arm/mikoto/mikoto_520_defconfig index 354fa56aa34a..99a327f6a897 100644 --- a/app/boards/arm/mikoto/mikoto_520_defconfig +++ b/app/boards/arm/mikoto/mikoto_520_defconfig @@ -12,6 +12,9 @@ CONFIG_PINCTRL=y # enable GPIO CONFIG_GPIO=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/nice_nano/nice_nano_defconfig b/app/boards/arm/nice_nano/nice_nano_defconfig index 6b7fcab252d1..a36b4b3a04bf 100644 --- a/app/boards/arm/nice_nano/nice_nano_defconfig +++ b/app/boards/arm/nice_nano/nice_nano_defconfig @@ -13,6 +13,9 @@ CONFIG_GPIO=y # Use pinctrl CONFIG_PINCTRL=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/nice_nano/nice_nano_v2_defconfig b/app/boards/arm/nice_nano/nice_nano_v2_defconfig index 6b5044e5ef0b..8b4ccd669b76 100644 --- a/app/boards/arm/nice_nano/nice_nano_v2_defconfig +++ b/app/boards/arm/nice_nano/nice_nano_v2_defconfig @@ -13,6 +13,10 @@ CONFIG_PINCTRL=y # enable GPIO CONFIG_GPIO=y +# Use until moved to retained bootmode + +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y @@ -24,4 +28,4 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_ZMK_BLE=y -CONFIG_ZMK_USB=y \ No newline at end of file +CONFIG_ZMK_USB=y diff --git a/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig b/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig index 93eef9e6ef8d..4a60871e6a78 100644 --- a/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig +++ b/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig @@ -11,6 +11,9 @@ CONFIG_ARM_MPU=y # enable GPIO CONFIG_GPIO=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_defconfig b/app/boards/arm/nrfmicro/nrfmicro_11_defconfig index 5ba4d6e14787..28e377dc8552 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_defconfig +++ b/app/boards/arm/nrfmicro/nrfmicro_11_defconfig @@ -12,6 +12,9 @@ CONFIG_PINCTRL=y # enable GPIO CONFIG_GPIO=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y @@ -25,4 +28,4 @@ CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig b/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig index 31cbfc9ae750..8f8a65028cb3 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig +++ b/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig @@ -12,6 +12,9 @@ CONFIG_PINCTRL=y # enable GPIO CONFIG_GPIO=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig b/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig index f459f35636a5..934dce80fa72 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig +++ b/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig @@ -12,6 +12,9 @@ CONFIG_PINCTRL=y # enable GPIO CONFIG_GPIO=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_defconfig b/app/boards/arm/nrfmicro/nrfmicro_13_defconfig index 9ffb2766a663..b32c5029e2ad 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_defconfig +++ b/app/boards/arm/nrfmicro/nrfmicro_13_defconfig @@ -12,6 +12,9 @@ CONFIG_PINCTRL=y # enable GPIO CONFIG_GPIO=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/pillbug/pillbug_defconfig b/app/boards/arm/pillbug/pillbug_defconfig index 9ec72c417ef3..6e587a4f72ca 100644 --- a/app/boards/arm/pillbug/pillbug_defconfig +++ b/app/boards/arm/pillbug/pillbug_defconfig @@ -14,6 +14,9 @@ CONFIG_PINCTRL=y # enable GPIO CONFIG_GPIO=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig b/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig index ab197df0a808..471a5e3de6c9 100644 --- a/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig +++ b/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig @@ -14,6 +14,9 @@ CONFIG_GPIO=y # Use pinctrl CONFIG_PINCTRL=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/arm/s40nc/s40nc_defconfig b/app/boards/arm/s40nc/s40nc_defconfig index b523ceb80b7a..d5c731b751f6 100644 --- a/app/boards/arm/s40nc/s40nc_defconfig +++ b/app/boards/arm/s40nc/s40nc_defconfig @@ -11,6 +11,9 @@ CONFIG_ARM_MPU=y # enable GPIO CONFIG_GPIO=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/seeeduino_xiao_ble.conf b/app/boards/seeeduino_xiao_ble.conf index 205f67e91272..89ec081bdea4 100644 --- a/app/boards/seeeduino_xiao_ble.conf +++ b/app/boards/seeeduino_xiao_ble.conf @@ -7,6 +7,9 @@ CONFIG_ZMK_USB=y CONFIG_ZMK_BLE=y +# Use until moved to retained bootmode +CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET=y + CONFIG_MPU_ALLOW_FLASH_WRITE=y CONFIG_NVS=y CONFIG_SETTINGS_NVS=y