• This repository has been archived on 03/Mar/2024
  • Stars
    star
    261
  • Rank 156,630 (Top 4 %)
  • Language
    C
  • License
    Other
  • Created over 5 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

EOL exFAT filesystem module for Linux kernel. Everyone should be using https://github.com/namjaejeon/linux-exfat-oot instead.

exfat-linux

This exFAT filesystem module for Linux kernel is a backport of the latest Linux mainline's exFAT drivers by Samsung.

This project can be used for everyday Linux users by simply doing make && make install. Ubuntu users can simply add a PPA and start using it, without even downloading the code. This can also be directly dropped-in to an existing Linux kernel source for building the filesystem drivers inline, which should be useful for Android kernel developers.

exfat-linux has been tested with all major LTS kernels ranging from v4.9 to v5.4 and the ones Canonical uses for Ubuntu: v4.9, v4.14, v4.19, v5.4 and v4.15, v5.3, and v5.6.

It's also been tested with x86(i386), x86_64(amd64), arm32(AArch32) and arm64(AArch64).

Linux kernels since v5.4 includes an exFAT driver, but it is an extremely outdated version from 2016. This was later revised by Samsung directly with v5.7.

People on v5.7 kernel or higher can just use the bundled exFAT drivers.

People on v5.4+ are highly recommended to use this drivers.

Support for kernel versions lower than v4.9 were dropped for easier maintenance. For people interested in exFAT support for said kernels, please use the old branch. It still works nicely and it's actively being shipped to production smartphones.

exfat-linux is planned to be maintained until Android devices with v5.7+ LTS kernel become more common.

Disclaimer

โ— Original authorship and copyright: Samsung

โ— Maintainer of exfat-linux: Park Ju Hyung(arter97)

Using exfat-linux

โ— Ubuntu PPA

If you're an Ubuntu user, you can simply add a PPA repository and start using the exFAT module.

Ubuntu will handle upgrades automatically as well.

  1. Add the exfat-linux repository

    sudo add-apt-repository ppa:arter97/exfat-linux
    sudo apt update
    
  2. Install the module

    sudo apt install exfat-dkms

This will use DKMS(Dynamic Kernel Module Support) and automatically build exFAT module for your current Ubuntu installation.

โ— Manually installing the module

  1. Download the code

    git clone https://github.com/arter97/exfat-linux
    cd exfat-linux
    
  2. Build

    make

  3. Install

    sudo make install

This will install the module to your currently running kernel.

If you're running a v5.4+ kernel, it is highly recommended to reboot at this point to prevent the existing staging exFAT drivers to load.

  1. And finally load

    sudo modprobe exfat

If you upgrade the kernel, you'll have to repeat this process.

If you want to update exfat-linux to the latest version, you'll have to repeat this process.

โ— Merging the drivers to existing Linux kernel source

If you're using git, using git subtree or git submodule is highly recommended.

  1. Add this repository to fs/exfat

  2. Modify fs/Kconfig

 menu "DOS/FAT/NT Filesystems"

 source "fs/fat/Kconfig"
+source "fs/exfat/Kconfig"
 source "fs/ntfs/Kconfig"
 endmenu
  1. Modify fs/Makefile
 obj-$(CONFIG_FAT_FS)    += fat/
+obj-$(CONFIG_EXFAT_FS)  += exfat/
 obj-$(CONFIG_BFS_FS)    += bfs/

And you're good to go!

Benchmarks

For reference, existing exFAT implementations were tested and compared on a server running Ubuntu 16.04 with Linux kernel 4.14 under a contained virtual machine.

Linux 4.14 was used as higher LTS kernels don't work with [exfat-nofuse] at the time of testing.

The new base backported from mainline is not benchmarked yet.

โ— Ramdisk

fio sequential I/O

Implementation Base Read Write
exfat-linux 2.2.0 7042 MB/s 2173 MB/s
[exfat-nofuse] 1.2.9 6849 MB/s 1961 MB/s
exfat-fuse N/A 3097 MB/s 1710 MB/s
ext4 N/A 7352 MB/s 3333 MB/s

fio random I/O

Implementation Base Read Write
exfat-linux 2.2.0 760 MB/s 2222 MB/s
[exfat-nofuse] 1.2.9 760 MB/s 2160 MB/s
exfat-fuse N/A 1.7 MB/s 1.6 MB/s
ext4 N/A 747 MB/s 2816 MB/s

โ— NVMe device

fio sequential I/O

Implementation Base Read Write
exfat-linux 2.2.0 1283 MB/s 1832 MB/s
[exfat-nofuse] 1.2.9 1285 MB/s 1678 MB/s
exfat-fuse N/A 751 MB/s 1464 MB/s
ext4 N/A 1283 MB/s 3356 MB/s

fio random I/O

Implementation Base Read Write
exfat-linux 2.2.0 26 MB/s 1885 MB/s
[exfat-nofuse] 1.2.9 24 MB/s 1827 MB/s
exfat-fuse N/A 1.6 MB/s 1.6 MB/s
ext4 N/A 29 MB/s 2821 MB/s

Mount options

  • uid

  • gid

  • umask

  • dmask

  • fmask

  • allow_utime

  • iocharset

  • quiet

  • time_offset

    • Please refer to the vfat's documentation.
  • errors=continue

    • Keep going on a filesystem error.
  • errors=panic

    • Panic and halt the machine if an error occurs.
  • errors=remount-ro

    • Remount the filesystem read-only on an error.
  • discard

    • Enable the use of discard/TRIM commands to ensure flash storage doesn't run out of free blocks. This option may introduce latency penalty on file removal operations.

Enjoy!

More Repositories

1

android_kernel_oneplus_sm8150

C
64
star
2

immich-native

Immich hosted without Docker
Shell
51
star
3

DisablePROCHOT

C
45
star
4

android_kernel_oneplus_sm8350

C
45
star
5

AutoHzPerm

Instructions for AutoHz (Auto90)
31
star
6

android_vendor_lawnchair

Lawnchair AOSP based build system
Makefile
29
star
7

android_kernel_nothing_sm8475

C
21
star
8

arm64-gcc

C
21
star
9

back-to-n00t

Port of SHV-E210S Android 4.4.4 Touchwiz firmware to GT-I9300
ApacheConf
20
star
10

SimpleMSR

Kext extension for writing MSR values(e.g. PROCHOT, undervolting)
C++
19
star
11

android_kernel_oneplus_sdm845

I force-push a lot between releases. You've been warned.
C
18
star
12

android_kernel_xiaomi_sdm845

C
16
star
13

arm32-gcc

C
16
star
14

android_kernel_xiaomi_sdm660

C
15
star
15

android_kernel_realme_sdm710

C
13
star
16

caf_msm-4.9

C
12
star
17

caf_msm-4.19

C
12
star
18

android_kernel_razer_sdm845

C
12
star
19

caf_msm-3.10

cron-maintained CAF mirror of msm-3.10 repo, updated every 6 hours. Refer to https://www.codeaurora.org/xwiki/bin/QAEP/release for choosing which branch to look at.
11
star
20

linaro-64

Linaro AArch64 toolchain
C
10
star
21

linaro-lto

Personal Linaro toolchain for LTO kernel compilation
C
10
star
22

back-to-n0t3

Shell
10
star
23

caf_msm-4.14

C
10
star
24

caf_msm-5.4

C
10
star
25

x86-kernel

Customized kernel for arter97's PC
C
10
star
26

caf_mirror_manifest

Android mirror manifest for CodeAurora
Shell
9
star
27

f2fs-backport

f2fs backport for Linux 3.0
C
7
star
28

ytpatch_scripts

Scripts to patch YouTube for adblocking based on Wanam's Xposed module (no longer working) Please don't run this script by yourself. These are only for references.
Shell
7
star
29

caf_qcacld-3.0

Mirrored qcacld-3.0 repository with recursive "ipa_cld" bug fixed
C
6
star
30

hdk-kernel

C
6
star
31

caf_msm-3.18

cron-maintained CAF mirror of msm-3.18 repo, updated every 6 hours. Refer to https://www.codeaurora.org/xwiki/bin/QAEP/release for choosing which branch to look at.
C
6
star
32

crc32csum

Simple crc32c checksum utility
C
5
star
33

caf_qca-wifi-host-cmn

Mirrored qca-wifi-host-cmn repository with recursive "ipa_cld" bug fixed
C
5
star
34

aapt

Custom aapt with customizable compression methods
C++
5
star
35

android_kernel_oneplus_msm8996

C
5
star
36

Dumper

Makes system dump easier : https://play.google.com/store/apps/details?id=com.arter97.dumper
Java
5
star
37

android_kernel_xiaomi_sm6150

C
4
star
38

android_kernel_nvidia_shieldtablet

C
4
star
39

android_kernel_motorola_smelt

Moto 360 2nd gen
C
4
star
40

android_kernel_asus_zenfone9

C
4
star
41

resetprop

Portable(?) resetprop extracted from Magisk, full credit goes to nkk71 and topjohnwu
C++
4
star
42

caf_msm-5.15

C
4
star
43

caf_msm-4.4

3
star
44

hid-magicmouse-virtual_touchpad

Maps Apple Magic Mouse's scrolling to touchpad events
C
3
star
45

roomservice

3
star
46

r8152_custom_mac

Custom r8152(RTL8152/8153) drivers for Linux with custom MAC address setting
C
3
star
47

android_bootable_bootloader_edk2

C
3
star
48

android_kernel_nubia_tp1803

C
2
star
49

arm-linux-androideabi-5.2

GCC 5.2 toolchain for arm-linux-androideabi
C
2
star
50

f2fs-tools

C
2
star
51

arm-linux-androideabi-4.9

Linaro Android toolchain 4.9
C
2
star
52

android_autobench

Automated Android benchmark via adb
Shell
2
star
53

custom_super

Custom super.img for OnePlus 9 Pro
Shell
2
star
54

helloworld2

2
star
55

kernel_mirror_manifest

Shell
2
star
56

arm-linux-androideabi-5.1

GCC 5.1 toolchain for arm-linux-androideabi
C
1
star
57

Snapshot-manager

Android system app for managing btrfs snapshot with corruptd
Java
1
star
58

helloworld

1
star
59

arm-eabi-5.1

GCC 5.1 toolchain for arm-eabi
C
1
star
60

corruptd

C
1
star
61

glibc

Optimized glibc
C
1
star
62

smelt_rom

Shell
1
star
63

tissot_kernel

C
1
star
64

chromeos

C
1
star
65

arm-linux-androideabi-4.8

Linaro Android toolchain 4.8
C
1
star
66

aarch64-linux-gnu-7.1

C
1
star
67

x86-dexopt-wrapper

C++
1
star
68

HangulClock

HangulClock for Arduino
C++
1
star
69

android_external_jemalloc

C
1
star
70

firewall

GeoIP and bad IP filtering for Linux
Shell
1
star