Skip to content

Commit 1ec3ed4

Browse files
committed
[sw] Add TEST_OWNER_FORCE_UPDATE flag to overwrite for testing
This flag allows the owner key to be overwritten unconditionally. This is intended for testing purposes where we want to reprogram the owner key without having to erase and reflash the entire device. Change-Id: I7d131cd391d6583b9ae3ceb5c3fe822308429f10 Signed-off-by: Yi-Hsuan Deng <[email protected]>
1 parent 9ba5d42 commit 1ec3ed4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sw/device/silicon_creator/lib/ownership/test_owner.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ rom_error_t sku_creator_owner_init(boot_data_t *bootdata) {
9999
owner_keydata_t owner = OWNER_KEYDATA;
100100
ownership_state_t state = bootdata->ownership_state;
101101

102+
#ifndef TEST_OWNER_FORCE_UPDATE
102103
if (state == kOwnershipStateUnlockedSelf ||
103104
state == kOwnershipStateUnlockedAny ||
104105
state == kOwnershipStateUnlockedEndorsed) {
@@ -116,6 +117,7 @@ rom_error_t sku_creator_owner_init(boot_data_t *bootdata) {
116117
// We'll not return, thus allowing the owner config below to be programmed
117118
// into flash.
118119
}
120+
#endif
119121

120122
owner_page[0].header.tag = kTlvTagOwner;
121123
owner_page[0].header.length = 2048;

0 commit comments

Comments
 (0)