name@portiaStanford.EDU (tony cooper) (06/11/90)
I am developing tape device drivers and I got sick of rebooting A/UX everytime I wanted to modify the driver. So I wrote a program to load drivers in without rebooting. You just reload it everytime you change it. In fact, you can load in as many versions of the driver as you want and number your device files to let you use whichever one you want, including one that you can load in /unix before rebooting. Now I have gotton into the habit of making minor changes and testing them straightaway instead of saving up modifications for a reboot. Pretty convenient. The run time loader works like I imagine autoconfig -k would if it were implemented. It autoconfigs a dummy kernel, takes out the driver, and stuffs it down /dev/kmem. The whole process takes 40 seconds on my machine. I've done it quite a few times and it has worked safely each time. One deficiency in the method I have used (this could probably be overcome if the loader was built into autoconfig) is that your driver must not have uninitialized external variables. Static uninitialized variables are OK - they go into the .bss area when the driver is compiled. But uninitialized external variables are put into the .bss area by the linker (/bin/ld) and they get put into a common area where my loader can't find them. So it's only in the executable that they are called .bss variables. It's no problem in practice; just make sure your external variables are initialized. Use nm(1) to check your driver to make sure. I won't be posting the driver anywhere since I don't think many people are into writing device drivers for A/UX. If you'd like to try it out, send me a note. It works perfectly for me; it is easily modified if you need it. I won't be doing any more work on it - it's up to Apple to write autoconfig -k. Now Miss Daisy doesn't have to boot up and walk to the shops. She can get there quickly anytime because now she has a run time driver. So I'm calling this driver Hoke. Cheers, Tony Cooper tony@popserver.stanford.edu