SMB Support - Kernel Modification

I am trying to install cifs-utils into my image.

Following this article I have done the following:

  1. Update local.conf to include: IMAGE_INSTALL_append = " samba cifs-utils"

  2. Create my own custom defconfig to enable:

CONFIG_CIFS_SMB2
CONFIG_CIFS_SMB311

My recipe:

##-- Add path for dts file --##
FILESEXTRAPATHS:prepend := "${THISDIR}/linux-toradex:"

SCMVERSION="n"
LOCALVERSION="-0-custom"

##-- Add Source --##
SRC_URI += "\ 
    file://defconfig \
"

# Prevent the use of in-tree defconfig
unset KBUILD_DEFCONFIG

defconfig Snippet

CONFIG_CIFS=y
CONFIG_CIFS_SMB2=y
CONFIG_CIFS_SMB311=y
CONFIG_LOCALVERSION="-0-custom"

However when I bitbake my image

zcat /proc/config.gz does not show my changes

root@colibri-imx8x:~# zcat /proc/config.gz  |grep CIFS
# CONFIG_CIFS is not set

And when I try to mount my shared drive I see the following error:

root@colibri-imx8x:~# sudo mount -a
mount error: cifs filesystem not supported by the system
mount error(19): No such device
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
root@colibri-imx8x:~# cat /proc/filesystems |grep cifs
root@colibri-imx8x:~# 

How can I get my shared drive to mount ?

root@colibri-imx8x:~# cat /etc/os-release 
VERSION="4.0.9 (kirkstone)"
VERSION_ID=4.0.9
DISTRO_CODENAME="kirkstone"

Hi @nmohan86

I think the kernel config parameters may have changed in Kirkstone. I think you just need “CONFIG_CIFS” now. The options you mentioned do not seem to exist in the Kirkstone kernel. I’ll sync up with our tech pubs folks to fix the docs.

Incidentally, when changing just a few kernel configs, I usually prefer to use a config file fragment rather than overriding the entire defconfig. I find that easier to maintain long-term and I can easily enable/disable individual feature sets just by adding or removing them from the SRC_URI.

Drew

I created a file called smb.cfg with the following contents:

CONFIG_CIFS=y

When bake my image the kernel-config file looks good:

However after I install my image config.gz does not have the changes.

root@colibri-imx8x:~# zcat /proc/config.gz |grep CIFS
# CONFIG_CIFS is not set

Well dang. At the risk of being completely unhelpful, it works for me. :wink:

Interestingly I do not get the kernel-config files that you have but I do verify in the .config file that CONFIG_CIFS is set:

$ find build/ -name .config | xargs grep CONFIG_CIFS=
build/tmp/work/colibri_imx8x-tdx-linux/linux-toradex/5.15.77+gitAUTOINC+aa0ff7e355-r0/build/.config:CONFIG_CIFS=y
build/tmp/work-shared/colibri-imx8x/kernel-build-artifacts/.config:CONFIG_CIFS=y

I bitbake the tdx-reference-minimal-image, deploy the updated image with Toradex Easy Installer and it all works. I guess we need to figure out where in your process the disconnect is happening.

Can you share more details about the image you are building, any local changes you may have, specifically relate to the linux-toradex recipe, and the actual steps and commands you use to build and deploy your modified image?

Drew

I was able to get it to work. I ended up installing the wrong image on the target.

The changes I mentioned with smb.cfg work :slight_smile:

Nice to hear.