Android:当前插槽:没有可引导插槽 - A/B 信息存储在哪里?

Android: current-slot:no bootable slot - where is the A/B info stored?

我正在构建 Android 定制 iMX8 板。 Android 从 SD 卡启动时工作正常。

我已经使用 uuu 将完全相同的分区映像放在板载 eMMC 闪存上。

从 SD 卡启动 Android 后,我可以看到 eMMC(和 SD 卡)上的分区:

smarc_mx8mq:/dev/block # ls
by-name loop5        mmcblk0boot1 mmcblk0p14 mmcblk0p4 mmcblk1    mmcblk1p14 mmcblk1p4 platform ram13 ram5 zram0
loop0   loop6        mmcblk0p1    mmcblk0p15 mmcblk0p5 mmcblk1p1  mmcblk1p15 mmcblk1p5 ram0     ram14 ram6
loop1   loop7        mmcblk0p10   mmcblk0p16 mmcblk0p6 mmcblk1p10 mmcblk1p16 mmcblk1p6 ram1     ram15 ram7
loop2   loop8        mmcblk0p11   mmcblk0p17 mmcblk0p7 mmcblk1p11 mmcblk1p17 mmcblk1p7 ram10    ram2  ram8
loop3   mmcblk0      mmcblk0p12   mmcblk0p2  mmcblk0p8 mmcblk1p12 mmcblk1p2  mmcblk1p8 ram11    ram3  ram9
loop4   mmcblk0boot0 mmcblk0p13   mmcblk0p3  mmcblk0p9 mmcblk1p13 mmcblk1p3  mmcblk1p9 ram12    ram4  vold

当我尝试从 eMMC 启动时出现错误:

fsl_avb_ab_flow.c:1182: ERROR: No bootable slots found.

我可以从 eMMC 启动到 u-boot 并使用命令 fastboot usb 0 将其置于快速启动模式。

从主机 PC 使用 fastboot flash boot boot.img 也失败,出现类似的错误:

error: Failed to identify current slot.

用SD卡比较fastboot getvar all的结果,与eMMC相比,我看到以下差异:

8c8
< (bootloader) erase-block-size:0x200
---
> (bootloader) erase-block-size:0x80000
40c40
< (bootloader) partition-size:all:0x3b5980000
---
> (bootloader) partition-size:all:0xece000000
75c75
< (bootloader) current-slot:a
---
> (bootloader) current-slot:no bootable slot
77c77
< (bootloader) slot-successful:a:yes
---
> (bootloader) slot-successful:a:no
79,80c79,80
< (bootloader) slot-unbootable:a:no
< (bootloader) slot-unbootable:b:no
---
> (bootloader) slot-unbootable:a:yes
> (bootloader) slot-unbootable:b:yes
82c82
< (bootloader) slot-retry-count:b:7
---
> (bootloader) slot-retry-count:b:0
84c84
< finished. total time: 0.009s
---
> finished. total time: 0.005s

所以eMMC上的A/B插槽肯定有问题。

我试过 fastboot --set-active=a,它输出:

Setting current slot to 'a'...
OKAY [  0.007s]
finished. total time: 0.007s

它没有解决任何问题。

我的问题是:

我可以用 fastboot --set-active=a 解决这个问题,紧接着 fastboot flash boot boot.img 和所有其他分区。