Can "test" partition be used instead of "factory" in production?

jhnlmn
Posts: 15
Joined: Wed Mar 03, 2021 4:22 am

Can "test" partition be used instead of "factory" in production?

Postby jhnlmn » Tue Dec 28, 2021 1:55 am

Hi,
Typical 3 partition scheme includes factory, ota_1 and ota_2 partitions.
Then bootloader can be configured with CONFIG_BOOTLOADER_FACTORY_RESET option to erase OTA partitions if some button is pressed during reboot.
But this is too drastic - I do not want user to erase all OTA partitions by accidentally pressing a button during power cycle. I want a button press during boot to simply load FW from factory partition, which will then give user a choice whether to boot existing OTA image or install a new one - this is how many modern devices work, including smartphones.
I see that bootloader has similar option CONFIG_BOOTLOADER_APP_TEST, which loads FW from "test" partition, but "test" is not the same as "factory", is it?
I tried to replace "factory" by "test", essentially, I replaced
factory, app, factory, 0x010000, 0x120000,
ota_0, app, ota_0, 0x130000, 0x150000,
ota_1, app, ota_1, 0x280000, 0x150000,
by
test, app, test, 0x010000, 0x120000,
ota_0, app, ota_0, 0x130000, 0x150000,
ota_1, app, ota_1, 0x280000, 0x150000,
in partitions.csv. This appears to work: it boots into ota_x normally and to "test" if button is pressed.

Are there any drawbacks to this approach of using "test" instead of "factory"? In particlar from secure boot point of view?
What are the differences between "test" and "factory"?

Thank you

Who is online

Users browsing this forum: No registered users and 467 guests