how do i install mmc/sd card driver?

The forum for our foreign guests... Please post in English
geeuk1
Beiträge: 1
Registriert: Samstag 22. Juli 2006, 17:23

how do i install mmc/sd card driver?

Beitrag von geeuk1 »

Hello,

i installed the mmc card into my dbox and now i am wondering how i am going to install the drivers and mount the card?? :gruebel:

i was soo happy when i was installing it now i feel soo sad i can't even use it...

i need instructions i.e where do to download the drivers etc etc.

@pt1 please help m8

Thanks
Barf
Developer
Beiträge: 1475
Registriert: Dienstag 4. Februar 2003, 22:02

Beitrag von Barf »

Amazingly enough there does not appear to be any guide, HOWTO, or even attempt for this available. Also not in German.

There is a mammuth-thread (presently 16 pages) here, but it is quite hard to extract the necessary info from it, even if you read German.

First note that there are two different, incompatible hardware wirings. The first one is described in the file ...driver/mmc/README_mmc and is to be used together with the driver called mmc. The second one is described in the file ...driver/mmc/README_mmc2 and is to be used together with the driver called mmc2.

1. Hook up the hardware according to the first or the second scheme.

2. Add the subdirectory mmc to ...driver/Makefile, for example by applying the following patch:

Code: Alles auswählen

RCS file: /cvs/tuxbox/driver/Makefile,v
retrieving revision 1.30
diff -u -r1.30 Makefile
--- driver/Makefile     27 Aug 2005 01:59:04 -0000      1.30
+++ driver/Makefile     26 Jul 2006 13:37:54 -0000
@@ -3,6 +3,6 @@
 include Config.make
 
 subdir-m                       := dvb info
-subdir-$(CONFIG_HARDWARE_DBOX2)        += avs cam event ext fp i2c lcd saa7126 dvb2eth ds1307 
+subdir-$(CONFIG_HARDWARE_DBOX2)        += avs cam event ext fp i2c lcd saa7126 dvb2eth ds1307 mmc
 
 include Rules.make
make driver will now build and install the drivers mmc.o and mmc2.o as modules (taking up space if you don't use them!).

On a system with these drivers installed, the appropriate driver (mmc or mmc2 according to the hardware setup, see above) is loaded with insmod or modprobe:

Code: Alles auswählen

# modprobe mmc              
mmc Hardware init
mmc Card init
mmc Card init *1*
mmc Card init *2*
Size = 6640, hardsectsize = 512, sectors = 13280
Partition check:
 mmca: p1
# 
This creates the device nodes (typically): /dev/mmc/disc0/disc and /dev/mmc/disc0/part1. These can now be used as storage, but not yet as a file system.

3. To support a file system on the card, the kernel has to contain the necessary module(s), either compiled in, or as loadable modules. For msdos-type FAT-formatted cards, this amounts to the kernel options

Code: Alles auswählen

CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
(Feel free to use y instead of m if you desire.) Compile a kernel with these parameters. If using modules, load with the appropriate insmod or modprobe command (order by insmod: fat, vfat, msdos).

A (V)-Fat formatted card can now me mounted, for reading and writing, with a command like

Code: Alles auswählen

mount -t vfat /dev/mmc/disc0/part1  /mnt
With appropriate kernel options, it is also possible to use smarter file systems, like ext2 (CONFIG_EXT2_FS) and ext3 (CONFIG_EXT2_FS, CONFIG_EXT3_FS, CONFIG_JBD) on the cards. Also, options in busybox can be enabled, allowing file system creation and manipulation directly on the dBox. This is not really necessary: Cards can also be formatted on a Windows ((V)FAT) or Linux-Computer (ext2/ext3).

Please note that everything is in a very expermental phase. In particular, it apperars to be necessary to unload and reload the driver when changing card, even if you carefully unmount before removing.
PT-1
Moderator english
Beiträge: 2458
Registriert: Donnerstag 20. Dezember 2001, 00:00

Beitrag von PT-1 »

Thank you BARF !

As usual very detailed !

So,

there is no way to just upload ready compiled drivers to a existing Image if the Kernel of the Image does not support it ?

THX

PT-1
MarcM
Foren-Moderator
Beiträge: 1119
Registriert: Sonntag 9. Juni 2002, 13:28

Beitrag von MarcM »

Hi,

look at my page > klick
there are kernel-modules (Kernel 2.4.32) for the mmc and filesystems.
my installed Yadi works great with them.....

Marc
PT-1
Moderator english
Beiträge: 2458
Registriert: Donnerstag 20. Dezember 2001, 00:00

Beitrag von PT-1 »

THX/Danke ;-)

Any chance that these also include the drivers ..?
MarcM
Foren-Moderator
Beiträge: 1119
Registriert: Sonntag 9. Juni 2002, 13:28

Beitrag von MarcM »

mmc.tar.gz <- drivers for the mmc/sd card

fs.tar.gz<- kernelmodules for the filesystems (ext2/ext3/fat16/fat32)

- extract & upload to the dbox
- load a kernelmodule with insmod /path/to/the/module.o
- mount the mmc/sd with mount /dev/mmc/disc0/part1 /mnt/somewhere

Marc
PT-1
Moderator english
Beiträge: 2458
Registriert: Donnerstag 20. Dezember 2001, 00:00

Beitrag von PT-1 »

Top Man ;-)
PT-1
Moderator english
Beiträge: 2458
Registriert: Donnerstag 20. Dezember 2001, 00:00

Beitrag von PT-1 »

Last question:
extract & upload to the dbox
Where to ..?
MarcM
Foren-Moderator
Beiträge: 1119
Registriert: Sonntag 9. Juni 2002, 13:28

Beitrag von MarcM »

Nicht wichtig.....irgenwo

Der Kram liegt bei mir in /var/bin und wird aus der /var/etc/init.d/rcS.local geladen und anschließend gemountet....
PT-1
Moderator english
Beiträge: 2458
Registriert: Donnerstag 20. Dezember 2001, 00:00

Beitrag von PT-1 »

THX !

So it can easily be installed into a SquashFS Image without extra root modding ...

Thanx to all for your help again..Need to dismantle my MMC Card Reader
Houdini
Developer
Beiträge: 2183
Registriert: Mittwoch 10. Dezember 2003, 07:59

Beitrag von Houdini »

Nicht wichtig.....irgenwo
dann müssen die module aber per

Code: Alles auswählen

insmod $irgendwo 
geladen werden und nicht per modprobe sonst gehts nicht
MarcM
Foren-Moderator
Beiträge: 1119
Registriert: Sonntag 9. Juni 2002, 13:28

Beitrag von MarcM »

MarcM hat geschrieben: - extract & upload to the dbox
- load a kernelmodule with insmod /path/to/the/module.o
- mount the mmc/sd with mount /dev/mmc/disc0/part1 /mnt/somewhere
:wink:

Außerdem gibts in meinem Yadi kein modprobe......

Marc