How to use newconfig patch

Last update: $Date: 1999/08/11 14:57:29 $

This patch is intended for testing only. The kernel with this patch can be compiled and booted in the 4.0-current or 3.1-RELEASE system, but has some limitations:

How to make newconfig kernel

  1. Have a working FreeBSD 4.0-current or FreeBSD 3.1-RELEASE system. We strongly suggest you to backup your data and also use of *latest* patch kit.
  2. Prepare source codes of FreeBSD 4.0-current at the time of 990410 00:00:00 JST. You can get them from CVS repository or ftp://daemon.jp.FreeBSD.org/pub/FreeBSD-jp/newconfig/base/sys4c990410.tar.gz.
  3. Extract source codes into /usr/src. You need /usr/src/sys and /usr/src/include as a minimum. Don't forget to make backups if you have any local changes. If you use sys4c990410.tar.gz,
        # cd /usr/src/
        # mv sys sys.ORG
        # mv include include.ORG
        # tar xzvf somewhere/sys4c990410.tar.gz
    
  4. Get the patch kit. You can find the patch at ftp://daemon.jp.FreeBSD.org/pub/FreeBSD-jp/newconfig/snapshot/. We strongly recommend use of *latest* patch kit.
  5. Apply the newconfig patch.
        # cd /usr/src
        # zcat somewhere/newconf_30_981225.diff.gz | patch -p1
    
    Check if the patch has been applied correctly.
        # find . -name '*.rej' -print
    
  6. Make config.new
        # cd /usr/src/usr.sbin/config.new
        # make
        # make install BINDIR=/usr/sbin
    
    Do not forget to rehash if you use csh and friends.
  7. Edit your kernel configuration file for config.new. Sample configuration files are:
          /usr/src/sys/i386/conf/NEWCONF    (for PC)
          /usr/src/sys/pc98/conf/NEWCONF98  (for NEC PC98)
    
    The syntax is different from that of conventional config, so please refer to the supplied samples. Note: You cannot use UserConfig with newconfig yet.
        # cd /usr/src/i386/conf
        # cp NEWCONF MYCONF
        # vi MYCONF
    
  8. Invoke config.new
        # config.new MYCONF
    
  9. Make kernel
        # cd ../../compile/MYCONF
        # make depend
        # make
    
  10. If you are using 3.1-RELEASE, install new /boot,
        # cd /usr/src/sys/boot
        # make
        # make install
    
    If the compiler complains about -Os in /usr/src/sys/boot/i386/boot2 directory. Try to change the `-Os' option to `-O'.
  11. Copy the kernel into root directory with another name and reboot. We recommend you do not do 'make install', as it is dangerous to have newconfig kernel as /kernel. For example:
        # cd /usr/src/sys/compile/MYCONF
        # cp kernel /kernel.newconf
    
When first time you boot with newconfig kernel, booting in single user mode is recommended. When you use SCSI system, you will get some messages like,
(probe14:ncr0:0:15:0): COMMAND FAILED (6 ff) @0xf085de00.
but they are because of hard coding and can be safely ignored.

[Powered by FreeBSD]

www@jp.FreeBSD.org
Copyright (C) 1998, 1999 The FreeBSD Project (Japan). All rights reserved.
$Date: 1999/08/11 14:57:29 $