diff --git a/lib/compilation-prepare.sh b/lib/compilation-prepare.sh index 588686d412..e0dcde0dee 100644 --- a/lib/compilation-prepare.sh +++ b/lib/compilation-prepare.sh @@ -717,7 +717,39 @@ compilation_prepare() fi + # Exfat driver + if linux-version compare "${version}" ge 4.9 && linux-version compare "${version}" le 5.4; then + + # attach to specifics tag or branch + display_alert "Adding" "exfat driver ${exfatsver}" "info" + + local exfatsver="branch:master" + fetch_from_repo "$GITHUB_SOURCE/arter97/exfat-linux" "exfat" "${exfatsver}" "yes" + cd "$kerneldir" || exit + mkdir -p $kerneldir/fs/exfat/ + cp -R "${SRC}/cache/sources/exfat/${exfatsver#*:}"/{*.c,*.h} \ + $kerneldir/fs/exfat/ + + # Add to section Makefile + echo "obj-\$(CONFIG_EXFAT_FS) += exfat/" >> $kerneldir/fs/Makefile + + # Makefile + cat <<-EOF > "$kerneldir/fs/exfat/Makefile" + # SPDX-License-Identifier: GPL-2.0-or-later + # + # Makefile for the linux exFAT filesystem support. + # + obj-\$(CONFIG_EXFAT_FS) += exfat.o + exfat-y := inode.o namei.o dir.o super.o fatent.o cache.o nls.o misc.o file.o balloc.o xattr.o + EOF + + # Kconfig + sed -i '$i\source "fs\/exfat\/Kconfig"' $kerneldir/fs/Kconfig + cp "${SRC}/cache/sources/exfat/${exfatsver#*:}/Kconfig" \ + "$kerneldir/fs/exfat/Kconfig" + + fi if linux-version compare $version ge 4.4 && linux-version compare $version lt 5.8; then display_alert "Adjusting" "Framebuffer driver for ST7789 IPS display" "info"