Connecting webcam - V4L drivers on the beagleboard

Hi!

I have just installed Ubuntu on my beagleboard. I want to connect my webcam to the beagleboard. On connecting the camera, lsusb gives -
      ~$ lsusb
            [...]
            Bus 002 Device 004: ID 046d:09a1 Logitech, Inc.
            [...]
which shows that the device is being detected. However, it does not appear as /dev/video0 (as it does on a normal desktop).

I attempted to install the v4l drivers by downloading the source tree using mercurial to clone the source (as mentioned http://www.linwik.com/wiki/installing+the+latest+v4l+tv+tuner+drivers+for+ubuntu+7.10). I was hoping that the installation process could be modified slightly for the BeagleBoard, but there seem to be some problem with linux-headers not being there.
How should I install the v4l drivers so that I can detect the webcam and see a video stream?

Is the working of the webcam dependent on my uImage as well? Or is it only dependent on the correct installation of v4l drivers?

Thanks
Kedar

Hi,

export ARCH=arm
export CROSS_COMPILE=arm-none-linux-gnueabi-
cd kernel-src
make omap3_beagle_defconfig
make menuconfig->Device Drivers->Multimedia Drivers->V4l->GSPCA → select camera driver as kernel module

(save the config)

make uImage

Hi Harish,

Thanks for helping out.

I'm a little unclear on how I should go about creating the uImage. This is how I had done it initially -
      $~ sudo ./rootstock --fqdn beagleboard --login ubuntu --password temppwd --imagesize 2G --seed xfce4,gdm --dist jaunty --serial ttyS2 --kernel-image http://rcn-ee.net/deb/kernel/beagle/jaunty/v2.6.29-58cf2f1-oer44.1/linux-image-2.6.29-oer44.1_1.0jaunty_armel.deb
which gave me the rootfs (as a .tgz file) and a folder called 'dl'. Searching through the folder, I found the vmlinuz file (in dl/tmp/boot), and then I gave the following command
      $~ mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Linux" -d ./vmlinuz-* ./uImage
which created a uImage file.

Should build uImage from source instead, and follow the steps given by you in the previous mail?

Regards,
Kedar

Hi,

u have to build the source with the change and then compile, build using ubuntu related procedure.

generally, i use these steps for building kernel for angstorm.

I found that the default Angstrom image has drivers built-in for many
webcams. The Playstation Eye webcam that I'm using on the Beagle was
supported without any drivers or kernel recompile on 2.6.29 using V4L
- details of what I did at http://mechomaniac.com/node/32

I suggest plugging your webcam into the USB host port, not the OTG
port.

Hi!

I did as was suggested -
1) I downloaded the git repository of the omap linux kernel and created a uImage (followed the steps given by Harish Kumar)
2) I downloaded the git repository of u-boot and x-loader, and created fresh u-boot.bin files and x-load.bin.ift files (followed the steps given here - http://elinux.org/BeagleBoard#Source)
After creating the three files, I wrote them to the FAT partition of the SD card (I left the working MLO from a previous install).

I then created an image using the build at http://www.angstrom-distribution.org/narcissus/ and created an image for myself, that I uncompressed and wrote to the ext3 partition of the SD card. On booting, I gave the following arguments -
setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/mmcblk0p2 rootwait rootfstype=ext3 ro'
setenv bootcmd 'mmc init; fatload mmc 0:1 0x80300000 uImage; bootm 0x80300000'
saveenv
boot

However, on restarting, the starting-up does not go beyond this -
mmc1 is available
reading uImage

1936220 bytes read
## Booting kernel from Legacy Image at 80300000 ...
   Image Name: Linux-2.6.31-omap1-05952-g945044
   Image Type: ARM Linux Kernel Image (uncompressed)
   Data Size: 1936156 Bytes = 1.8 MB
   Load Address: 80008000
   Entry Point: 80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................
............................................................ done, booting the k
ernel.

After this, the whole BeagleBoard appears to have hung - all the LED's are glowing constantly (not blinking). Even after 15 minutes or so, there seemed to be no change in the BeagleBoard's status.

How do I get the new uImage, x-load, etc. to work properly? Do I need to get a different image of the Angstrom (the one I downloaded from ttp://www.angstrom-distribution.org/narcissus/ works fine with some older u-boots and uImages that I have, but do not support v4l).
I have ensured that the root file system has has been extracted correctly to the ext3 partition (I copied the tar.bz2 file to the partition first and then uncompressed it on the ext3 partition, and then synced the drives too)

Thanks
Kedar

On giving the command printenv, I see -
bootdelay=10
baudrate=115200
loadaddr=0x80200000
rdaddr=0x81600000
console=ttyS2,115200n8
optargs=
mmcargs=setenv bootargs console=${console} ${optargs} root=/dev/mmcblk0p2 rw roo
tfstype=ext3 rootwait
ramargs=setenv bootargs console=${console} ${optargs} root=/dev/ram0 rw ramdisk_
size=32768 initrd=${rdaddr},32M
ubifsargs=setenv bootargs console=${console} ${optargs} root=ubi0:beagleroot ubi
.mtd=4 rw rootfstype=ubifs
jffs2args=setenv bootargs console=${console} ${optargs} root=/dev/mtdblock4 rw r
ootfstype=jffs2
loadbootscript=fatload mmc 0 ${loadaddr} boot.scr
bootscript=echo Running bootscript from mmc ...; autoscr ${loadaddr}
loaduimage=fatload mmc 0 ${loadaddr} uImage.bin
loadramdisk=fatload mmc 0 ${rdaddr} ramdisk.gz
ramboot=echo Booting from ramdisk.gz ...; run ramargs; bootm ${loadaddr}
mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${loadaddr}
nandboot=echo Booting from nand ...; run jffs2args; nand read ${loadaddr} 280000
400000; bootm ${loadaddr}
usbtty=cdc_acm
serial=5ac400030000000004013f8901001001
dieid#=5ac400030000000004013f8901001001
filesize=1D8B5C
bootcmd=mmc init; fatload mmc 0:1 0x80300000 uImage; bootm 0x80300000
bootargs=console=ttyS2,115200n8 console=tty0 root=/dev/mmcblk0p2 rootwait rootfs
type=ext3 ro
stdin=serial
stdout=serial
stderr=serial

Environment size: 1291/131068 bytes

Op 24 sep 2009, om 09:11 heeft Mavinkurve, Kedar IN BLR SISL het volgende geschreven:

Do I need to get a different image of the Angstrom (the one I downloaded from ttp://www.angstrom-distribution.org/narcissus/ works fine with some older u-boots and uImages that I have, but do not support v4l).

v4l2 works jolly good for me with the angstrom kernel.

Hi,

What could be the problem if the kernel is not booting? Could the problem be related to the uImage, x-load.bin.ift or u-boot in any way?
I am trying out various combinations from my old files (uImage, etc) and new files.

Do I need to get a different image of the Angstrom (the one I
downloaded from ttp://www.angstrom-distribution.org/narcissus/ works
fine with some older u-boots and uImages that I have, but do not
support v4l).

v4l2 works jolly good for me with the angstrom kernel.

v4l2 was not working when I had installed ubuntu nor was it working with my previous Angstrom image. I think it was because of the config of the uImage (I got it off the internet).
However, the new uImage, u-boot.bin and x-load.bin.ift only results in the kernel being uncompressed. The BeagleBoard seems unable to read the kernel properly.

The Angstrom image definitely works, as I have used it in the past with my older uImage, etc.

Thanks for the help.
Kedar

Mavinkurve:
I had the same problem the other day, then I applied the patch described below, and I was able to boot the kernel:
http://groups.google.com/group/beagleboard/msg/c7003963ae36d430

Quist

2009/9/24 Mavinkurve, Kedar IN BLR SISL <kedar.mavinkurve@siemens.com>

Hi Quist,

I used the patch given at http://patchwork.kernel.org/patch/47089/

However, things were not so smooth after that! I remade the uImage by -
  make distclean
  make omap3_beagle_defconfig
  make menuconfig
  make uImage

However, when I attempt to boot the BeagleBoard, I get the following set of errors (two errors) -

<...>
Remounting root file system...
modprobe: FATAL: Could not load /lib/modules/2.6.31-omap1-05952-g945044d-dirty/modules.dep: No such file or directory
WARNING: Couldn't open directory /lib/modules/2.6.31-omap1-05952-g945044d-dirty: No such file or directory
FATAL: Could not open /lib/modules/2.6.31-omap1-05952-g945044d-dirty/modules.dep.temp for writing: No such file or directory
Unknown HZ value! (14) Assume 100.
ALSA: Restoring mixer settings...
Configuring network interfaces... /usr/sbin/alsactl: load_state:1616: No soundcards found...
modprobe: FATAL: Could not load /lib/modules/2.6.31-omap1-05952-g945044d-dirty/modules.dep: No such file or directory
eth0: unknown interface: No such device
modprobe: FATAL: Could not load /lib/modules/2.6.31-omap1-05952-g945044d-dirty/modules.dep: No such file or directory
eth0: unknown interface: No such device
modprobe: FATAL: Could not load /lib/modules/2.6.31-omap1-05952-g945044d-dirty/modules.dep: No such file or directory
eth0 No such device
modprobe: FATAL: Could not load /lib/modules/2.6.31-omap1-05952-g945044d-dirty/modules.dep: No such file or directory
eth0: unknown interface: No such device
done.
<...>

After which the boot starts configuring the kernel modules. etc. But, after a fair amount of configuring, the boot hits another block -

<....>
Configuring kernel-module-vivi
Configuring kernel-module-cls-basic
Configuring kernel-module-xfrm6-tunnel
Configuring evince
mmcblk0: error -110 transferring data, sector 3656767, nr 480, card status 0xc00

And after this, the BeagleBoard becomes unresponsive again.

These are my bootargs and bootcmds -
set bootargs 'console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait rootfstype=ext3'
set bootcmd 'mmc init; fatload mmc 0 0x80300000 uImage; bootm 0x80300000'
(my SD card has a FAT partition and ext3 partition)

Thanks,
Kedar

Hi!

I changed the filesystem of the root system to ext2, and my boot was a little more successful. All the configurations of kernel modules, etc. went successfully, and I even reached the boot screen. However, Angstrom does not seem to recognize the keyboard (no keystrokes through serial port are recognized)!

There is no problem with the serial cable connection, as I entered the boot commands without any problem.

Has anyone else faced something similar? Is there a patch I have missed somewhere?

Thanks
Kedar

Hi!

Is there a problem in my uImage that is causing my usb otg hub not to be detected? some patch i missed?

kedar