|
|
|
Re: Compiling an embedded driver | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
|
Paul, I am going to differ from the advice you've been given so far on this. While its all very accurate and helpful, it might be easier for your first foray into embedded Linux development to follow closely the path laid out pretty clearly by your board's manufacturer. There is a very detailed PDF at this URL from their web site : http://www.artila.com/manual/matrix520_QIG.pdf Reading this over and the board specs, the manufacturer has provided you instructions for building the kernel for the board (GNU tool chain provided on a CD-ROM shipped with the board), and how to add software utilities (a stripped down busybox kit I think). The next step of writing a device driver using the O'Reilly book is an adventure that you might want to undertake only after you have become very familiar with a) how to build the board's "vanilla" kernel b) understand the kernel build script c) have looked at the code for the board's drivers supplied on the CD-ROM d) built the code for the supplied drivers and the mechanics of loading them e) keep a seperate notebook of notes on the steps you take so you can follow it later None of this should look complicated or difficult, but given your lack of experience I'm recommending a more conservative approach than perhaps what others have posted. The set of drivers already provided in the source sent to you on the board's CD-ROM is your best bet for help with writing new drivers for that board. Look the code for these driver over and the kernel build script so you get a good idea of how to modify it. That way, when you're ready to build any custom written drivers (like your Hello World driver) you have a good idea of what needs to be changed. It appears from the board manufacture's web site that they operate a listserve and have a support e-mail address. Once you have yourself grounded in getting the vanilla kernel and drivers built, post a message there and find out if anyone else who has your board has written drivers for it and what they suggest you do. Prince On Thu, Mar 5, 2009 at 10:29 AM, Paul Thomas <pthomas8589@xxxxxxxxx> wrote: > On Thu, Mar 5, 2009 at 4:43 AM, Matthias Kaehlcke <matthias@xxxxxxxxxxxx> > wrote: > > El Thu, Mar 05, 2009 at 12:10:48PM +0100 Roger ha dit: > > > >> I am rather new to Linux and I am trying > >> to create a driver for my embedded > >> Artila Matrix-512 system. > >> As a start I want to compile the example > >> 'Hello' from the book 'Linux Device Drivers' > >> (O'Reilly). > >> My developing system is Linux Centos 5.2 and > >> I have installed the Matrix-512 source. > >> I have managed to compile and run the 'Hello' example > >> for Centos. > >> Could someone, please, give me some guidence here. > > > > as your target is an ARM processor you need a ARM cross-compilation > > toolchain. > > > > you can download such a toolchain from several places, a popular one > > is http://www.codesourcery.com/sgpp/lite/arm. you could also build one > > yourself using a framework like crosstool-ng > > (http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool), though this > > is an advanced option. > > have a look at http://elinux.org/Toolchains for a fairly complete list > > > > if there is already a linux system running on your target system i > > recommend you to start with the toolchain supplied by the board > > vendor. otherwise it is very likely that your binary will not execute > > on your target. > > > > if you can afford it i recommend you the purchase of one of the > > following books: > > > > Building Embedded Linux Systems (ISBN 978-0596529680) > > Embedded Linux Primer (ISBN 978-0131679849) > > > > the embedded linux wiki at http://elinux.org is also a good starting > > point > > > > happy hacking! > > > > -- > > Matthias Kaehlcke > > Embedded Linux Engineer > > Barcelona > > > > La guerra es un acto abominable en el que se matan personas que no > > se conocen, dirigidas por personas que se conocen y no se matan > > .''`. > > using free software / Debian GNU/Linux | http://debian.org : :' : > > `. `'` > > gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `- > > > > ------------------------------------------------------------------- > > List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm > > FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php > > Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php > > > > Roger, > > You've got good advise so far. I would just add a couple of things. > Really you want to be able to build the kernel for your board. This > isn't technically required as you could just get by with the headers, > but I think it will make a lot more sense if you start with building > the kernel, here are some simple steps for doing that with a > cross-compiler ( > http://opencircuits.com/Linuxstamp#Building_the_Linux_Kernel). > Then all of the tutorials for native compiling a kernel module can be > applied in the same way. > > thanks, > Paul > > ------------------------------------------------------------------- > List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm > FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php > Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php > ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
[Linux ARM] [Linux ARM MSM] [Linux ARM Kernel] [Fedora ARM] [IETF Annouce] [Security] [Bugtraq] [Linux] [Linux OMAP] [Linux MIPS] [ECOS] [Asterisk Internet PBX] [Linux API]
![]() |
![]() |