Use application capabilities for adaptive RAK recovery status

This commit is contained in:
mikecarper committed 2026-09-27 13:21:40 -07:00
1 parent 51211834e8
commit a007346561
2 files changed
+18

No files matched your search

+14
View File
@@ -830,6 +830,20 @@ TEST(OtaBootPackage, LegacyAndCurrentBootloadersHaveSeparateCapabilityViews) {
EXPECT_TRUE(app.present);
EXPECT_FALSE(update.present);
// Adaptive RAK ABI-2 advertises application OTA and the recovery storage
// layout, while its bootloader still cannot self-update.
const uint8_t adaptive_marker[16] = {
'M','O','T','A','B','L','D','R', 2,0, 5,0,
OTA_BL_PROFILE_RAK_AUTO, 0,0,0};
memset(image, 0xFF, sizeof(image));
memcpy(image + 4, adaptive_marker, sizeof(adaptive_marker));
app = ota_bl_app_caps_scan(image, sizeof(image));
update = ota_bl_update_caps_scan_aligned(
image, sizeof(image), OTA_BL_PROFILE_RAK_AUTO);
ASSERT_TRUE(app.present);
EXPECT_EQ(app.storage_flags, OTA_BL_PROFILE_RAK_AUTO);
EXPECT_FALSE(update.present);
// A valid marker for another storage profile is visible diagnostically but
// cannot authorize an internal-flash bootloader replacement.
memset(image, 0xFF, sizeof(image));