Mouting/Using SD-Card

  • I am trying to mount the bundled 1 GB SD-Card under emlix, but without any success up to this point in time. When I plug in the card on the NetDCU-Board, nothing happens (dmesg doesn´t show any changes). What modules are needed to use the SD-Card, do I need to install additional drivers for the SD-Card-Slot?

  • Hello,


    you need the drivers:


    insmod /lib/modules/${kernelver}/kernel/fs/fat/fat.ko
    insmod /lib/modules/${kernelver}/kernel/fs/vfat/vfat.ko
    insmod /lib/modules/${kernelver}/kernel/fs/msdos/msdos.ko
    insmod /lib/modules/${kernelver}/kernel/fs/ext2/ext2.ko


    insmod /lib/modules/${kernelver}/kernel/drivers/mmc/core/mmc_core.ko
    insmod /lib/modules/${kernelver}/kernel/drivers/mmc/card/mmc_block.ko
    insmod /lib/modules/${kernelver}/kernel/drivers/mmc/host/s3cmci.ko


    then you can mount the SD card:


    mount -o rw /dev/mmcblk0p1 /mountpoint


    After that the SD card should be available

  • The following drivers are missing in my emlix:


    .../kernel/fs/msdos/msdos.ko
    .../kernel/fs/ext2/ext2.ko
    .../kernel/drivers/mmc/core/mmc_core.ko
    .../kernel/drivers/mmc/card/mmc_block.ko
    .../kernel/drivers/mmc/host/s3cmci.ko


    Do I need to compile a completely new kernel?


    Regards,
    Patrick

  • Hello,


    that depends on the kernel you use.
    If you use the default kernel, that is delivered in the BSP, you can find the modules in:


    bsp/sysroot/lib/modules/kernelversion/kernel/drivers...


    If you use a self compiled kernel, you have to compile the kernel modules new!


    Good Luck,


    Gunther

  • Hi Gunther,


    I had a look at my BSP and found all the modules you mentioned above. So copying the files to the expected directories on the NetDCU is enough to run a simple modprobe and use the SD-Card?


    Thanks! :)


    Patrick

  • Hi Patrick,


    if you use the kernel, emlix delivered with the BSP, this should be enough.
    You can take a look to the file:


    /lib/modules/kernelversionxxx/modules.dep


    on the target filesystem. Here are all dependencies of loadable kernel modules.
    This is the way, the insmod (modprobe) tries to locate and load kernel modules.


    Good luck,


    Gunther