Question about building a driver for enigma2
#1
Posted 2 October 2009 - 05:48
Just built the cross developer environment for enigma2.
I have a driver i would like to experiment and try to build for my dm8000.
its a usb to serial adapter. I have located a source code for linux.
It has some of the following include statements
#include <linux/tty_flip.h>
#include <linux/module.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>
#include <linux/serial.h>
This thread has the make file as well as the source code :
http://www.gossamer-.../kernel/1130475
I realise i will need to change all the refrence paths to some other..
Question i have is how do i go about building this driver to work with the box and current pli image...is it even possible ?
Thanks and sorry for the noobness...
Re: Question about building a driver for enigma2 #2
Re: Question about building a driver for enigma2 #3
Re: Question about building a driver for enigma2 #4
Posted 11 October 2009 - 12:49
guess ive got a lot to learn... getting confused around some things
The file for the ark has the following folder and file structure.
- /DMProjects/dm8000/dm8000/openembedded/packages/ark3116$ ls
ark3116-0.4.1 ark3116_0.4.1.bb
- /DMProjects/dm8000/dm8000/openembedded/packages/ark3116/ark3116-0.4.1$ ls
ark3116.c.patch Makefile.patch
So my questions are :
1. Do i replace the .c.patch file with the actuall new c file i hav found ? And then run the command mentioned.
2. When i try the command you mentioned i get a - Please set the 'CACHE' variable.
Re: Question about building a driver for enigma2 #5
Posted 11 October 2009 - 13:02
What we currently use is the driver which is contained in the kernel sourcetree.
2. forgot to source env.source?
I guess the standard build works, and you can build a working image?
The command is to rebuild the kernel (and ark module contained in it), but you could use the same principle if you want to use the externam ark package.
Re: Question about building a driver for enigma2 #6
Posted 11 October 2009 - 15:21
not too sure about the env.source file...and where it resides ? i basically have just built cross development environment.
i havnt yet built an image from the files...
my main aim is to compile those drivers and use them with the pli image...
you mention externam ark package ? what does that mean and how can that be created.
Thanks alot for your help.... if theres any good readings that i could do just pass me some beginner tutorial inks - that would be great...
Re: Question about building a driver for enigma2 #7
Re: Question about building a driver for enigma2 #8
Posted 11 October 2009 - 18:38
Re: Question about building a driver for enigma2 #9
Posted 15 October 2009 - 02:00
Attempted to build the ark3116 package...but am getting errors... I did : source env.source , before the bitbake command....
Error as below , not sure what quilt is ?
Error in executing: /home/xman/DMProjects/dm8000/dm8000/openembedded/packages/ark3116/ark3116_0.4.1.bb
ERROR: Exception:<class 'CmdError'> Message:Command Error: exit status: 127 Output:
sh: quilt: not found
ERROR: Printing the environment of the function
Traceback (most recent call last):
File "/home/xman/DMProjects/dm8000/bb/bin/bitbake", line 1111, in <module>
main()
File "/home/xman/DMProjects/dm8000/bb/bin/bitbake", line 1106, in main
cooker.cook( BBConfiguration( options ), args[1:] )
File "/home/xman/DMProjects/dm8000/bb/bin/bitbake", line 860, in cook
self.tryBuildPackage( bf, item, bbfile_data )
File "/home/xman/DMProjects/dm8000/bb/bin/bitbake", line 227, in tryBuildPackage
bb.build.exec_task('do_%s' % self.configuration.cmd, the_data)
File "/home/xman/DMProjects/dm8000/bb/lib/bb/build.py", line 298, in exec_task
task_graph.walkdown(task, execute)
File "/home/xman/DMProjects/dm8000/bb/lib/bb/__init__.py", line 1200, in walkdown
ret = self.walkdown(p, callback, debug, usecache)
File "/home/xman/DMProjects/dm8000/bb/lib/bb/__init__.py", line 1200, in walkdown
ret = self.walkdown(p, callback, debug, usecache)
File "/home/xman/DMProjects/dm8000/bb/lib/bb/__init__.py", line 1200, in walkdown
ret = self.walkdown(p, callback, debug, usecache)
File "/home/xman/DMProjects/dm8000/bb/lib/bb/__init__.py", line 1200, in walkdown
ret = self.walkdown(p, callback, debug, usecache)
File "/home/xman/DMProjects/dm8000/bb/lib/bb/__init__.py", line 1200, in walkdown
ret = self.walkdown(p, callback, debug, usecache)
File "/home/xman/DMProjects/dm8000/bb/lib/bb/__init__.py", line 1200, in walkdown
ret = self.walkdown(p, callback, debug, usecache)
File "/home/xman/DMProjects/dm8000/bb/lib/bb/__init__.py", line 1205, in walkdown
return callback(self, item)
File "/home/xman/DMProjects/dm8000/bb/lib/bb/build.py", line 277, in execute
exec_task(item, d)
File "/home/xman/DMProjects/dm8000/bb/lib/bb/build.py", line 298, in exec_task
task_graph.walkdown(task, execute)
File "/home/xman/DMProjects/dm8000/bb/lib/bb/__init__.py", line 1205, in walkdown
return callback(self, item)
File "/home/xman/DMProjects/dm8000/bb/lib/bb/build.py", line 287, in execute
exec_func(item, localdata)
File "/home/xman/DMProjects/dm8000/bb/lib/bb/build.py", line 114, in exec_func
exec_func_python(func, d)
File "/home/xman/DMProjects/dm8000/bb/lib/bb/build.py", line 133, in exec_func_python
utils.better_exec(comp,g,tmp, bb.data.getVar('FILE',d,1))
File "/home/xman/DMProjects/dm8000/bb/lib/bb/utils.py", line 142, in better_exec
exec code in context
File "do_patch", line 4, in <module>
File "do_patch", line 2, in do_patch
File "/home/xman/DMProjects/dm8000/bb/lib/bb/build.py", line 114, in exec_func
exec_func_python(func, d)
File "/home/xman/DMProjects/dm8000/bb/lib/bb/build.py", line 133, in exec_func_python
utils.better_exec(comp,g,tmp, bb.data.getVar('FILE',d,1))
File "/home/xman/DMProjects/dm8000/bb/lib/bb/utils.py", line 142, in better_exec
exec code in context
File "base_do_patch", line 4, in <module>
File "base_do_patch", line 2, in base_do_patch
File "/home/xman/DMProjects/dm8000/bb/lib/bb/build.py", line 114, in exec_func
exec_func_python(func, d)
File "/home/xman/DMProjects/dm8000/bb/lib/bb/build.py", line 133, in exec_func_python
utils.better_exec(comp,g,tmp, bb.data.getVar('FILE',d,1))
File "/home/xman/DMProjects/dm8000/bb/lib/bb/utils.py", line 142, in better_exec
exec code in context
File "patch_do_patch", line 98, in <module>
File "patch_do_patch", line 92, in patch_do_patch
File "<bb>", line 234, in Import
File "<bb>", line 173, in _runcmd
File "<bb>", line 47, in runcmd
__builtin__.CmdError: Command Error: exit status: 127 Output:
sh: quilt: not found
[mail]xman@xman-linux:~/DMProjects/dm8000/dm8000/openembedded/packages/ark3116$[/mail]
Thanks again guys.
Re: Question about building a driver for enigma2 #10
Posted 15 October 2009 - 12:19
How exactly do you start the build of the ark package?
The first time, you should to
bitbake ark3116
(the -f -c compile is only for consecutive builds, if you changed something in the code)
Also, if the external package doesn't work, try to replace the sourcefile in the kernel instead.
I think this external ark package originates from a very long time ago, when there was no ark support in the kernel yet.
Re: Question about building a driver for enigma2 #11
Posted 15 October 2009 - 17:13
Played around some more and notice the error (last one i posted) occurs even when i do :
bitbake -f -c compile -b linux-dm8000.bb
... perhaps something is wrong with the way im running the command ? I am running source env.source before i run the bitbake command..
Looks like a bitbake issue/setup issue ?
In the work dir i placed the source code (from the forum link in first post) in the usb/serial section and also edited the KCONFIG files to pick up the source, as ARK was not in there....Then i ran the bitbake command to compile the image but no go...can you compile the kernel without bitbake ?... i have tried the instructions but cant see the usb/serial folder being generated...
"To configure and build the kernel use:
cd /usr/src/linux-2.6.N
make O=/home/name/build/kernel menuconfig
make O=/home/name/build/kernel
sudo make O=/home/name/build/kernel modules_install install"
Re: Question about building a driver for enigma2 #12
Posted 15 October 2009 - 17:20
bitbake -f -c compile -b linux-dm8000.bb
When using -b, you need to specify the whole path to the bb file
And run it from the build directory, where you sourced env.source.
In the work dir i placed the source code (from the forum link in first post) in the usb/serial section and also edited the KCONFIG files to pick up the source, as ARK was not in there....
Hm, now I see.
Though we have
CONFIG_USB_SERIAL_ARK3116=m
in our defconfig, the ark stuff is indeed missing from usb/serial
So you can choose, try to get the external package working, or indeed add everything to usb/serial, and hope it compiles.
BTW, if you change Kconfig files, you need to repeat the configure step (-f -c configure instead of -f -c compile).
i have tried the instructions but cant see the usb/serial folder being generated...
it should be there already, in the sourcetree
"To configure and build the kernel use:
cd /usr/src/linux-2.6.N
make O=/home/name/build/kernel menuconfig
make O=/home/name/build/kernel
sudo make O=/home/name/build/kernel modules_install install"
no, that's a native build, crossbuilds are something completely different.
Use bitbake, it does all the nasty stuff for you.
Re: Question about building a driver for enigma2 #13
Posted 16 October 2009 - 03:00
When using -b, you need to specify the whole path to the bb file
And run it from the build directory, where you sourced env.source.
Yup this solved the errors and now able to rebuild the image. However i still cant see the usb/serial folder being generated in the kernel folders...maybe this usb serial compiling is left out of some file....i had a look at the 8000 defconfig n commented out the usb serial line...Keep in mind i am not using the OE opensource-pli build, using the standard one...
Hm, now I see.
Though we have
CONFIG_USB_SERIAL_ARK3116=m
in our defconfig, the ark stuff is indeed missing from usb/serial
So you can choose, try to get the external package working, or indeed add everything to usb/serial, and hope it compiles.
BTW, if you change Kconfig files, you need to repeat the configure step (-f -c configure instead of -f -c compile).
This -f -c configure is throwing me an error, will paste the error when i get back to the computer. And the package compiling results as well...
To be continued...lol...
Thanks.
Re: Question about building a driver for enigma2 #14
Posted 16 October 2009 - 17:37
CONFIG_USB_SERIAL=m (path location : /home/xman/DMProjects/dm8000/dm8000/build/tmp/work/linux-dm8000-2.6.12-r10)
I then -f -c configure , was successfull , then compile and successfull...running the command from the build folder.
But i still cant find this damn usb/serial folder anywhere...its not in the kernel folder...am i looking in the wrong spot, which folder should i be looking at.. ??
I am running the bb file which is in the path : /home/xman/DMProjects/dm8000/dm8000/build/tmp/work/linux-dm8000-2.6.12-r10/linux-8000.bb , called from the build folder.
had a look at the stblinux-2.6.12 sub folder , but cant find nothing....had a look in some staging folder and nothing...
ill get there slowly slowly , even though i could just buy a new adaptor - i am just trying to learn
Thanks
Re: Question about building a driver for enigma2 #15
Re: Question about building a driver for enigma2 #16
Re: Question about building a driver for enigma2 #17
Posted 16 October 2009 - 18:29
/DMProjects/dm8000/dm8000/build/tmp/work/linux-dm8000-2.6.12-
r10$ find . -name '*serial'
./tmp/work/linux-dm8000-2.6.12-r10/stblinux-2.6.12/drivers/serial
./tmp/work/linux-dm8000-2.6.12-r10/stblinux-2.6.12/drivers/usb/serial
./tmp/work/linux-dm8000-2.6.12-r10/stblinux-2.6.12/Documentation/serial
./stblinux-2.6.12/drivers/serial
./stblinux-2.6.12/drivers/usb/serial
./stblinux-2.6.12/.pc/linux-2.6.12-brcm-5.1.patch.bz2/drivers/serial
./stblinux-2.6.12/Documentation/serial
./stblinux-2.6.12/include/config/snd/serial
./stblinux-2.6.12/include/config/serial
./stblinux-2.6.12/include/config/usb/serial
hmmm....
Re: Question about building a driver for enigma2 #18
Re: Question about building a driver for enigma2 #19
Posted 17 October 2009 - 16:02
i can compile the belkin , pl2303 ... but this ark one is causing me issues...
i think its the include statements causing an issue... will play around a bit more... will try to compile it first in normal ubuntu kernel somehow...
alot of readings to do ...any tips ?
to be continued....
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users