Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc510061

Browse files
jmarcoscostatrini
authored andcommitted
fs/squashfs: new filesystem
Add support for SquashFS filesystem. Right now, it does not supportcompression but support for zlib will be added in a follow-up commit.Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
1 parent550a9e7 commitc510061

File tree

16 files changed

+2297
-0
lines changed

16 files changed

+2297
-0
lines changed

‎MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,12 @@ S:Maintained
969969
F:drivers/spmi/
970970
F:include/spmi/
971971

972+
SQUASHFS
973+
M:Joao Marcos Costa <joaomarcos.costa@bootlin.com>
974+
S:Maintained
975+
F:fs/squashfs/
976+
F:include/sqfs.h
977+
972978
TARGET_BCMNS3
973979
M:Bharat Gooty <bharat.gooty@broadcom.com>
974980
M:Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>

‎common/spl/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,15 @@ config SPL_FS_EXT4
577577
filesystem from within SPL. Support for the underlying block
578578
device (e.g. MMC or USB) must be enabled separately.
579579

580+
config SPL_FS_SQUASHFS
581+
bool "Support SquashFS filesystems"
582+
select FS_SQUASHFS
583+
help
584+
Enable support for SquashFS filesystems with SPL. This permits
585+
U-Boot (or Linux in Falcon mode) to be loaded from a SquashFS
586+
filesystem from within SPL. Support for the underlying block
587+
device (e.g. MMC or USB) must be enabled separately.
588+
580589
config SPL_FS_FAT
581590
bool "Support FAT filesystems"
582591
select FS_FAT

‎fs/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ source "fs/cramfs/Kconfig"
2222

2323
source "fs/yaffs2/Kconfig"
2424

25+
source "fs/squashfs/Kconfig"
26+
2527
endmenu

‎fs/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ obj-$(CONFIG_FS_LOADER) += fs.o
99
obj-$(CONFIG_SPL_FS_FAT) += fat/
1010
obj-$(CONFIG_SPL_FS_EXT4) += ext4/
1111
obj-$(CONFIG_SPL_FS_CBFS) += cbfs/
12+
obj-$(CONFIG_SPL_FS_SQUASHFS) += squashfs/
1213
else
1314
obj-y+= fs.o
1415

@@ -23,5 +24,6 @@ obj-$(CONFIG_SANDBOX) += sandbox/
2324
obj-$(CONFIG_CMD_UBIFS) += ubifs/
2425
obj-$(CONFIG_YAFFS2) += yaffs2/
2526
obj-$(CONFIG_CMD_ZFS) += zfs/
27+
obj-$(CONFIG_FS_SQUASHFS) += squashfs/
2628
endif
2729
obj-y += fs_internal.o

‎fs/fs.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include<div64.h>
2323
#include<linux/math64.h>
2424
#include<efi_loader.h>
25+
#include<squashfs.h>
2526

2627
DECLARE_GLOBAL_DATA_PTR;
2728

@@ -276,6 +277,20 @@ static struct fstype_info fstypes[] = {
276277
.mkdir=fs_mkdir_unsupported,
277278
.ln=fs_ln_unsupported,
278279
},
280+
#endif
281+
#ifIS_ENABLED(CONFIG_FS_SQUASHFS)
282+
{
283+
.fstype=FS_TYPE_SQUASHFS,
284+
.name="squashfs",
285+
.probe=sqfs_probe,
286+
.opendir=sqfs_opendir,
287+
.readdir=sqfs_readdir,
288+
.ls=fs_ls_generic,
289+
.read=sqfs_read,
290+
.size=sqfs_size,
291+
.close=sqfs_close,
292+
.closedir=sqfs_closedir,
293+
},
279294
#endif
280295
{
281296
.fstype=FS_TYPE_ANY,

‎fs/squashfs/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
config FS_SQUASHFS
2+
bool "Enable SquashFS filesystem support"
3+
help
4+
This provides support for reading images from SquashFS filesystem.
5+
Squashfs is a compressed read-only filesystem for Linux.
6+
It uses zlib, lz4, lzo, or xz compression to compress files, inodes
7+
and directories. Squashfs is intended for general read-only
8+
filesystem use, for archival use (i.e. in cases where a .tar.gz file
9+
may be used), and in constrained block device/memory systems (e.g.
10+
embedded systems) where low overhead is needed.

‎fs/squashfs/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-License-Identifier: GPL-2.0+
2+
#
3+
4+
obj-$(CONFIG_$(SPL_)FS_SQUASHFS) = sqfs.o\
5+
sqfs_inode.o\
6+
sqfs_dir.o\
7+
sqfs_decompressor.o

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp