View previous topic :: View next topic |
Author |
Message |
southerngentooman n00b
Joined: 26 Jan 2005 Posts: 35
|
Posted: Mon Feb 14, 2005 8:00 am Post subject: Olympus and Hotplug get Married |
|
|
Setting up Olympus C-5000Z Digital Camera with gentoo-dev-sources 2.6.10r6 and Hotplug.
This setup could well work on other cameras using xD-Picture Card memory.
In a previous post https://forums.gentoo.org/viewtopic-t-293533-highlight-olympus.html I indicated that Olympus and Hotplug kept breaking up. Well, that problem is now solved and the wedding is on.
I'm not sure what fixed this. I had done a rebuild while working on a cdrw issue, but it was bugging me, so I decided to revisit the digcam. I stripped everything I had done before and re-emerged hotplug and udev, this time it worked first time through. So, thought I'd pass along the setup. .
- Assumptions: you have gentoo linux 2.6.10, udev, and hotplug installed or you are willing to install them; and you own a Olympus digital camera or other similar camera with an xD-Picture card. Also, you will be connecting your camera directly to a usb port and not using a thumb/flash type mem dock. Lastly, You don't mind mounting and unmounting your camera when using it.
Let's plan a wedding:
Olympus needs to get a fresh charge while Hotplug and thier friend udev make the wedding perparations
- connect Olympus to his battery charger
Hotplug and udev like the subway they grab a root terminal
Code: | $ su
# mount
*** IMPORTANT *** make sure /boot partition is mounted, if not mount it before proceeding.
# mount /dev/hda2 |
Let's get the wedding organized:
Code: | # env-update && source /etc/profile
# cd /usr/src
# ls -l linux
*** IMPORTANT *** make sure the correct kernel is linked
# cd linux
# make menuconfig
General setup -->
[*] Support for hot-pluggable devices
File Systems --> Pseudo Filesystems -->
[*] /proc file system support
[ ] /dev file system ....
[ ] automatically mount at boot, *** THIS is a NO NO!
[*] Virtual memory file system support ....
Device Drivers --> USB Support -->
<*> Support for Host-side USB
[*] USB device filesystem
<*> EHCI HCD (USB 2.0) support
either: OHCI or UHCI depending on your motherboard (select both if you can't figure this out)
<*> UHCI HCD (most Intel and VIA) support
<*> USB Mass Storage support
<*> USB Human Interface Device (full HID) support
Check the listing of usb hardware that follows. If yours is listed, then enable that driver,
if your hardware is not specifically listed then you dont need anything else in this menu.
Device Drivers --> SCSI device support -->
[*] legacy /proc/scsi/ support
<M> SCSI disk support
<*> SCSI generic support
<*> Probe all LUNs on each SCSI device
Device Drivers --> ATA/ATAPI/MFM/RLL support -->
you probably already have lots of options here, we are only interested in:
<M> SCSI emulation support |
- If you didn't change anything skip down to Adding scsi modules.
Rebuild Kernel:
Code: | # make && make modules_install |
- copy the arch/i386/boot/bzImage to your boot directory, matching the filename to whatever name you used for the kernel parameter in grub.conf, if your not sure, use # cat /boot/grub/grub.conf Mine goes like so:
Code: | # cp arch/i386/boot/bzImage /boot/mykernel-2.6.10
# cp System.map /boot/mySystem.map-2.6.10
# cp .config /boot/config-2.6.10-gentoo-r6
|
Add scsi modules:
check that the scsi modules are available
Code: | # find /lib/modules/2.6.10-gentoo-r6/ -type f -iname '*.ko' |
....
/lib/modules/2.6.10-gentoo-r6/kernel/drivers/scsi/ide-scsi.ko
/lib/modules/2.6.10-gentoo-r6/kernel/drivers/scsi/sd_mod.ko
...
if they are, then you did good, now add them to your system:
Code: | # nano -w /etc/modules.autoload.d/kernel-2.6
add both to the list
ide-scsi
sd_mod
<ctrl-o> <return> <ctrl-x> |
Installing support files:
Code: | $ su
# env-update && source /etc/profile
# emerge -a udev
# emerge -a baselayout
# emerge -a module-init-tools |
Hotplug wants to chill out at the salon, hair done, manicure, etc. A trip to the salon last week don't count. (btw, don't invite coldplug to the wedding, Olympus is not interested. Coldplug can find some other device to hook up to)
Code: | # emerge -a hotplug |
and add hotplug to default runlevel
Code: | # rc-update add hotplug default |
and linkup modules
- Even if you previously installed hotplug, let's check to see if there is a nasty file present. It was replaced by pnp.rc.
Code: | $ ls /etc/hotplug/isapnp.rc |
If it's there, delete it.
Code: | su
# rm /etc/hotplug/isapnp.rc |
Edit these settings as shown below:
Code: | # nano -w /etc/conf.d/rc
RC_DEVICES="udev"
RC_DEVICE_TARBALL="yes"
RC_DEVFSD_STARTUP="no" |
Olympus has to get permissions to get married, so edit these two groups as shown below:
Code: |
# nano -w /etc/group
usb:x:85:danny
users:x:100:games,danny |
Rebooting into your new kernel:
Check that the kernel file name in /boot/grub/grub.conf matches your new kernel name.
Code: |
# cat /boot/grub/grub.conf
# ls /boot
# umount /boot
# exit
$ exit
shutdown X11 |
Before Olympus and Hotplug can get married, they need to be seperated for the bachelor's party.
*** important *** Unplug camera.
$ reboot
Wow, udev came through. Olympus and Hotplug have agreed on the type of Modular Home they will live in, just a few more preparations before they tie the knot.
Let's work out the details for the prenup:
open a console and su to root then use dmesg to find our device type
Now, plug in the camera and repeat dmesg 2 or 3 times checking for the device.
look for sda2 or something similar. My example uses sda1, change the following commands accordingly for what dmesg reports.
Code: | # udevinfo -p /sys/block/sda/sda1 -a |
If you just get 2 lines and no indication that something was plugged in, then you are probably missing a driver, or the minister got on the wrong buss.
Let's start the wedding:
First. examine the marriage documents we got from udevinfo.
It is divided into sections, groom's friends here, bride's family there etc. What you need is the section with the most information about the couple. That section is the marriage license. You can only have one license. Here is mine as an example:
looking at the device chain at '/sys/devices/pci0000:00/0000:00:10.2/usb4/4-1':
BUS="usb"
ID="4-1"
SYSFS{bConfigurationValue}="1"
SYSFS{bDeviceClass}="00"
SYSFS{bDeviceProtocol}="00"
SYSFS{bDeviceSubClass}="00"
SYSFS{bMaxPower}="100mA"
SYSFS{bNumConfigurations}="1"
SYSFS{bNumInterfaces}=" 1"
SYSFS{bcdDevice}="1004"
SYSFS{bmAttributes}="c0"
SYSFS{detach_state}="0"
SYSFS{devnum}="2"
SYSFS{idProduct}="0102"
SYSFS{idVendor}="07b4"
SYSFS{manufacturer}="OLYMPUS"
SYSFS{maxchild}="0"
SYSFS{product}="C-5000Z"
SYSFS{serial}="152086671"
SYSFS{speed}="12"
SYSFS{version}=" 1.10"
Dearly beloved, if there is anyone present who objects to this wedding, let them speak now or forever hold thier parameters
*** IMPORTANT *** once you have picked your section, you must ignore all the rest. Do not mix info between the in-laws.
We need two udev keys, one that identifies the connection and another to identify the device: If you look at mine you can see that BUS and SYSFS{product} will work fine. Then for the name field we will use a symbolic link to our file system via fstab.
If a bus key is not indicated, then use ID.
If SYSFS[product} is not indicated, then use serial, or manufacturer.
Code: | # nano -w /etc/udev/rules.d/10-udev.rules |
- now, gather up the pieces that together will make up the wedding vows;
Do you Hotplug promise to forever be, BUS="usb",
Do you Olympus promise to forever be, SYSFS{product}="C-5000Z",
'while placing the ring on Hotplug's finger'
With this NAME='%k"
I thee SYMLINK="digcam/cam%n"
- now just put all the vows together like so, and you've got the udev rule:
Code: | BUS="usb", SYSFS[product}="C-5000Z", KERNEL="sd*[0-9]", NAME="%k" SYMLINK="digcam/cam%n" |
'the bashful minister will gracefully save and open fstab:
Code: | # nano -w /etc/fstab |
By the power invested in me by the superuser, I declare Olympus and Hotplug to be device and mount point:
Code: | /dev/digcam/cam1 /mnt/camera vfat umask=000,noauto,noatime,users 0 0 |
You may kiss the OS:
Code: | # mkdir /mnt/camera |
... music ... fanfare ... tears...
Code: | # exit
$ exit
shutdown X11
# reboot |
The happy couple escapes under a shower of scripts.
* Option, they throw out the kde bouquet and drive away in a fluxbox.
startx the reception: emerge gimp and other programs for entertainment, but lay off the wine.
Honeymoon:
Go on a krusader. Hotplug and Olympus, just married, slip away and navigate over to their private room, /mnt/camera; right-click on the occupied icon; then click mount.
I'll leave the rest for you to figure out.
Last edited by southerngentooman on Wed Feb 16, 2005 7:54 pm; edited 1 time in total |
|
Back to top |
|
|
Bojan Tux's lil' helper
Joined: 18 Oct 2004 Posts: 145 Location: € Matrix
|
Posted: Wed Feb 16, 2005 6:58 pm Post subject: |
|
|
I might just try this. So far I've used an USB picture card reader. It would be nice if I could manage without ... Thanks |
|
Back to top |
|
|
GungHo Apprentice
Joined: 27 Aug 2004 Posts: 254
|
Posted: Wed Feb 16, 2005 7:02 pm Post subject: |
|
|
well done and written, master southerngentooman |
|
Back to top |
|
|
southerngentooman n00b
Joined: 26 Jan 2005 Posts: 35
|
Posted: Wed Feb 16, 2005 8:31 pm Post subject: |
|
|
Bojan wrote: | I might just try this. So far I've used an USB picture card reader. It would be nice if I could manage without ... Thanks |
Thanks for the reply. I took another look and found a goof!
I had nano -w etc/fstab instead of nano -w /etc/fstab
daaahhhhh
anyhow, tis fixed now. If you do try it let me know the results. Thanks
Danny |
|
Back to top |
|
|
codergeek42 Bodhisattva
Joined: 05 Apr 2004 Posts: 5142 Location: Anaheim, CA (USA)
|
Posted: Wed Feb 16, 2005 8:43 pm Post subject: |
|
|
Shouldn't this be in DT&T?
[/completely-useless-comment] _________________ ~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF |
|
Back to top |
|
|
mslinn Apprentice
Joined: 24 Sep 2004 Posts: 206 Location: Half Moon Bay, CA
|
Posted: Sat Nov 19, 2005 12:32 am Post subject: |
|
|
I've got a Sony HandyCam DCR-DVD403 and I had hoped to slightly modify the above instructions so as to be able to read the DVD in it before it is finalized. The only changes I made to the instructions were:
1) Compiled sd_mod.ko into the kernel instead of making it loadable (because .config was already set that way)
2) Changed the entry in /etc/udev/rules.d/10-udev.rules to:
Code: | BUS="usb", SYSFS[product}="DDX-C1000", KERNEL="sd*[0-9]", NAME="%k" SYMLINK="digcam/cam%n" |
3) renamed /etc/hotplug/isapnp.rc to isapnp.rc- in case I wanted it back for some reason
After turning the unit on, plugging it into the USB cable and setting it to USB mode, I get:
Code: | $ dmesg | tail -f
usb 1-1: new high speed USB device using ehci_hcd and address 3
scsi1 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
Vendor: SONY Model: DDX-C1000 Rev: R1.0
Type: CD-ROM ANSI SCSI revision: 00
Attached scsi generic sg1 at scsi1, channel 0, id 0, lun 0, type 5
usb-storage: device scan complete
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sda1.
|
I changed the mount filesystem type to iso9660 and dmesg didn't emit anything next time I mounted the device:
Code: | /dev/digcam/cam1 /mnt/camera iso9660 umask=000,noauto,noatime,users 0 0 |
Each time I try to get it started the USB device increments:
Code: |
usb 1-1: new high speed USB device using ehci_hcd and address 5
scsi3 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
Vendor: SONY Model: DDX-C1000 Rev: R1.0
Type: CD-ROM ANSI SCSI revision: 00
Attached scsi generic sg1 at scsi3, channel 0, id 0, lun 0, type 5
usb-storage: device scan complete
|
Still can't seem to mount the device, however. What am I missing? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|