You are not logged in.
Pages: 1
Hi everyone
Today i foudn this little piece of software called smartcam.
it turns you s60 mobile phone into a webcam via bluetooth or lan.
i installed the software on the phone downloaded the source and tried compiling following the instructions of the readme file.
sadly i didnt succed. i get errors (see below) and i'm not sure if they come from me using arch64 or from missing dependencies or what.
funny thing is ... the windows version of the software runs via wine ... but i'd really like to use the module.
hope someone can help.
Thanks in advance
Yonk
make: Entering directory `/usr/src/linux-2.6.28-ARCH'
CC [M] /home/yonk/build/smartcam/src/driver/smartcam.o
/home/yonk/build/smartcam/src/driver/smartcam.c: In function 'smartcam_mmap':
/home/yonk/build/smartcam/src/driver/smartcam.c:194: error: implicit declaration of function 'vmalloc_to_pfn'
/home/yonk/build/smartcam/src/driver/smartcam.c:195: error: implicit declaration of function 'remap_pfn_range'
/home/yonk/build/smartcam/src/driver/smartcam.c:195: error: 'PAGE_SHARED' undeclared (first use in this function)
/home/yonk/build/smartcam/src/driver/smartcam.c:195: error: (Each undeclared identifier is reported only once
/home/yonk/build/smartcam/src/driver/smartcam.c:195: error: for each function it appears in.)
/home/yonk/build/smartcam/src/driver/smartcam.c: At top level:
/home/yonk/build/smartcam/src/driver/smartcam.c:559: error: 'video_ioctl2' undeclared here (not in a function)
/home/yonk/build/smartcam/src/driver/smartcam.c:566: error: unknown field 'type' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:572: error: unknown field 'vidioc_querycap' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:572: warning: initialization makes integer from pointer without a cast
/home/yonk/build/smartcam/src/driver/smartcam.c:572: error: initializer element is not computable at load time
/home/yonk/build/smartcam/src/driver/smartcam.c:572: error: (near initialization for 'smartcam_vid.num')
/home/yonk/build/smartcam/src/driver/smartcam.c:573: error: unknown field 'vidioc_enum_fmt_cap' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:573: warning: initialization makes integer from pointer without a cast
/home/yonk/build/smartcam/src/driver/smartcam.c:573: error: initializer element is not computable at load time
/home/yonk/build/smartcam/src/driver/smartcam.c:573: error: (near initialization for 'smartcam_vid.index')
/home/yonk/build/smartcam/src/driver/smartcam.c:574: error: unknown field 'vidioc_g_fmt_cap' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:574: warning: initialization makes integer from pointer without a cast
/home/yonk/build/smartcam/src/driver/smartcam.c:574: error: initializer element is not computable at load time
/home/yonk/build/smartcam/src/driver/smartcam.c:574: error: (near initialization for 'smartcam_vid.debug')
/home/yonk/build/smartcam/src/driver/smartcam.c:575: error: unknown field 'vidioc_try_fmt_cap' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:575: warning: initialization makes integer from pointer without a cast
/home/yonk/build/smartcam/src/driver/smartcam.c:576: error: unknown field 'vidioc_s_fmt_cap' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:576: warning: initialization makes integer from pointer without a cast
/home/yonk/build/smartcam/src/driver/smartcam.c:577: error: unknown field 'vidioc_reqbufs' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:577: warning: initialization from incompatible pointer type
/home/yonk/build/smartcam/src/driver/smartcam.c:578: error: unknown field 'vidioc_querybuf' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:578: warning: initialization from incompatible pointer type
/home/yonk/build/smartcam/src/driver/smartcam.c:579: error: unknown field 'vidioc_qbuf' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:579: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:579: warning: (near initialization for 'smartcam_vid')
/home/yonk/build/smartcam/src/driver/smartcam.c:580: error: unknown field 'vidioc_dqbuf' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:580: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:580: warning: (near initialization for 'smartcam_vid')
/home/yonk/build/smartcam/src/driver/smartcam.c:581: error: unknown field 'vidioc_s_std' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:581: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:581: warning: (near initialization for 'smartcam_vid')
/home/yonk/build/smartcam/src/driver/smartcam.c:582: error: unknown field 'vidioc_enum_input' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:582: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:582: warning: (near initialization for 'smartcam_vid')
/home/yonk/build/smartcam/src/driver/smartcam.c:583: error: unknown field 'vidioc_g_input' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:583: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:583: warning: (near initialization for 'smartcam_vid')
/home/yonk/build/smartcam/src/driver/smartcam.c:584: error: unknown field 'vidioc_s_input' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:584: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:584: warning: (near initialization for 'smartcam_vid')
/home/yonk/build/smartcam/src/driver/smartcam.c:585: error: unknown field 'vidioc_queryctrl' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:585: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:585: warning: (near initialization for 'smartcam_vid')
/home/yonk/build/smartcam/src/driver/smartcam.c:586: error: unknown field 'vidioc_g_ctrl' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:586: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:586: warning: (near initialization for 'smartcam_vid')
/home/yonk/build/smartcam/src/driver/smartcam.c:587: error: unknown field 'vidioc_s_ctrl' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:587: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:587: warning: (near initialization for 'smartcam_vid')
/home/yonk/build/smartcam/src/driver/smartcam.c:588: error: unknown field 'vidioc_cropcap' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:588: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:588: warning: (near initialization for 'smartcam_vid')
/home/yonk/build/smartcam/src/driver/smartcam.c:589: error: unknown field 'vidioc_g_crop' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:589: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:589: warning: (near initialization for 'smartcam_vid')
/home/yonk/build/smartcam/src/driver/smartcam.c:590: error: unknown field 'vidioc_s_crop' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:590: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:590: warning: (near initialization for 'smartcam_vid')
/home/yonk/build/smartcam/src/driver/smartcam.c:591: error: unknown field 'vidioc_g_parm' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:591: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:591: warning: (near initialization for 'smartcam_vid')
/home/yonk/build/smartcam/src/driver/smartcam.c:592: error: unknown field 'vidioc_s_parm' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:592: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:592: warning: (near initialization for 'smartcam_vid')
/home/yonk/build/smartcam/src/driver/smartcam.c:593: error: unknown field 'vidioc_streamon' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:593: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:593: warning: (near initialization for 'smartcam_vid')
/home/yonk/build/smartcam/src/driver/smartcam.c:594: error: unknown field 'vidioc_streamoff' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:594: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:594: warning: (near initialization for 'smartcam_vid')
/home/yonk/build/smartcam/src/driver/smartcam.c:596: error: unknown field 'vidiocgmbuf' specified in initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:596: warning: excess elements in struct initializer
/home/yonk/build/smartcam/src/driver/smartcam.c:596: warning: (near initialization for 'smartcam_vid')
make[1]: *** [/home/yonk/build/smartcam/src/driver/smartcam.o] Error 1
make: *** [_module_/home/yonk/build/smartcam/src/driver] Error 2
make: Leaving directory `/usr/src/linux-2.6.28-ARCH'
Offline
In scientia veritas, in arte honestas.
Offline
And if you succeed, please make a AUR package of it. It doesn't take too long, and is extremely useful.
Consistency is not a virtue.
Offline
I'll make it within few minutes...
@edit: I am willing to make one, but I can't fully understand howto Any help lol?
Last edited by Оо (2009-03-22 00:05:53)
In scientia veritas, in arte honestas.
Offline
Anyway, here's compiled smartcam.ko for you to use untill i figure out how to create package lol:
http://phplab.biz/neradnik/arch/smartcam.ko
good luck and have fun with it
In scientia veritas, in arte honestas.
Offline
I'm not package king, but it should look somthing like this:
pkgname=smartcam
pkgver=2008.09.18.2
pkgrel=1
pkgdesc="Turns a Symbian Series 60 phone with bluetooth and camera into a handy webcam ready to use with your PC"
depends=('any' 'packages' 'smartcam' 'relies' 'on' 'should' 'be' 'put' 'here')
confilics=('any' 'packages' 'smartcam' 'confilicts' 'with' 'should' 'be' 'put' 'here')
url='http://sourceforge.net/projects/smartcam/'
licence=GPL
source=('http://dfn.dl.sourceforge.net/sourceforge/$pkgname/$pkgname_v_$pkgver.zip'/
'http://launchpadlibrarian.net/19222206/smartcam-linux-2.6.27.1.patch')
md5sum=('bc1c3f784557636a188313affd9d9e82'/
'c2c0309957eab697fba7437cefa2846b')
build () {
Put the build instructions here.
}
Consistency is not a virtue.
Offline
There are particular requirements for packages that provide kernel modules. Have a look at some relevant official packages e.g. nvidia, ndiswrapper, lirc, etc.
Offline
There are particular requirements for packages that provide kernel modules. Have a look at some relevant official packages e.g. nvidia, ndiswrapper, lirc, etc.
The wiki has a page on module packaging guidelines here: http://wiki.archlinux.org/index.php/Ker … Guidelines
The important bit, as far as I can see is this:
Guideline
When packaging such software (using the NVidia drivers as an example) the convention is:
* create an nvidia package containing just the kernel modules built for the vanilla kernel
* create an nvidia-utils package containing the supporting files
* make sure nvidia depends on nvidia-utils (unless there's a good reason not to do so)
* for another kernel like kernel26-mm, create nvidia-mm containing the kernel modules built against that kernel which provides nvidia and also depends on nvidia-utils
* make sure nvidia depends on the current major kernel version, for example:depends=('kernel26>=2.6.24-2' 'kernel26<2.6.25-0' 'nvidia-utils')
Note that it is 2.6.24-2, not -1 in above example - this is because there was a configuration change to important kernel subsystem that required all modules to be rebuilt. You should always change depends version in such cases, otherwise some people with out-of-sync kernel and module version will report that module is broken.
Last edited by Blue Peppers (2009-03-22 09:30:30)
Consistency is not a virtue.
Offline
hehe.. forgot to look for a wiki page. However, the install script requirements are not covered there, so check some examples as suggested above.
Offline
so i managed to compile both the module and the app ...
but i get a segmentation fault when i try
insmod smartcam.ko
the app itself launches but gives an error message that it cant find the driver ... no surprise there.
the question now is ... is it because i am on arch64 or is something wrong with the module itself
maybe someone is interessted in my unfinished PKGBUILD:
pkgname=smartcam
pkgver=2008.09.18.2
pkgrel=1
pkgdesc="Turns a Symbian Series 60 phone with bluetooth and camera into a handy webcam ready to use with your PC"
arch=(i686 x86_64)
depends=('kernel26>=2.6.27-1' 'bluez')
confilics=()
url='http://sourceforge.net/projects/smartcam/'
licence=GPL
source=( http://dfn.dl.sourceforge.net/sourceforge/smartcam/smartcam_v_2008.09.18.2.zip
http://launchpadlibrarian.net/19222206/smartcam-linux-2.6.27.1.patch)
md5sum=('bc1c3f784557636a188313affd9d9e82'/
'c2c0309957eab697fba7437cefa2846b')
build () {
cd "${srcdir}/$pkgname/src/driver"
patch smartcam.c < ${startdir}/smartcam-linux-2.6.27.1.patch
make -C /lib/modules/2.6.28-ARCH/build M=`pwd` modules
cd "${srcdir}/$pkgname/src/app"
gcc `pkg-config --cflags --libs gtk+-2.0 gthread-2.0` -lbluetooth smartcam.c -o smartcam
#
#move the module to the appropriacte location etc ...
#
}
Last edited by Yonk (2009-03-23 10:31:08)
Offline
nice pkgbuild you got there...
Talking of modules, you'll have to modprobe videodev and compiled smartcam, as seen in README:
/sbin/modprobe videodev
/sbin/insmod smartcam.ko
and then try to run app.
You may add them to init if you're gonna use the app frequently or something.
In scientia veritas, in arte honestas.
Offline
i did that
still doesnt work for me ...
it would be interessting if the problem is only 64bit related or if the same thing happens on 32bit.
[yonk@archlinux build]$ sudo /sbin/insmod smartcam.ko
[yonk@archlinux build]$ sudo /sbin/insmod src/smartcam/src/driver/smartcam.ko
Segmentation fault
Offline
Yonk, you've already inserted by doing it w/o the full path ( /sbin/insmod smartcam.ko )...
In scientia veritas, in arte honestas.
Offline
copied the wrong line
should read
[yonk@archlinux build]$ sudo /sbin/modprobe videodev
[yonk@archlinux build]$ sudo /sbin/insmod src/smartcam/src/driver/smartcam.ko
Segmentation fault
since i didnt move the compiled files i assume i have to use the full path
Offline
so i played around a little bit more but i still cant get the module loaded.
but i did switch to 2.6.29 from testing and i'm getting a new error from dmesg:
------------[ cut here ]------------
WARNING: at drivers/media/video/v4l2-dev.c:372 video_register_device_index+0x33a/0x540 [videodev]()
Hardware name: System Product Name
Modules linked in: smartcam(+) videodev v4l1_compat v4l2_compat_ioctl32 ext2 sha256_generic cbc loop nls_cp437 vfat fat ipv6 radeon drm w83627ehf hwmon_vid coretemp fuse jfs joydev usb_storage snd_usb_audio snd_usb_lib snd_rawmidi hid_logitech ff_memless pcspkr psmouse serio_raw ohci1394 ieee1394 i2c_i801 i2c_core iTCO_wdt iTCO_vendor_support sg intel_agp usbhid hid thermal processor snd_seq_oss fan snd_seq_midi_event snd_seq snd_seq_device evdev button battery ac aes_x86_64 aes_generic dm_crypt dm_mod snd_hwdep snd_pcm_oss snd_pcm snd_timer snd_page_alloc snd_mixer_oss snd soundcore slhc sky2 skge rtc_cmos rtc_core rtc_lib ext3 jbd mbcache uhci_hcd sd_mod ehci_hcd sr_mod cdrom usbcore ata_piix ahci ata_generic pata_jmicron pata_acpi libata scsi_mod
Pid: 26343, comm: modprobe Not tainted 2.6.29-ARCH #1
Call Trace:
[<ffffffff802420aa>] warn_slowpath+0xea/0x160
[<ffffffffa045b5ea>] video_register_device_index+0x33a/0x540 [videodev]
[<ffffffffa0203000>] smartcam_init+0x0/0x4f [smartcam]
[<ffffffff8020903b>] _stext+0x3b/0x180
[<ffffffff8036a391>] __up_read+0x21/0xc0
[<ffffffff8025e895>] __blocking_notifier_call_chain+0x65/0x90
[<ffffffff80270815>] sys_init_module+0xb5/0x1f0
[<ffffffff8020c6aa>] system_call_fastpath+0x16/0x1b
---[ end trace c2530621be0af6e7 ]---
maybe now someone can tell me if theres a problem because i'm on 64bit or if it's competly module related. maybe some could build the package on 32bit and check it out?
i'll post the PKGBUILD just in case. (pls check if the module is placed in the right folder ... first time PKGBUILDer)
pkgname=smartcam
pkgver=2008.09.18.2
pkgrel=1
pkgdesc="Turns a Symbian Series 60 phone with bluetooth and camera into a handy webcam ready to use with your PC"
arch=(i686 x86_64)
depends=('kernel26>=2.6.27-1' 'bluez')
confilics=()
url='http://sourceforge.net/projects/smartcam/'
licence=GPL
source=( http://dfn.dl.sourceforge.net/sourceforge/smartcam/smartcam_v_2008.09.18.2.zip
http://launchpadlibrarian.net/19222206/smartcam-linux-2.6.27.1.patch)
md5sum=('bc1c3f784557636a188313affd9d9e82'/
'c2c0309957eab697fba7437cefa2846b')
_kernelrelease=`uname -r`
build () {
cd "${srcdir}/$pkgname/src/driver"
patch smartcam.c < ${startdir}/smartcam-linux-2.6.27.1.patch
make -C /lib/modules/$_kernelrelease/build M=`pwd` modules
mkdir -p ${pkgdir}/lib/modules/$_kernelrelease/misc
install -D -m644 "${srcdir}/${pkgname}/src/driver/smartcam.ko" \
"${pkgdir}/lib/modules/$_kernelrelease/misc/${pkgname}/smartcam.ko" || return 1
cd "${srcdir}/$pkgname/src/app"
gcc `pkg-config --cflags --libs gtk+-2.0 gthread-2.0` -lbluetooth smartcam.c -o smartcam
install -D -m755 "${srcdir}/${pkgname}/src/app/smartcam" "${pkgdir}/usr/bin/smartcam" || return 1
}
Offline
It will load if you uncomment line 603 of smartcam.c before compiling it. However, the userspace program won't run for me anyway.
Adding
sed 's/\/\/\t.release/\t.release/' -i smartcam.c
between patch and make in your PKGBUILD ought to do it.
Offline
If any one has the working PKGBUILD please post here. I would like to try it with Nokia 6120.
Thanks
Offline
Pages: 1