spl: spi: Raw Kernel Image Support for Falcon Mode Boot Via SPI Devices
Nathan Barrett-Morrison
nathan.morrison at timesys.com
Tue Apr 19 23:38:11 CEST 2022
Hi Tom,
I believe this patch is still relevant, so I'm resubmitting it. It was previously marked as superseded.
Thanks,
Nathan
>From 0bb98a42bcb01c078f63513d9151d307dbfd6ccd Mon Sep 17 00:00:00 2001
From: Nathan Barrett-Morrison <nathan.morrison at timesys.com>
Date: Tue, 19 Apr 2022 17:35:21 -0400
Subject: [PATCH v2] Allow Falcon Mode boot to use raw kernel image when booting
via SPI.
When using Falcon Mode boot with a raw, unwrapped kernel image, the bootz_setup() call inside of spl_parse_image_header() is
unreachable because the mkimage header magic check in spi_load_image_os() will never pass. This check is entirely redundant and unnecessary,
as the spl_parse_image_header() call will also check for IH_MAGIC.
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison at timesys.com>
Cc: Tom Rini <trini at konsulko.com>
---
Changes for v2:
- Remove proposed CONFIG_SYS_SPI_KERNEL_SKIP_HEADER option, as we've determined the entire check is redundant and unnecessary. Just delete it instead.
common/spl/spl_spi.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
index cf3f7ef4c0..22e9c87eae 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -34,9 +34,6 @@ static int spi_load_image_os(struct spl_image_info *spl_image,
spi_flash_read(flash, CONFIG_SYS_SPI_KERNEL_OFFS, sizeof(*header),
(void *)header);
- if (image_get_magic(header) != IH_MAGIC)
- return -1;
-
err = spl_parse_image_header(spl_image, bootdev, header);
if (err)
return err;
--
2.30.2
More information about the U-Boot
mailing list