You've already forked linux-t2-patches
mirror of
https://github.com/t2linux/linux-t2-patches.git
synced 2026-04-30 13:52:11 -07:00
93 lines
2.7 KiB
Diff
93 lines
2.7 KiB
Diff
From bdc9881b548752150cdbf9f952c58747fc256b9d Mon Sep 17 00:00:00 2001
|
|
From: Aditya Garg <gargaditya08@live.com>
|
|
Date: Sat, 8 Jun 2024 17:48:28 +0530
|
|
Subject: [PATCH] Necessary modifications to build APFS with the kernel
|
|
|
|
---
|
|
fs/Kconfig | 1 +
|
|
fs/Makefile | 1 +
|
|
fs/apfs/Kconfig | 16 ++++++++++++++++
|
|
fs/apfs/Makefile | 17 ++---------------
|
|
4 files changed, 20 insertions(+), 15 deletions(-)
|
|
create mode 100644 fs/apfs/Kconfig
|
|
|
|
diff --git a/fs/Kconfig b/fs/Kconfig
|
|
index a46b0cbc4..d914838fd 100644
|
|
--- a/fs/Kconfig
|
|
+++ b/fs/Kconfig
|
|
@@ -317,6 +317,7 @@ source "fs/affs/Kconfig"
|
|
source "fs/ecryptfs/Kconfig"
|
|
source "fs/hfs/Kconfig"
|
|
source "fs/hfsplus/Kconfig"
|
|
+source "fs/apfs/Kconfig"
|
|
source "fs/befs/Kconfig"
|
|
source "fs/bfs/Kconfig"
|
|
source "fs/efs/Kconfig"
|
|
diff --git a/fs/Makefile b/fs/Makefile
|
|
index 6ecc9b0a5..0cfeacc98 100644
|
|
--- a/fs/Makefile
|
|
+++ b/fs/Makefile
|
|
@@ -120,6 +120,7 @@ obj-$(CONFIG_DEBUG_FS) += debugfs/
|
|
obj-$(CONFIG_TRACING) += tracefs/
|
|
obj-$(CONFIG_OCFS2_FS) += ocfs2/
|
|
obj-$(CONFIG_BTRFS_FS) += btrfs/
|
|
+obj-$(CONFIG_APFS_FS) += apfs/
|
|
obj-$(CONFIG_GFS2_FS) += gfs2/
|
|
obj-$(CONFIG_F2FS_FS) += f2fs/
|
|
obj-$(CONFIG_BCACHEFS_FS) += bcachefs/
|
|
diff --git a/fs/apfs/Kconfig b/fs/apfs/Kconfig
|
|
new file mode 100644
|
|
index 000000000..3c209463d
|
|
--- /dev/null
|
|
+++ b/fs/apfs/Kconfig
|
|
@@ -0,0 +1,16 @@
|
|
+# SPDX-License-Identifier: GPL-2.0-only
|
|
+config APFS_FS
|
|
+ tristate "Apple file system support"
|
|
+ select CRYPTO
|
|
+ select CRYPTO_CRC32C
|
|
+ select LIBCRC32C
|
|
+ select CRYPTO_XXHASH
|
|
+ select CRYPTO_SHA256
|
|
+ select CRYPTO_BLAKE2B
|
|
+ select BUFFER_HEAD
|
|
+ select FS_IOMAP
|
|
+ select LEGACY_DIRECT_IO
|
|
+ help
|
|
+ If you say Y here, you will be able to mount APFS partitions
|
|
+ with read-only access. Write access is experimental and will
|
|
+ corrupt your container.
|
|
diff --git a/fs/apfs/Makefile b/fs/apfs/Makefile
|
|
index ab4c49d55..bc7bc8cc5 100644
|
|
--- a/fs/apfs/Makefile
|
|
+++ b/fs/apfs/Makefile
|
|
@@ -1,23 +1,10 @@
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
-# Makefile for the out-of-tree Linux APFS module.
|
|
+# Makefile for the Linux APFS module.
|
|
#
|
|
|
|
-KERNELRELEASE ?= $(shell uname -r)
|
|
-KERNEL_DIR ?= /lib/modules/$(KERNELRELEASE)/build
|
|
-PWD := $(shell pwd)
|
|
-
|
|
-obj-m = apfs.o
|
|
+obj-$(CONFIG_APFS_FS) = apfs.o
|
|
apfs-y := btree.o compress.o dir.o extents.o file.o inode.o key.o libzbitmap.o \
|
|
lzfse/lzfse_decode.o lzfse/lzfse_decode_base.o lzfse/lzfse_fse.o \
|
|
lzfse/lzvn_decode_base.o message.o namei.o node.o object.o snapshot.o \
|
|
spaceman.o super.o symlink.o transaction.o unicode.o xattr.o xfield.o
|
|
-
|
|
-default:
|
|
- ./genver.sh
|
|
- make -C $(KERNEL_DIR) M=$(PWD)
|
|
-install:
|
|
- make -C $(KERNEL_DIR) M=$(PWD) modules_install
|
|
-clean:
|
|
- rm -f version.h
|
|
- make -C $(KERNEL_DIR) M=$(PWD) clean
|
|
--
|
|
2.43.0
|
|
|