How to install driver for infinity USB card reader?

Using applications, configuring, problems
Message
Author
chrism
Posts: 14
Joined: Sat 10 May 2008, 21:27

How to install driver for infinity USB card reader?

#1 Post by chrism »

Hello to everybody
I am totally new to linux and i need your help.
I have installed the puppy 4.00 on hd (full installation) and now i am trying to follow some instructions to install a driver for the infinity usb unlimited card reader.
The instructions are these

1. Prepare your kernel 2.6.18 an up
2. Compile it with usbserial enabled
3. install it as usual
4. cd into V2.6 directory
5. type 'make all'

The V2.6 directory is where the files of the driver are.

I have downloaded and install the devx_400.sfs as in this topic http://www.murga-linux.com/puppy/viewtopic.php?t=22701
and added the usbserial to the BootManager under Load kernel modules.
I reboot the pc and under the directory V2.6 i typed the command "make all".
The message i am getting is this
# make all
rm -fr *.o *.ko *.cmd .*.cmd Module.symvers .tmp* *.mod.c
make -C /lib/modules/2.6.21.7/build/ SUBDIRS=/root/my-documents/iuu/iux-0.9/V2.6 modules -I/lib/modules/2.6.21.7/build/drivers/usb/serial/
make: *** /lib/modules/2.6.21.7/build/: No such file or directory. Stop
make: *** [default] Error 2

Can somebody tell me what i have done wrong and how to fix it?

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#2 Post by Jesse »

Hello,

The linux driver for usb chip readers is called 'usb-storage'. You shouldn't have to build it for any puppy distro as its there by default, unless perhaps you have to patch it in some way?
To manually install the driver, open up an rxvt terminal window, and type in 'modprobe usb-storage', and to see what is loaded, type in 'lsmod'.

Regards
Jesse

chrism
Posts: 14
Joined: Sat 10 May 2008, 21:27

#3 Post by chrism »

Jesse wrote:Hello,

The linux driver for usb chip readers is called 'usb-storage'. You shouldn't have to build it for any puppy distro as its there by default, unless perhaps you have to patch it in some way?
To manually install the driver, open up an rxvt terminal window, and type in 'modprobe usb-storage', and to see what is loaded, type in 'lsmod'.

Regards
Jesse
Thanks jesse
but this is what the author says
"This module provides a serial interface to use your
IUU unit in phoenix mode. Loading this module will
bring a ttyUSB[0-x] interface. This driver must be
used by your favorite application to pilot the IUU
A few parameters can be used at load time
To use parameters, just unload the module if it is
already loaded and use modprobe iuu_phoenix param=value.
In case of prebuilt module, use the command
insmod iuu_phoenix param=value.
Example:
modprobe iuu_phoenix clockmode=3"

So i think is not the same. This is a separate module (iuu_phoenix) that has to be installed.
As far as i understand this is what the "make all" command has to do.

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#4 Post by Jesse »

Hi chrism,

ok, it looks like you've got the devx package working, but that the kernel source code is not yet installed (or something), that is a seperate package to the devx as far as I know, thats probably the thing preventing the 'make all' from working for you.

Here is the link for the kernel src .sfs package for Puppy 3.01,
ftp://ibiblio.org/pub/linux/distributio ... rc_301.sfs

But I can't spot one for Puppy 4, so I'm not sure what is up with that.
Maybe you could try with Puppy 3.01?

Um, I remember that the /lib/modules/2.6.21.7/build/ is supposed to be a sym link to the kernel source code, it might just be incorrect for your setup, check it out, see if you have the src somewhere already, I think the usual thing is for it to point to a location like /usr/src/linux-2.6.21.7

Jesse

chrism
Posts: 14
Joined: Sat 10 May 2008, 21:27

#5 Post by chrism »

Jesse
As i wrote in my first post this is the first time with linux and i know nothing about it.
So here are all the files and the instructions from the author.
Is there anybody that can guide me step-by-step to make it work?

The instructions are:
>>>
This module provide a serial interface to use your IUU unit in phoenix mode. Loading this module will bring a ttyUSB[0-x] interface. This driver must be used by your favorite application to pilot the IUU

You can plug more than one IUU. Every unit will have his own device file(/dev/ttyUS0,/dev/ttyUSB1,...)

How to install it ?

A.Compile yourself

1. Prepare your kernel 2.6.21 an up
2. Compile it with usbserial enabled
3. install it as usual
4. cd into V2.6 directory
5. type 'make all'

B.Use prebuilt modules

iuu_phoenix-2.6.21.ko and iuu_phoenix-2.6.22.ko
are provided for those who are unable to compile
kernels.
You can directly use insmod with the right module like this:

insmod -f iuu_phoenix-2.6.21.ko ( or 2.6.22.1 )


How to tune the reader speed ?

A few parameters can be used at load time
To use parameters, just unload the module if it is
already loaded and use modprobe iuu_phoenix param=value.
In case of prebuilt module, use the command
insmod iuu_phoenix param=value.

Example:

modprobe iuu_phoenix clockmode=3
<<<

Note: I did not managed to attach the files so here is the link to them
http://eczema.ecze.com/iuu_phoenix.html
and the files is iuu_phoenix-0.9.tgz Devel version

chrism
Posts: 14
Joined: Sat 10 May 2008, 21:27

#6 Post by chrism »

Jesse
i think i made some progress. The problem was inside the "makefile" file. The directory must be /lib/modules/2.6.21.7/kernel/drivers/usb/serial/ not "build". So i fixed it and run the "make all" again.
Now I am getting another error.
Any ideas?

# make all
rm -fr *.o *.ko *.cmd .*.cmd Module.symvers .tmp* *.mod.c
make -C /lib/modules/2.6.21.7/kernel/ SUBDIRS=/root/my-documents/iuu/iux-0.9/V2.6 modules -I/lib/modules/2.6.21.7/kernel/drivers/usb/serial/
make[1]: Entering directory `/lib/modules/2.6.21.7/kernel'
make[1]: *** No rule to make target `modules'. Stop
make[1]: Leaving directory `/lib/modules/2.6.21.7/kernel'
make: *** [default] Error 2
#

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#7 Post by Jesse »

Hi Chrism,

Did you put in the kernel .config file for the kernel?
It is all the configuration parameters for the kernel so that it knows how to build itself.
The puppy linux usually comes with the .config file renamed to something like /lib/modules/DOTconfig-2.6.21.7
You should rename it to .config and place it in the kernel source code directory next to the makefile.

I am not sure if your change to 'build' was the right thing to do.
The way linux is designed is that /lib/modules/2.6.21.7/ and sub directories is for the binary versions of kernel modules, and associated index files. The /lib/modules/2.6.21.7/build is a sym-link to the base directory of the source code. You can use the command line application 'ln' to make sym links.
Its been a long time since I did kernel build stuff, but once it is all set up right, you usually don't have to edit anything, (there is a menu system for selecting build options etc...), the trick to it is in getting all the right files in the right place and knowing the build command that you want to issue.

The 'make all' command that you issued stopped because the kernel makefile did not have a build target of 'modules'.
make[1]: *** No rule to make target `modules'. Stop
So it did nothing, and it looks like it needs the kernel configuration info, so that it knows how modules is defined, once that is known it ought to issue the build commands to compile your driver as a module.

I hope that helps.

Regards
Jesse

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#8 Post by Jesse »

Hi chrism,

Just a side note, any file starting with a period does not get shown in a ls command, its easy to think the file is not there.
Thats why the .config file is renamed to DOTconfig-xxx.
To see the .config file with ls, use "ls -a".

Jesse

chrism
Posts: 14
Joined: Sat 10 May 2008, 21:27

#9 Post by chrism »

Hi jesse

I've done everything you said. I created a sym link with name build under /lib/modules/2.6.21.7/ which points to the /lib/modules/2.6.21.7/kernel/
I renamed the /lib/modules/DOTconfig-k2.6.21.7 to .config and place a copy of it under /lib/modules/ , /lib/modules/2.6.21.7/build/drivers/usb/serial/ , and under the directory /root/my-documents/iuu/iux-0.9/V2.6 where the makefile is.
The message is exactly the same. The error is still there.

Regards

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#10 Post by Jesse »

Hi chrism,

"You should rename it to .config and place it in the kernel source code directory next to the makefile."
i.e. put it in the /lib/modules/2.6.21.7/kernel/ or /lib/modules/2.6.21.7/ directory. I can't remember which one, but it belongs next to a makefile. It shouldn't harm it to copy it to both.

Regards
Jesse

chrism
Posts: 14
Joined: Sat 10 May 2008, 21:27

#11 Post by chrism »

jesse

That what i said in my previous post

"I renamed the /lib/modules/DOTconfig-k2.6.21.7 to .config and place a copy of it under /lib/modules/ , /lib/modules/2.6.21.7/build/drivers/usb/serial/ , and under the directory /root/my-documents/iuu/iux-0.9/V2.6 where the makefile is. "

The problem is still there

chrism
Posts: 14
Joined: Sat 10 May 2008, 21:27

#12 Post by chrism »

Any ideas guys?

What about the moderators?

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#13 Post by Jesse »

Hi,

I say
/lib/modules/2.6.21.7/kernel/.config
/lib/modules/2.6.21.7/.config

you say
/lib/modules/.config
/lib/modules/2.6.21.7/build/drivers/usb/serial/.config
/root/my-documents/iuu/iux-0.9/V2.6/.config

It seems to me we are talking about different locations, have I read something wrong?

Just to clarify, the .config file is configuration settings for the whole of all the many many seperate components that make up the linux kernel. There is only one .config file for the whole of the linux kernel.
Your module is not distributed with the linux kernel, so it is considered an external module. The .config file does not go in any external module directory. Only when the .config file is in the right location will the linux kernel source code be set up to be able to build your external module with the right settings to be compatible with that linux kernel version and configuration.

Regards
Jesse

chrism
Posts: 14
Joined: Sat 10 May 2008, 21:27

#14 Post by chrism »

ok jesse

i copy the .config in the two directories
/lib/modules/2.6.21.7/kernel/.config
/lib/modules/2.6.21.7/.config

but i am getting the same error

User avatar
erikson
Posts: 735
Joined: Wed 27 Feb 2008, 09:22
Location: Ghent, Belgium
Contact:

#15 Post by erikson »

chrism wrote:(...)
B.Use prebuilt modules

iuu_phoenix-2.6.21.ko and iuu_phoenix-2.6.22.ko
are provided for those who are unable to compile
kernels.
So... why do you want to compile? These *.ko files are the compiled drivers (for kernels 2.6.21 resp. 2.6.22).

Simply copy iuu_phoenix-2.6.21.ko into /lib/modules/2.6.21.7/kernel/drivers/usb/serial
Then rename it to iuu_phoenix.ko (or, leave the original iuu_phoenix-2.6.21.ko as is and make a symlink iuu_phoenix.ko to it).
You can then modprobe iuu_phoenix with parameters as needed.

Of course you must use the 4.00 version built with 2.6.21.7 kernel.

I don't guarantee that it will work. But surely it's worth a try ;-)

(Edit - when reading again, I see that you should use insmod for the precompiled modules)
[size=84][i]If it ain't broke, don't fix it.[/i] --- erikson
hp/compaq nx9030 (1.6GHz/480MB/37.2GB), ADSL, Linksys wireless router
[url]http://www.desonville.net/[/url]
Puppy page: [url]http://www.desonville.net/en/joere.puppy.htm[/url][/size]

chrism
Posts: 14
Joined: Sat 10 May 2008, 21:27

#16 Post by chrism »

@erikson

unfortunately there are no such files on the author's website. I don't know if he published these modules with the first versions but now there are no compiled modules.
I contact him on the infinity usb unlimited forum and he told me that i have to follow the first way.

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#17 Post by Jesse »

Hi Chrism,

I just recently comiled an external driver for the kernel myself, it seems some things have gotten more tricky since I last did this sort of thing.
It used to be as simple as what I described earlier, but now it seems that if you want to compile an external driver, you first have to compile everything else that comes with the linux kernel... so that it can eventually build a special file (or three).
The only issue is that it takes ages to compile everything else, and many hard disk megabytes. A full compile of 2.6.25.4 is 620Mb.

so...

(go to your linux source code directory)
cd /usr/linux/linux-2.6.25.4/
(copy in .config to this directory)
make dep (takes about 1 min)
make bzImage (takes about 7 mins)
make modules (takes about 60 mins)
make modules_install (takes about 2 mins)
(change to your external module src dir)
cd /usr/linux/my-driver/
(run the custom build script, or "./configure", "make", "make install")

I have a reasonably fast CPU, the above subjective time estimate measures, are for an AMD Athlon(tm) 64 X2 Dual Core Processor 4800+ CPU (2.4GHz, 1Mb Cache)

Jesse

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#18 Post by Jesse »

Hello Chrism,

I had a go at compiling your iuu_phoenix driver as I described above, seems to have all worked.
Attached is src and build iuu_phoenix.ko for Linux 2.6.25.4, Which is currently only in the __alternative__ and __experimental__ Puppy 4 which uses the 2.6.25.4 kernel, theres another Puppy 4 mainstream which uses a different kernel. You could download the Puppy4-2.6.25.4 and try the attached driver.
Anyway, the concept of building it seems now covered.
To install the driver:

cp iuu_phoenix.ko /lib/modules/2.6.25.4/kernel/drivers/usb/serial/
depmod -a
modprobe iuu_phoenix

Regards
Jesse
Attachments
iuu_phoenix-0.5-Linux_2.6.25.4.tar.gz
(37.68 KiB) Downloaded 407 times

chrism
Posts: 14
Joined: Sat 10 May 2008, 21:27

#19 Post by chrism »

Hi jesse
Thanks for the help but
2. Where can i find the puppy with the new kernel? I searched everywhere but i cannot find any iso file.
2. How can i upgrade from puppy 4.00 kernel 2.6.21.7 to kernel 2.6.25.4?
Is there a way of upgrading without having to install everything from the beginning?

regards

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#20 Post by Jesse »

Hi chrism,
looks like the the experimental version has been removed from the download directory.
You might try the 4.1alpha2 release, I think it has the same 2.6.25.4 kernel, follow all the regular download links, but look in the 'test' directory. I'd suggest first booting the alpha2 with pfix=ram, so as just to see if the driver can work with your hardware, upgrading with an alpha version probably isn't the best move if you have lots of important files, back them up first.
Theres always the compiling option.
Jesse

Post Reply