Hi everyone,
I’ve been struggling recently to add CIFS support to my Boot2Qt Yocto build on an Apalis iMX8 (v6.5.6-lts.xml « toradex - yocto/boot2qt-manifest.git - Unnamed repository; edit this file 'description' to name the repository.).
Initially, I encountered issues following the documentation here: SMB support | Toradex Developer Center, as the options CONFIG_CIFS_SMB2
and CONFIG_CIFS_SMB311
are no longer supported. They have been replaced by CONFIG_CIFS
, but this update is not reflected in the documentation (see: SMB Support - Kernel Modification ).
After building my image, I tried adding an SMB share in fstab with the following line:
//server/share /mnt/smb/server_share cifs vers=3.0,file_mode=0777,dir_mode=0777,port=445,username=user,password=pass 0 0
Everything seems to work fine, and I can access my files at /mnt/smb/server_share
. However, the problem arises when I run the df
command, which outputs the following:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 14988256 2393060 11812044 17% /
devtmpfs 410508 4 410504 0% /dev
tmpfs 903756 0 903756 0% /dev/shm
tmpfs 361504 10800 350704 3% /run
tmpfs 4096 0 4096 0% /sys/fs/cgroup
tmpfs 903756 4 903752 0% /tmp
tmpfs 903756 40 903716 0% /var/volatile
/dev/mmcblk0p1 48380 13793 34588 29% /media/BOOT-mmcblk0p1
tmpfs 180748 0 180748 0% /run/user/0
df: /mnt/smb/server_share: Resource temporarily unavailable
It seems that the mount point is not detected as a valid drive, which causes it to not be recognized in my Qt app, as QStorageInfo
only lists valid drives. This was working correctly with an older Boot2Qt release (5.15.x).
It appears that there is a recent bug in the Linux 5.15 kernel related to CIFS (Bug #2060797 “df says Resource temporarily unavailable after ker... : Bugs : cifs-utils package : Ubuntu), and I’m unsure how to resolve this.
Do you know if this kernel bug will be patched in future Boot2Qt manifest releases, such as version 6.5.7?
Here is the relevant dmesg
output when trying to mount the drive:
[ 6486.279150] CIFS: VFS: \\server\IPC$ validate protocol negotiate failed: -11
Any guidance would be greatly appreciated. Thank you!
Edit:
Also here the output provided by zcat /proc/config.gz |grep CIFS
root@b2qt-apalis-imx8:~# zcat /proc/config.gz |grep CIFS
CONFIG_CIFS=y
CONFIG_CIFS_STATS2=y
CONFIG_CIFS_ALLOW_INSECURE_LEGACY=y
# CONFIG_CIFS_UPCALL is not set
# CONFIG_CIFS_XATTR is not set
CONFIG_CIFS_DEBUG=y
# CONFIG_CIFS_DEBUG2 is not set
# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set
# CONFIG_CIFS_DFS_UPCALL is not set
# CONFIG_CIFS_SWN_UPCALL is not set
# CONFIG_CIFS_ROOT is not set