how to run bash script for device driver
Hi all,
i am new to device driver development. i am reading device driver book
downloaded for orelly site.
the version of the kernel is 2.4.X. in chapter number - 3 character
device, they have given some bash script to create scull = Simple
Character Utility for Loading Localities,
i dont know how to run this scripts.
can any body help me how do i get through this scrip?
one more thing, what knowledge apart form C is required for development
device driver.
please do reply
thanks in advance
dharmendra
09898455770
Re: how to run bash script for device driver
Dharmendra wrote:
can u post that here.[color=blue]
> Hi all,
>
> i am new to device driver development. i am reading device driver book
> downloaded for orelly site.
> the version of the kernel is 2.4.X. in chapter number - 3 character
> device, they have given some bash script to create scull = Simple
> Character Utility for Loading Localities,
>
> i dont know how to run this scripts.
> can any body help me how do i get through this scrip?
>
> one more thing, what knowledge apart form C is required for development
> device driver.
>
>
> please do reply
> thanks in advance
>
> dharmendra
> 09898455770[/color]
Re: how to run bash script for device driver
Dharmendra wrote:
access.c main.c Makefile pipe.c scull.h scull.init scull_load
scull_unload tags
[root@shadowfox scull]# ./scull.init
Usage: ./scull.init {start|stop|restart|force-reload}
[root@shadowfox scull]#
[color=blue]
> Hi all,
>
> i am new to device driver development. i am reading device driver book
> downloaded for orelly site.
> the version of the kernel is 2.4.X. in chapter number - 3 character
> device, they have given some bash script to create scull = Simple
> Character Utility for Loading Localities,
>
> i dont know how to run this scripts.
> can any body help me how do i get through this scrip?
>
> one more thing, what knowledge apart form C is required for development
> device driver.
>
>
> please do reply
> thanks in advance
>
> dharmendra
> 09898455770[/color]
Re: how to run bash script for device driver
Dharmendra wrote:
[color=blue]
> Hi all,
>
> i am new to device driver development. i am reading device driver book
> downloaded for orelly site.
> the version of the kernel is 2.4.X. in chapter number - 3 character
> device, they have given some bash script to create scull = Simple
> Character Utility for Loading Localities,
>
> i dont know how to run this scripts.[/color]
access.c main.c Makefile pipe.c scull.h scull.init scull_load
scull_unload tags
[root@shadowfox scull]# ./scull.init
Usage: ./scull.init {start|stop|restart|force-reload}
[root@shadowfox scull]#
[color=blue]
> can any body help me how do i get through this scrip?
>
> one more thing, what knowledge apart form C is required for development
> device driver.[/color]
shell scripting is not much needed.
Linux kernel and module writing technique , google for it .. is must.[color=blue]
>
>
> please do reply
> thanks in advance
>
> dharmendra
> 09898455770[/color]
Re: how to run bash script for device driver
> Hi all,[color=blue]
>
> i am new to device driver development. i am reading device driver book
> downloaded for orelly site.
> the version of the kernel is 2.4.X. in chapter number - 3 character
> device, they have given some bash script to create scull = Simple
> Character Utility for Loading Localities,
>
> i dont know how to run this scripts.
> can any body help me how do i get through this scrip?[/color]
1. write it
2. do a "chmod +x scriptname.sh"
3. to run it (being in its folder) just type ./scriptname.sh
I hope you understand what this script is for. It get's your devices
major number from /proc/devices and creates the device file(/node) in
/dev/ with mknod /dev/devname c majornumber minornumber(any)
So you write your module, "insmod" it and run this script.
(If you start, you maybe want to do this manually (increasing the
learning factor))
[color=blue]
>
> one more thing, what knowledge apart form C is required for development
> device driver.[/color]
IMHO one should first read
[url]http://dirac.org/linux/writing/lkmpg/2.4/lkmpg-2.4.0.html[/url] for 2.4 or
[url]http://dirac.org/linux/writing/lkmpg/2.6/lkmpg-2.6.0.html[/url] for 2.6
as most of the code written in the first chapters of the book you are
using is not compiling at all, which can be really disappointing.
A lot of people that started with it also stopped with it...
The links I gave you above introduce you into kernel-module-writing with
good, working code which helps you understand the mess in O'Reillys book,
but if you are fine with the code in O'Reillys book, forget what I said.