Categories

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

SheevaPlug non-standard module compiling

Howto compile a module for sheeva without standard kernel headers

I’ve bought an EasyCap DC60 and i’ve found this fantastic driver for it:

http://sourceforge.net/projects/easycapdc60/

Obviously they aren’t available for our sheevaplug so i’m looking through the web on how to compile it,finally I was able to do it, this is the howto.

We suppose that sheevaplug is already runnning with a http://sheeva.with-linux.com/sheeva kernel (in this example 2.6.33.2).
All the operations described here are executed on a standard i686 linux pc (debian).

We need a cross-compiler, so go to this page and download the latest arm-XXXXXX-arm-none-eabi-i686-pc-linux-gnu.tar.bz2:
http://www.codesourcery.com/downloads/public/public/gnu_toolchain/arm-none-eabi
(in this example we use 2009q3-68)

First of all we need packages for cross-compile it

cd /usr/src
wget http://www.codesourcery.com/downloads/public/public/gnu_toolchain/arm-none-eabi/arm-2009q3-68-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
tar xzvf arm-2009q3-68-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
apt-get install build-essential

Then download the standard kernel from kernel.org (nowadays marvell patch is included in the mainline kernel tree), and apply the config from http://sheeva.with-linux.com

cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.33.2.tar.bz2
tar xvf linux-2.6.33.2.tar.bz2
cd linux-2.6.33.2

wget http://sheeva.with-linux.com/sheeva/2.6.33.2/sheeva-2.6.33.2.config
cp sheeva-2.6.33.2.config .config
make ARCH=arm oldconfig

Now we can compile it, if you wouldn’t waste time you can stop it after the first “CC …” lines, when it has already done “HOSTCC/scripts …“, at this time it has already generated header needed by us. If you want you can also compile it all (better).

make -j4 ARCH=arm CROSS_COMPILE=../arm-2009q3/bin/arm-none-eabi-

In this example we try to compile easycap driver, but you can adapt it to any external modules:

cd /usr/src
wget “http://downloads.sourceforge.net/project/easycapdc60/easycap_dc60.0.7.1.tar.gz?use_mirror=netcologne”
cd easycap_dc60.0.7.1
make clean

Edit src/MakeFile (vi src/Makefile) and replace KERNELDIR line with this:

KERNELDIR ?= /usr/src/linux-2.6.33.2

and now compile it:

make -j4 ARCH=arm CROSS_COMPILE=/usr/src/arm-2009q3/bin/arm-none-eabi-

All done! 😉

Login to your sheevaplug and copy the new kernel mod in /lib/modules/`uname -r`/kernel/drivers/media/video

scp 192.168.1.220:/usr/src/easycap_dc60.0.7.1/src/easycap.ko /lib/modules/`uname -r`/kernel/drivers/media/video
depmod -a

try to insmod it and enjoy 😉

7 comments to SheevaPlug non-standard module compiling

  • Philip

    Interesting. What are your impressions of the Easycap? Could you post a captured frame with the easycap/sheevaplug combination? I’m looking to build a similar system.

    Thanks

  • alan

    Hi, thanks for your tips on the non-standard compilation of easycap. It helps me alot.

    Following your example, I have successfully cross-compiled easycap.ko for my FriendlyArm tiny6410. After installing the module, /dev/video2 shows up.

    However, there is no video output at the Cheese Webcam Program.

    I have tested my easycap on Fedora Linux desktop with no problem. Have I overlooked something when it comes to arm device?

  • alan

    here is the debug message :

    easycap::0adjust_standard: selected standard: PAL_BGHIN
    easycap::0adjust_format: sought: 320×240,UYVY(0x59565955),1=field,0x00=std mask
    easycap::0adjust_format: sought: V4L2_FIELD_NONE
    easycap::0adjust_format: actioning: 320×240 PAL_BGHIN_AT_320x240_FMT_UYVY-n
    easycap::0adjust_brightness: adjusting brightness to 0x7F
    easycap::0adjust_contrast: adjusting contrast to 0x3F
    easycap::0adjust_saturation: adjusting saturation to 0x2F
    easycap::0adjust_hue: adjusting hue to 0x00
    easycap::0adjust_format: sought: 640×480,UYVY(0x59565955),1=field,0x00=std mask
    easycap::0adjust_format: sought: V4L2_FIELD_NONE
    easycap::0adjust_format: actioning: 640×480 PAL_BGHIN_AT_640x480_FMT_UYVY-n
    easycap::0adjust_format: sought: 640×480,YV12(0x32315659),0=field,0x00=std mask
    easycap::0adjust_format: sought: V4L2_FIELD_ANY
    easycap::0adjust_format: prefer: V4L2_FIELD_NONE=field, was V4L2_FIELD_ANY
    easycap::0adjust_format: cannot do: 640×480 with standard mask 0x00
    easycap::0adjust_format: cannot do 640x… with standard mask 0x00
    easycap::0adjust_format: cannot do …x480 with standard mask 0x00
    easycap::0adjust_format: 640×480 unmatched
    easycap::0easycap_ioctl: requested input already in effect
    easycap::0adjust_standard: selected standard: PAL_BGHIN
    easycap::0adjust_standard: requested standard already in effect
    easycap::0adjust_format: sought: 60×40,UYVY(0x59565955),0=field,0x00=std mask
    easycap::0adjust_format: sought: V4L2_FIELD_ANY
    easycap::0adjust_format: prefer: V4L2_FIELD_NONE=field, was V4L2_FIELD_ANY
    easycap::0adjust_format: cannot do: 60×40 with standard mask 0x00
    easycap::0adjust_format: actioning: 320×240 PAL_BGHIN_AT_320x240_FMT_UYVY-n
    easycap::0adjust_format: sought: 60×240,UYVY(0x59565955),1=field,0x00=std mask
    easycap::0adjust_format: sought: V4L2_FIELD_NONE
    easycap::0adjust_format: cannot do: 60×240 with standard mask 0x00
    easycap::0adjust_format: actioning: 320×240 PAL_BGHIN_AT_320x240_FMT_UYVY-n
    easycap::0adjust_format: sought: 320×40,UYVY(0x59565955),0=field,0x00=std mask
    easycap::0adjust_format: sought: V4L2_FIELD_ANY
    easycap::0adjust_format: prefer: V4L2_FIELD_NONE=field, was V4L2_FIELD_ANY
    easycap::0adjust_format: cannot do: 320×40 with standard mask 0x00
    easycap::0adjust_format: actioning: 320×240 PAL_BGHIN_AT_320x240_FMT_UYVY-n
    Selected input hasn’t got a tuner!easycap::0adjust_mute: adjusting mute: 0=peasycap->audio_idle
    easycap::0adjust_brightness: unchanged brightness at 0x7F
    easycap::0adjust_hue: unchanged hue at 0x80
    easycap::0adjust_saturation: unchanged saturation at 0xAF
    easycap::0adjust_contrast: unchanged contrast at 0xBF
    ^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[Aeasycap::0easycap_complete: easycap driver shutting down on condition green
    easycap::0adjust_standard: selected standard: PAL_BGHIN
    easycap::0adjust_format: sought: 320×240,UYVY(0x59565955),1=field,0x00=std mask
    easycap::0adjust_format: sought: V4L2_FIELD_NONE
    easycap::0adjust_format: actioning: 320×240 PAL_BGHIN_AT_320x240_FMT_UYVY-n
    easycap::0adjust_brightness: adjusting brightness to 0x7F
    easycap::0adjust_contrast: adjusting contrast to 0x3F
    easycap::0adjust_saturation: adjusting saturation to 0x2F
    easycap::0adjust_hue: adjusting hue to 0x00
    easycap::0adjust_mute: adjusting mute: 1=peasycap->audio_idle

  • Nyla Summey

    This was actually a fascinating subject, I’m very lucky to have the ability to come to your blog and I will bookmark this page in order that I may come back another time.

  • admin

    Hi Alan,
    try with a different resolution and/or capturing as yuv image and not a mpeg stream. try with mjpg-streamer.

  • dexter

    File Not Found?

    root@esposa-segunda:/usr/src# wget http://www.codesourcery.com/downloads/public/public/gnu_toolchain/arm-none-eabi/arm-2009q3-68-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
    –2011-06-12 12:02:26– http://www.codesourcery.com/downloads/public/public/gnu_toolchain/arm-none-eabi/arm-2009q3-68-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
    Resolving http://www.codesourcery.com... 38.113.113.100
    Connecting to http://www.codesourcery.com|38.113.113.100|:80… connected.
    HTTP request sent, awaiting response… 404 Not Found
    2011-06-12 12:02:26 ERROR 404: Not Found.

  • admin

    Hi dexter, maybe check your syntax
    I’ve try it and it works. The link is still valid

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

*