From owner-freebsd-hackers Wed Apr 16 10:03:51 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id KAA08093 for hackers-outgoing; Wed, 16 Apr 1997 10:03:51 -0700 (PDT) Received: from cold.org (cold.org [206.81.134.103]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id KAA08083 for ; Wed, 16 Apr 1997 10:03:46 -0700 (PDT) Received: from localhost (brandon@localhost) by cold.org (8.8.5/8.8.3) with SMTP id LAA02647 for ; Wed, 16 Apr 1997 11:03:45 -0600 (MDT) Date: Wed, 16 Apr 1997 11:03:44 -0600 (MDT) From: Brandon Gillespie To: freebsd-hackers@FreeBSD.ORG Subject: kernel config 'doconfig' (was: Re: Another Linux Religious war) In-Reply-To: <335293EF.535B@fps.biblos.unal.edu.co> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Mon, 14 Apr 1997, Pedro Giffuni wrote: > I do have (I hope) some constructive suggestions, after having a crack > on a Linux box: > 1) I like our way of rebuilding the kernel, but perhaps "we" (actually a > good programmer, not me) could add a program or script that would ask > the options for the desired kernel and will help build the configuration > file. Nothing really fancy is required, maybe even a PERL script should > be enough. Actually, I agree. In digital unix 4.0 kernel rebuilds are nearly exactly the same as FreeBSD (the idea has the same roots), except for they wrap everything up in a command 'doconfig' which pops you into an editor for your kernel config file, when you are done editing it it just says 'building kernel now' and every five minutes or so it says: Working .. And when its done you just move the built kernel to / and reboot. If there are errors it tells you, and points to the logfile for them. It also lets you edit the config file seperately, and you can give it to it. Basically, putting this into the FreeBSD scope it'd be really cool to just have a 'doconfig' program which did the same. I can whip up something in perl, if there is interest. Some of the man page for doconfig (more comments after the manpage): ---------------------------- SYNOPSIS /usr/sbin/doconfig [-s | -b] [-c config_file -dn] [ -e ed_script] FLAGS The /usr/sbin/doconfig program supports the following flags: -b Specifies that you want to build a bootstrap linked kernel. A bootstrap linked kernel is built directly into memory, without writing an executable file to disk. To create the kernel, the bootstrap program reads a text file that describes the hardware and software support needed in the kernel. See the Writing Dev- ice Drivers: Advanced Topics manual for more information. You cannot use this flag with the -s flag, which builds an exe- cutable image file called /vmunix. The -b flag has no effect if specified with the -d flag. -c config_file Specifies that you want to build a kernel using the existing con- figuration file, config_file. The configuration file resides in the /usr/sys/conf directory and is usually named using the system name, in uppercase letters. You must supply the name of the existing configuration file without specifying the pathname. The /usr/sbin/doconfig program also uses any existing config- file.list file. If there is no config_file.list file and a .product.list file exists, /usr/sbin/doconfig copies the .product.list file to the config_file.list file. These files must exist in the /sys/conf directory. -d Specifies that only device special files are created. -e ed-script Specifies that you want to run the specified ed editor script on the configuration file before a new kernel is built. -n Builds a network-bootable kernel for Dataless Management Services (DMS) clients. The -n flag invokes the pmerge utility, which builds a stripped network-bootable kernel called .vmunix. This flag is used by the dataless management utility, dmu during its configuration phase. For more information, see dmu(8) and pmerge(8). -s Specifies that you want to build a statically linked kernel. A statically linked kernel is a traditional kernel, built and stored in an executable image file called /vmunix. This flag is the default if you omit the -b and -s flags. You cannot use this flag with the -b flag, which builds a bootstrap linked kernel, or the -d flag. This flag has no effect when specified with the -n flag. ---------------------------- For FreeBSD I'd suggest the -c and -e option, and possibly -d (altho I don't know how relevant to FreeBSD it is). Altho, I think -e should be default on if you don't specify -cFILE. I'd also like to add '-i' and '-r' where '-i' automatically installs the kernel in '/' and '-r' will automatically reboot (after its done, prompt you saying 'kernel rebuild is completed, press any key to reboot). Comments? -Brandon Gillespie