summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-03-26 11:04:41 -0600
committerTom Rini <[email protected]>2026-03-26 11:04:41 -0600
commit80a4c49a4ab2ad06fa84a8b7bdf6e33b3b5101bf (patch)
tree94041e641b12a66eef8c35d991d83fb05409d698 /include
parent5673d25fd82a00eb5a2bf5761b3aa92de0e9e4e1 (diff)
parent868233099d873cc8e2f8b99f609bdbaed421eab7 (diff)
Merge patch series "Introduce SQUASHFS support in SPL"
Richard Genoud <[email protected]> says: SquashFS has support in U-Boot, but not in SPL. This series adds the possibility for the SPL to load files from SquashFS partitions. This is useful, for instance, when there's a SquashFS rootfs containing U-Boot binary. NB: falcon mode is not supported yet. Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include')
-rw-r--r--include/part.h1
-rw-r--r--include/spl.h6
-rw-r--r--include/squashfs.h5
3 files changed, 11 insertions, 1 deletions
diff --git a/include/part.h b/include/part.h
index aed089d00f6..15daacd7faa 100644
--- a/include/part.h
+++ b/include/part.h
@@ -461,6 +461,7 @@ ulong disk_blk_erase(struct udevice *dev, lbaint_t start, lbaint_t blkcnt);
#ifdef CONFIG_XPL_BUILD
# define part_print_ptr(x) NULL
# if defined(CONFIG_SPL_FS_EXT4) || defined(CONFIG_SPL_FS_FAT) || \
+ defined(CONFIG_SPL_FS_SQUASHFS) || \
defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION) || \
defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE)
# define part_get_info_ptr(x) x
diff --git a/include/spl.h b/include/spl.h
index 06dc28362d3..5078d7525ab 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -882,6 +882,12 @@ int spl_blk_load_image(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev,
enum uclass_id uclass_id, int devnum, int partnum);
+/* SPL SQUASHFS image functions */
+int spl_load_image_sqfs(struct spl_image_info *spl_image,
+ struct spl_boot_device *bootdev,
+ struct blk_desc *block_dev, int partition,
+ const char *filename);
+
/**
* spl_early_init() - Set up device tree and driver model in SPL if enabled
*
diff --git a/include/squashfs.h b/include/squashfs.h
index 7489eefa1f2..83ed8a49442 100644
--- a/include/squashfs.h
+++ b/include/squashfs.h
@@ -10,7 +10,10 @@
#ifndef _SQFS_H_
#define _SQFS_H_
-struct disk_partition;
+#include <fs.h>
+#include <blk.h>
+#include <part.h>
+#include <linux/types.h>
int sqfs_opendir(const char *filename, struct fs_dir_stream **dirsp);
int sqfs_readdir(struct fs_dir_stream *dirs, struct fs_dirent **dentp);