On 10/5/07, Russell L. Harris <[EMAIL PROTECTED]> wrote:
> * Ben Lau <[EMAIL PROTECTED]> [071004 04:21]:
> > On 10/4/07, Russell L. Harris <[EMAIL PROTECTED]> wrote:
> >> I am confused. I am running Debian testing ("Lenny"), and, if
> >> possible, I would like to install the linux-uvc drivers in accordance
> >> with Debian protocol.
> >>
> >> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> >>
> >> I used aptitude to install the Debian package linux-uvc-source. The
> >> installation provided the file /usr/src/linux-uvc.tar.bz2 , which is
> >> expanded with bunzip2 and tar, providing the following files:
> >>
> >> /usr/src/modules/linux-uvc/debian/rules
> >> /usr/src/modules/linux-uvc/debian/control.modules.in
> >> /usr/src/modules/linux-uvc/debian/control
> >> /usr/src/modules/linux-uvc/debian/compat
> >>
> >> /usr/src/modules/linux-uvc/debian/copyright
> >> /usr/src/modules/linux-uvc/debian/changelog
> >> /usr/src/modules/linux-uvc/debian/README.Debian
> >>
> >> /usr/src/modules/linux-uvc/Makefile
> >>
> >> /usr/src/modules/linux-uvc/uvcvideo.h
> >>
> >> /usr/src/modules/linux-uvc/uvc_video.c
> >> /usr/src/modules/linux-uvc/uvc_driver.c
> >> /usr/src/modules/linux-uvc/uvc_queue.c
> >> /usr/src/modules/linux-uvc/uvc_ctrl.c
> >> /usr/src/modules/linux-uvc/uvc_v4l2.c
> >> /usr/src/modules/linux-uvc/uvc_compat.h
> >>
> >> /usr/src/modules/linux-uvc/extract.c
> >> /usr/src/modules/linux-uvc/.uvcvideo.o.d
> >>
> >> /usr/src/modules/linux-uvc/macbook-insight-firmware-loader.8
> >>
> >> It appears to me that, once I discover the proper Debian approach to
> >> installation of linux-uvc, I can update the drivers simply by copying
> >> into /usr/src/modules/linux-uvc/ the latest source files obtained via:
> >>
> >> # svn checkout svn://svn.berlios.de/linux-uvc/linux-uvc/trunk linux-uvc
> >>
> >> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> >>
> >> From the OpenFacts documents "Linux UVC" and "HowTo compile for Ubuntu
> >> 6.06 LTS", it appears that the first thing to do is to compile the
> >> modules:
> >>
> >> # make
> >>
> >> # make install
> >>
> >> -----------------------------------
> >>
> >> Second, the module uvcvideo.ko is to be removed from /lib/modules/ ,
> >> so that the module is not loaded automatically. (This may be a
> >> problem with Debian, because /lib/modules/ has several subdirectories,
> >> and the structure of /lib/modules/ is not immediately apparent to me.)
> >>
> >> -----------------------------------
> >>
> >> Third, /etc/modprobe.conf.local is to be edited to add the line:
> >>
> >> install uvcvideo /sbin/modprobe snd_usb_audio;
> >> /sbin/modprobe --ignore-install uvcvideo
> >>
> >> However, I find in Debian no file /etc/modprobe.conf.local .
> >>
> >> -----------------------------------
> >>
> >> Fourth, the commands:
> >>
> >> # modprobe -r uvcvideo
> >>
> >> # modprobe -r snd_usb_audio
> >>
> >> are to be used after unplugging the camera, in the event that the
> >> camera needs to be restarted.
> >>
> >> -----------------------------------
> >>
> >> Adding to my confusion is the instruction given in the file
> >> /usr/src/modules/linux-uvc/debian/README.Debian , which states that
> >> the module-assistant tool should be used to install linux-uvc, using
> >> the commands:
> >>
> >> # module-assistant prepare
> >>
> >> # module-assistant auto-install linux-uvc
> >>
> >> -----------------------------------
> >>
> >> Would someone on the list who is knowledgeable concerning Debian
> >> kindly help me sort out this matter?
> >>
> >
> > module-assistant is the tool to help to compile module-source package
> > into binary kernel module , and then pack into a Debian package. So
> > that you could install/uninstall through the package management
> > system(dpkg).
> >
> > The generated package is placed in /usr/src . If you build with the
> > argument "auto-install" , it will be installed automatically. It is
> > recommended (and the most simplest) way to install kernel module in
> > Debian system. Moreover, the generated package works with a specific
> > kernel version only. That means the package should be rebuild after
> > kernel upgrade.
> >
> > However , Debian may not be able to provide the most updated module
> > source. Just take UVC as an example, the most updated revision
> > no. is 132 at this moment , but the module source package in SID
> > could only offer rev 120. If you need the features provided by the
> > most updated revision , then you need to install by source through
> > the svn command, and then build by the command 'make` & `make
> > install`.
>
> Thanks for the explanation, Ben.
>
> I have been running Debian for about five years now, and I have been
> reading man pages, including the man page for module-assistant. But I
> am still struggling with the concepts involved in this. I intend to
> write a mini-HOWTO once I understand the concepts.
>
> I would like to ask you two or three more questions, please.
>
> -----------------------------------
>
> (1) Is the file:
>
> /usr/src/modules/linux-uvc/debian/rules
>
> executed automatically by module-assistant?
>
> Or is the file to be executed from the command line as a script:
>
> # ./rules
>
> or as a makefile:
>
> # make rules
debian/rules is a Makefile to describe the process to compile the
source & install the binary to specific location. You could involve it
by the command "make -f debian/rules". However, it can't create
package directly. The command to pack the repository should be
"dpkg-buildpackage".
Example:
dpkg-buildpackage -rfakeroot -us -uc
However, I am not sure how module-assistant works. It is possible that
module-assistant by-pass dpkg-buildpackage and involve debian/rules
directly. If you just want to test whether can the build process
success, you may just run :
m-a build linux-uvc
> -----------------------------------
>
> (2) Can I enjoy benefit of both the Debian approach and the
> most-recent driver revisions, by copying the source files obtained
> from the svn.berlios.de svn repository into:
>
> /usr/src/modules/linux-uvc/
>
> and thus overwriting the "linux-uvc-source" files obtained from the Debian
> repository?
I think it is possible, but you need to also update the rev no. for
the generated package. Usually the version no. is controlled by the
file changlog, but seems that module package use another approach.
Within the debian/rules, you could find this line:
dh_gencontrol -- -v$(VERSION)
Instead of getting the version no. from changelog, the version is
directly passed by the argument.
> -----------------------------------
>
> (3) To which directory must I "cd" before executing:
>
> # module-assistant prepare
>
> # module-assistant auto-install linux-uvc
>
> -----------------------------------
anywhere you like
>
> RLH
>
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel