diff --git a/buildroot-external/Config.in b/buildroot-external/Config.in index eac673c91a5..f7c54d9449d 100644 --- a/buildroot-external/Config.in +++ b/buildroot-external/Config.in @@ -8,4 +8,5 @@ source "$BR2_EXTERNAL_HASSOS_PATH/package/qemu-guest-agent/Config.in" source "$BR2_EXTERNAL_HASSOS_PATH/package/intel-e1000e/Config.in" source "$BR2_EXTERNAL_HASSOS_PATH/package/wsdd2/Config.in" source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-eeprom/Config.in" +source "$BR2_EXTERNAL_HASSOS_PATH/package/exfat-linux/Config.in" source "$BR2_EXTERNAL_HASSOS_PATH/package/channels-dvr/Config.in" diff --git a/buildroot-external/configs/PI4_defconfig b/buildroot-external/configs/PI4_defconfig index 17d6ae054da..e9d4eb1e054 100644 --- a/buildroot-external/configs/PI4_defconfig +++ b/buildroot-external/configs/PI4_defconfig @@ -148,3 +148,4 @@ BR2_PACKAGE_NFS_UTILS=y BR2_PACKAGE_DOSFSTOOLS=y BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y +BR2_PACKAGE_EXFAT_LINUX=y \ No newline at end of file diff --git a/buildroot-external/package/exfat-linux/Config.in b/buildroot-external/package/exfat-linux/Config.in new file mode 100644 index 00000000000..0dc2714fd91 --- /dev/null +++ b/buildroot-external/package/exfat-linux/Config.in @@ -0,0 +1,4 @@ +menuconfig BR2_PACKAGE_EXFAT_LINUX + bool "exFAT linux kernel module" + help + https://github.com/arter97/exfat-linux diff --git a/buildroot-external/package/exfat-linux/exfat-linux.mk b/buildroot-external/package/exfat-linux/exfat-linux.mk new file mode 100644 index 00000000000..dd3635ff8ab --- /dev/null +++ b/buildroot-external/package/exfat-linux/exfat-linux.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# exfat-linux +# +################################################################################ + +EXFAT_LINUX_VERSION = 034f47d607c441e7fb5be3eb71d7a289ef76bc0c +EXFAT_LINUX_SITE = $(call github,arter97,exfat-linux,$(EXFAT_LINUX_VERSION)) +EXFAT_LINUX_LICENSE = GPL-2.0 +EXFAT_LINUX_LICENSE_FILES = LICENSE +EXFAT_LINUX_MODULE_MAKE_OPTS = CONFIG_EXFAT_FS=m + +$(eval $(kernel-module)) +$(eval $(generic-package)) \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/usr/lib/modules-load.d/exfat.conf b/buildroot-external/rootfs-overlay/usr/lib/modules-load.d/exfat.conf new file mode 100644 index 00000000000..07aa084d808 --- /dev/null +++ b/buildroot-external/rootfs-overlay/usr/lib/modules-load.d/exfat.conf @@ -0,0 +1 @@ +exfat diff --git a/buildroot-external/rootfs-overlay/usr/sbin/usb-mount b/buildroot-external/rootfs-overlay/usr/sbin/usb-mount index 9b4bb0ba570..07405ac8e78 100755 --- a/buildroot-external/rootfs-overlay/usr/sbin/usb-mount +++ b/buildroot-external/rootfs-overlay/usr/sbin/usb-mount @@ -48,7 +48,7 @@ do_mount() if grep -q " /media/${LABEL} " /etc/mtab; then # Already in use, make a unique one - LABEL+="-${DEVBASE}" + LABEL="${LABEL}-${DEVBASE}" fi DEV_LABEL="${LABEL}" @@ -67,9 +67,11 @@ do_mount() OPTS="rw,relatime" # File system type specific mount options - # if [ "${ID_FS_TYPE}" = "vfat" ]; then - # OPTS+=",users,gid=100,umask=000,shortname=mixed,utf8=1,flush" - # fi + if [ "${ID_FS_TYPE}" = "vfat" ]; then + OPTS="${OPTS},uid=501,gid=501,umask=000,utf8=1" + elif [ "${ID_FS_TYPE}" = "exfat" ]; then + OPTS="${OPTS},uid=501,gid=501,umask=000" + fi if ! mount -o ${OPTS} ${DEVICE} ${MOUNT_POINT}; then ${log} "Error mounting ${DEVICE} (status = $?)" diff --git a/buildroot-external/scripts/post-build.sh b/buildroot-external/scripts/post-build.sh index 5bf2bec28dc..4e7924df8cf 100755 --- a/buildroot-external/scripts/post-build.sh +++ b/buildroot-external/scripts/post-build.sh @@ -47,6 +47,7 @@ rm -f "${TARGET_DIR}"/usr/lib/systemd/system/hassos-{supervisor,apparmor,data}.s rm -f "${TARGET_DIR}"/etc/systemd/system/*getty*service.d/hassos.conf rm -f "${TARGET_DIR}"/etc/systemd/system/dropbear.service.d/docker.conf rm -f "${TARGET_DIR}"/etc/avahi/services/{sftp-ssh,ssh}.service +rm -f "${TARGET_DIR}"/sbin/mount.exfat sed -i "s|\(root:.*\)/bin/sh|\1/bin/bash|" "${TARGET_DIR}/etc/passwd" mkdir -p "${TARGET_DIR}/media" touch "${TARGET_DIR}/etc/channelsdistro" diff --git a/buildroot-external/scripts/rootfs-layer.sh b/buildroot-external/scripts/rootfs-layer.sh index e325073d21a..5a9120c4112 100755 --- a/buildroot-external/scripts/rootfs-layer.sh +++ b/buildroot-external/scripts/rootfs-layer.sh @@ -14,7 +14,7 @@ function fix_rootfs() { rm -rf "${TARGET_DIR:?}/opt" # Cleanup miscs - rm -rf "${TARGET_DIR}/usr/lib/modules-load.d" + # rm -rf "${TARGET_DIR}/usr/lib/modules-load.d" # Fix: permission for system connection files chmod 600 "${TARGET_DIR}/etc/NetworkManager/system-connections"/*