ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] Request to explain how the platform specific drivers can be l


From: Charles Krinke
Subject: Re: [Ltib] Request to explain how the platform specific drivers can be loaded into the rootfs
Date: Fri, 13 Aug 2010 13:14:19 -0700

Dear Malay:

There is a book whose name is "Linux Device Drivers" written by Alessandro Rubini which many of us use as our reference for writing device drivers. It is available at amazon.com and I believe the author has also made it available online on his web site.

In order to create a device driver in Linux, it helps greatly to read this book.

Charles

On Fri, Aug 13, 2010 at 12:12 PM, Kevin Wells <address@hidden> wrote:
Hi Malay,

> > My doubt is that i want to write a simple device driver (say blinking
> > LED on my PHYTEC3250 board). Since it is a platform specific driver, i
> > want to know how can i make my driver module available after booting the
> > board with Linux image using LTIB, so that i can use insmod on terminal
> > "PHY3250>" and use it.  Also how a char device driver node can be created.
> > I hope this understand my difficulty.

It sounds like you have a fun day planned. I have an LED driver and user space control app that can be used to blink an LED on the Phytec board. This should be installable as a module, but you'll have to figure out how to build and install them. They should compile and work just fine. Maybe this will be useful.

Sorry about using attachments.

thanks,
Kevin

> -----Original Message-----
> From: ltib-bounces+kevin.wells=nxp.com@nongnu.org [mailto:ltib-
> bounces+kevin.wells=nxp.com@nongnu.org] On Behalf Of Stuart Hughes
> Sent: Friday, August 13, 2010 10:29 AM
> To: malay jajodia
> Cc: address@hidden
> Subject: Re: [Ltib] Request to explain how the platform specific drivers can
> be loaded into the rootfs
>
> Hi Malay,
>
> Please keep messages on the list.
>
> Use the example hello_mod as a template to write your driver.  This will
> end up on your target image and you'll be able to insmod it.  Before you
> change it, try it out as a pure "hello world" to get familiar.  There is
> a README in the source for this (rpm/BUILD/hello_mod-1.2/README) that
> should help.
>
> To create a device node, just use mknod, or you can alternatively add
> and entry to bin/device_table.txt and when you re-build the device node
> will be on the target.  Note this is only true for static device nodes.
>
> Regards, Stuart
>
>
> malay jajodia wrote:
> > Hi Stuart,
> >
> > Thanks a lot for your quick reply.
> >
> > My doubt is that i want to write a simple device driver (say blinking
> > LED on my PHYTEC3250 board). Since it is a platform specific driver, i
> > want to know how can i make my driver module available after booting the
> > board with Linux image using LTIB, so that i can use insmod on terminal
> > "PHY3250>" and use it.  Also how a char device driver node can be created.
> > I hope this understand my difficulty.
> >
> > On Thu, Aug 12, 2010 at 11:57 AM, Stuart Hughes <address@hidden
> > <mailto:address@hidden>> wrote:
> >
> >     Hi Malay,
> >
> >     Not sure what the real question is here, but there are example kernel
> >     module and userspace examples.
> >
> >     For userspace try this:
> >
> >     ##### unpack the code to rpm/BUILD/helloworld-1.1
> >     $ ./ltib -p helloworld -m prep
> >
> >     ##### build and install it (to test)
> >     $ ./ltib -p helloworld
> >
> >     ##### edit the source, make it do what you want
> >
> >     ##### re-build and install (repeat this and last step until done)
> >     $ ./ltib -p helloworld
> >
> >
> >     Similar idea for the kernel module:
> >     $ ./ltib -p hello_mod -m prep
> >     $ ./ltib -p hello_mod
> >
> >     Regards, Stuart
> >
> >
> >     malay1 jajodia wrote:
> >     > Hi,
> >     >
> >     > I have started using LTIB for my PHY3250 board and have a question
> >     that
> >     > has probably been answered many times but still gives me some
> >     doubts. If
> >     > possible please let me know the steps required to load a platform
> >     > specific driver into rootfs. Also i need to make an application
> >     program
> >     > to test with my driver. I have read many related documents but still i
> >     > am confused on how i can achieve both tasks, so please elaborate
> >     it with
> >     > your reply.
> >     >
> >     > Thanks a lot in advance.
> >     >
> >     > --
> >     > Malay Jajodia
> >     > Email: address@hidden <mailto:address@hidden>
> >     <mailto:address@hidden <mailto:address@hidden>>
> >
> >
> >
> >
> > --
> > Malay Jajodia
> > Contact No: 618-303-4805
> > Email: address@hidden <mailto:address@hidden>
>
> _______________________________________________
> LTIB home page: http://ltib.org
>
> Ltib mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/ltib

_______________________________________________
LTIB home page: http://ltib.org

Ltib mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/ltib



reply via email to

[Prev in Thread] Current Thread [Next in Thread]