Your device is corrupt. It can't be trusted and will not boot...
一上来会认为刷机有问题?有时候,你的眼睛背叛了你的心。
分析
首先,获取串口log,主要部分:
Active Slot _a is bootable, retry count 5 Booting from slot (_a) Booting Into Mission Mode Load Image vbmeta_a total time: 2 ms Load Image vbmeta_system_a total time: 1 ms avb_slot_verify.c:657: ERROR: vbmeta_system_a: Image rollback index is less than the stored rollback index. Load Image boot_a total time: 43 ms Load Image dtbo_a total time: 4 ms No bootable slots found enter fastboot mode VB2: boot state: red(3) //重启 ... Slot _a is unbootable, trying alternate slot Err: line:1603 FindBootableSlot() status: Load Error Err: line:1386 LoadImageAndAuth() status: Load Error LoadImageAndAuth failed: Load Error Launching fastboot
static AvbSlotVerifyResult load_and_verify_vbmeta( AvbOps* ops, constchar* const* requested_partitions, constchar* ab_suffix, bool allow_verification_error, AvbVBMetaImageFlags toplevel_vbmeta_flags, int rollback_index_location, constchar* partition_name, size_t partition_name_len, constuint8_t* expected_public_key, size_t expected_public_key_length, AvbSlotVerifyData* slot_data, AvbAlgorithmType* out_algorithm_type) { ... if (vbmeta_header.rollback_index < stored_rollback_index) { avb_errorv( full_partition_name, ": Image rollback index is less than the stored rollback index.\n", //tj: here NULL); ret = AVB_SLOT_VERIFY_RESULT_ERROR_ROLLBACK_INDEX; if (!allow_verification_error) { goto out; } } ... out: /* If |vbmeta_image_data| isn't NULL it means that it adopted * |vbmeta_buf| so in that case don't free it here. */ if (vbmeta_image_data == NULL) { if (vbmeta_buf != NULL) { avb_free(vbmeta_buf); } } if (descriptors != NULL) { avb_free(descriptors); } return ret; }
STATIC EFI_STATUS DisplayVerifiedBootScreen(BootInfo *Info) { ... DEBUG ((EFI_D_VERBOSE, "Boot State is : %d\n", Info->BootState)); switch (Info->BootState) { case RED: Status = DisplayVerifiedBootMenu (DISPLAY_MENU_RED); if (Status != EFI_SUCCESS) { DEBUG ((EFI_D_INFO, "Your device is corrupt. It can't be trusted and will not boot." "\nYour device will shutdown in 30s\n")); } MicroSecondDelay (30000000); ShutdownDevice (); //tj: here break;
aha…这里显示并复位的。DisplayVerifiedBootMenu这里会显示device is corrupt,code就不贴了。ok,接下来就是: