initrd_addr_r=0x88000000
bootcmd=
- if part number mmc 0 vbmeta is_avb; then
- echo 'MMC with vbmeta partition detected.';
+ virtio scan;
+ if virtio info; then
+ blk_dev=virtio;
+ else;
+ blk_dev=mmc;
+ fi;
+ echo block device is ${blk_dev};
+ if part number ${blk_dev} 0 vbmeta is_avb; then
+ echo '${blk_dev} with vbmeta partition detected.';
echo 'Starting Android Verified boot...';
- avb init mmc 0;
+ avb init ${blk_dev} 0;
if avb verify; then
set bootargs $bootargs $avb_bootargs;
- part start mmc 0 boot boot_start;
- part size mmc 0 boot boot_size;
- mmc read ${load_addr} ${boot_start} ${boot_size};
+ part start ${blk_dev} 0 boot boot_start;
+ part size ${blk_dev} 0 boot boot_size;
+ ${blk_dev} read ${load_addr} ${boot_start} ${boot_size};
bootm ${load_addr} ${load_addr} ${fdt_addr_r};
else;
echo 'AVB verification failed.';
exit;
fi;
- elif part number mmc 0 system is_non_avb_android; then
+ elif part number ${blk_dev} 0 system is_non_avb_android; then
echo 'Booting Android non-AVB...';
booti ${kernel_addr_r} ${initrd_addr_r} ${fdt_addr_r};
elif iminfo ${load_addr}; then