summaryrefslogtreecommitdiff
path: root/include/spl.h
diff options
context:
space:
mode:
authorManoj Sai <[email protected]>2023-09-18 00:56:25 +0530
committerKever Yang <[email protected]>2023-10-07 16:49:41 +0800
commitce6ab56401c6f91c77bdadd3128df94b2e3f046e (patch)
treefbb1518ff4d459f0aa7c135f5ef3b090d7e45b59 /include/spl.h
parent9841fe21197e9cfcbd64ecb257e298b9eec8a385 (diff)
spl: fit: support for booting a GZIP-compressed U-boot binary
If GZIP Compression support is enabled, GZIP compressed U-Boot binary will be at a specified RAM location which is defined at CONFIG_SYS_LOAD_ADDR and will be assign it as the source address. gunzip function in spl_load_fit_image ,will decompress the GZIP compressed U-Boot binary which is placed at source address(CONFIG_SYS_LOAD_ADDR) to the default CONFIG_SYS_TEXT_BASE location. spl_load_fit_image function will load the decompressed U-Boot binary, which is placed at the CONFIG_SYS_TEXT_BASE location. Signed-off-by: Manoj Sai <[email protected]> Signed-off-by: Suniel Mahesh <[email protected]> Reviewed-by: Kever Yang <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]>
Diffstat (limited to 'include/spl.h')
-rw-r--r--include/spl.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/spl.h b/include/spl.h
index 0fedddd00ef..320ed942739 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -897,4 +897,14 @@ struct legacy_img_hdr *spl_get_load_buffer(ssize_t offset, size_t size);
void board_boot_order(u32 *spl_boot_list);
void spl_save_restore_data(void);
+
+/*
+ * spl_decompression_enabled() - check decompression support is enabled for SPL build
+ *
+ * Returns true if decompression support is enabled, else False
+ */
+static inline bool spl_decompression_enabled(void)
+{
+ return IS_ENABLED(CONFIG_SPL_GZIP);
+}
#endif