home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / sun / admin / 9546 < prev    next >
Encoding:
Text File  |  1992-12-17  |  4.1 KB  |  122 lines

  1. Newsgroups: comp.sys.sun.admin
  2. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!slsvaat!egger
  3. From: egger@slsvaat.sel.de (Jochen Egger Fa. SSW US/ESS B.60/1/15 #3578)
  4. Subject: Re: modload limit on SunOS 4.1.3
  5. Message-ID: <1992Dec17.165638.12295@us-es.sel.de>
  6. Sender: news@us-es.sel.de
  7. Organization: SEL-Alcatel LTS Dept. US/ES
  8. X-Newsreader: Tin 1.1 PL3
  9. References: <Bz0DD4.6z3@metadigm.co.uk>
  10. Date: Thu, 17 Dec 92 16:56:38 GMT
  11. Lines: 109
  12.  
  13. alan@metadigm.co.uk (Alan McRae) writes:
  14. : Openwindows, Sun-PC, CoPoP (parallel port driver), ... use
  15. : modload to load kernel modules. I don't know if its the number
  16. : of modules or the total size but currently I appear to have a limit
  17. : of 3 modules after which no more can be loaded.
  18. : Can this be increased and how?
  19. : ---
  20. : Alan McRae                                     | Phone: +44 223 871577
  21. : Metadigm Ltd                                   | Fax:   +44 223 873032 (G3)
  22. : 33 West Green,Barrington,Cambridge,UK,CB2 5RZ  | Email: alan@metadigm.co.uk
  23. : "True wisdom must comprise some nonsense as a compromise..." -- Piet Hein
  24.  
  25. Hmm..., might be true, I thought 4 are possible, at least on 4.1.2. However
  26. in 4.1.2 and 4.1.3 there are only 3 or 4 unused driver slots in the standard
  27. kernel. But you can patch this very easily.
  28. We had a similar problem.
  29. We wanted to attach a SparcPrinter to a SS2 running ISDN software.
  30. The ISDN software uses to load 4 modules at runtime. The NewsPrint software
  31. wanted to load an additional module to run the SparcServer via the video
  32. interface.
  33.  
  34. To increase the number of supported modules, you have to change your
  35. /sys/sun4/conf.c (I hope you are using sun4) the following way:
  36.  
  37. At about line 1108 you will find 3 elements of an array of datastructures
  38. which reserve the space for the unused driver slots. Yank one of them in
  39. a buffer:
  40.   
  41. ------------ CUT --------------
  42.    {
  43.         vd_unuseddev,   vd_unuseddev,   vd_unuseddev,   vd_unuseddev,   /*59*/
  44.         vd_unuseddev,   vd_unuseddev,   vd_unuseddev,   0,
  45.         0,              0,
  46.     },
  47. ------------ CUT --------------
  48.  
  49. go down to the end of the array, almost until the end of the file (5 lines
  50. before). This should look as follows:
  51.  
  52. ------------ CUT --------------
  53.     {
  54.         nodev,          nodev,          nodev,          nodev,          /*104*/
  55.         nodev,          nodev,          nodev,          0,
  56.         lightpentab,          0,
  57.     },
  58. };
  59.  
  60. int     nchrdev = sizeof (cdevsw) / sizeof (cdevsw[0]);
  61.  
  62. int     mem_no = 3;     /* major device number of memory special file */
  63. int     dump_no = 41;   /* major device number of dump special file */
  64. ------------ CUT --------------
  65.  
  66. Paste the buffer as often to the end of the array, as may as free slots
  67. you need.
  68.  
  69.  
  70. If you add 3 more slots, it will look as follows:
  71.  
  72. ------------ CUT --------------
  73.     {
  74.         nodev,          nodev,          nodev,          nodev,          /*104*/
  75.         nodev,          nodev,          nodev,          0,
  76.         lightpentab,          0,
  77.     },
  78.     {
  79.         vd_unuseddev,   vd_unuseddev,   vd_unuseddev,   vd_unuseddev,   /*105*/
  80.         vd_unuseddev,   vd_unuseddev,   vd_unuseddev,   0,
  81.         0,              0,
  82.     },
  83.     {
  84.         vd_unuseddev,   vd_unuseddev,   vd_unuseddev,   vd_unuseddev,   /*106*/
  85.         vd_unuseddev,   vd_unuseddev,   vd_unuseddev,   0,
  86.         0,              0,
  87.     },
  88.     {
  89.         vd_unuseddev,   vd_unuseddev,   vd_unuseddev,   vd_unuseddev,   /*107*/
  90.         vd_unuseddev,   vd_unuseddev,   vd_unuseddev,   0,
  91.         0,              0,
  92.     },
  93. };
  94.  
  95. int     nchrdev = sizeof (cdevsw) / sizeof (cdevsw[0]);
  96.  
  97. int     mem_no = 3;     /* major device number of memory special file */
  98. int     dump_no = 41;   /* major device number of dump special file */
  99. ---------- CUT --------------
  100.  
  101. After the modification in the file, you have to recompile your kernel with
  102. your favourite configuration.
  103. This has worked fine for a SS2 running SunOS4.1.2.
  104.  
  105.  
  106. Have fun,
  107. --
  108. -----------------------------------------------------------------------------
  109. Jochen Egger              |
  110.                          < >              intentionally left blank
  111. egger@us-es.sel.de        |
  112. --------------------------+--------------------------------------------------
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.