Now I want to use an easycap DC60 device also on my NSLU2 with openwrt, so similar for sheevaplug i’ve to compile the module.
All the operations described here are executed on a standard i686 linux pc (debian).
Download openwrt 8.09.2 and default config file:
cd /usr/src/nslu2/test
svn checkout svn://svn.openwrt.org/openwrt/branches/8.09 8.09.2
wget http://downloads.openwrt.org/kamikaze/8.09.2/ixp4xx/ixp4xx.config
go into 8.09.2 directory and
make menuconfig
now choose “Load an alternate config file and select ixp4xx.config” just downloaded, then
make V=99
When all done we have all things necessary.
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/nslu2/test/8.09.2/build_dir/toolchain-armeb_gcc4.1.2/linux-2.6.26.8/
we need to make a symbolic link to resolve an issue:
ln -s /usr/src/nslu2/test/8.09.2/build_dir/toolchain-armeb_gcc4.1.2/linux-2.6.26.8/include/config/video/usbvideo.h /usr/src/nslu2/test/8.09.2/build_dir/linux-ixp4xx_generic/linux-2.6.26.8/include/config/video
and now compile it:
make clean
make ARCH=arm CROSS_COMPILE=/usr/src/nslu2/test/8.09.2/build_dir/armeb/OpenWrt-SDK-ixp4xx-for-Linux-i686/staging_dir/toolchain-armeb_gcc4.1.2/bin/armeb-linux-uclibc-
All done! 😉
Login to your nslu 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 😉
With new version of easycap 0.8.3 there is some difference, when you have unzipped easycap source edit install.sh and just before the line:
make 1>>${WORKDIR}/make.out 2>>${WORKDIR}/make.err
insert an exit 0, so the script will terminate there. Now we can launch the script with KERNELDIR as parameter:
./install.sh /usr/src/nslu2/test/8.09.2/build_dir/toolchain-armeb_gcc4.1.2/linux-2.6.26.8/
now some needed steps:
cd /usr/src/nslu2/test/8.09.2/build_dir/toolchain-armeb_gcc4.1.2/linux-2.6.26.8
check in .config that MODVERSIONS is disabled and BIG_ENDIAN is enabled!
# make ARCH=arm CROSS_COMPILE=/usr/src/nslu2/test/8.09.2/build_dir/armeb/OpenWrt-SDK-ixp4xx-for-Linux-i686/staging_dir/toolchain-armeb_gcc4.1.2/bin/armeb-linux-uclibc- prepare
# make ARCH=arm CROSS_COMPILE=/usr/src/nslu2/test/8.09.2/build_dir/armeb/OpenWrt-SDK-ixp4xx-for-Linux-i686/staging_dir/toolchain-armeb_gcc4.1.2/bin/armeb-linux-uclibc- scripts/mod/
and then make it:
cd /usr/src/easycap_dc60.0.8.3
make ARCH=arm CROSS_COMPILE=/usr/src/nslu2/test/8.09.2/build_dir/armeb/OpenWrt-SDK-ixp4xx-for-Linux-i686/staging_dir/toolchain-armeb_gcc4.1.2/bin/armeb-linux-uclibc-
now in src/easycap.ko we have the module for our NSLU2!
Attached here you can find the already compiled module for openwrt kamikaze 8.09.2
Leave a Reply