LDT - Linux Driver Template

7 messages, 3 authors, 2012-09-26 · open the first message on its own page

LDT - Linux Driver Template

From: Constantine Shulyupin <hidden>
Date: 2012-09-26 11:03:50

Hi

I develop template of Linux driver. It can be used as sample for Linux
driver development beginners and starting point for development of new
drivers.

The driver uses following Linux facilities: module, platform driver,
file operations (read/write, mmap, ioctl, blocking and non-blocking
mode, polling), kfifo, completion, interrupt, tasklet, work, kthread,
timer, misc device, proc fs, UART 0x3f8, HW loopback, SW loopback

Readme and sources: https://github.com/makelinux/ldt/blob/master/README.md

To run driver with test script just run:
 git clone git://github.com/makelinux/ldt.git && cd ldt && ./ldt-test

You feedback, suggestions, discussions, recommendations patched will
be greatly appreciated!

Thanks

-- 
Constantine Shulyupin
http://www.MakeLinux.com/
Embedded Linux Systems,
Device Drivers, TI DaVinci

LDT - Linux Driver Template

From: Mulyadi Santosa <hidden>
Date: 2012-09-26 14:48:53

On Wed, Sep 26, 2012 at 6:03 PM, Constantine Shulyupin
[off-list ref] wrote:
Readme and sources: https://github.com/makelinux/ldt/blob/master/README.md

To run driver with test script just run:
 git clone git://github.com/makelinux/ldt.git && cd ldt && ./ldt-test

You feedback, suggestions, discussions, recommendations patched will
be greatly appreciated!
Hi,

I am the same person you probably see in LinkedIn :)

Anyway, I use kernel 3.2.0-31-generic (Linux Mint 13) and when I run
'sudo ldt-test', I got:
stty: /dev/ttyS0: Input/output error
dio.c:138 io_start FAIL errno = 5 "Input/output error" -1 = ret =
output(dev, inbuf, data_in_len)
No loopback on /dev/ttyS0 detected, running ldt driver with UART in
loopback mode
dio.c:138 io_start FAIL errno = 5 "Input/output error" -1 = ret =
output(dev, inbuf, data_in_len)

is it due to I have no serial port?

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

LDT - Linux Driver Template

From: Robert P. J. Day <hidden>
Date: 2012-09-26 15:04:29

On Wed, 26 Sep 2012, Mulyadi Santosa wrote:
On Wed, Sep 26, 2012 at 6:03 PM, Constantine Shulyupin
[off-list ref] wrote:
quoted
Readme and sources: https://github.com/makelinux/ldt/blob/master/README.md

To run driver with test script just run:
 git clone git://github.com/makelinux/ldt.git && cd ldt && ./ldt-test

You feedback, suggestions, discussions, recommendations patched will
be greatly appreciated!
Hi,

I am the same person you probably see in LinkedIn :)

Anyway, I use kernel 3.2.0-31-generic (Linux Mint 13) and when I run
'sudo ldt-test', I got:
stty: /dev/ttyS0: Input/output error
dio.c:138 io_start FAIL errno = 5 "Input/output error" -1 = ret =
output(dev, inbuf, data_in_len)
No loopback on /dev/ttyS0 detected, running ldt driver with UART in
loopback mode
dio.c:138 io_start FAIL errno = 5 "Input/output error" -1 = ret =
output(dev, inbuf, data_in_len)

is it due to I have no serial port?
  i get the same error on ubuntu 12.04, and it's pretty clearly
because my laptop has no actual serial port (something becoming more
and more common these days).  i think you have to modify your examples
to consider that possibility.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

LDT - Linux Driver Template

From: Constantine Shulyupin <hidden>
Date: 2012-09-26 15:05:55

Yes, it is because you have no serial port. In this case LDT emulates loopback.

On Wed, Sep 26, 2012 at 4:48 PM, Mulyadi Santosa
[off-list ref] wrote:
On Wed, Sep 26, 2012 at 6:03 PM, Constantine Shulyupin
[off-list ref] wrote:
quoted
Readme and sources: https://github.com/makelinux/ldt/blob/master/README.md

To run driver with test script just run:
 git clone git://github.com/makelinux/ldt.git && cd ldt && ./ldt-test

You feedback, suggestions, discussions, recommendations patched will
be greatly appreciated!
Hi,

I am the same person you probably see in LinkedIn :)

Anyway, I use kernel 3.2.0-31-generic (Linux Mint 13) and when I run
'sudo ldt-test', I got:
stty: /dev/ttyS0: Input/output error
dio.c:138 io_start FAIL errno = 5 "Input/output error" -1 = ret =
output(dev, inbuf, data_in_len)
No loopback on /dev/ttyS0 detected, running ldt driver with UART in
loopback mode
dio.c:138 io_start FAIL errno = 5 "Input/output error" -1 = ret =
output(dev, inbuf, data_in_len)

is it due to I have no serial port?

--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com


-- 
Constantine Shulyupin
http://www.MakeLinux.com/
Embedded Linux Systems,
Device Drivers, TI DaVinci

LDT - Linux Driver Template

From: Constantine Shulyupin <hidden>
Date: 2012-09-26 15:21:38

I've made test script less noise. Please update sources. The driver
and the the test works with UART too.

On Wed, Sep 26, 2012 at 5:04 PM, Robert P. J. Day [off-list ref] wrote:
On Wed, 26 Sep 2012, Mulyadi Santosa wrote:
quoted
On Wed, Sep 26, 2012 at 6:03 PM, Constantine Shulyupin
[off-list ref] wrote:
quoted
Readme and sources: https://github.com/makelinux/ldt/blob/master/README.md

To run driver with test script just run:
 git clone git://github.com/makelinux/ldt.git && cd ldt && ./ldt-test

You feedback, suggestions, discussions, recommendations patched will
be greatly appreciated!
Hi,

I am the same person you probably see in LinkedIn :)

Anyway, I use kernel 3.2.0-31-generic (Linux Mint 13) and when I run
'sudo ldt-test', I got:
stty: /dev/ttyS0: Input/output error
dio.c:138 io_start FAIL errno = 5 "Input/output error" -1 = ret =
output(dev, inbuf, data_in_len)
No loopback on /dev/ttyS0 detected, running ldt driver with UART in
loopback mode
dio.c:138 io_start FAIL errno = 5 "Input/output error" -1 = ret =
output(dev, inbuf, data_in_len)

is it due to I have no serial port?
  i get the same error on ubuntu 12.04, and it's pretty clearly
because my laptop has no actual serial port (something becoming more
and more common these days).  i think you have to modify your examples
to consider that possibility.

rday

--

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


-- 
Constantine Shulyupin
http://www.MakeLinux.com/
Embedded Linux Systems,
Device Drivers, TI DaVinci

LDT - Linux Driver Template

From: Mulyadi Santosa <hidden>
Date: 2012-09-26 15:28:03

On Wed, Sep 26, 2012 at 10:21 PM, Constantine Shulyupin
[off-list ref] wrote:
I've made test script less noise. Please update sources. The driver
and the the test works with UART too.
Hi...

yup, less noise:
sudo ./ldt-test

stty: /dev/ttyS0: Input/output error
No loopback on /dev/ttyS0 detected, running ldt driver with UART in
loopback mode
LDT nonblocking read/write test passed
LDT blocking read/write test passed
LDT mmap test passed
LDT ioctl test passed
trace_stat.log saved
ftrace.log saved
kernel.log saved

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

LDT - Linux Driver Template

From: Robert P. J. Day <hidden>
Date: 2012-09-26 15:46:15

  you might extend the "clean:" target to *really* clean the generated
artifacts in that directory.  or perhaps introduce "distclean:".

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help