From 9c5e2f1dbb99eaf369ad4db5eb753d1bd4ae53d8 Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Thu, 4 Feb 2021 11:55:56 +0800 Subject: [PATCH] disk: efi: correct the partition_entry_lba location Set partition_entry_lba to 0x2 but not 0x22, otherwise it will overlay write the rockchip's idb data in the location 32KB. Signed-off-by: Jason Zhu Change-Id: Ic02859fb135ece6d609320a9df030f041af93a8e --- disk/part_efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disk/part_efi.c b/disk/part_efi.c index 1d18302971..0783289432 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -415,7 +415,7 @@ static int part_efi_repair(struct blk_desc *dev_desc, gpt_entry *gpt_pte, gpt_head->header_crc32 = 0; gpt_head->my_lba = 1; gpt_head->alternate_lba = dev_desc->lba - 1; - gpt_head->partition_entry_lba = 0x22; + gpt_head->partition_entry_lba = 0x2; gpt_head->last_usable_lba = cpu_to_le64(dev_desc->lba - 34); gpt_entry_modify(dev_desc, gpt_pte, gpt_head); calc_crc32 = efi_crc32((const unsigned char *)gpt_head,