View Full Version : [Solved] SD card support
Slesarev
February 6th, 2009, 20:33
Yesterday I bought a Petnax k200d photocamera, and now I want to get my photos. The pentax, of course, has no driver for FreeBSD, and I have no driver for SDHC card, while I have a reader in my ACER Aspire 9410Z notebook.
How can I read data from the SD-card?
Carpetsmoker
February 6th, 2009, 22:28
Doesn't the umass driver work with the photocamera?
I have no driver for SDHC card
The OS (i.e. FreeBSD) doesn't need a driver, the cardreader needs to support HC cards.
You can check the Acer site for a BIOS update, this might update the firmware so it will supportHC cards.
Otherwise getting an external USB card reader might be an option, they go for ~10 Euro.
Slesarev
February 7th, 2009, 02:49
Doesn't the umass driver work with the photocamera?
It can see the camera attaching and detachind, but the camera has unusual interface - the umass just told me, that "*** camera on uhub#" but I haven`t a block device for it. In fact, I have a CD with MS soft, but wine cannot interact just with umass.
The OS (i.e. FreeBSD) doesn't need a driver, the cardreader needs to support HC cards.
You can check the Acer site for a BIOS update, this might update the firmware so it will supportHC cards.
Otherwise getting an external USB card reader might be an option, they go for ~10 Euro.
I need a kernel module then, or something else to get block device in /dev. Just anything.
anomie
February 7th, 2009, 03:30
The pentax, of course, has no driver for FreeBSD, and I have no driver for SDHC card, while I have a reader in my ACER Aspire 9410Z notebook.
+1 on the card reader suggestion.
I purchased an inexpensive (US$15) card reader for situations like this.
Slesarev
February 7th, 2009, 07:35
+1 on the card reader suggestion.
I purchased an inexpensive (US$15) card reader for situations like this.
It`s not a true way. Of course, I may buy it at the end, but the true path is to make my included device working! At least, it has more fun.
tingo
February 7th, 2009, 18:02
Hmm, perhaps graphics/fusefs-gphotofs wil work with your camera?
Slesarev
February 8th, 2009, 14:22
Oh, I haven`t seen it before.
Dou you have expirience of using it?
Does this:
# gphotofs
fuse: failed to open fuse device: No such file or directory
mean that I have no hope? Is FUSE a spectrum emulator?
Djn
February 8th, 2009, 15:50
FUSE is a way to write filesystem drivers as userland programs.
You need to load a kernel module for it to work - try to kldload fuse first.
tingo
February 8th, 2009, 20:20
Oh, I haven`t seen it before.
Dou you have expirience of using it?
I use it with my camera. It's been a while since I last used it.
Does this:
# gphotofs
fuse: failed to open fuse device: No such file or directory
mean that I have no hope? Is FUSE a spectrum emulator?
As Djn says, try kldload fuse first, and see what happens when you try 'gphotofs' after that.
lme@
February 10th, 2009, 16:28
What kind of card reader is it? pciconv -lv will show it.
If you're using CURRENT, you can kldload mmc and sdhci and see if the card reader shows up.
Slesarev
February 12th, 2009, 07:28
none3@pci0:10:6:3: class=0x080500 card=0x01071025 chip=0x803c104c rev=0x00 hdr=0x00
vendor = 'Texas Instruments (TI)'
device = 'PCIxx12 SDA Standard Compliant SD Host Controller'
class = base peripheral
Slesarev
February 12th, 2009, 07:29
# kldload fuse
kldload: can't load fuse: No such file or directory
lme@
February 12th, 2009, 11:04
none3@pci0:10:6:3: class=0x080500 card=0x01071025 chip=0x803c104c rev=0x00 hdr=0x00
vendor = 'Texas Instruments (TI)'
device = 'PCIxx12 SDA Standard Compliant SD Host Controller'
class = base peripheral
I think this one should work with CURRENT's sdhci driver.
Slesarev
February 12th, 2009, 17:14
If you're using CURRENT, you can kldload mmc and sdhci and see if the card reader shows up.
I cannot kldload them. Also, I`ve included them into my kernel long time ago - and recompiled it several days ago, but it still has no effect. That`s why I am confused.
Slesarev
February 13th, 2009, 03:23
What kind of card reader is it? pciconv -lv will show it.
If you're using CURRENT, you can kldload mmc and sdhci and see if the card reader shows up.
Damn it, i have device mmc and device mmcsd included in my kernel. The device sdhci does not compile (config: Error: device "sdhci" is unknown), and
# kldload mmc
kldload: can't load mmc: No such file or directory
What I am doing wrong, sir?
lme@
February 13th, 2009, 16:28
Hmm, go to /usr/src/sys/modules and run make depend && make obj && make && make install in the directories mmc, mmcsd and sdhci. Then load the modules and it _should_ work :)
Slesarev
February 13th, 2009, 20:06
Hmm, go to /usr/src/sys/modules and run make depend && make obj && make && make install in the directories mmc, mmcsd and sdhci. Then load the modules and it _should_ work :)
# make install
install -o root -g wheel -m 555 mmc.ko /boot/kernel
install: mmc.ko: No such file or directory
*** Error code 71
Stop in /usr/src/sys/modules/mmc.
I`ve loaded new sources a week ago. Strange thing.
lme@
February 14th, 2009, 15:50
Hmm, were there any error messages building the mmc module?
Slesarev
February 14th, 2009, 15:51
Now I`ve downloaded new sources for 7.1 kernel, mmc and mmcsd compiled and kldloaded, but now I haven`t sdhci at all.
It seems, that the card reader works, but not with sdhc, as expexted.
So, would it be supported later?
lme@
February 14th, 2009, 15:52
Yes, sdhci is only available in 8-CURRENT.
Slesarev
February 14th, 2009, 15:56
Yes, sdhci is only available in 8-CURRENT.
And what does it do?
I think, I`ll use stable version for some more time on my notebook.
lme@
February 18th, 2009, 15:23
sdhci is the kernel module for the internal SD card readers.
Slesarev
February 19th, 2009, 09:15
well... I thought, that it`s mmc... well, what then do mmc and mmcsd do?
lme@
February 19th, 2009, 10:57
Uhm.... Just see the three drivers as one. All three together get me a working card reader ;)
Mel_Flynn
February 20th, 2009, 02:45
It can see the camera attaching and detachind, but the camera has unusual interface - the umass just told me, that "*** camera on uhub#" but I haven`t a block device for it. In fact, I have a CD with MS soft, but wine cannot interact just with umass.
Been hit by the Kodak bug as well, our camera is capable of hard hanging the machine.
Fortunately, our Ricoh SD card reader built into the laptop works perfectly using sdmmc. Had no problems with Canon and Samsung. A Kodak Photoframe also confuses the hell out of umass.
tobe
November 7th, 2009, 14:13
Hello,
I'm trying to use a SD Card with an internal reader, but i'm having some problems.
Right after boot, dmesg say:
pci0: <base peripheral, SD host controller> at device 30.0 (no driver attached)
pci0: <base peripheral, SD host controller> at device 30.1 (no driver attached)
Then after,
kldload mmc
kldload mmcsd
kldload sdhci
dmesg say:
sdhci0: <Generic SD HCI> mem 0xd8014400-0xd80144ff irq 22 at device 30.0 on pci0
sdhci0: 1 slot(s) allocated
sdhci0: [ITHREAD]
sdhci1: <Generic SD HCI> mem 0xd8014800-0xd80148ff irq 20 at device 30.1 on pci0
sdhci1: 1 slot(s) allocated
sdhci1: [ITHREAD]
and after i've inserted the SD card it say:
mmc0: <MMC/SD bus> on sdhci1
But nothing appears under /dev :(
pciconf:
sdhci0@pci0:0:30:0: class=0x080501 card=0x81198086 chip=0x811c8086 rev=0x07 hdr=0x00
vendor = 'Intel Corporation'
class = base peripheral
subclass = SD host controller
sdhci1@pci0:0:30:1: class=0x080501 card=0x81198086 chip=0x811d8086 rev=0x07 hdr=0x00
vendor = 'Intel Corporation'
class = base peripheral
subclass = SD host controller
I'm running FreeBSD 7.2-RELEASE-p4. My Chipset is Intel US15W SCH.
Any ideas?
Thanks,
Tobé
mav@
November 12th, 2009, 12:54
tobe, add these modules load to /boot/loader.conf and boot with verbose kernel messages enabled and card inserted. Send me (mav@FreeBSD.org) full resulted dmesg log. Include messages when you removing/inserting card.
Also you may set hw.sdhci.debug and hw.mmc.debug to get more information.
jogi
March 28th, 2010, 17:57
Hi all,
I've made the same steps like tobe and dmesg said:
sdhci0: <RICOH R5C822 SD> mem 0xd0001b00-0xd0001bff irq 22 at device 9.1 on pci134
sdhci0: 1 slot(s) allocated
sdhci0: [ITHREAD]
pciconf -lv
sdhci0@pci0:134:9:1: class=0x080500 card=0x30e7103c chip=0x08221180 rev=0x25 hdr=0x00
vendor = 'Ricoh Company, Ltd.'
device = 'SDA Standard Compliant SD Host Controller (R5C832, R5C843)'
class = base peripheral
subclass = SD host controller
none2@pci0:134:9:2: class=0x088000 card=0x30e7103c chip=0x08431180 rev=0x14 hdr=0x00
vendor = 'Ricoh Company, Ltd.'
device = 'Ricoh SD/MMC Host Controller (R5C853)'
class = base peripheral
Do you have any ideas? Thx
jogi
March 28th, 2010, 18:06
I've forgotten to write the point of my problem. If I insert SD card (tested a few types), it'll write nothing news to a log file.
lme@
March 29th, 2010, 12:56
@mav sd card support also stopped working for me in CURRENT.
ATM I have no access to the box, but nothing showed up in dmesg when I insert a card.
I hardly use sd cards, so I can't tell when it stopped working. All I can say is that it worked with 8-CURRENT in Nov 2008. We had a longer thread about it on mobile@.
I should find the time to get you some more information during the next days.
sossego
August 23rd, 2010, 19:15
bobagem# fdisk /dev/da0
******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=240 heads=255 sectors/track=63 (16065 blks/cyl)
parameters to be used for BIOS calculations are:
cylinders=240 heads=255 sectors/track=63 (16065 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 6 (0x06),(Primary DOS, 16 bit FAT (>= 32MB))
start 135, size 3858489 (1884 Meg), flag 0
beg: cyl 0/ head 2/ sector 10;
end: cyl 956/ head 63/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
sysid 0 (0000),(unused)
start 24897, size 0 (0 Meg), flag 0
beg: cyl 0/ head 0/ sector 0;
end: cyl 370/ head 0/ sector 50
The data for partition 4 is:
<UNUSED>
bobagem# mount_msdosfs /dev/da0p1 sdmmc/
mount_msdosfs: /dev/da0p1: No such file or directory
bobagem# /sbin/fsck_msdosfs -p /dev/da0
Floating exception (core dumped)
bobagem#
How do I mount this?
wblock@
August 23rd, 2010, 19:30
mount -t msdosfs /dev/da0s1 /mnt
hermes
August 23rd, 2010, 20:28
Use /dev/da0s1 (both for fscking and mounting). /dev/dap1 is a GPT partition. Fdisk only creates traditional MBR schemes.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.