[PATCH 1/2] FIT: fix build with sandbox

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux