This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
developersguide:driverprogramming [2015/10/26 12:41] dcvmoole [Getting Started] make even clearer that the page may be out of sync |
developersguide:driverprogramming [2016/02/04 14:33] lionelsambuc parenthesis vs curly braces, again |
||
---|---|---|---|
Line 30: | Line 30: | ||
PROG= hello | PROG= hello | ||
SRCS= hello.c | SRCS= hello.c | ||
+ | |||
+ | FILES=${PROG}.conf | ||
+ | FILESNAME=${PROG} | ||
+ | FILESDIR= /etc/system.conf.d | ||
DPADD+= ${LIBCHARDRIVER} ${LIBSYS} | DPADD+= ${LIBCHARDRIVER} ${LIBSYS} | ||
Line 62: | Line 66: | ||
# make install | # make install | ||
</code> | </code> | ||
- | If you did not receive any errors, it is time to try and run the device driver. Before we do that, we must modify the ///etc/system.conf// file. It contains a list of all system services (servers and drivers) and their permissions. Each device driver typically only needs to access one real hardware device, and uses a few functions provided by Minix. To give our simple hello try-out driver enough permissions to experiment with, append the following to ///etc/system.conf//: | + | If you did not receive any errors, it is time to try and run the device driver. Before we do that, we must create the //hello.conf// file. It contains the permissions for the service. Each device driver typically only needs to access one real hardware device, and uses a few functions provided by Minix. To give our simple hello try-out driver enough permissions to experiment with, create //hello.conf// with: |
- | ///etc/system.conf//: | + | //hello.conf//: |
<code> | <code> | ||
Line 575: | Line 579: | ||
SRCS= time.c | SRCS= time.c | ||
- | FILES=$(PROG).conf | + | FILES=${PROG}.conf |
- | FILESNAME=$(PROG) | + | FILESNAME=${PROG} |
FILESDIR=/etc/system.conf.d | FILESDIR=/etc/system.conf.d | ||
DPADD+= ${LIBCHARDRIVER} ${LIBSYS} | DPADD+= ${LIBCHARDRIVER} ${LIBSYS} | ||
LDADD+= -lchardriver -lsys | LDADD+= -lchardriver -lsys | ||
- | |||
- | |||
.include <minix.service.mk> | .include <minix.service.mk> | ||
</code> | </code> | ||
- | Now we need to give the new time device driver access to the CMOS ports 0x70 and 0x71 using the time.conf file mentioned in the Makefile. Putting it in /etc/system.d/ lets service read it. This is the contents: | + | Now we need to give the new time device driver access to the CMOS ports 0x70 and 0x71 using the //time.conf// file mentioned in the Makefile. Putting it in /etc/system.d/ lets service read it. This is the contents: |
<code> | <code> |