home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / bsd / 11796 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  2.9 KB

  1. Path: sparky!uunet!walter!att-out!pacbell.com!ames!sun-barr!cs.utexas.edu!natinst.com!hrd769.brooks.af.mil!hrd769.brooks.af.mil!not-for-mail
  2. From: burgess@hrd769.brooks.af.mil (Dave Burgess)
  3. Newsgroups: comp.unix.bsd
  4. Subject: [386bsd] Kernel builder
  5. Date: 22 Jan 1993 11:34:25 -0600
  6. Organization: Armstrong Lab MIS, Brooks AFB TX
  7. Lines: 92
  8. Message-ID: <1jpb71INNa3v@hrd769.brooks.af.mil>
  9. NNTP-Posting-Host: hrd769.brooks.af.mil
  10.  
  11.   After going through the 'Idiot's Guide to Rebuilding your kernel' (his name
  12. not mine), I decided that the process was reasonably well defined and could
  13. stand to be put into a simple script.  I have done that.  It is included
  14. below, and makes a new kernel using the existing software, Makefiles, etc.
  15. The program defaults to GENERICISA as the configuration file to edit, or 
  16. will accept an environment variable called CONFIG_NAME which should contain
  17. the name of your configuration file, or will accept an argument which will
  18. override the CONFIG_NAME variable.  I started using this when I was building
  19. a new kernel for a friend of mine that needed to have different options
  20. enabled than I needed.  also, since I am one of those folks that keeps a
  21. bunch of weird kernels around, I decided that the last step should be
  22. manual.  Check it out.  E-Mail me with improvements or questions.
  23.  
  24. TSgt Dave Burgess
  25. NCOIC AL/MIS
  26. Brooks AFB, TX
  27. ----------------------------- Cut Here -----------------------------------
  28. # This is a shell archive.  Save it in a file, remove anything before
  29. # this line, and then unpack it by entering "sh file".  Note, it may
  30. # create directories; files and directories will be owned by you and
  31. # have default permissions.
  32. #
  33. # This archive contains:
  34. #
  35. #    /usr/local/bin/build.kernel
  36. #
  37. echo x - /usr/local/bin/build.kernel
  38. sed 's/^X//' >/usr/local/bin/build.kernel << 'END-of-/usr/local/bin/build.kernel'
  39. X:
  40. X#
  41. X#  Script to rebuild the kernel.
  42. X#
  43. Xif [ `whoami` != 'root' ] ; then
  44. X  echo 'You must be root to proceed from this point'
  45. X  exit 1
  46. Xfi
  47. X
  48. X#
  49. X# Rebuild Config
  50. X#
  51. X
  52. Xcd /usr/src/usr.sbin/config
  53. Xmake depend
  54. Xmake
  55. Xmake install
  56. X
  57. X#
  58. X# Modify the local Configuration File
  59. X#
  60. X
  61. Xif [ "X$CONFIG_NAME" = "X" ]; then
  62. X  CONFIG_NAME=GENERICISA
  63. Xfi  
  64. X
  65. Xif [ "X$1" != "X" ]; then
  66. X  CONFIG_NAME=$1
  67. Xfi
  68. Xcd /sys/i386/conf
  69. X
  70. Xif [ ! -f $CONFIG_NAME ]; then
  71. X  cp GENERICISA $CONFIG_NAME
  72. Xfi
  73. X
  74. Xecho `tput clr`
  75. Xecho "Modifying $CONFIG_NAME config file"
  76. Xecho -n "Press return to continue"
  77. Xread ans
  78. X
  79. Xvi $CONFIG_NAME
  80. X
  81. Xconfig $CONFIG_NAME
  82. X
  83. Xcd /sys/compile/$CONFIG_NAME
  84. Xmake newvers
  85. Xmake depend
  86. Xmake
  87. X
  88. Xecho `tput clr`
  89. Xecho ""
  90. Xecho "  Manual Installation is recommended.  The following files should be"
  91. Xecho "copied/linked/moved to the root directory.  The following steps are"
  92. Xecho "suggested:"
  93. Xecho ""
  94. Xecho "    mv /386bsd /386bsd.old"
  95. Xecho "    mv  386bsd /386bsd"
  96. Xecho "    reboot"
  97. Xecho ""
  98. Xecho "Remember that the new kernel changes will not take place until you "
  99. Xecho "re-boot the system."
  100. END-of-/usr/local/bin/build.kernel
  101. exit
  102.  
  103.