From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 1/2] FIT: fix build with sandbox
Date: Fri, 17 May 2024 09:48:34 +0200 [thread overview]
Message-ID: <20240517074835.768112-1-a.fatoum@pengutronix.de> (raw)
As FIT is built only for ARM so far, this sandbox-related code has
bitrotted. To prepare allowing it to build for other platforms, adjust
the API to the current state.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
common/image-fit.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/common/image-fit.c b/common/image-fit.c
index 251fda97b3fc..4a69049abcdf 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -945,21 +945,22 @@ void fit_close(struct fit_handle *handle)
free(handle);
}
-#ifdef CONFIG_SANDBOX
static int do_bootm_sandbox_fit(struct image_data *data)
{
struct fit_handle *handle;
+ void *config;
int ret;
- void *kernel;
- unsigned long kernel_size;
- handle = fit_open(data->os_file, data->verbose);
+ handle = fit_open(data->os_file, data->verbose, BOOTM_VERIFY_NONE,
+ FILESIZE_MAX);
if (IS_ERR(handle))
return PTR_ERR(handle);
- ret = fit_open_configuration(handle, data->os_part);
- if (ret)
+ config = fit_open_configuration(handle, data->os_part);
+ if (IS_ERR(config)) {
+ ret = PTR_ERR(config);
goto out;
+ }
ret = 0;
out:
@@ -974,9 +975,10 @@ static struct image_handler sandbox_fit_handler = {
.filetype = filetype_oftree,
};
-static int sandbox_fit_register(void)
+static __maybe_unused int sandbox_fit_register(void)
{
return register_image_handler(&sandbox_fit_handler);
}
+#ifdef CONFIG_SANDBOX
late_initcall(sandbox_fit_register);
#endif
--
2.39.2
next reply other threads:[~2024-05-17 7:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-17 7:48 Ahmad Fatoum [this message]
2024-05-17 7:48 ` [PATCH 2/2] common: fit: don't have BOOTM_FITIMAGE depend on ARM Ahmad Fatoum
2024-05-21 6:23 ` [PATCH 1/2] FIT: fix build with sandbox Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240517074835.768112-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox