This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-J722S: Why the exFAT-formatted SSD is not recognized.

Part Number: PROCESSOR-SDK-J722S

Tool/software:

Hi. TI experts

I'm trying to support the exFAT-formatted SSD on TDA4AEN EVM (J722S).

First I'll share my environment.

 - PSDK Linux version : 10.0.0.8

 - PSDK RTOS version : 10.0.0.5

I did Yocto-build in PSDK Linux as below.

MACHINE="j722s-evm" bitbake fuse-exfat

MACHINE="j722s-evm" bitbake fuse

MACHINE="j722s-evm" bitbake exfatprogs

And then I copied the images to sdcard as below.

cp -rf /home/yongsig/workspace/ti_psdk/100_j722s/git_repo/psdkla_10.00.00.08_j722s/yocto-build/build/arago-tmp-default-glibc/work/aarch64-oe-linux/fuse-exfat/1.4.0/image/* ../../system_resources/rootfs/
cp -rf /home/yongsig/workspace/ti_psdk/100_j722s/git_repo/psdkla_10.00.00.08_j722s/yocto-build/build/arago-tmp-default-glibc/work/aarch64-oe-linux/fuse/2.9.9/image/* ../../system_resources/rootfs/
cp -rf /home/yongsig/workspace/ti_psdk/100_j722s/git_repo/psdkla_10.00.00.08_j722s/yocto-build/build/arago-tmp-default-glibc/work/aarch64-oe-linux/exfatprogs/1.2.2/image/* ../../system_resources/rootfs/
cp -rf ../../system_resources/rootfs/* /media/yongsig/rootfs/

But when I connected the exFAT-formatted SSD, it has been failed.

Logs are attached,

722s-evm login: [   18.385910] usb 1-1.1: new high-speed USB device number 3 using xhci-hcd
[   18.656212] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[   18.663196] scsi host0: usb-storage 1-1.1:1.0
[   19.725898] scsi 0:0:0:0: Direct-Access     Samsung  PSSD T7 Touch    0    PQ: 0 ANSI: 6
[   19.752437] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[   19.760714] sd 0:0:0:0: [sda] Write Protect is off
[   19.766021] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   19.784163]  sda: sda1
[   19.786963] sd 0:0:0:0: [sda] Attached SCSI disk
[   20.423568] block sda: the capability attribute has been deprecated.
[   20.445096] WARNING! power/level is deprecated; use power/control instead

There is nothing in /run/media/

Please help to get it resolved.

Best regards

Yongsig

  • Hi Yongsig,

    Are you trying to read an SD card that's attached with a USB to SD card reader or boot off of an exFAT SD card?

    Can you also send the entire dmesg log?

    Best,
    Jared

  • Hi Jared.

    Are you trying to read an SD card that's attached with a USB to SD card reader or boot off of an exFAT SD card?

    --> No. I used a default image for boot-up. I download the image from this LINK.

    And then, as I mentioned above, I copied some files from Yocto-build to sdcard.

    I'll attach the entire dmesg log.entire_dmesg.txt

    sda in the log means the exFAT-formatted SSD.

    Also I couldn't see any mounted log file in /run/systemd/transient/

    root@j722s-evm:/run/systemd/transient# ls -al
    total 12
    drwxr-xr-x  2 root root 100 Nov  7 21:08  .
    drwxr-xr-x 23 root root 600 Nov  7 21:08  ..
    -rw-r--r--  1 root root 301 Nov  7 21:08 'run-media-BOOT\x2dmmcblk1p1.mount'
    -rw-r--r--  1 root root 301 Nov  7 21:08  run-media-mmcblk0p1.mount
    -rw-r--r--  1 root root 385 Nov  7 21:08  session-c1.scope
    root@j722s-evm:/run/systemd/transient# vi run-media-mmcblk0p1.mount
    

    Best regards

    Yongsig

  • Hi Yongsig,

    How is the SD card connected to the board?

    Best,
    Jared

  • Hi Jared.

    I'm sorry, I don't understand why you are asking about the sdcard connection.

    I'll explain the environment again.

    1. flashed the sdcard using these command in psdk rtos 10.0.0.5.

    $ sudo ./sdk_builder/scripts/mk-linux-card.sh /dev/sdc
    $ ./sdk_builder/scripts/install_to_sdcard.sh

    2. Check booting on TDA4AEN EVM

       --> Booting OK

    3. Check if an exFAT-formatted SSD (NOT SDCARD) through USB3.0 port is recognized or not. 

       --> NOT recognized

    4. Yocto build regarding exFAT

    5. Copy image by Yocto-build to sdcard (Please see below)

    And then I copied the images to sdcard as below.

      --> NOT work

    So, I'm wondering what I should do.

    Best regards

    Yongsig

  • Hi Yongsig,

    Sorry, I see now that you're asking about an exFAT SSD. Apologies about that misunderstanding.

    Do you have either the exfat-utils or fuse-exfat package installed?

    Additionally, can you send the output of lsblk?

    Best,
    Jared

  • Hi Jared

    I installed as follow already.

    - MACHINE="j722s-evm" bitbake fuse-exfat
    - MACHINE="j722s-evm" bitbake fuse
    - MACHINE="j722s-evm" bitbake exfatprogs

    It seems like exfat-utils is deprecated.  exfat-utils is not supported PSDK Linux 10.0.0.8.  So I have to install exfatprogs instead of exfat-utils.

    Additionally, can you send the output of lsblk?

    root@j722s-evm:/run/media# lsblk
    NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
    sda            8:0    0  1.8T  0 disk
    `-sda1         8:1    0  1.8T  0 part
    mtdblock0     31:0    0  512K  0 disk
    mtdblock1     31:1    0    2M  0 disk
    mtdblock2     31:2    0    4M  0 disk
    mtdblock3     31:3    0  256K  0 disk
    mtdblock4     31:4    0  256K  0 disk
    mtdblock5     31:5    0 55.8M  0 disk
    mtdblock6     31:6    0  256K  0 disk
    mmcblk0      179:0    0 29.6G  0 disk
    |-mmcblk0p1  179:1    0   16M  0 part /run/media/mmcblk0p1
    `-mmcblk0p2  179:2    0 29.6G  0 part
    mmcblk0boot0 179:32   0 31.5M  1 disk
    mmcblk0boot1 179:64   0 31.5M  1 disk
    mmcblk1      179:96   0 29.7G  0 disk
    |-mmcblk1p1  179:97   0  128M  0 part /run/media/BOOT-mmcblk1p1
    `-mmcblk1p2  179:98   0 29.6G  0 part /
    root@j722s-evm:/run/media# df -T
    Filesystem     Type     1K-blocks    Used Available Use% Mounted on
    /dev/root      ext4      30371260 6826624  21976508  24% /
    devtmpfs       devtmpfs   2891692       4   2891688   1% /dev
    tmpfs          tmpfs      3351660       0   3351660   0% /dev/shm
    tmpfs          tmpfs      1340664    9948   1330716   1% /run
    tmpfs          tmpfs      3351660       8   3351652   1% /tmp
    tmpfs          tmpfs      3351660       4   3351656   1% /var/volatile
    /dev/mmcblk0p1 vfat         16334       2     16332   1% /run/media/mmcblk0p1
    /dev/mmcblk1p1 vfat        129039    3604    125436   3% /run/media/BOOT-mmcblk1p1
    tmpfs          tmpfs       670332       4    670328   1% /run/user/0
    

    Best regards

    Yongsig

  • Hi Yonsig,

    Did you install the generated ipks?

    Additionally, if you mount sda1, can you access the files?

    Best,
    Jared

  • Hi, Jared.

    No. I just copied the generated images. But I know that if I install the generated ipks, it'll be same as the images.

    For example, generated images are created in yocto-build/build/arago-tmp-default-glibc/work/aarch64-oe-linux/exfatprogs/1.2.2/image/.

    Additionally, if you mount sda1, can you access the files?

    I can't access the sda. When I put 'df -T', no directory is mounted as sda.

    Best regards

    Yongsig

  • Hi Yongsig,

    I added the following to my local.conf:

    IMAGE_INSTALL:append = " fuse-exfat exfatprogs"

    I then rebuilt the tisdk-base-image for the J722s.

    I was able to mount and read the contents of an exFAT USB by executing the following:

    root@am67-sk:~# mkdir /mnt/exfat
    root@am67-sk:~# mount.exfat-fuse /dev/sda /mnt/exfat
    FUSE exfat 1.4.0 (libfuse2)
    root@am67-sk:~# cd /mnt/exfat/
    root@am67-sk:/mnt/exfat# ls
    helloworld.txt
    root@am67-sk:/mnt/exfat# cat helloworld.txt 
    hello world!

    Best,
    Jared

  • Hi. Jared

    Would you please give me the guidance more details?

    I want to know what file you add "IMAGE_INSTALL:append = " fuse-exfat exfatprogs" in.

    and then It looks like you are using am67-sk board not J722s-evm as me.

    Best regards

    Yongsig

  • Hi Yongsig,

    I want to know what file you add "IMAGE_INSTALL:append = " fuse-exfat exfatprogs" in.

    The local.conf file can be found within the build/conf directory. It's used for variables that you want to temporarily edit in a local build.

    You can also check whether the packages are installed by running (on the board):

    $ opkg list | grep exfat

    and then It looks like you are using am67-sk board not J722s-evm as me.

    The AM67-SK and J722S-EVM are the same board. They both have the superset device J722S.

    Best,
    Jared

  • Hi Jared

    Thank you for your help.

    I succeeded the exFAT-formatted SSD mounting manually.

    I tried manually because it was not mounted auto.

    But I want it to mount automatically.

    As I know, It should be mounted automatically using /etc/udev/scripts/mount.sh. Am I right?

    For example, In the case of ext4-formatted SSD is mounted auto well.

    root@j722s-evm:/etc/udev/scripts# df -T
    Filesystem     Type      1K-blocks      Used  Available Use% Mounted on
    /dev/root      ext4       30371260   6795120   22008012  24% /
    devtmpfs       devtmpfs    2891692         4    2891688   1% /dev
    tmpfs          tmpfs       3351660         0    3351660   0% /dev/shm
    tmpfs          tmpfs       1340664      9956    1330708   1% /run
    tmpfs          tmpfs       3351660        12    3351648   1% /tmp
    tmpfs          tmpfs       3351660         4    3351656   1% /var/volatile
    /dev/mmcblk0p1 vfat          16334         2      16332   1% /run/media/mmcblk0p1
    /dev/mmcblk1p1 vfat         129039      3604     125436   3% /run/media/mmcblk1p1
    /dev/sda1      ext4     1921723584 114001124 1710030456   7% /run/media/sda1
    tmpfs          tmpfs        670332         4     670328   1% /run/user/0
    

    Do you have an idea about that?

    Best regards

    Yongsig

  • Hi Yongsig,

    Can you post the mount.sh script? I assume it doesn’t support exFAT, and that is why it’s not mounted automatically.

    Best,

    Jared

  • Hi Jared

    I'm sorry I can't attach the file due to an error on web-site. 'Insert code' has same error as well.

    But I believe you can find it in psdk_rtos_10.0.0.5/targetfs/etc/udev/scripts/mount.sh.

    I added some codes to support exFAT.

    is_filesystem_supported() {
        while read -r fs; do
           # Stradvisoin Start
           if [ "${fs#nodev}" = "$1" ] || [ "$1" = "exfat" ]; then
           # Stradvisoin End
           # if [ "${fs#nodev}" = "$1" ]; then
               return 0
           fi
        done < "/proc/filesystems"
        return 1
    }

    automount_systemd() {
    ...
    
        # If filesystemtype is vfat, change the ownership group to 'disk', and
        # grant it with  w/r/x permissions.
        case $ID_FS_TYPE in
        vfat|fat)
            MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`"
            ;;
        # Stradvisoin Start
        exfat)
            MOUNT="mount -v"
            ;;
        # Stradvision End
        swap)
            return ;;
        lvm*|LVM*)
            return ;;
        # TODO
        *)
            ;;
        esac
    
    ...
    }

    and then I can see the logs as below.

    mount -t exfat /dev/sda1 /run/media/sda1
    fusermount: mount failed: Operation not permitted

    Best regards

    Yongsig

  • Hi Yongsig,

    There’s an Arch Linux forum that states that exfat-utils is required for automounting.

    https://bbs.archlinux.org/viewtopic.php?id=276405

    Can you try adding that to the IMAGE_INSTALL variable?

    Best,
    Jared

  • Hi Jared

    As I mentioned, when using udev to directly mount FUSE-based file systems such as 'mount -t exfat' and 'mount.exfat-fuse', permission issues or environmental restrictions can arise.

    This is because udev operates within a limited environment, which can restrict the capabilities needed by FUSE-based mounts.

    To address this, I configured FUSE mounts to be handled through 'systemd'.
    By utilizing systemd services triggered by udev events, I can bypass some of these restrictions and ensure that FUSE mounts execute with the necessary permissions and resources provided by systems.

    Hence, I made a systems service file that would trigger within udev.

    And It works.

    I appreciate your help so far.

    Best regards

    Yongsig