arch/esp32_partition.c: fix the issue of switching from Factory to OTA_1
with a fixed seq of 1, which causes ota_get_bootseq() to return ota_0. The current solution is to directly use the target partition's number (num) as next_seq to ensure the correct increment logic of seq. Ensure the formula (seq-1) % OTA_DATA_NUM + OTA_IMG_BOOT_OTA_0 correctly maps to ota_0 or ota_1 Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
This commit is contained in:
parent
726683485f
commit
c4506929e9
1 changed files with 1 additions and 1 deletions
|
|
@ -333,7 +333,7 @@ static int ota_set_bootseq(struct mtd_dev_priv *dev, int num)
|
|||
}
|
||||
else if (ret == OTA_IMG_BOOT_FACTORY)
|
||||
{
|
||||
next_seq = 1;
|
||||
next_seq = (uint32_t)num;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue