Multiple changes stacked as one commit since they all depend on one another.
First, change sysinstall and the Makefile rules to not build the kernel nlist directly into sysinstall now. Instead, spit it out as an ascii file in /stand and parse it from sysinstall later. This solves the chicken-n- egg problem of building sysinstall into the fsimage before BOOTMFS is built and can have its symbols extracted. Now we generate the symbol file in release.8. Second, add Poul-Henning's USERCONFIG_BOOT changes. These have two effects: 1. Userconfig is always entered, rather than only after a -c (don't scream yet, it's not as bad as it sounds). 2. Userconfig reads a message string which can optionally be written just past the boot blocks. This string "preloads" the userconfig input buffer and is parsed as user input. If the first command is not "USERCONFIG", userconfig will treat this as an implied "quit" (which is why you don't need to scream - you never even know you went through userconfig and back out again if you don't specifically ask for it), otherwise it will read and execute the following commands until a "quit" is seen or the end is reached, in which case the normal userconfig command prompt will then be presented. How to create your own startup sequences, using any boot.flp image from the next snap forward (not yet, but soon): % dd of=/dev/rfd0 seek=1 bs=512 count=1 conv=sync <<WAKKA_WAKKA_DOO USERCONFIG irq ed0 10 iomem ed0 0xcc000 disable ed1 quit WAKKA_WAKKA_DOO Third, add an intro screen to UserConfig so that users aren't just thrown into this strange screen if userconfig is auto-launched. The default boot.flp startup sequence is now, in fact, this: USERCONFIG intro visual (Since visual never returns, we don't need a following "quit"). Submitted-By: phk & jkh
This commit is contained in:
parent
89c99ff0c6
commit
92667e3313
@ -1,4 +1,4 @@
|
||||
# $Id: Makefile,v 1.241 1996/10/05 06:10:58 jkh Exp $
|
||||
# $Id: Makefile,v 1.242 1996/10/05 07:46:54 jkh Exp $
|
||||
#
|
||||
# How to roll a release:
|
||||
#
|
||||
@ -200,8 +200,7 @@ release.3:
|
||||
# You are not supposed to like this :-)
|
||||
release.4:
|
||||
@cd ${.CURDIR} && $(MAKE) ckRELEASEDIR
|
||||
cd ${.CURDIR}/sysinstall && make depend all \
|
||||
KERNEL_NAME=${RD}/kernels/BOOTMFS.std
|
||||
cd ${.CURDIR}/sysinstall && make depend all
|
||||
rm -rf ${RD}/crunch
|
||||
mkdir -p ${RD}/crunch
|
||||
for j in ${WHICH_CRUNCH} ; do \
|
||||
@ -357,7 +356,7 @@ release.7:
|
||||
# +-----------------------------------------+
|
||||
#
|
||||
|
||||
release.8: write_mfs_in_kernel
|
||||
release.8: write_mfs_in_kernel dumpnlist
|
||||
@cd ${.CURDIR} && $(MAKE) ckRELEASEDIR
|
||||
rm -rf ${RD}/mfsfd
|
||||
mkdir ${RD}/mfsfd
|
||||
@ -378,6 +377,7 @@ release.8: write_mfs_in_kernel
|
||||
echo "domain 53/udp nameserver" >> ${RD}/mfsfd/stand/etc/services
|
||||
gzip -c ${.CURDIR}/../COPYRIGHT > ${RD}/mfsfd/stand/help/COPYRIGHT.hlp.gz
|
||||
-test -f ${.CURDIR}/install.cfg && cp ${.CURDIR}/install.cfg ${RD}/mfsfd
|
||||
./dumpnlist ${RD}/kernels/BOOTMFS.std > ${RD}/mfsfd/stand/symbols
|
||||
# make the small bootfd
|
||||
@echo "Making the small 4MB boot floppy."
|
||||
sh -e ${.CURDIR}/doFS.sh ${RD} ${MNT} ${BOOTMFSSIZE} ${RD}/mfsfd \
|
||||
@ -505,6 +505,9 @@ fixit.flp:
|
||||
write_mfs_in_kernel: ${.CURDIR}/write_mfs_in_kernel.c
|
||||
${CC} ${CFLAGS} -o write_mfs_in_kernel ${.CURDIR}/write_mfs_in_kernel.c
|
||||
|
||||
dumpnlist: ${.CURDIR}/dumpnlist.c
|
||||
${CC} ${CFLAGS} -o dumpnlist ${.CURDIR}/dumpnlist.c
|
||||
|
||||
ckRELEASEDIR:
|
||||
.if !defined(RELEASEDIR)
|
||||
@echo "To make a release RELEASEDIR must be defined" && false
|
||||
@ -550,9 +553,9 @@ doKERNEL:
|
||||
#
|
||||
doMFSKERN:
|
||||
@cd ${.CURDIR} && $(MAKE) ckRELEASEDIR
|
||||
rm -f ${RD}/kernels/BOOTMFS.${FSIMAGE}
|
||||
rm -f /sys/compile/BOOTMFS/mfs_vfsops.o
|
||||
cd ${.CURDIR}/../sys/i386/conf && \
|
||||
@rm -f ${RD}/kernels/BOOTMFS.${FSIMAGE}
|
||||
@rm -f /sys/compile/BOOTMFS/mfs_vfsops.o
|
||||
@cd ${.CURDIR}/../sys/i386/conf && \
|
||||
sed -e '/SYSV/d' \
|
||||
-e '/pty/d' \
|
||||
-e '/PROCFS/d' \
|
||||
@ -561,22 +564,29 @@ doMFSKERN:
|
||||
-e '/maxusers/s/10/4/' < GENERIC > BOOTMFS && \
|
||||
echo "options MFS" >> BOOTMFS && \
|
||||
echo "options NFS_NOSERVER" >> BOOTMFS && \
|
||||
echo 'options "MAXCONS=4"' >> BOOTMFS
|
||||
echo "options \"MFS_ROOT=`cat fs-image.${FSIMAGE}.size`\"" >> \
|
||||
echo 'options "MAXCONS=4"' >> BOOTMFS && \
|
||||
echo "options USERCONFIG_BOOT" >> BOOTMFS
|
||||
@echo "options \"MFS_ROOT=`cat fs-image.${FSIMAGE}.size`\"" >> \
|
||||
${.CURDIR}/../sys/i386/conf/BOOTMFS
|
||||
cd ${.CURDIR} && ${MAKE} doKERNEL KERNEL=BOOTMFS
|
||||
rm -rf ${RD}/boot.${FSIMAGE}
|
||||
mkdir ${RD}/boot.${FSIMAGE}
|
||||
mv ${RD}/kernels/BOOTMFS ${RD}/kernels/BOOTMFS.${FSIMAGE}
|
||||
cp ${RD}/kernels/BOOTMFS.${FSIMAGE} ${RD}/boot.${FSIMAGE}/kernel
|
||||
@rm -rf ${RD}/boot.${FSIMAGE}
|
||||
@mkdir ${RD}/boot.${FSIMAGE}
|
||||
@mv ${RD}/kernels/BOOTMFS ${RD}/kernels/BOOTMFS.${FSIMAGE}
|
||||
@cp ${RD}/kernels/BOOTMFS.${FSIMAGE} ${RD}/boot.${FSIMAGE}/kernel
|
||||
./write_mfs_in_kernel ${RD}/boot.${FSIMAGE}/kernel \
|
||||
fs-image.${FSIMAGE}
|
||||
kzip -v ${RD}/boot.${FSIMAGE}/kernel
|
||||
mv ${RD}/boot.${FSIMAGE}/kernel ${RD}/kernels/MFSKERNEL.${FSIMAGE}
|
||||
mv ${RD}/boot.${FSIMAGE}/kernel.kz ${RD}/boot.${FSIMAGE}/kernel
|
||||
ls -l ${RD}/boot.${FSIMAGE}/kernel
|
||||
rm -f ${RD}/floppies/boot${FSIMAGE}.flp
|
||||
@mv ${RD}/boot.${FSIMAGE}/kernel ${RD}/kernels/MFSKERNEL.${FSIMAGE}
|
||||
@mv ${RD}/boot.${FSIMAGE}/kernel.kz ${RD}/boot.${FSIMAGE}/kernel
|
||||
@ls -l ${RD}/boot.${FSIMAGE}/kernel
|
||||
@rm -f ${RD}/floppies/boot${FSIMAGE}.flp
|
||||
cat /usr/mdec/rawboot ${RD}/boot.${FSIMAGE}/kernel | \
|
||||
dd conv=sync of=${RD}/floppies/boot${FSIMAGE}.flp
|
||||
@echo 'USERCONFIG' > startup_foo
|
||||
@echo 'intro' >> startup_foo
|
||||
@echo 'visual' >> startup_foo
|
||||
dd if=startup_foo of=${RD}/floppies/boot${FSIMAGE}.flp \
|
||||
seek=1 bs=512 count=1 conv=sync
|
||||
@rm -f startup_foo
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <nlist.h>
|
||||
#include <stdio.h>
|
||||
#include "uc_main.h"
|
||||
|
||||
struct nlist nl[] = {
|
||||
{"_isa_devtab_bio"},
|
||||
@ -35,12 +34,11 @@ main(int ac, char **av)
|
||||
perror("nlist");
|
||||
return 1;
|
||||
}
|
||||
fprintf(stdout, "struct nlist nl[] = {\n");
|
||||
printf("%d\n", sizeof(nl) / sizeof(struct nlist));
|
||||
for (i = 0; nl[i].n_name; i++) {
|
||||
fprintf(stdout, "\t{ \"%s\", %d, %d, %d, %ld },\n",
|
||||
nl[i].n_name, nl[i].n_type, nl[i].n_other,
|
||||
nl[i].n_desc, nl[i].n_value);
|
||||
printf("%s\n", nl[i].n_name);
|
||||
printf("%d %d %d %ld\n",
|
||||
nl[i].n_type, nl[i].n_other, nl[i].n_desc, nl[i].n_value);
|
||||
}
|
||||
fprintf(stdout, "};\n");
|
||||
return 0;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
PROG= sysinstall
|
||||
NOMAN= yes
|
||||
CLEANFILES+= makedevs.c rtermcap dumpnlist kern-nlist.h
|
||||
CLEANFILES+= makedevs.c rtermcap dumpnlist
|
||||
|
||||
.PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum
|
||||
|
||||
@ -22,7 +22,7 @@ DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL} ${LIBDISK}
|
||||
LDADD= -ldialog -lncurses -lmytinfo -lutil -ldisk
|
||||
|
||||
|
||||
makedevs.c: Makefile rtermcap dumpnlist
|
||||
makedevs.c: Makefile rtermcap
|
||||
rm -f makedevs.tmp
|
||||
echo '#include <sys/types.h>' > makedevs.tmp
|
||||
./rtermcap cons25 | \
|
||||
@ -47,11 +47,6 @@ makedevs.c: Makefile rtermcap dumpnlist
|
||||
file2c 'const char termcap_vt100[] = {' ',0};' \
|
||||
>> makedevs.tmp
|
||||
mv makedevs.tmp makedevs.c
|
||||
.if defined(KERNEL_NAME)
|
||||
dumpnlist ${KERNEL_NAME} > kern-nlist.h
|
||||
.else
|
||||
dumpnlist /kernel > kern-nlist.h
|
||||
.endif
|
||||
|
||||
rtermcap: ${.CURDIR}/rtermcap.c
|
||||
${CC} -o rtermcap ${.CURDIR}/rtermcap.c -ltermcap
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: install.c,v 1.127 1996/10/04 13:33:43 jkh Exp $
|
||||
* $Id: install.c,v 1.128 1996/10/04 14:53:50 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -920,14 +920,12 @@ save_userconfig_to_kernel(char *kern)
|
||||
struct list *c_isa, *c_dev, *b_dev;
|
||||
int i, d;
|
||||
|
||||
core = uc_open("-incore");
|
||||
if (core < 0) {
|
||||
if ((core = uc_open("-incore")) == NULL) {
|
||||
msgDebug("Can't read in-core information for kernel.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
boot = uc_open(kern);
|
||||
if (boot < 0) {
|
||||
if ((boot = uc_open(kern)) == NULL) {
|
||||
msgDebug("Can't read device information for kernel image %s\n", kern);
|
||||
return;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* library functions for userconfig library
|
||||
*
|
||||
* $Id: uc_main.c,v 1.5 1996/10/05 02:12:35 jkh Exp $
|
||||
* $Id: uc_main.c,v 1.6 1996/10/05 05:51:12 jkh Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -43,10 +43,7 @@
|
||||
extern int isDebug(void);
|
||||
extern void msgDebug(char *fmt, ...);
|
||||
|
||||
#ifdef KERN_NO_SYMBOLS
|
||||
#include "kern-nlist.h"
|
||||
#else
|
||||
static struct nlist nl[] = {
|
||||
static struct nlist _nl[] = {
|
||||
{"_isa_devtab_bio"},
|
||||
{"_isa_devtab_tty"},
|
||||
{"_isa_devtab_net"},
|
||||
@ -63,7 +60,6 @@ static struct nlist nl[] = {
|
||||
{"_scsi_tinit"},
|
||||
{""},
|
||||
};
|
||||
#endif
|
||||
|
||||
struct kernel *
|
||||
uc_open(char *name){
|
||||
@ -71,12 +67,13 @@ uc_open(char *name){
|
||||
struct kernel *kern;
|
||||
struct stat sb;
|
||||
char kname[80];
|
||||
int i = 0;
|
||||
|
||||
int size, i = 0;
|
||||
struct nlist *nl = _nl;
|
||||
|
||||
if (strcmp(name, "-incore") == 0)
|
||||
incore = 1;
|
||||
else
|
||||
incore=0;
|
||||
incore = 0;
|
||||
|
||||
if (incore || (strcmp(name,"-bootfile") == 0))
|
||||
strncpy(kname, getbootfile(), 79);
|
||||
@ -86,11 +83,42 @@ uc_open(char *name){
|
||||
if (isDebug())
|
||||
msgDebug("uc_open: kernel name is %s, incore = %d\n", kname, incore);
|
||||
|
||||
kern=(struct kernel *)malloc(sizeof(struct kernel));
|
||||
|
||||
kern = (struct kernel *)malloc(sizeof(struct kernel));
|
||||
|
||||
#ifdef KERN_NO_SYMBOLS
|
||||
if (incore) {
|
||||
kern->nl = nl;
|
||||
FILE *fp;
|
||||
|
||||
fp = fopen("/stand/symbols", "r");
|
||||
if (!fp) {
|
||||
msgDebug("Couldn't open /stand/symbols file! Punting.\n");
|
||||
free(kern);
|
||||
return NULL;
|
||||
}
|
||||
if (fscanf(fp, "%d\n", &size) != 1) {
|
||||
msgDebug("Unable to get # of name list entries from symbol file.\n");
|
||||
free(kern);
|
||||
return NULL;
|
||||
}
|
||||
nl = (struct nlist *)malloc((size + 1) * sizeof(struct nlist));
|
||||
for (i = 0; i < size; i++) {
|
||||
char name[255];
|
||||
|
||||
if (fgets(name, 255, fp) == NULL) {
|
||||
msgDebug("Unable to read symbol name from symbol file.\n");
|
||||
free(kern);
|
||||
return NULL;
|
||||
}
|
||||
nl[i].n_name = strdup(name);
|
||||
if (fscanf(fp, "%d %d %d %ld\n",
|
||||
&(nl[i].n_type), &(nl[i].n_other), &(nl[i].n_desc), &(nl[i].n_value)) != 4) {
|
||||
msgDebug("Unable to read symbol detail fields from symbol file, entry = %d\n", i);
|
||||
free(kern);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
kern->nl = nl;
|
||||
i = 0;
|
||||
}
|
||||
else
|
||||
@ -98,8 +126,8 @@ uc_open(char *name){
|
||||
i = nlist(kname, nl);
|
||||
if (i == -1) {
|
||||
msgDebug("uc_open: kernel %s does not contain symbols.\n", kname);
|
||||
kern = (struct kernel *)-5;
|
||||
return kern;
|
||||
free(kern);
|
||||
return NULL;
|
||||
}
|
||||
#ifdef KERN_NO_SYMBOLS
|
||||
if (!incore) {
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)locore.s 7.3 (Berkeley) 5/13/91
|
||||
* $Id: locore.s,v 1.72 1996/05/27 06:51:46 phk Exp $
|
||||
* $Id: locore.s,v 1.73 1996/07/12 06:48:55 bde Exp $
|
||||
*
|
||||
* originally from: locore.s, by William F. Jolitz
|
||||
*
|
||||
@ -45,6 +45,7 @@
|
||||
|
||||
#include "apm.h"
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_userconfig.h"
|
||||
|
||||
#include <sys/errno.h>
|
||||
#include <sys/syscall.h>
|
||||
@ -520,6 +521,15 @@ olddiskboot:
|
||||
movl 12(%ebp),%eax
|
||||
movl %eax,R(_bootdev)
|
||||
|
||||
#if defined(USERCONFIG_BOOT) && defined(USERCONFIG)
|
||||
movl $0x10200, %esi
|
||||
movl $R(_userconfig_from_boot),%edi
|
||||
movl $512,%ecx
|
||||
cld
|
||||
rep
|
||||
movsb
|
||||
#endif /* USERCONFIG_BOOT */
|
||||
|
||||
ret
|
||||
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)locore.s 7.3 (Berkeley) 5/13/91
|
||||
* $Id: locore.s,v 1.72 1996/05/27 06:51:46 phk Exp $
|
||||
* $Id: locore.s,v 1.73 1996/07/12 06:48:55 bde Exp $
|
||||
*
|
||||
* originally from: locore.s, by William F. Jolitz
|
||||
*
|
||||
@ -45,6 +45,7 @@
|
||||
|
||||
#include "apm.h"
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_userconfig.h"
|
||||
|
||||
#include <sys/errno.h>
|
||||
#include <sys/syscall.h>
|
||||
@ -520,6 +521,15 @@ olddiskboot:
|
||||
movl 12(%ebp),%eax
|
||||
movl %eax,R(_bootdev)
|
||||
|
||||
#if defined(USERCONFIG_BOOT) && defined(USERCONFIG)
|
||||
movl $0x10200, %esi
|
||||
movl $R(_userconfig_from_boot),%edi
|
||||
movl $512,%ecx
|
||||
cld
|
||||
rep
|
||||
movsb
|
||||
#endif /* USERCONFIG_BOOT */
|
||||
|
||||
ret
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.205 1996/09/27 13:38:02 peter Exp $
|
||||
* $Id: machdep.c,v 1.206 1996/09/28 22:37:33 dyson Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -380,6 +380,10 @@ cpu_startup(dummy)
|
||||
for (i = 1; i < ncallout; i++)
|
||||
callout[i-1].c_next = &callout[i];
|
||||
|
||||
#if defined(USERCONFIG_BOOT) && defined(USERCONFIG)
|
||||
boothowto |= RB_CONFIG;
|
||||
#endif
|
||||
|
||||
if (boothowto & RB_CONFIG) {
|
||||
#ifdef USERCONFIG
|
||||
userconfig();
|
||||
|
@ -32,12 +32,12 @@
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# @(#)newvers.sh 8.1 (Berkeley) 4/20/94
|
||||
# $Id: newvers.sh,v 1.23 1996/07/12 11:21:57 peter Exp $
|
||||
# $Id: newvers.sh,v 1.24 1996/08/04 22:34:00 wosch Exp $
|
||||
|
||||
TYPE="FreeBSD"
|
||||
REVISION="2.2"
|
||||
BRANCH="CURRENT"
|
||||
RELEASE="${REVISION}-${BRANCH}"
|
||||
RELEASE=2.2-961004-SNAP
|
||||
SNAPDATE=""
|
||||
if [ "X${SNAPDATE}" != "X" ]; then
|
||||
RELEASE="${RELEASE}-${SNAPDATE}"
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: options.i386,v 1.19 1996/10/01 03:00:36 pst Exp $
|
||||
# $Id: options.i386,v 1.20 1996/10/02 03:48:09 pst Exp $
|
||||
BOUNCEPAGES opt_bounce.h
|
||||
USER_LDT
|
||||
MATH_EMULATE opt_math_emulate.h
|
||||
@ -41,3 +41,4 @@ ATAPI_STATIC opt_atapi.h
|
||||
|
||||
USERCONFIG opt_userconfig.h
|
||||
VISUAL_USERCONFIG opt_userconfig.h
|
||||
USERCONFIG_BOOT opt_userconfig.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: options.i386,v 1.19 1996/10/01 03:00:36 pst Exp $
|
||||
# $Id: options.i386,v 1.20 1996/10/02 03:48:09 pst Exp $
|
||||
BOUNCEPAGES opt_bounce.h
|
||||
USER_LDT
|
||||
MATH_EMULATE opt_math_emulate.h
|
||||
@ -41,3 +41,4 @@ ATAPI_STATIC opt_atapi.h
|
||||
|
||||
USERCONFIG opt_userconfig.h
|
||||
VISUAL_USERCONFIG opt_userconfig.h
|
||||
USERCONFIG_BOOT opt_userconfig.h
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)locore.s 7.3 (Berkeley) 5/13/91
|
||||
* $Id: locore.s,v 1.72 1996/05/27 06:51:46 phk Exp $
|
||||
* $Id: locore.s,v 1.73 1996/07/12 06:48:55 bde Exp $
|
||||
*
|
||||
* originally from: locore.s, by William F. Jolitz
|
||||
*
|
||||
@ -45,6 +45,7 @@
|
||||
|
||||
#include "apm.h"
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_userconfig.h"
|
||||
|
||||
#include <sys/errno.h>
|
||||
#include <sys/syscall.h>
|
||||
@ -520,6 +521,15 @@ olddiskboot:
|
||||
movl 12(%ebp),%eax
|
||||
movl %eax,R(_bootdev)
|
||||
|
||||
#if defined(USERCONFIG_BOOT) && defined(USERCONFIG)
|
||||
movl $0x10200, %esi
|
||||
movl $R(_userconfig_from_boot),%edi
|
||||
movl $512,%ecx
|
||||
cld
|
||||
rep
|
||||
movsb
|
||||
#endif /* USERCONFIG_BOOT */
|
||||
|
||||
ret
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.205 1996/09/27 13:38:02 peter Exp $
|
||||
* $Id: machdep.c,v 1.206 1996/09/28 22:37:33 dyson Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -380,6 +380,10 @@ cpu_startup(dummy)
|
||||
for (i = 1; i < ncallout; i++)
|
||||
callout[i-1].c_next = &callout[i];
|
||||
|
||||
#if defined(USERCONFIG_BOOT) && defined(USERCONFIG)
|
||||
boothowto |= RB_CONFIG;
|
||||
#endif
|
||||
|
||||
if (boothowto & RB_CONFIG) {
|
||||
#ifdef USERCONFIG
|
||||
userconfig();
|
||||
|
@ -46,7 +46,7 @@
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**
|
||||
** $Id: userconfig.c,v 1.51 1996/10/03 01:22:22 jkh Exp $
|
||||
** $Id: userconfig.c,v 1.52 1996/10/03 07:51:40 jkh Exp $
|
||||
**/
|
||||
|
||||
/**
|
||||
@ -121,8 +121,32 @@
|
||||
|
||||
static struct isa_device *isa_devlist; /* list read by dset to extract changes */
|
||||
|
||||
#define putchar(x) cnputc(x)
|
||||
|
||||
#ifdef USERCONFIG_BOOT
|
||||
char userconfig_from_boot[512] = "";
|
||||
char *next = userconfig_from_boot;
|
||||
int
|
||||
getchar(x)
|
||||
{
|
||||
if (next == userconfig_from_boot) {
|
||||
if (strncmp(next, "USERCONFIG\n", 11)) {
|
||||
next++;
|
||||
strcpy(next, "quit\n");
|
||||
} else {
|
||||
next += 11;
|
||||
}
|
||||
}
|
||||
if (*next) {
|
||||
return (*next++);
|
||||
} else {
|
||||
return cngetc();
|
||||
}
|
||||
}
|
||||
#else /* !USERCONFIG_BOOT */
|
||||
#define getchar() cngetc()
|
||||
#endif /* USERCONFIG_BOOT */
|
||||
|
||||
#define putchar(x) cnputc(x)
|
||||
|
||||
#ifdef VISUAL_USERCONFIG
|
||||
static struct isa_device *devtabs[] = { isa_devtab_bio, isa_devtab_tty, isa_devtab_net,
|
||||
@ -2187,7 +2211,7 @@ visuserconfig(void)
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: userconfig.c,v 1.51 1996/10/03 01:22:22 jkh Exp $
|
||||
* $Id: userconfig.c,v 1.52 1996/10/03 07:51:40 jkh Exp $
|
||||
*/
|
||||
|
||||
#include "scbus.h"
|
||||
@ -2241,6 +2265,7 @@ static int set_device_enable(CmdParm *);
|
||||
static int set_device_disable(CmdParm *);
|
||||
static int quitfunc(CmdParm *);
|
||||
static int helpfunc(CmdParm *);
|
||||
static int introfunc(CmdParm *);
|
||||
|
||||
static int lineno;
|
||||
|
||||
@ -2269,6 +2294,7 @@ static Cmd CmdList[] = {
|
||||
{ "ex", quitfunc, NULL }, /* exit (quit) */
|
||||
{ "f", set_device_flags, int_parms }, /* flags dev mask */
|
||||
{ "h", helpfunc, NULL }, /* help */
|
||||
{ "intro", introfunc, NULL }, /* intro screen */
|
||||
{ "iom", set_device_mem, addr_parms }, /* iomem dev addr */
|
||||
{ "ios", set_device_iosize, int_parms }, /* iosize dev size */
|
||||
{ "ir", set_device_irq, int_parms }, /* irq dev # */
|
||||
@ -2292,7 +2318,7 @@ userconfig(void)
|
||||
int rval;
|
||||
Cmd *cmd;
|
||||
|
||||
printf("\nFreeBSD Kernel Configuration Utility - Version 1.0\n"
|
||||
printf("\nFreeBSD Kernel Configuration Utility - Version 1.1\n"
|
||||
" Type \"help\" for help"
|
||||
#ifdef VISUAL_USERCONFIG
|
||||
" or \"visual\" to go to the visual\n"
|
||||
@ -2527,6 +2553,41 @@ helpfunc(CmdParm *parms)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
center(int y, char *str)
|
||||
{
|
||||
putxy((80 - strlen(str)) / 2, y, str);
|
||||
}
|
||||
|
||||
static int
|
||||
introfunc(CmdParm *parms)
|
||||
{
|
||||
int y = 3;
|
||||
|
||||
clear();
|
||||
center(y, "!iKernel Configuration Editor!n");
|
||||
y += 2;
|
||||
putxy(2, y++, "In this next screen, you will be shown a full list of all the device");
|
||||
putxy(2, y++, "drivers which are available in this copy of the OS kernel. This is");
|
||||
putxy(2, y++, "!inot!n a list of devices which you necessarily have, simply those");
|
||||
putxy(2, y++, "which this kernel is capable of supporting.");
|
||||
++y;
|
||||
putxy(2, y++, "You should go through each device category and delete all entries");
|
||||
putxy(2, y++, "(using the DELETE key) for devices that you do not have. This is an");
|
||||
putxy(2, y++, "important step since it minimizes the chance of conflicts and also");
|
||||
putxy(2, y++, "makes the kernel boot faster since there's no time wasted in trying to");
|
||||
putxy(2, y++, "detect non-existant hardware. If you see an entry for a device which you");
|
||||
putxy(2, y++, "you !ido!n have and it's not a PCI device (which will be auto-configured),");
|
||||
putxy(2, y++, "be sure that its configuration parameters match your actual hardware.");
|
||||
putxy(2, y++, "To edit a device's configuration, simply press ENTER while over it.");
|
||||
putxy(2, y++, "Once you are satisfied with your device configuration, press Q to");
|
||||
putxy(2, y++, "proceed with the booting process.");
|
||||
++y;
|
||||
center(y, "!iPress a key to continue!n");
|
||||
cngetc();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
lsdevtab(struct isa_device *dt)
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
PROG= sysinstall
|
||||
NOMAN= yes
|
||||
CLEANFILES+= makedevs.c rtermcap dumpnlist kern-nlist.h
|
||||
CLEANFILES+= makedevs.c rtermcap dumpnlist
|
||||
|
||||
.PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum
|
||||
|
||||
@ -22,7 +22,7 @@ DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL} ${LIBDISK}
|
||||
LDADD= -ldialog -lncurses -lmytinfo -lutil -ldisk
|
||||
|
||||
|
||||
makedevs.c: Makefile rtermcap dumpnlist
|
||||
makedevs.c: Makefile rtermcap
|
||||
rm -f makedevs.tmp
|
||||
echo '#include <sys/types.h>' > makedevs.tmp
|
||||
./rtermcap cons25 | \
|
||||
@ -47,11 +47,6 @@ makedevs.c: Makefile rtermcap dumpnlist
|
||||
file2c 'const char termcap_vt100[] = {' ',0};' \
|
||||
>> makedevs.tmp
|
||||
mv makedevs.tmp makedevs.c
|
||||
.if defined(KERNEL_NAME)
|
||||
dumpnlist ${KERNEL_NAME} > kern-nlist.h
|
||||
.else
|
||||
dumpnlist /kernel > kern-nlist.h
|
||||
.endif
|
||||
|
||||
rtermcap: ${.CURDIR}/rtermcap.c
|
||||
${CC} -o rtermcap ${.CURDIR}/rtermcap.c -ltermcap
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: install.c,v 1.127 1996/10/04 13:33:43 jkh Exp $
|
||||
* $Id: install.c,v 1.128 1996/10/04 14:53:50 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -920,14 +920,12 @@ save_userconfig_to_kernel(char *kern)
|
||||
struct list *c_isa, *c_dev, *b_dev;
|
||||
int i, d;
|
||||
|
||||
core = uc_open("-incore");
|
||||
if (core < 0) {
|
||||
if ((core = uc_open("-incore")) == NULL) {
|
||||
msgDebug("Can't read in-core information for kernel.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
boot = uc_open(kern);
|
||||
if (boot < 0) {
|
||||
if ((boot = uc_open(kern)) == NULL) {
|
||||
msgDebug("Can't read device information for kernel image %s\n", kern);
|
||||
return;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
PROG= sysinstall
|
||||
NOMAN= yes
|
||||
CLEANFILES+= makedevs.c rtermcap dumpnlist kern-nlist.h
|
||||
CLEANFILES+= makedevs.c rtermcap dumpnlist
|
||||
|
||||
.PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum
|
||||
|
||||
@ -22,7 +22,7 @@ DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL} ${LIBDISK}
|
||||
LDADD= -ldialog -lncurses -lmytinfo -lutil -ldisk
|
||||
|
||||
|
||||
makedevs.c: Makefile rtermcap dumpnlist
|
||||
makedevs.c: Makefile rtermcap
|
||||
rm -f makedevs.tmp
|
||||
echo '#include <sys/types.h>' > makedevs.tmp
|
||||
./rtermcap cons25 | \
|
||||
@ -47,11 +47,6 @@ makedevs.c: Makefile rtermcap dumpnlist
|
||||
file2c 'const char termcap_vt100[] = {' ',0};' \
|
||||
>> makedevs.tmp
|
||||
mv makedevs.tmp makedevs.c
|
||||
.if defined(KERNEL_NAME)
|
||||
dumpnlist ${KERNEL_NAME} > kern-nlist.h
|
||||
.else
|
||||
dumpnlist /kernel > kern-nlist.h
|
||||
.endif
|
||||
|
||||
rtermcap: ${.CURDIR}/rtermcap.c
|
||||
${CC} -o rtermcap ${.CURDIR}/rtermcap.c -ltermcap
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: install.c,v 1.127 1996/10/04 13:33:43 jkh Exp $
|
||||
* $Id: install.c,v 1.128 1996/10/04 14:53:50 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -920,14 +920,12 @@ save_userconfig_to_kernel(char *kern)
|
||||
struct list *c_isa, *c_dev, *b_dev;
|
||||
int i, d;
|
||||
|
||||
core = uc_open("-incore");
|
||||
if (core < 0) {
|
||||
if ((core = uc_open("-incore")) == NULL) {
|
||||
msgDebug("Can't read in-core information for kernel.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
boot = uc_open(kern);
|
||||
if (boot < 0) {
|
||||
if ((boot = uc_open(kern)) == NULL) {
|
||||
msgDebug("Can't read device information for kernel image %s\n", kern);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user