how to run bash script for device driver - Linux

This is a discussion on how to run bash script for device driver - Linux ; 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 ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: how to run bash script for device driver

  1. 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


  2. Re: how to run bash script for device driver


    Dharmendra wrote:
    can u post that here.
    > 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



  3. 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]#


    > 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



  4. Re: how to run bash script for device driver


    Dharmendra wrote:

    > 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.


    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]#

    > 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.

    shell scripting is not much needed.
    Linux kernel and module writing technique , google for it .. is must.
    >
    >
    > please do reply
    > thanks in advance
    >
    > dharmendra
    > 09898455770



  5. Re: 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?


    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))

    >
    > one more thing, what knowledge apart form C is required for development
    > device driver.


    IMHO one should first read
    http://dirac.org/linux/writing/lkmpg...mpg-2.4.0.html for 2.4 or
    http://dirac.org/linux/writing/lkmpg...mpg-2.6.0.html 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.

+ Reply to Thread