Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions debian/dkms.conf.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
PACKAGE_NAME="#PKG_NAME#"
PACKAGE_VERSION="#VERSION#"
# To avoid missing sources for NTFS3 for a specific kernel version
# we have to set BUILD_EXCLUSIVE_KERNEL_MIN and BUILD_EXCLUSIVE_KERNEL_MAX to build only driver
# only between these Kernel versions.
# This means the driver will not fail for Kernels that are not present outside of these versions.
# For the moment: #MOD_MIN_VER# to #MOD_MAX_VER# are present.
BUILD_EXCLUSIVE_KERNEL_MIN="#MIN_VER#"
BUILD_EXCLUSIVE_KERNEL_MAX="#MAX_VER#"
# we only build for kernel major.minor versions that exist under ntfs3/.
# This means the driver will not fail for kernels without matching sources.
# For the moment: #SUPPORTED_KVERS# are present.
BUILD_EXCLUSIVE_KERNEL="#BUILD_EXCLUSIVE_KERNEL#"
# All symbols are defined in Makefile
MAKE="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build CONFIG_NTFS3_FS=m CONFIG_NTFS3_64BIT_CLUSTER=y CONFIG_NTFS3_LZX_XPRESS=y CONFIG_NTFS3_FS_POSIX_ACL=y CONFIG_NTFS_FS=y"
CLEAN="make clean"
Expand Down
24 changes: 6 additions & 18 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,9 @@ ARCH := $(shell dpkg --print-architecture)
#ARCH_SUFFIX=i386
#endif

KVER_MIN := $(shell ls -1 $(DRIVER_NAME) | grep "^[0-9]\." | sort -V | head -1)
KVER_MAX := $(shell ls -1 $(DRIVER_NAME) | grep "^[0-9]\." | sort -V | tail -1)

## We need one version lower for BUILD_EXCLUSIVE_KERNEL_MIN
## and one version higher for BUILD_EXCLUSIVE_KERNEL_MAX
KVER_MIN_MAJOR := $(shell echo $(KVER_MIN) | sed "s/\([0-9]\+\)\.[0-9]\+/\1/g")
KVER_MIN_MINOR := $(shell echo $(KVER_MIN) | sed "s/[0-9]\+\.\([0-9]\+\)/\1/g")

KVER_MAX_MAJOR := $(shell echo $(KVER_MAX) | sed "s/\([0-9]\+\)\.[0-9]\+/\1/g")
KVER_MAX_MINOR := $(shell echo $(KVER_MAX) | sed "s/[0-9]\+\.\([0-9]\+\)/\1/g")

MOD_KVER_MIN_MINOR := $(shell echo $$(($(KVER_MIN_MINOR)-1)))
MOD_KVER_MAX_MINOR := $(shell echo $$(($(KVER_MAX_MINOR)+1)))
KVER_DIRS := $(shell ls -1 $(DRIVER_NAME) | grep "^[0-9]\+\.[0-9]\+$$" | sort -V)
SUPPORTED_KVERS := $(shell printf '%s\n' $(KVER_DIRS) | paste -sd',' - | sed 's/,/, /g')
BUILD_EXCLUSIVE_KERNEL := $(shell printf '%s\n' $(KVER_DIRS) | sed 's/\./\\\\./g' | paste -sd'|' - | sed 's|.*|^(&)([.+-].*)?$$|')

%:
dh "$@"
Expand All @@ -44,12 +34,10 @@ override_dh_auto_install:
-e "s|#DRIVER_NAME#|$(DRIVER_NAME)|" \
-e "s|#VERSION#|$(VERSION)|" \
-e "s|#ARCH#|$(ARCH_SUFFIX)|" \
-e "s|#MOD_MIN_VER#|$(KVER_MAX_MAJOR).$(KVER_MIN_MINOR)|" \
-e "s|#MOD_MAX_VER#|$(KVER_MAX_MAJOR).$(KVER_MAX_MINOR)|" \
-e "s|#MIN_VER#|$(KVER_MAX_MAJOR).$(MOD_KVER_MIN_MINOR)|" \
-e "s|#MAX_VER#|$(KVER_MAX_MAJOR).$(MOD_KVER_MAX_MINOR)|" \
-e "s|#SUPPORTED_KVERS#|$(SUPPORTED_KVERS)|" \
-e 's@#BUILD_EXCLUSIVE_KERNEL#@$(BUILD_EXCLUSIVE_KERNEL)@' \
debian/$$i.in > debian/$$i; \
done
done

override_dh_clean:
dh_clean
Expand Down
57 changes: 57 additions & 0 deletions ntfs3/7.0/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# SPDX-License-Identifier: GPL-2.0-only
config NTFS3_FS
tristate "NTFS Read-Write file system support"
select BUFFER_HEAD
select NLS
select LEGACY_DIRECT_IO
help
Windows OS native file system (NTFS) support up to NTFS version 3.1.

Y or M enables the NTFS3 driver with full features enabled (read,
write, journal replaying, sparse/compressed files support).
File system type to use on mount is "ntfs3". Module name (M option)
is also "ntfs3".

Documentation: <file:Documentation/filesystems/ntfs3.rst>

config NTFS3_64BIT_CLUSTER
bool "64 bits per NTFS clusters"
depends on NTFS3_FS && 64BIT
help
Windows implementation of ntfs.sys uses 32 bits per clusters.
If activated 64 bits per clusters you will be able to use 4k cluster
for 16T+ volumes. Windows will not be able to mount such volumes.

It is recommended to say N here.

config NTFS3_LZX_XPRESS
bool "activate support of external compressions lzx/xpress"
depends on NTFS3_FS
help
In Windows 10 one can use command "compact" to compress any files.
4 possible variants of compression are: xpress4k, xpress8k, xpress16k and lzx.
If activated you will be able to read such files correctly.

It is recommended to say Y here.

config NTFS3_FS_POSIX_ACL
bool "NTFS POSIX Access Control Lists"
depends on NTFS3_FS
select FS_POSIX_ACL
help
POSIX Access Control Lists (ACLs) support additional access rights
for users and groups beyond the standard owner/group/world scheme,
and this option selects support for ACLs specifically for ntfs
filesystems.
NOTE: this is linux only feature. Windows will ignore these ACLs.

If you don't know what Access Control Lists are, say N.

config NTFS_FS
tristate "NTFS file system support"
select NTFS3_FS
select BUFFER_HEAD
select NLS
help
This config option is here only for backward compatibility. NTFS
filesystem is now handled by the NTFS3 driver.
36 changes: 36 additions & 0 deletions ntfs3/7.0/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# SPDX-License-Identifier: GPL-2.0
#
# Makefile for the ntfs3 filesystem support.
#

# to check robot warnings
ccflags-y += -Wint-to-pointer-cast \
$(call cc-option,-Wunused-but-set-variable,-Wunused-const-variable) \
$(call cc-option,-Wold-style-declaration,-Wout-of-line-declaration)

obj-$(CONFIG_NTFS3_FS) += ntfs3.o

ntfs3-y := attrib.o \
attrlist.o \
bitfunc.o \
bitmap.o \
dir.o \
fsntfs.o \
frecord.o \
file.o \
fslog.o \
inode.o \
index.o \
lznt.o \
namei.o \
record.o \
run.o \
super.o \
upcase.o \
xattr.o

ntfs3-$(CONFIG_NTFS3_LZX_XPRESS) += $(addprefix lib/,\
decompress_common.o \
lzx_decompress.o \
xpress_decompress.o \
)
Loading