Author Topic: Linux embeded systems  (Read 3047 times)

0 Members and 1 Guest are viewing this topic.

Offline JaneTopic starter

  • Frequent Contributor
  • **
  • Posts: 409
Linux embeded systems
« on: November 13, 2012, 07:41:02 am »
Where can I get some info   about  porting Linux to embedded systems?
E.g. I designed  a device and would like to use it with Linux.
I expect I must write few drivers so that they will communicate with my hardware( device)  but what parameters the drivers should export?
And what kind of drivers I should write and are there any strict procedures for writing?
Thanks
 

Offline JuKu

  • Frequent Contributor
  • **
  • Posts: 566
  • Country: fi
    • LitePlacer - The Low Cost DIY Pick and Place Machine
http://www.liteplacer.com - The Low Cost DIY Pick and Place Machine
 

Offline Gall

  • Frequent Contributor
  • **
  • Posts: 310
  • Country: ru
Re: Linux embeded systems
« Reply #2 on: November 13, 2012, 12:06:48 pm »
The main site is http://elinux.org

If you want something special and thus are building everything from sources by hand, look at http://www.linuxfromscratch.org/

Usually there's no need to make a kernel-side hardware driver. The kernel is able to give direct access to raw hardware in many cases.

A kernel hardware module is rather simple. Usually it should provide read(), write() and ioctl() handlers for a device file. You may want to have direct access to the device's address space, use mmap() to do that.

A good example is nwbutton.c found in drivers/char subdir of Linux kernel. It is short and simple.
The difficult we do today; the impossible takes a little longer.
 

Offline poptones

  • Frequent Contributor
  • **
  • Posts: 709
  • Country: 00
Re: Linux embeded systems
« Reply #3 on: November 13, 2012, 04:08:16 pm »
I find it's often easy to use an arduino with usb built in, or a usb to serial adapter, and just pipe comms through the serial port. Easy.
 

Offline Gall

  • Frequent Contributor
  • **
  • Posts: 310
  • Country: ru
Re: Linux embeded systems
« Reply #4 on: November 13, 2012, 08:10:00 pm »
I find it's often easy to use an arduino with usb built in, or a usb to serial adapter, and just pipe comms through the serial port. Easy.
FT2232 in bit-bang mode is even easier. Direct usage of built-in GPIO too. No drivers needed.

The cases when dedicated driver is needed are:
1. A FPGA or something is hooked directly to the system bus.
2. GPIO is used in hard-realtime mode so that FIQ handler is needed.
3. GPIOs are used in some non-standard manner (i.e. to output audio).
4. A device like i2c touchscreen is used and there is no driver yet. In this case it is wise to submit the driver into Linux mainstream.
The difficult we do today; the impossible takes a little longer.
 

Offline xygor

  • Regular Contributor
  • *
  • Posts: 227
  • Country: us
Re: Linux embeded systems
« Reply #5 on: November 13, 2012, 09:13:24 pm »
I can vouch for
http://lwn.net/Kernel/LDD3/
it's *really* good.  I used it to write a network driver for a modified opencores ethernet MAC.

Also came across this
http://xillybus.com/
I was interested on getting Linux running on microblaze and didn't try the xillybus device, but it solves interfacing fpga hardware to Linux and might be useful as example code for learning.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->