From f47eccf65b05ebab7f3f24c14a09aceb442e08fc Mon Sep 17 00:00:00 2001 From: Dan Ehrenberg Date: Mon, 5 Jan 2015 13:05:58 -0800 Subject: nand: Allow smaller disks for booting a kernel When vboot eliminates trivially small disks, it checks the GPT size for external GPT disks. For upcoming NAND devices, the GPT size is 8kB. This patch changes the definition of trivially small disks to be those under 8kB so that NAND can be booted from. BUG=chromium:433433 TEST=make runalltests TEST=Booted and saw a kernel from NAND selected on from an 8kB GPT. BRANCH=none Change-Id: I5047b9b642d564d5e4d77dd0b6dafb9eea09176a Signed-off-by: Dan Ehrenberg Reviewed-on: https://chromium-review.googlesource.com/238463 Reviewed-by: Bill Richardson Reviewed-by: Randall Spangler --- firmware/lib/vboot_api_kernel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c index 784751ad..d394d5cc 100644 --- a/firmware/lib/vboot_api_kernel.c +++ b/firmware/lib/vboot_api_kernel.c @@ -104,7 +104,7 @@ uint32_t VbTryLoadKernel(VbCommonParams *cparams, LoadKernelParams *p, * asked for. */ if (512 != disk_info[i].bytes_per_lba || - 32 > disk_info[i].lba_count || + 16 > disk_info[i].lba_count || get_info_flags != (disk_info[i].flags & ~VB_DISK_FLAG_EXTERNAL_GPT)) { VBDEBUG((" skipping: bytes_per_lba=%" PRIu64 " lba_count=%" PRIu64 " flags=0x%x\n", -- cgit v1.2.1