42 lines
1.5 KiB
Plaintext
42 lines
1.5 KiB
Plaintext
|
|
Modified tserialio.o, sample deck control driver, and sample user-mode app
|
|
which uses both.
|
|
|
|
See the file "mgate*" in this package for the terms and details of the
|
|
SGI/Mountaingate agreement, as well as the version number of this
|
|
package.
|
|
|
|
To use this,
|
|
|
|
1. save your old /var/sysgen/boot/tserialio.o somewhere
|
|
|
|
2. copy the tserialio.o in this package to /var/sysgen/boot and
|
|
reboot, so that your kernel is rebuilt. you can even do
|
|
unsetenv ROOT
|
|
unsetenv TOOLROOT
|
|
autoconfig -fv
|
|
init 6
|
|
if you want to see the rebuild happen yourself.
|
|
|
|
3. do 'make' to bulid the driver, driver.c->driver.pre.o->driver.o,
|
|
and to build the user-mode test program user.c->user. I stole the
|
|
command line arguments for driver.c from an internal SGI Makefile. I
|
|
recommend that you instead follow whatever guidelines our kernel
|
|
developer documentation gives you for the cc and ld flags for a
|
|
loadable driver.
|
|
|
|
4. as root, do 'make nodes' to create two device nodes. I have chosen
|
|
a major number 271 at random because it was unused (see
|
|
/usr/include/sys/major.h). This should do for you for your O2 demo.
|
|
the Makefile puts the nodes in the current directory for convenience.
|
|
|
|
5. as root, do 'make load' to load the driver.
|
|
|
|
6. run 'user'. you should see foo increment about 1000 times per
|
|
second, and you should see 'bar' go up to 3 and stay there. any
|
|
characters that arrive at serial port 2 should be echoed out within
|
|
2ms.
|
|
|
|
7. modify the driver as desired, doing 'make unload' and then
|
|
'make load' to re-load it when you modify it.
|