From 9df731a176aab8e03b984b681b1bea01ccff6644 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 06 Nov 2023 07:23:06 +0000 Subject: [PATCH] rk3568 rt uboot init --- u-boot/disk/part_efi.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/u-boot/disk/part_efi.c b/u-boot/disk/part_efi.c index 27f3e4d..d4d03de 100644 --- a/u-boot/disk/part_efi.c +++ b/u-boot/disk/part_efi.c @@ -368,7 +368,7 @@ if (gpt_pte[i - 1].ending_lba <= (dev_desc->lba - 0x22)) return; /* The last partition size need align to 4KB, here align to 32KB. */ - gpt_pte[i - 1].ending_lba = dev_desc->lba - 0x40; + gpt_pte[i - 1].ending_lba = dev_desc->lba - 0x41; calc_crc32 = efi_crc32((const unsigned char *)gpt_pte, le32_to_cpu(gpt_head->num_partition_entries) * le32_to_cpu(gpt_head->sizeof_partition_entry)); @@ -963,7 +963,8 @@ dev_desc->blksz); if ((le64_to_cpu(gpt_h->alternate_lba) + 1) - != cpu_to_le64(dev_desc->lba)) { + != cpu_to_le64(dev_desc->lba) && + le64_to_cpu(gpt_h->last_usable_lba) != FACTORY_UNKNOWN_LBA) { printf("%s: failed checking '%s'\n", __func__, "invalid GPT Disk Size"); return -1; -- Gitblit v1.6.2