How to associate a driver with a new device? - Minix

This is a discussion on How to associate a driver with a new device? - Minix ; I am having a problem in associating a driver with a new device, let me explain. First, I create a new device with mknod, named /dev/lpx. It has to be like the /dev/lp device, the parallel port. So, I want ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: How to associate a driver with a new device?

  1. How to associate a driver with a new device?

    I am having a problem in associating a driver with a new device, let
    me explain. First, I create a new device with mknod, named /dev/lpx.
    It has to be like the /dev/lp device, the parallel port. So, I want to
    associate the /dev/lp driver (\src\drivers\printer\printer.c) with my
    new devide (/dev/lpx).

    I found that for create a new device, I have to create a new entry in
    the devices table (\src\servers\fs\dmap.c). But I donīt know what to
    put in the #driver column of that table, to associate my new device
    with the parallel port driver (\src\drivers\printer\printer.c). Note
    that /dev/lp and my device (/dev/lpx) have different major numbers.

    Thanks!


  2. Re: How to associate a driver with a new device?

    I found a solution on this pdf (http://www.cs.vu.nl/~lmbronwa/es1371/
    bachelorES1371.pdf) in this blog (http://www.minixtips.com/2006/06/
    device-driver-development.html).

    To associate your device with a binary driver, all you have to do is
    use this command:
    service up /usr/sbin/driver_executable -dev /dev/audio.

    This command use the servive interface to call a functionality
    provided by the reincarnation server. The reincarnation server (RS)
    starts (and if necessary) restars device drivers that were not loaded
    to the memory at the boot time. So, if you wanna associate a driver
    with your device, all you have to is add a new entry in the device
    table (/usr/src/servers/fs/dmap.c) and after that associate your
    driver with your new device through the service up command.


  3. Re: How to associate a driver with a new device?

    There is just one error in the text above, all you have to do to
    associate a driver with a device is use service up command. There is
    no need to create a new entry in the devices table before use service
    up command. I think service up already do that job.


+ Reply to Thread