diff options
Diffstat (limited to 'release/sysinstall')
47 files changed, 6273 insertions, 641 deletions
diff --git a/release/sysinstall/Makefile b/release/sysinstall/Makefile index 10e0d6aab0661..a252c166d07c1 100644 --- a/release/sysinstall/Makefile +++ b/release/sysinstall/Makefile @@ -9,17 +9,18 @@ CLEANFILES+= keymap.tmp keymap.h .PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum -SRCS= anonFTP.c cdrom.c command.c config.c devices.c kget.c \ +SRCS= anonFTP.c cdrom.c command.c config.c devices.c \ disks.c dispatch.c dist.c dmenu.c doc.c dos.c floppy.c \ ftp.c globals.c index.c install.c installUpgrade.c keymap.c \ label.c lndir.c main.c makedevs.c media.c menus.c misc.c mouse.c \ msg.c network.c nfs.c options.c package.c register.c system.c \ tape.c tcpip.c termcap.c ufs.c user.c variable.c wizard.c \ + uc_eisa.c uc_isa.c uc_kmem.c uc_list.c uc_main.c uc_pci.c \ keymap.h CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR} CFLAGS+= -I${.CURDIR}/../../sys -CFLAGS+= -DUC_PRIVATE -DKERN_NO_SYMBOLS +CFLAGS+= -DUC_PRIVATE -DKERN_NO_SYMBOLS -DSAVE_USERCONFIG # -DDO_SCSI DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL} ${LIBDISK} ${LIBFTPIO} LDADD= -ldialog -lncurses -lmytinfo -lutil -ldisk -lftpio diff --git a/release/sysinstall/cdrom.c b/release/sysinstall/cdrom.c index 011520211dbf4..1fd1380bc11bb 100644 --- a/release/sysinstall/cdrom.c +++ b/release/sysinstall/cdrom.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: cdrom.c,v 1.44 1998/12/22 12:31:24 jkh Exp $ + * $Id: cdrom.c,v 1.42 1998/08/27 00:50:14 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -54,7 +54,6 @@ #undef CD9660 static Boolean cdromMounted; -static char mountpoint[] = "/dist"; static properties read_props(char *name) @@ -75,7 +74,7 @@ mediaInitCDROM(Device *dev) { struct iso_args args; properties cd_attr = NULL; - char *cp = NULL; + char *cp = NULL, *mountpoint = "/dist"; Boolean readInfo = TRUE; static Boolean bogusCDOK = FALSE; @@ -83,6 +82,7 @@ mediaInitCDROM(Device *dev) return TRUE; Mkdir(mountpoint); + bzero(&args, sizeof(args)); args.fspec = dev->devname; args.flags = 0; @@ -95,8 +95,10 @@ mediaInitCDROM(Device *dev) msgConfirm("Error mounting %s on %s: %s (%u)", dev->devname, mountpoint, strerror(errno), errno); return FALSE; } + cdromMounted = TRUE; } - cdromMounted = TRUE; + else + cdromMounted = TRUE; if (!file_readable(string_concat(mountpoint, "/cdrom.inf")) && !bogusCDOK) { if (msgYesNo("Warning: The CD currently in the drive is either not a FreeBSD\n" @@ -141,6 +143,7 @@ mediaInitCDROM(Device *dev) bogusCDOK = TRUE; } } + msgDebug("Mounted FreeBSD CDROM from device %s\n", dev->devname); properties_free(cd_attr); return TRUE; } @@ -148,17 +151,35 @@ mediaInitCDROM(Device *dev) FILE * mediaGetCDROM(Device *dev, char *file, Boolean probe) { - return mediaGenericGet(mountpoint, file); + char buf[PATH_MAX]; + + if (isDebug()) + msgDebug("Request for %s from CDROM\n", file); + snprintf(buf, PATH_MAX, "/dist/%s", file); + if (file_readable(buf)) + return fopen(buf, "r"); + snprintf(buf, PATH_MAX, "/dist/dists/%s", file); + if (file_readable(buf)) + return fopen(buf, "r"); + snprintf(buf, PATH_MAX, "/dist/%s/%s", variable_get(VAR_RELNAME), file); + if (file_readable(buf)) + return fopen(buf, "r"); + snprintf(buf, PATH_MAX, "/dist/%s/dists/%s", variable_get(VAR_RELNAME), file); + return fopen(buf, "r"); } void mediaShutdownCDROM(Device *dev) { + char *mountpoint = "/dist"; + if (!cdromMounted) return; - + msgDebug("Unmounting %s from %s\n", dev->devname, mountpoint); if (unmount(mountpoint, MNT_FORCE) != 0) msgConfirm("Could not unmount the CDROM from %s: %s", mountpoint, strerror(errno)); - else + else { + msgDebug("Unmount of CDROM successful\n"); cdromMounted = FALSE; + } } diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c index 878a2324b2a75..9c9ca8c0eb02a 100644 --- a/release/sysinstall/config.c +++ b/release/sysinstall/config.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: config.c,v 1.114 1998/10/14 01:04:44 jkh Exp $ + * $Id: config.c,v 1.113 1998/09/30 12:33:28 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -168,7 +168,7 @@ seq_num(Chunk *c1) } int -configFstab(dialogMenuItem *self) +configFstab(void) { Device **devs; Disk *disk; @@ -213,42 +213,49 @@ configFstab(dialogMenuItem *self) } chunk_list[nchunks] = 0; chunk_sort(); - + fstab = fopen("/etc/fstab", "w"); if (!fstab) { msgConfirm("Unable to create a new /etc/fstab file! Manual intervention\n" "will be required."); return DITEM_FAILURE; } - + check_rootdev(chunk_list, nchunks); - + /* Go for the burn */ msgDebug("Generating /etc/fstab file\n"); fprintf(fstab, "# Device\t\tMountpoint\tFStype\tOptions\t\tDump\tPass#\n"); for (i = 0; i < nchunks; i++) fprintf(fstab, "/dev/%s\t\t%s\t\t%s\t%s\t\t%d\t%d\n", name_of(chunk_list[i]), mount_point(chunk_list[i]), fstype(chunk_list[i]), fstype_short(chunk_list[i]), seq_num(chunk_list[i]), seq_num(chunk_list[i])); - + Mkdir("/proc"); + fprintf(fstab, "proc\t\t\t/proc\t\tprocfs\trw\t\t0\t0\n"); + /* Now look for the CDROMs */ devs = deviceFind(NULL, DEVICE_TYPE_CDROM); cnt = deviceCount(devs); - - /* Write out the CDROM entries */ - for (i = 0; i < cnt; i++) { + + /* Write the first one out as /cdrom */ + if (cnt) { + if (Mkdir("/cdrom")) { + msgConfirm("Unable to make mount point for: /cdrom"); + } + else + fprintf(fstab, "/dev/%s\t\t/cdrom\t\tcd9660\tro,noauto\t0\t0\n", devs[0]->name); + } + + /* Write the others out as /cdrom<n> */ + for (i = 1; i < cnt; i++) { char cdname[10]; - - sprintf(cdname, "/cdrom%s", i ? itoa(i) : ""); - if (Mkdir(cdname)) + + sprintf(cdname, "/cdrom%d", i); + if (Mkdir(cdname)) { msgConfirm("Unable to make mount point for: %s", cdname); + } else fprintf(fstab, "/dev/%s\t\t%s\tcd9660\tro,noauto\t0\t0\n", devs[i]->name, cdname); } - - /* And finally, a /proc. */ - fprintf(fstab, "proc\t\t\t/proc\t\tprocfs\trw\t\t0\t0\n"); - Mkdir("/proc"); - fclose(fstab); if (isDebug()) msgDebug("Wrote out /etc/fstab file\n"); @@ -257,7 +264,7 @@ configFstab(dialogMenuItem *self) /* Do the work of sucking in a config file. * config is the filename to read in. - * lines is a fixed (max) sized array of char* + * lines is a fixed (max) sized array of char *. * returns number of lines read. line contents * are malloc'd and must be freed by the caller. */ @@ -499,7 +506,6 @@ configXEnvironment(dialogMenuItem *self) char *config, *execfile; char *moused; -tryagain: dialog_clear_norefresh(); if (!dmenuOpenSimple(&MenuXF86Config, FALSE)) return DITEM_FAILURE | DITEM_RESTORE; @@ -532,8 +538,6 @@ tryagain: "utility."); dialog_clear(); systemExecute(execfile); - if (!file_readable("/etc/XF86Config") && !msgYesNo("The XFree86 configuration process seems to have\nfailed. Would you like to try again?")) - goto tryagain; return DITEM_SUCCESS | DITEM_RESTORE; } else { @@ -544,8 +548,8 @@ tryagain: } } -int -configResolv(dialogMenuItem *ditem) +void +configResolv(void) { FILE *fp; char *cp, *dp, *hp; @@ -556,7 +560,7 @@ configResolv(dialogMenuItem *ditem) Mkdir("/etc"); fp = fopen("/etc/resolv.conf", "w"); if (!fp) - return DITEM_FAILURE; + return; if (variable_get(VAR_DOMAINNAME)) fprintf(fp, "domain\t%s\n", variable_get(VAR_DOMAINNAME)); fprintf(fp, "nameserver\t%s\n", cp); @@ -571,7 +575,7 @@ skip: /* Tack ourselves into /etc/hosts */ fp = fopen("/etc/hosts", "w"); if (!fp) - return DITEM_FAILURE; + return; /* Add an entry for localhost */ if (dp) fprintf(fp, "127.0.0.1\t\tlocalhost.%s localhost\n", dp); @@ -593,7 +597,6 @@ skip: fclose(fp); if (isDebug()) msgDebug("Wrote out /etc/hosts\n"); - return DITEM_SUCCESS; } int diff --git a/release/sysinstall/devices.c b/release/sysinstall/devices.c index 7b7261d23b43f..d687a20eb3981 100644 --- a/release/sysinstall/devices.c +++ b/release/sysinstall/devices.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: devices.c,v 1.87 1998/12/04 18:01:10 wpaul Exp $ + * $Id: devices.c,v 1.83 1998/09/26 17:05:08 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -73,14 +73,11 @@ static struct _devname { { DEVICE_TYPE_DISK, "rda%d", "SCSI disk device", 13, 65538, 8, 16, 'c' }, { DEVICE_TYPE_DISK, "wd%d", "IDE/ESDI/MFM/ST506 disk device", 0, 65538, 8, 16, 'b' }, { DEVICE_TYPE_DISK, "rwd%d", "IDE/ESDI/MFM/ST506 disk device", 3, 65538, 8, 16, 'c' }, - { DEVICE_TYPE_DISK, "fla%d", "DiskOnChip2000 Flash device", 28, 65538, 8, 16, 'b' }, - { DEVICE_TYPE_DISK, "rfla%d", "DiskOnChip2000 Flash devicee", 101, 65538, 8, 16, 'c' }, { DEVICE_TYPE_DISK, "wfd%d", "ATAPI floppy device", 1, 65538, 8, 4, 'b' }, { DEVICE_TYPE_DISK, "rwfd%d", "ATAPI floppy device", 87, 65538, 8, 4, 'c' }, { DEVICE_TYPE_FLOPPY, "fd%d", "floppy drive unit A", 2, 0, 64, 4, 'b' }, { DEVICE_TYPE_FLOPPY, "wfd%d", "ATAPI floppy drive unit A", 1, 0, 8, 4, 'b' }, { DEVICE_TYPE_FLOPPY, "worm%d", "SCSI optical disk / CDR", 23, 0, 1, 4, 'b' }, - { DEVICE_TYPE_NETWORK, "ax", "ASIX AX88140A PCI ethernet card" }, { DEVICE_TYPE_NETWORK, "fpa", "DEC DEFPA PCI FDDI card" }, { DEVICE_TYPE_NETWORK, "sr", "SDL T1/E1 sync serial PCI card" }, { DEVICE_TYPE_NETWORK, "cc3i", "SDL HSSI sync serial PCI card" }, @@ -96,14 +93,9 @@ static struct _devname { { DEVICE_TYPE_NETWORK, "ix", "Intel Etherexpress ethernet card" }, { DEVICE_TYPE_NETWORK, "le", "DEC EtherWorks 2 or 3 ethernet card" }, { DEVICE_TYPE_NETWORK, "lnc", "Lance/PCnet (Isolan/Novell NE2100/NE32-VL) ethernet" }, - { DEVICE_TYPE_NETWORK, "mx", "Macronix 98713/98715/98725 PCI ethernet card" }, - { DEVICE_TYPE_NETWORK, "pn", "Lite-On 82168/82169 PNIC PCI ethernet card" }, - { DEVICE_TYPE_NETWORK, "rl", "RealTek 8129/8139 PCI ethernet card" }, { DEVICE_TYPE_NETWORK, "tx", "SMC 9432TX ethernet card" }, { DEVICE_TYPE_NETWORK, "tl", "Texas Instruments ThunderLAN PCI ethernet card" }, - { DEVICE_TYPE_NETWORK, "vr", "VIA VT3043/VT86C100A Rhine PCI ethernet card" }, { DEVICE_TYPE_NETWORK, "vx", "3COM 3c590 / 3c595 ethernet card" }, - { DEVICE_TYPE_NETWORK, "wb", "Winbond W89C840F PCI ethernet card" }, { DEVICE_TYPE_NETWORK, "xl", "3COM 3c90x / 3c90xB PCI ethernet card" }, { DEVICE_TYPE_NETWORK, "ze", "IBM/National Semiconductor PCMCIA ethernet card" }, { DEVICE_TYPE_NETWORK, "zp", "3Com Etherlink III PCMCIA ethernet card" }, diff --git a/release/sysinstall/disks.c b/release/sysinstall/disks.c index 6c6b5019a9c7b..fd2bed49b1c8c 100644 --- a/release/sysinstall/disks.c +++ b/release/sysinstall/disks.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: disks.c,v 1.107 1999/01/02 07:23:37 jkh Exp $ + * $Id: disks.c,v 1.105 1998/10/13 09:45:59 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -36,8 +36,6 @@ #include "sysinstall.h" #include <ctype.h> -#include <fcntl.h> -#include <sys/stat.h> #include <sys/disklabel.h> /* Where we start displaying chunk information on the screen */ @@ -533,37 +531,6 @@ diskPartition(Device *dev) restorescr(w); } -static u_char * -bootalloc(char *name) -{ - char buf[FILENAME_MAX]; - struct stat sb; - - snprintf(buf, sizeof buf, "/boot/%s", name); - if (stat(buf, &sb) != -1) { - int fd; - - fd = open(buf, O_RDONLY); - if (fd != -1) { - u_char *cp; - - cp = malloc(sb.st_size); - if (read(fd, cp, sb.st_size) != sb.st_size) { - free(cp); - close(fd); - msgDebug("bootalloc: couldn't read %d bytes from %s\n", sb.st_size, buf); - return NULL; - } - close(fd); - return cp; - } - msgDebug("bootalloc: couldn't open %s\n", buf); - } - else - msgDebug("bootalloc: can't stat %s\n", buf); - return NULL; -} - static int partitionHook(dialogMenuItem *selected) { @@ -672,23 +639,15 @@ diskPartitionWrite(dialogMenuItem *self) for (i = 0; devs[i]; i++) { Chunk *c1; Disk *d = (Disk *)devs[i]->private; - static u_char *boot1; -#ifndef __alpha__ - static u_char *boot2; -#endif if (!devs[i]->enabled) continue; #ifdef __alpha__ - if (!boot1) boot1 = bootalloc("boot1"); Set_Boot_Blocks(d, boot1, NULL); #else - if (!boot1) boot1 = bootalloc("boot1"); - if (!boot2) boot2 = bootalloc("boot2"); Set_Boot_Blocks(d, boot1, boot2); #endif - msgNotify("Writing partition information to drive %s", d->name); if (!Fake && Write_Disk(d)) { msgConfirm("ERROR: Unable to write data to disk %s!", d->name); diff --git a/release/sysinstall/dispatch.c b/release/sysinstall/dispatch.c index 5e1668a3da788..9bac849de70c6 100644 --- a/release/sysinstall/dispatch.c +++ b/release/sysinstall/dispatch.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: dispatch.c,v 1.25 1998/07/18 09:41:58 jkh Exp $ + * $Id: dispatch.c,v 1.24 1997/09/17 16:18:13 pst Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -82,8 +82,7 @@ static struct _word { { "installExpress", installExpress }, { "installNovice", installNovice }, { "installUpgrade", installUpgrade }, - { "installFixupBin", installFixupBin }, - { "installFixupXFree", installFixupXFree }, + { "installFixup", installFixup }, { "installFixitHoloShell", installFixitHoloShell }, { "installFixitCDROM", installFixitCDROM }, { "installFixitFloppy", installFixitFloppy }, diff --git a/release/sysinstall/dist.c b/release/sysinstall/dist.c index d84c6ef5331a6..5c1ead2056953 100644 --- a/release/sysinstall/dist.c +++ b/release/sysinstall/dist.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: dist.c,v 1.131 1998/11/27 00:30:10 jkh Exp $ + * $Id: dist.c,v 1.128 1998/10/14 11:23:48 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -77,7 +77,7 @@ static Distribution DistTable[] = { { "compat20", "/", &Dists, DIST_COMPAT20, NULL }, { "compat21", "/", &Dists, DIST_COMPAT21, NULL }, { "ports", "/usr", &Dists, DIST_PORTS, NULL }, -{ "XF86333", "/usr", &Dists, DIST_XF86, XF86DistTable }, +{ "XF86332", "/usr", &Dists, DIST_XF86, XF86DistTable }, { NULL }, }; @@ -101,6 +101,7 @@ static Distribution SrcDistTable[] = { { "sinclude", "/usr/src", &SrcDists, DIST_SRC_INCLUDE, NULL }, { "slib", "/usr/src", &SrcDists, DIST_SRC_LIB, NULL }, { "slibexec", "/usr/src", &SrcDists, DIST_SRC_LIBEXEC, NULL }, +{ "slkm", "/usr/src", &SrcDists, DIST_SRC_LKM, NULL }, { "srelease", "/usr/src", &SrcDists, DIST_SRC_RELEASE, NULL }, { "sbin", "/usr/src", &SrcDists, DIST_SRC_BIN, NULL }, { "ssbin", "/usr/src", &SrcDists, DIST_SRC_SBIN, NULL }, @@ -114,8 +115,8 @@ static Distribution SrcDistTable[] = { /* The XFree86 distribution */ static Distribution XF86DistTable[] = { -{ "XF86333", "/usr/X11R6", &XF86Dists, DIST_XF86_FONTS, XF86FontDistTable }, -{ "XF86333", "/usr/X11R6", &XF86Dists, DIST_XF86_SERVER, XF86ServerDistTable }, +{ "XF86332", "/usr/X11R6", &XF86Dists, DIST_XF86_FONTS, XF86FontDistTable }, +{ "XF86332", "/usr/X11R6", &XF86Dists, DIST_XF86_SERVER, XF86ServerDistTable }, { "Xsrc1", "/usr/X11R6/src", &XF86Dists, DIST_XF86_SRC, NULL }, { "Xsrcctrb", "/usr/X11R6/src", &XF86Dists, DIST_XF86_CSRC, NULL }, { "Xbin", "/usr/X11R6", &XF86Dists, DIST_XF86_BIN, NULL }, @@ -763,7 +764,7 @@ printSelected(char *buf, int selected, Distribution *me, int *col) int distExtractAll(dialogMenuItem *self) { - int old_dists, retries = 0, status = DITEM_SUCCESS; + int retries = 0; char buf[512]; /* paranoia */ @@ -775,22 +776,13 @@ distExtractAll(dialogMenuItem *self) if (!mediaVerify() || !mediaDevice->init(mediaDevice)) return DITEM_FAILURE; - old_dists = Dists; distVerifyFlags(); - dialog_clear_norefresh(); msgNotify("Attempting to install all selected distributions.."); - /* Try for 3 times around the loop, then give up. */ while (Dists && ++retries < 3) distExtract(NULL, DistTable); - /* Only do bin fixup if bin dist was successfully extracted */ - if ((old_dists & DIST_BIN) && !(Dists & DIST_BIN)) - status |= installFixupBin(self); - if (old_dists & DIST_XF86) - status |= installFixupXFree(self); - if (Dists) { int col = 0; @@ -800,7 +792,7 @@ distExtractAll(dialogMenuItem *self) msgConfirm("Couldn't extract the following distributions. This may\n" "be because they were not available on the installation\n" "media you've chosen:\n\n\t%s", buf); - status |= DITEM_RESTORE; + return DITEM_SUCCESS | DITEM_RESTORE; } - return status; + return DITEM_SUCCESS; } diff --git a/release/sysinstall/dist.h b/release/sysinstall/dist.h index 19efb223faec0..9418a5cdd013f 100644 --- a/release/sysinstall/dist.h +++ b/release/sysinstall/dist.h @@ -43,7 +43,7 @@ #define DIST_SRC_INCLUDE 0x00020 #define DIST_SRC_LIB 0x00040 #define DIST_SRC_LIBEXEC 0x00080 -/* 0x00100 */ +#define DIST_SRC_LKM 0x00100 #define DIST_SRC_RELEASE 0x00200 #define DIST_SRC_SBIN 0x00400 #define DIST_SRC_SHARE 0x00800 diff --git a/release/sysinstall/dos.c b/release/sysinstall/dos.c index a11122ab811d5..ac021bb929f81 100644 --- a/release/sysinstall/dos.c +++ b/release/sysinstall/dos.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: dos.c,v 1.21 1998/10/28 02:18:08 jkh Exp $ + * $Id: dos.c,v 1.19 1998/09/08 11:44:07 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -50,26 +50,29 @@ #undef MSDOSFS static Boolean DOSMounted; -static char mountpoint[] = "/dist"; Boolean mediaInitDOS(Device *dev) { struct msdosfs_args args; - if (DOSMounted) + if (!RunningAsInit || DOSMounted) return TRUE; - Mkdir(mountpoint); + if (DITEM_STATUS(Mkdir("/dist")) != DITEM_SUCCESS) + return FALSE; + memset(&args, 0, sizeof(args)); args.fspec = dev->devname; args.uid = args.gid = 0; args.mask = 0777; - if (mount("msdos", mountpoint, MNT_RDONLY, (caddr_t)&args) == -1) { - msgConfirm("Error mounting %s on %s: %s (%u)", args.fspec, mountpoint, strerror(errno), errno); + if (mount("msdos", "/dist", MNT_RDONLY, (caddr_t)&args) == -1) { + msgConfirm("Error mounting %s on /dist: %s (%u)", args.fspec, strerror(errno), errno); return FALSE; } + else + msgDebug("Mounted DOS device (%s) on /dist.\n", args.fspec); DOSMounted = TRUE; return TRUE; } @@ -77,18 +80,33 @@ mediaInitDOS(Device *dev) FILE * mediaGetDOS(Device *dev, char *file, Boolean probe) { - return mediaGenericGet(mountpoint, file); + char buf[PATH_MAX]; + + if (isDebug()) + msgDebug("Request for %s from DOS\n", file); + snprintf(buf, PATH_MAX, "/dist/%s", file); + if (file_readable(buf)) + return fopen(buf, "r"); + snprintf(buf, PATH_MAX, "/dist/dists/%s", file); + if (file_readable(buf)) + return fopen(buf, "r"); + snprintf(buf, PATH_MAX, "/dist/%s/%s", variable_get(VAR_RELNAME), file); + if (file_readable(buf)) + return fopen(buf, "r"); + snprintf(buf, PATH_MAX, "/dist/%s/dists/%s", variable_get(VAR_RELNAME), file); + return fopen(buf, "r"); } void mediaShutdownDOS(Device *dev) { - if (!DOSMounted) + if (!RunningAsInit || !DOSMounted) return; - if (unmount(mountpoint, MNT_FORCE) != 0) - msgConfirm("Could not unmount the DOS partition from %s: %s", - mountpoint, strerror(errno)); - else - DOSMounted = FALSE; + msgDebug("Unmounting %s from /dist\n", dev->name); + if (unmount("/dist", MNT_FORCE) != 0) + msgConfirm("Could not unmount the DOS partition: %s", strerror(errno)); + if (isDebug()) + msgDebug("Unmount successful\n"); + DOSMounted = FALSE; return; } diff --git a/release/sysinstall/floppy.c b/release/sysinstall/floppy.c index 6c1ab402abe45..87974dd24404a 100644 --- a/release/sysinstall/floppy.c +++ b/release/sysinstall/floppy.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: floppy.c,v 1.30 1998/10/12 23:45:06 jkh Exp $ + * $Id: floppy.c,v 1.29 1998/07/18 09:42:00 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -56,17 +56,18 @@ static Boolean floppyMounted; char *distWanted; -static char mountpoint[] = "/dist"; Boolean mediaInitFloppy(Device *dev) { struct msdosfs_args dosargs; struct ufs_args u_args; + char *mountpoint; if (floppyMounted) return TRUE; + mountpoint = (char *)dev->private; if (Mkdir(mountpoint)) { msgConfirm("Unable to make %s directory mountpoint for %s!", mountpoint, dev->devname); return FALSE; @@ -92,11 +93,12 @@ mediaInitFloppy(Device *dev) if (mount("msdos", mountpoint, MNT_RDONLY, (caddr_t)&dosargs) == -1) { if (mount("ufs", mountpoint, MNT_RDONLY, (caddr_t)&u_args) == -1) { - msgConfirm("Error mounting floppy %s (%s) on %s : %s", - dev->name, dev->devname, mountpoint, strerror(errno)); + msgConfirm("Error mounting floppy %s (%s) on %s : %s", dev->name, dev->devname, mountpoint, + strerror(errno)); return FALSE; } } + msgDebug("initFloppy: mounted floppy %s successfully on %s\n", dev->devname, mountpoint); floppyMounted = TRUE; distWanted = NULL; return TRUE; @@ -109,12 +111,10 @@ mediaGetFloppy(Device *dev, char *file, Boolean probe) FILE *fp; int nretries = 5; - /* - * floppies don't use mediaGenericGet() because it's too expensive - * to speculatively open files on a floppy disk. Make user get it - * right or give up with floppies. - */ - snprintf(buf, PATH_MAX, "%s/%s", mountpoint, file); + snprintf(buf, PATH_MAX, "%s/%s", (char *)dev->private, file); + + if (isDebug()) + msgDebug("Request for %s from floppy on %s, probe is %d.\n", buf, (char *)dev->private, probe); if (!file_readable(buf)) { if (probe) return NULL; @@ -138,13 +138,17 @@ mediaGetFloppy(Device *dev, char *file, Boolean probe) void mediaShutdownFloppy(Device *dev) { + char *mountpoint = (char *)dev->private; + if (floppyMounted) { if (unmount(mountpoint, MNT_FORCE) != 0) msgDebug("Umount of floppy on %s failed: %s (%d)\n", mountpoint, strerror(errno), errno); else { floppyMounted = FALSE; + msgDebug("Floppy unmounted successfully.\n"); if (!variable_get(VAR_NONINTERACTIVE)) - msgConfirm("You may remove the floppy from %s", dev->description); + msgConfirm("You may remove the floppy from %s", + dev->description); } } } diff --git a/release/sysinstall/ftp.c b/release/sysinstall/ftp.c index 4f1e542e86b16..f6d6bc7fd8a26 100644 --- a/release/sysinstall/ftp.c +++ b/release/sysinstall/ftp.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: ftp.c,v 1.35 1998/01/28 04:42:38 jkh Exp $ + * $Id: ftp.c,v 1.34 1997/10/03 14:00:09 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -80,6 +80,9 @@ mediaInitFTP(Device *dev) if (ftpInitted) return TRUE; + if (isDebug()) + msgDebug("Init routine for FTP called.\n"); + if (OpenConn) { fclose(OpenConn); OpenConn = NULL; @@ -164,6 +167,8 @@ try: else goto punt; } + if (isDebug()) + msgDebug("mediaInitFTP was successful (logged in and chdir'd)\n"); ftpInitted = TRUE; return TRUE; @@ -216,7 +221,7 @@ mediaGetFTP(Device *dev, char *file, Boolean probe) /* Try some alternatives */ switch (nretries++) { case 1: - sprintf(buf, "releases/%s", file); + sprintf(buf, "dists/%s", file); try = buf; break; @@ -226,7 +231,7 @@ mediaGetFTP(Device *dev, char *file, Boolean probe) break; case 3: - sprintf(buf, "%s/releases/%s", variable_get(VAR_RELNAME), file); + sprintf(buf, "%s/dists/%s", variable_get(VAR_RELNAME), file); try = buf; break; @@ -245,6 +250,7 @@ mediaShutdownFTP(Device *dev) if (!ftpInitted) return; + msgDebug("FTP shutdown called. OpenConn = %x\n", OpenConn); if (OpenConn != NULL) { fclose(OpenConn); OpenConn = NULL; diff --git a/release/sysinstall/help/XF86.hlp b/release/sysinstall/help/XF86.hlp new file mode 100644 index 0000000000000..4757fb079c26c --- /dev/null +++ b/release/sysinstall/help/XF86.hlp @@ -0,0 +1,1580 @@ + + README for XFree86[tm] 3.3.2.3 + + + The XFree86 Project, Inc + + + 20 July 1998 + + + + Abstract + + XFree86 is a port of X11R6.3 that supports several Unix and Unix-like + operating systems on Intel and other platforms. This release is a + maintenance release, fixing bugs found in XFree86 3.3.1. The release + is available as source patches against the X Consortium X11R6.3 code + and the XFree86 3.3.1 release. Binary distributions for many archi- + tectures are also available. + + +[ FreeBSD Project Note: 3.3.2.3 is a security release relative to 3.3.2. + Where 3.3.2 is referred to below, understand that "3.3.2.3" is actually + being referred to. ] + +1. What's new in XFree86 3.3.2 + +For a summary of new features in this release, please refer to the RELNOTES +file. For a detailed list of changes, refer to the CHANGELOG file in the +source distribution. + + +2. Systems XFree86 has been tested on + +Note: Not all systems listed here have been tested with the current release. + + SVR4.0: + + o Esix: 4.0.3A, 4.0.4, 4.0.4.1 + + o Microport: 2.2, 3.1, 4.1, 4.2 + + o Dell: 2.1, 2.2, 2.2.1 + + o UHC: 2.0, 3.6 + + o Consensys: 1.2 + + o MST: 4.0.3 (Load 2.07 and Load 3.02) + + o ISC: 4.0.3 + + o AT&T: 2.1, 4.0 + + + + +README for XFree86[tm] 3.3.2 + + + + + +README for XFree86[tm] 3.3.2 + + + + o NCR: MP-RAS + + o SunSoft: Solaris x86 2.1, 2.4, 2.5, 2.5.1, 2.6 + + o PANIX 5.0 for AT + + + SVR4.2: + + o Consensys + + o Novell UnixWare + + + SVR3: + + o ISC: 3.0, 4.0, 4.1 + + + Others: + + o NetBSD 1.0, 1.1, 1.2, 1.2.1, 1.3 + + o OpenBSD 2.0, 2.1 + + o FreeBSD 2.0.5, 2.1, 2.1.5, 2.1.6, 2.1.7, 2.1.7.1, 2.2, 2.2.1, + 2.2.2, 2.2.5, 3.0-current + + o Linux (Intel x86, DEC Alpha/AXP and m68k) + + o LynxOS AT 2.3.0, 2.4.0, 2.5.0 + + o LynxOS microSPARC 2.4.0, 2.5.0 + + o LynxOS PowerPC 2.4.0, 2.5.0 + + o OS/2 Warp 3 FP5/17/22, Warp 4 -/FP1 + + + PC98: + + o FreeBSD(98) 2.0.5, 2.1, 2.1.5, 2.1.7.1, 2.2, 2.2.1, 2.2.2, + 2.2.5 + + o NetBSD/pc98 (based on NetBSD 1.2, 1.2.1) + + o PANIX 5.0 for 98 + + o Linux/98 + + +3. Supported video-card chip-sets + +At this time, XFree86 3.3.2 supports the following chipsets: + + + + + + + + +README for XFree86[tm] 3.3.2 + + + + Ark Logic + ARK1000PV, ARK1000VL, ARK2000PV, ARK2000MT + + Alliance + AP6422, AT24 + + ATI + 18800, 18800-1, 28800-2, 28800-4, 28800-5, 28800-6, 68800-3, + 68800-6, 68800AX, 68800LX, 88800GX-C, 88800GX-D, 88800GX-E, + 88800GX-F, 88800CX, 264CT, 264ET, 264VT, 264GT, 264VT-B, 264VT3, + 264GT-B, 264GT3 (this list includes the Mach8, Mach32, Mach64, 3D + Rage, 3D Rage II and 3D Rage Pro) + + Avance Logic + ALG2101, ALG2228, ALG2301, ALG2302, ALG2308, ALG2401 + + Chips & Technologies + 65520, 65530, 65540, 65545, 65520, 65530, 65540, 65545, 65546, + 65548, 65550, 65554, 65555, 68554, 64200, 64300 + + Cirrus Logic + CLGD5420, CLGD5422, CLGD5424, CLGD5426, CLGD5428, CLGD5429, + CLGD5430, CLGD5434, CLGD5436, CLGD5440, CLGD5446, CLGD5462, + CLGD5464, CLGD5465, CLGD5480, CLGD6205, CLGD6215, CLGD6225, + CLGD6235, CLGD6410, CLGD6412, CLGD6420, CLGD6440, CLGD7541(*), + CLGD7543(*), CLGD7548(*), CLGD7555(*) + + Digital Equipment Corporation + TGA + + Compaq + AVGA + + Genoa + GVGA + + IBM + 8514/A (and true clones), XGA-2 + + IIT + AGX-014, AGX-015, AGX-016 + + Matrox + MGA2064W (Millennium), MGA1064SG (Mystique and Mystique 220), + MGA2164W (Millennium II PCI and AGP) + + MX + MX68000(*), MX680010(*) + + NCR + 77C22(*), 77C22E(*), 77C22E+(*) + + Number Nine + I128 (series I and II), Revolution 3D (T2R) + + + + + + + + +README for XFree86[tm] 3.3.2 + + + + NVidia/SGS Thomson + NV1, STG2000, RIVA128 + + OAK + OTI067, OTI077, OTI087 + + RealTek + RTG3106(*) + + S3 + 86C911, 86C924, 86C801, 86C805, 86C805i, 86C928, 86C864, 86C964, + 86C732, 86C764, 86C765, 86C767, 86C775, 86C785, 86C868, 86C968, + 86C325, 86C357, 86C375, 86C375, 86C385, 86C988, 86CM65, 86C260 + + SiS + 86C201, 86C202, 86C205 + + Tseng + ET3000, ET4000AX, ET4000/W32, ET4000/W32i, ET4000/W32p, ET6000, + ET6100 + + Trident + TVGA8800CS, TVGA8900B, TVGA8900C, TVGA8900CL, TVGA9000, TVGA9000i, + TVGA9100B, TVGA9200CXR, Cyber9320(*), TVGA9400CXi, TVGA9420, + TGUI9420DGi, TGUI9430DGi, TGUI9440AGi, TGUI9660XGi, TGUI9680, Pro- + Vidia 9682, ProVidia 9685(*), Cyber 9382, Cyber 9385, Cyber 9388, + 3DImage975(PCI), 3DImage985(AGP), Cyber 9397, Cyber 9520 + + Video 7/Headland Technologies + HT216-32(*) + + Weitek + P9000 + + Western Digital/Paradise + PVGA1 + + Western Digital + WD90C00, WD90C10, WD90C11, WD90C24, WD90C24A, WD90C30, WD90C31, + WD90C33 + +(*) Note, chips marked in this way have either limited support or the drivers +for them are not actively maintained. + +All of the above are supported in both 256 color, and some are supported in +mono and 16 color modes, and some are supported an higher color depths. + +Refer to the chipset-specific README files (currently for TGA, Matrox, Mach32, +Mach64, NVidia, Oak, P9000, S3 (except ViRGE), S3 ViRGE, SiS, Video7, Western +Digital, Tseng (W32), Tseng (all), AGX/XGA, ARK, ATI (SVGA server), Chips and +Technologies, Cirrus, Trident) for more information about using those chipsets. + +The monochrome server also supports generic VGA cards, using 64k of video mem- +ory in a single bank, the Hercules monochrome card, the Hyundai HGC1280, Sigma + + + + + + + + +README for XFree86[tm] 3.3.2 + + + +LaserView, Visa and Apollo monochrome cards. + +The VGA16 server supports memory banking with the ET4000, Trident, ATI, NCR, +OAK and Cirrus 6420 chipsets allowing virtual display sizes up to about +1600x1200 (with 1MB of video memory). For other chipsets the display size is +limited to approximately 800x600. + +Notes: The Diamond SpeedStar 24 (and possibly some SpeedStar+) boards are NOT +supported, even though they use the ET4000. + +The Weitek 9100 and 9130 chipsets are not supported (these are used on the Dia- +mond Viper Pro and Viper SE boards). Most other Diamond boards will work with +this release of XFree86. Diamond is actively supporting The XFree86 Project, +Inc. + +3DLabs GLINT, Permedia and Permedia 2 support could unfortunately not be +included in XFree86 3.3.2 since there are open issues regarding the documenta- +tion and whether or not they were provided to us under NDA. + +S.u.S.E. will continue to make available binary only servers for these cards. +These servers can be freely distributed just like XFree86, but sources cannot +be made available. S.u.S.E. will continue to develop these servers and will +continue to try to donate the code back to XFree86. For the time being S.u.S.E. +will try to not only make Linux binaries available, but binaries for other +platforms as well. + +Please contact x@suse.de with further questions. You can find the servers at +http://www.suse.de/XSuSE/XSuSE_E.html + + +4. Where to get more information + +Additional documentation is available in the XFree86(1), XF86Config(4/5), +XF86_SVGA(1), XF86_Mono(1), XF86_VGA16(1), XF86_Accel(1), XF86Setup(1) and +xvidtune(1) manual pages. In addition, several README files and tutorial docu- +ments are provided. These are available in /usr/X11R6/lib/X11/doc in the +binary distributions, and in xc/programs/Xserver/hw/xfree86/doc in the source +distribution. + +The files QuickStart.doc and README.Config should be consulted for information +on how to set up the XFree86 servers. All supplied documents, manual pages, +and the XFree86 FAQ <URL:http://www.XFree86.org/FAQ> should be read before con- +tacting the XFree86 team for assistance. + +Documentation on SVGA driver development can be found in the directory +/usr/X11R6/lib/Server/VGADriverDoc in the binary distribution, and in the +directory xc/programs/Xserver/hw/xfree86/VGADriverDoc in the source distribu- +tion. + +If you are totally at a loss, you can contact the XFree86 Support Team at +<XFree86@XFree86.Org>. Before doing so, please make sure that you are using +the latest release of XFree86. Check the versions listed on +ftp://ftp.xfree86.org/pub/XFree86. + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + +There is a Usenet news group comp.windows.x.i386unix that contains mostly dis- +cussions about XFree86 and related topics. Many questions can be answered +there. + + +5. Thanks + +The XFree86 Project wants to express a special thanks to S.u.S.E. GmbH, Fuerth, +Germany, for the long and successful cooperation over the last few years. +S.u.S.E. GmbH at one point hired our Core Team member and Vice President Dirk +Hohndel as an employee and allowed him to work more or less full time on +XFree86 for almost nine months. S.u.S.E. continues to be a significant source +of input and help to XFree86. This manifested itself in the XSuSE series of X +servers that have all except for the GLINT server (due to unresolved legal +issues) been integrated into XFree86 3.3.2. + + +6. Credits + +XFree86 was originally put together by: + + o David Dawes <dawes@XFree86.org> + + o Glenn Lai <glenn@cs.utexas.edu> + + o Jim Tsillas <jtsilla@ccs.neu.edu> + + o David Wexelblat <dwex@XFree86.org> + +XFree86 support was integrated into the base X11R6 distribution by: + + o Stuart Anderson <anderson@metrolink.com> + + o Doug Anson <danson@lgc.com> + + o Gertjan Akkerman <akkerman@dutiba.twi.tudelft.nl> + + o Mike Bernson <mike@mbsun.mlb.org> + + o Robin Cutshaw <robin@XFree86.org> + + o David Dawes <dawes@XFree86.org> + + o Marc Evans <marc@XFree86.org> + + o Pascal Haible <haible@izfm.uni-stuttgart.de> + + o Matthieu Herrb <Matthieu.Herrb@laas.fr> + + o Dirk Hohndel <hohndel@XFree86.org> + + o David Holland <davidh@use.com> + + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + + o Alan Hourihane <alanh@fairlite.demon.co.uk> + + o Jeffrey Hsu <hsu@soda.berkeley.edu> + + o Glenn Lai <glenn@cs.utexas.edu> + + o Ted Lemon <mellon@ncd.com> + + o Rich Murphey <rich@XFree86.org> + + o Hans Nasten <nasten@everyware.se> + + o Mark Snitily <mark@sgcs.com> + + o Randy Terbush <randyt@cse.unl.edu> + + o Jon Tombs <tombs@XFree86.org> + + o Kees Verstoep <versto@cs.vu.nl> + + o Paul Vixie <paul@vix.com> + + o Mark Weaver <Mark_Weaver@brown.edu> + + o David Wexelblat <dwex@XFree86.org> + + o Philip Wheatley <Philip.Wheatley@ColumbiaSC.NCR.COM> + + o Thomas Wolfram <wolf@prz.tu-berlin.de> + + o Orest Zborowski <orestz@eskimo.com> + + 386BSD, FreeBSD, NetBSD support by: + + o Rich Murphey <Rich@XFree86.org> + + NetBSD, OpenBSD support by: + + o Matthieu Herrb <Matthieu.Herrb.@laas.fr> + + Original 386BSD port by: + + o Pace Willison, + + o Amancio Hasty Jr <hasty@netcom.com> + + Mach 386 support by: + + o Robert Baron <Robert.Baron@ernst.mach.cs.cmu.edu> + + Linux support by: + + o Orest Zborowski <orestz@eskimo.com> + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + + SCO Unix support by: + + o David McCullough <davidm@stallion.oz.au> + + Amoeba support by: + + o Kees Verstoep <versto@cs.vu.nl> + + Minix-386 support by: + + o Philip Homburg <philip@cs.vu.nl> + + OSF/1 support by: + + o Marc Evans <Marc@XFree86.org> + + BSD/OS support by: + + o Hans Nasten <nasten@everyware.se>, + + o Paul Vixie <paul@vix.com> + + Solaris support by: + + o Doug Anson <danson@lgc.com>, + + o David Holland <davidh@use.com> + + ISC SVR3 support by: + + o Michael Rohleder <michael.rohleder@stadt-frankfurt.de> + + LynxOS support by: + + o Thomas Mueller <tmueller@sysgo.de> + + OS/2 support by: + + o Holger Veit <Holger.Veit@gmd.de> + + o Sebastien Marineau <s521936@aix1.uottawa.ca> + + Linux shared libraries by: + + o Orest Zborowski <orestz@eskimo.com>, + + o Dirk Hohndel <hohndel@XFree86.org> + + PC98 support by: + + o Toyonori Fujiura <toyo@ibbsal.or.jp>, + + o Hiroyuki Aizu <aizu@jaist.ac.jp>, + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + + o Tetsuya Kakefuda <kakefuda@tag.iijnet.or.jp>, + + o Takefumi Tsukada <tsuka@linkt.imasy.or.jp>, + + o H.Komatsuzaki, + + o Naoki Katsurakawa <katsura@prc.tsukuba.ac.jp>, + + o Shuichiro Urata <s-urata@nmit.tmg.nec.co.jp>, + + o Yasuyuki Kato <yasuyuki@acaets0.anritsu.co.jp>, + + o Michio Jinbo <karl@spnet.ne.jp>, + + o Tatsuya Koike <koiket@focus.rim.or.jp>, + + o Koichiro Suzuki <s-koichi@nims.nec.co.jp>, + + o Tsuyoshi Tamaki <tamaki@sail.t.u-tokyo.ac.jp>, + + o Isao Ohishi <ohishi@hf.rim.or.jp>, + + o Kohji Ohishi <atena@njk.co.jp>, + + o Shin'ichi Yairo <QZR00522@niftyserve.or.jp>, + + o Kazuo Ito <ft4k-itu@asahi-net.or.jp>, + + o Jun Sakuma <i931361@jks.is.tsukuba.ac.jp>, + + o Shuichi Ueno <uenos@ppp.bekkoame.or.jp>, + + o Ishida Kazuo <ishidakz@obp.cl.nec.co.jp>, + + o Takaaki Nomura <amadeus@yk.rim.or.jp>, + + o Tadaaki Nagao <nagao@cs.titech.ac.jp>, + + o Minoru Noda <mnoda@cv.tottori-u.ac.jp>, + + o Naofumi Honda <honda@Kururu.math.hokudai.ac.jp>, + + o Akio Morita <amorita@bird.scphys.kyoto-u.ac.jp>, + + o Takashi Sakamoto <sakamoto@yajima.kuis.kyoto-u.ac.jp>, + + o Yasuhiro Ichikawa <cs94006@mbox.sist.ac.jp>, + + o Kazunori Ueno <jagarl@creator.club.or.jp>, + + o Yasushi Suzuki <suz@d2.bs1.fc.nec.co.jp>, + + o Satoshi Kimura <KFB03633@niftyserve.or.jp>, + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + + o Kazuhiko Uno <Kazuhiko.Uno@softvision.co.jp>, + + o Tomiharu Takigami <takigami@elsd.mt.nec.co.jp>, + + o Tomomi Suzuki <suzuki@grelot.elec.ryukoku.ac.jp>, + + o Toshihiko Yagi <j2297222@ed.kagu.sut.ac.jp>, + + o Masato Yoshida (Contributor of PW805i support) + + Original accelerated code by: + + o Kevin Martin <martin@cs.unc.edu>, + + o Rik Faith <faith@cs.unc.edu>, + + o Jon Tombs <tombs@XFree86.org> + + XFree86 Acceleration Architecture (XAA) by: + + o Harm Hanemaayer <H.Hanemaayer@inter.nl.net>, + + S3 accelerated code by: + + o Jon Tombs <tombs@XFree86.org>, + + o Harald Koenig <koenig@tat.physik.uni-tuebingen.de>, + + o David Wexelblat <dwex@XFree86.org>, + + o David Dawes <dawes@XFree86.org>, + + o Robin Cutshaw <robin@XFree86.org>, + + o Amancio Hasty <hasty@netcom.com>, + + o Norbert Distler <Norbert.Distler@physik.tu-muenchen.de>, + + o Leonard N. Zubkoff <lnz@dandelion.com>, + + o Bernhard Bender <br@elsa.mhs.compuserve.com>, + + o Dirk Hohndel <hohndel@XFree86.org>, + + o Joe Moss <joe@XFree86.org> + + S3V accelerated code by: + + o Harald Koenig <koenig@tat.physik.uni-tuebingen.de>, + + o Kevin Brosius <Cobra@compuserve.com> + + o Berry Dijk <berry_dijk@tasking.nl> + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + + o Dirk Hohndel <hohndel@XFree86.org> + + o Huver Hu <huver@amgraf.com> + + o Dirk Vangestel <gesteld@sh.bel.alcatel.be> + + Mach32 accelerated code by: + + o Kevin Martin <martin@cs.unc.edu>, + + o Rik Faith <faith@cs.unc.edu>, + + o Mike Bernson <mike@mbsun.mlb.org>, + + o Mark Weaver <Mark_Weaver@brown.edu>, + + o Craig Groeschel <craig@metrolink.com> + + o Bryan Feir <jenora@istar.ca> + + Mach64 accelerated code by: + + o Kevin Martin <martin@cs.unc.edu>, + + Mach8, 8514 accelerated code by: + + o Kevin Martin <martin@cs.unc.edu>, + + o Rik Faith <faith@cs.unc.edu>, + + o Tiago Gons <tiago@comosjn.hobby.nl>, + + o Hans Nasten <nasten@everyware.se>, + + o Scott Laird <scott@laird.com> + + Cirrus accelerated code by: + + o Simon Cooper <scooper@vizlab.rutgers.edu>, + + o Harm Hanemaayer <H.Hanemaayer@inter.nl.net>, + + o Bill Reynolds <bill@goshawk.lanl.gov>, + + o Corin Anderson <corina@the4cs.com> + + Western Digital accelerated code by: + + o Mike Tierney <floyd@pepsi.eng.umd.edu>, + + o Bill Conn <conn@bnr.ca> + + P9000 accelerated code by: + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + + o Erik Nygren <nygren@mit.edu>, + + o Harry Langenbacher <harry@brain.jpl.nasa.gov> + + o Chris Mason <mason@mail.csh.rit.edu> + + o Henrik Harmsen <harmsen@eritel.se> + + AGX accelerated code by: + + o Henry Worth <haworth@wco.com>, + + Number Nine I128 driver by: + + o Robin Cutshaw <robin@XFree86.org>, + + ET4000/W32 accelerated code by: + + o Glenn Lai <glenn@cs.utexas.edu>, + + ET6000 SVGA and accelerated support (both based on the existing W32 code) by: + + o Koen Gadeyne <koen.gadeyne@barco.com>, + + Oak Technologies Inc. accelerated code by: + + o Jorge Delgado <ernar@dit.upm.es>, + + 16 color VGA server by: + + o Gertjan Akkerman <akkerman@dutiba.twi.tudelft.nl> + + 2 color VGA and non-VGA mono servers by: + + o Pascal Haible <haible@izfm.uni-stuttgart.de> + + ATI SVGA driver by: + + o Per Lindqvist <pgd@compuram.bbt.se> and Doug Evans + <dje@cygnus.com>. + + o Ported to X11R5 by Rik Faith <faith@cs.unc.edu>. + + o Rewritten by Marc Aurele La France <tsi@ualberta.ca> + + WD90C24 support by: + + o Brad Bosch <brad@lachman.com> + + Trident SVGA driver by: + + o Alan Hourihane <alanh@fairlite.demon.co.uk> + + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + + SiS SVGA driver by: + + o Alan Hourihane <alanh@fairlite.demon.co.uk> + + o Xavier Ducoin <xavier@rd.lectra.fr> + + DEC 21030 (TGA) server by: + + o Alan Hourihane <alanh@fairlite.demon.co.uk> + + o Harald Koenig <koenig@tat.physik.uni-tuebingen.de> + + NCR SVGA driver by: + + o Stuart Anderson <anderson@metrolink.com> with the permission + of NCR Corporation + + Cirrus SVGA driver by: + + o Bill Reynolds <bill@goshawk.lanl.gov>, + + o Hank Dietz <hankd@ecn.purdue.edu>, + + o Simon Cooper <scooper@vizlab.rutgers.edu>, + + o Harm Hanemaayer <H.Hanemaayer@inter.nl.net>, + + o Corin Anderson <corina@the4cs.com> + + Cirrus CL64xx driver by: + + o Manfred Brands <mb@oceonics.nl> + + o Randy Hendry <randy@sgi.com> + + o Jeff Kirk <jeff@bambam.dsd.ES.COM> + + Compaq SVGA driver by: + + o Hans Oey <hans@mo.hobby.nl> + + o Ming Yu <yum@itp.ac.cn> + + o Gerry Toll <gtoll@tc.cornell.edu> + + Oak SVGA driver by: + + o Steve Goldman <sgoldman@encore.com> + + o Jorge Delgado <ernar@dit.upm.es> + + ARK Logic SVGA driver by: + + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + + o Harm Hanemaayer <H.Hanemaayer@inter.nl.net> + + o Leon Bottou <bottou@laforia.ibp.fr> + + AL2101 SVGA driver by: + + o Paolo Severini <lendl@dist.dist.unige.it> + + Avance Logic ``ali'' SVGA driver by: + + o Ching-Tai Chiu <cchiu@netcom.com> + + Chips & Technologies SVGA driver by: + + o Regis Cridlig <cridlig@dmi.ens.fr> + + o Jon Block <block@frc.com> + + o Mike Hollick <hollick@graphics.cis.upenn.edu> + + o Nozomi Ytow + + o Egbert Eich <Egbert.Eich@Physik.TH-Darmstadt.DE> + + o David Bateman <dbateman@ee.uts.edu.au> + + o Xavier Ducoin <xavier@rd.lectra.fr> + + MX SVGA driver by: + + o Frank Dikker <dikker@cs.utwente.nl> + + Video7 SVGA driver by: + + o Craig Struble <cstruble@acm.vt.edu> + + RealTek SVGA driver by: + + o Peter Trattler <peter@sbox.tu-graz.ac.at> + + Apollo Mono driver by: + + o Hamish Coleman <hamish@zot.apana.org.au> + + Matrox SVGA driver by: + + o Guy Desbief <g.desbief@aix.pacwan.net> + + o Radoslaw Kapitan <kapitan@student.uci.agh.edu.pl> + + o Andrew Vanderstock <vanderaj@mail2.svhm.org.au> + + o Angsar Hockmann <Ansgar.Hockmann@hrz.uni-dortmund.de> + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + + o Michael Will <Michael.Will@student.uni-tuebingen.de> + + o Andrew Mileski <aem@ott.hookup.net> + + o Stephen Pitts <pitts2@memphisonline.com> + + o Dirk Hohndel <hohndel@XFree86.Org> + + o Leonard N. Zubkoff <lnz@dandelion.com> + + ViRGE SVGA driver by: + + o Sebastien Marineau <marineau@genie.uottawa.ca>, + + o Harald Koenig <koenig@tat.physik.uni-tuebingen.de> + + Linux/m68k Frame Buffer Device driver by: + + o Martin Schaller + + o Geert Uytterhoeven <Geert.Uytterhoeven@cs.kuleuven.ac.be> + + o Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + o Guenther Kelleter <guenther@Pool.Informatik.RWTH-Aachen.de> + + Tseng ET4000 and ET6000 SVGA driver by: + + o [Unknown authors] + + o Dirk Hohndel <hohndel@XFree86.Org> + + o Koen Gadeyne <koen.gadeyne@barco.com> + + o ... and others + + XFree86-VidModeExtension and xvidtune client by: + + o Kaleb S. Keithley <kaleb@x.org> + + o David Dawes <dawes@XFree86.org> + + o Jon Tombs <tombs@XFree86.org> + + o Joe Moss <joe@XFree86.org> + + XFree86-Misc extension by: + + o Joe Moss <joe@XFree86.org> + + o David Dawes <dawes@XFree86.org> + + XFree86-DGA extension by: + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + + o Jon Tombs <tombs@XFree86.org> + + o Mark Vojkovich <mvojkovi@ucsd.edu> + + o Harm Hanemaayer <H.Hanemaayer@inter.nl.net>, + + o David Dawes <dawes@XFree86.org> + + XInput integration, devices and clients by: + + o Frederic Lepied <lepied@XFree86.Org> (XInput integration, + Wacom tablet, Joystick and extended mouse devices, xsetpointer + and xsetmode clients) + + o Patrick Lecoanet <lecoanet@cena.dgac.fr> (Elographics touch- + screen device) + + o Steven Lang <tiger@tyger.org> (Summagraphics tablet device) + + Other contributors: + + o Joerg Wunsch <joerg_wunsch@uriah.sax.de> (ET3000 banked mono), + + o Thomas Dickey <dickey@clark.net> (xterm "new" model ANSI col- + ors and VT220, VT520 emulation). + + o Eric Raymond <esr@snark.thyrsus.com> (new video mode documen- + tation), + + o and an entire horde of beta-testers around the world! + + +7. Contact information + +Ongoing development planning and support is coordinated by the XFree86 Core +Team. At this time the Core Team consists of (in alphabetical order): + + o Robin Cutshaw <robin@XFree86.org> + + o David Dawes <dawes@XFree86.org> + + o Marc Evans <marc@XFree86.org> + + o Harm Hanemaayer <H.Hanemaayer@inter.nl.net> + + o Dirk Hohndel <hohndel@XFree86.org> + + o Harald Koenig <koenig@XFree86.org> + + o Rich Murphey <rich@XFree86.org> + + o Jon Tombs <tombs@XFree86.org> + + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + + o David Wexelblat <dwex@XFree86.org> + +Mail sent to <Core@XFree86.org> will reach the core team. Please note that +support questions should be sent to <XFree86@XFree86.org>. + + +8. The XFree86 Project, Inc. + +The XFree86 Project, Inc, was founded to accomplish two major goals: + + 1. To provide a vehicle by which XFree86 can be represented in X Consortium, + Inc, the organization responsible for the design, development, and + release of The X Window System. + + 2. To provide some basic funding for acquisition of facilities for ongoing + XFree86 development, largely to consist of new video hardware and basic + computing facilities. + +The first of these was the primary motivation. We have held discussions with +the X Consortium on and off for many months, attempting to find an avenue by +which our loosely-organized free software project could be given a voice within +the X Consortium. The bylaws of the Consortium would not recognize such an +organization. After an initial investigation about funding, we decided to form +our own corporation to provide the avenue we needed to meet the requirements of +the X Consortium bylaws. + +By doing this, we were able to be involved in the beta-test interval for X11R6, +and have contributed the majority of XFree86 to the X11R6 and X11R6.1 core +release. The version of XFree86 in the initial X11R6 core is 3.0. The version +of XFree86 in the current X11R6.3 release is 3.2. + +An additional benefit of this incorporation is that The XFree86 Project, Inc +has obtained outside financial support for our work. This will hopefully give +us the freedom to be more pro-active in obtaining new video hardware, and +enable us to release better products more quickly, as we will be able to go and +get what we need, and get it into the hands of the people who can do the work. + +The current Board of Directors and Officers of the The XFree86 Project, Inc, +are: + + o David Dawes, President and Secretary + + o Dirk Hohndel, Vice-President + + o Glenn Lai, Director + + o Rich Murphey, Treasurer + + o Jim Tsillas, Director + + o Jon Tombs, Director + + o David Wexelblat, Director + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + +Email to <BOD@XFree86.org> reaches the board of directors. + +Our bylaws have been crafted in such a way to ensure that XFree86 is and always +will be a free software project. There is no personal financial benefit to any +member of the Core Team or any other XFree86 participant. All assets of the +corporation remain with the corporation, and, in the event of the dissolution +of the corporation, all assets will be turned over to the X Consortium, Inc. +It is hoped that by doing this, our corporation will be merely a formalization +of what we have been doing in the past, rather than something entirely new. + +As of March 1997, The XFree86 Project has revised its source/binary access and +release policy. The main points of the new policy are: + + o There will be no more time-limited public binary-only beta releases. + Instead we plan to increase the frequency of full public releases to about + four releases per year. + + o The source access/use is divided into three categories: + + o End users. End users have access to only the source of full public + releases. The main reason for this restriction is that our develop- + ment code often contains code from other sources which cannot be + released to the public immediately. + + o Active developers (members of the XFree86 ``developer team''). + Active developers must formally become non-voting members of the + XFree86 Project, and have full access to our internal development + source. They are permitted to make time-limited binaries (in coordi- + nation with the Core Team) of the servers they are actively working + on available to external testers for specific testing. + + o Commercial members. Commercial members are non-voting members of The + XFree86 Project who donate US$5000/year to the Project. Addition- + ally, companies who contribute significantly to the development + effort of XFree86 can be awarded commercial membership by the Core + Team on a yearly bases. Commercial members can use the internal + XFree86 development source for derived binary-only products providing + that they take full responsibility for supporting the product, and + don't call it ``XFree86'' (although the derivation of the product + must be acknowledged in any accompanying documentation). Binary + packages for the OSs we support which are simply compiled from our + internal source without significant added value are explicitly NOT + allowed. + +Here is a list of the organizations and individuals who have provided sponsor- +ship to The XFree86 Project, Inc, either by financial contribution or by the +donation of equipment and resources. The XFree86 Project, Inc gratefully +acknowledges these contributions, and hopes that we can do justice to them by +continuing to release high-quality free software for the betterment of the +Internet community as a whole. + + o UUNET Communications Services, Inc. <URL:http://www.uu.net/> + +UUNET Communications Services, Inc, deserves special mention. This + + + + + + + + +README for XFree86[tm] 3.3.2 + + + +organization stepped forward and contributed the entire 1994 X Consortium mem- +bership fee on a moment's notice. This single act ensured XFree86's involve- +ment in X11R6. + + o GUUG -- 1st German Linux Congress + +Also deserving of special mention are the organizers and attendees of the 1st +German Linux Congress in Heidelberg. Significant funding to The XFree86 Pro- +ject has been provided from its proceeds. + + o AIB Software Corporation <URL:http://www.aib.com/>, Herndon, VA + + o Roland Alder, Armin Fessler, Patrick Seemann, Martin Wunderli + + o American Micro Group + + o ATI Technologies Inc <URL:http://www.atitech.ca/> + + o Andrew Burgess + + o Berkeley Software Design, Inc <URL:http://www.bsdi.com/>, Falls Church, VA + + o Caldera, Inc. <URL:http://www.caldera.com/> + + o Delix Computer GmbH <URL:http://www.delix.de/>, Stuttgart, Germany + + o The Destek Group, Inc. <URL:http://www.destek.net/Destek/>, Nashua, NH + (formerly Synergytics) + + o Diamond Multimedia Systems, Inc. <URL:http://www.diamondmm.com/> + + o Digital Equipment Corporation <URL:http://www.digital.com/> + + o Elsa GmbH <URL:http://www.elsa.de/>, Aachen, Germany + + o Genoa Systems Corporation + + o Helius, Inc. <URL:http://www.helius.com/> + + o Hercules Computer Technology, Inc. <URL:http://www.hercules.com/> + + o Ralf Hockens + + o Dirk Hohndel + + o InfoMagic <URL:http://www.infomagic.com/>, Flagstaff, AZ + + o Daniel Kraemer + + o Epoch Networks, Inc. <URL:http://www.eni.net/>, Irvine, CA + + o Frank & Paige McCormick + + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + + o Internet Labs, Inc. + + o Linux International + + o Linux Support Team, Erlangen, Germany + + o LunetIX Softfair <URL:http://www.lunetix.de>, Berlin, Germany + + o Morse Telecommunications <URL:http://www.morse.net>, Long Beach, NY + + o MELCO, Inc <URL:http://www.melcoinc.co.jp> + + o MIRO Computer Products AG, Braunschweig, Germany + + o Rich & Amy Murphey + + o NCR Corp <URL:http://www.ncr.com/> + + o Brett Neumeier + + o Number Nine, Lexington, MA + + o Kazuyuki Okamoto, Japan + + o Prime Time Freeware <URL:http://www.ptf.com/>, San Bruno, CA + + o Red Hat Software <URL:http://www.redhat.com/>, Chapel Hill, NC + + o Norbert Reithinger + + o SPEA Software AG, Starnberg, Germany + + o STB Systems + + o Clifford M Stein + + o Joel Storm + + o S.u.S.E. GmbH <URL:http://www.suse.de>, Fuerth, Germany + + o Tekelec Airtronic GmbH <URL:http://www.tekelec.com>, Muenchen, Germany + + o Jim Tsillas + + o Trans-Ameritech Enterprises, Inc., Santa Clara, CA + + o Unifix Software GmbH, Braunschweig, Germany + + o Vixie Enterprises <URL:http://www.vix.com/>, La Honda, CA + + o Walnut Creek CDROM <URL:http://www.cdrom.com/>, Concord, CA + + o Xtreme s.a.s. <URL:http://www.xfree86.org/xtreme>, Livorno, Italy + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + +The XFree86 Project, Inc, welcomes the additional contribution of funding +and/or equipment. Such contributions should be tax-deductible; we will know +for certain when the lawyers get finished with the papers. For more informa- +tion, contact The XFree86 Project, Inc, at <BOD@XFree86.org> + + +9. Source and binary archive sites + +Source patches are available to upgrade X11R6.3 PL2 from the X Consortium (now +The Open Group) to XFree86 3.3.2. Binaries for many OSs are also available. +The distribution is available from: + + o ftp://ftp.XFree86.org/pub/XFree86 + +and the following mirror sites: + + o North America: + + o ftp://ftp2.XFree86.org/pub/XFree86 (source and binaries) + + o ftp://ftp.infomagic.com/pub/mirrors/XFree86-current (source and bina- + ries) + + o ftp://ftp.rge.com/pub/X/XFree86 and http://www.rge.com/pub/X/XFree86 + (source and binaries) + + o ftp://ftp.varesearch.com/pub/mirrors/xfree86 (source and binaries) + + o ftp://ftp.cs.umn.edu/pub/XFree86 (source and binaries) + + o ftp://ftp.kernel.org/pub/mirrors/xfree86 (source and binaries) + + + o Europe: + + o ftp://fvkma.tu-graz.ac.at/pub/XFree86 (source and binaries) + + o ftp://gd.tuwien.ac.at/hci/X11/XFree86 and + http://gd.tuwien.ac.at/hci/X11/XFree86 (source and binaries) + + o ftp://ftp.fee.vutbr.cz/pub/XFree86 (source patches and binaries) + + o ftp://ftp.gwdg.de/pub/xfree86/XFree86 (source and binaries) + + o ftp://ftp.mpi-sb.mpg.de/pub/X/mirror/ftp.xfree86.org (source and + binaries) + + o ftp://ftp.cs.tu-berlin.de/pub/X/XFree86 (source and binaries) + + o ftp://ftp.uni-erlangen.de/pub/Linux/MIRROR.xfree86 (source and Linux + binaries) + + o ftp://ftp.uni-stuttgart.de/pub/X11/Xfree86 (source and binaries) + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + + o ftp://ftp.funet.fi/pub/X11/XFree86 (source and binaries) + + o ftp://ftp.ibp.fr/pub/X11/XFree86 (source and binaries) + + o ftp://ftp.unina.it/pub/XFree86 (source and binaries) + + o ftp://ftp.pvv.unit.no/pub/XFree86 (source and binaries) + + o ftp://sunsite.doc.ic.ac.uk/packages/XFree86 (source and binaries) + + + + + o Asia/Australia: + + o ftp://x.physics.usyd.edu.au/pub/XFree86 (source and binaries) + + o ftp://ftp.netlab.is.tsukuba.ac.jp/pub/XFree86 (source and binaries) + + o ftp://ftp.iij.ad.jp/pub/X/XFree86/XFree86 (source and binaries) + + o ftp://ftp.kreonet.re.kr/pub/Linux/xfree86 (source and binaries) + + +Ensure that you are getting XFree86 3.3.2 - some of these sites may archive +older releases as well. Check the RELNOTES to find which files you need to +take from the archive. + + Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/README.sgml,v 3.75.2.33 1998/02/28 15:49:46 robin Exp $ + + + + + + $XConsortium: README.sgml /main/31 1996/10/28 05:43:24 kaleb $ + + + + + + + + + + + + + + + + + + + + + + + + + + + +README for XFree86[tm] 3.3.2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CONTENTS + + + +1. What's new in XFree86 3.3.2 .............................................. 1 + +2. Systems XFree86 has been tested on ....................................... 1 + +3. Supported video-card chip-sets ........................................... 2 + +4. Where to get more information ............................................ 5 + +5. Thanks ................................................................... 6 + +6. Credits .................................................................. 6 + +7. Contact information ..................................................... 16 + +8. The XFree86 Project, Inc. ............................................... 17 + +9. Source and binary archive sites ......................................... 21 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + i + + + +$XFree86: xc/programs/Xserver/hw/xfree86/doc/README,v 3.76.2.28 1998/03/01 13:58:20 dawes Exp $ diff --git a/release/sysinstall/help/hardware.hlp b/release/sysinstall/help/hardware.hlp new file mode 100644 index 0000000000000..690a5f18bf621 --- /dev/null +++ b/release/sysinstall/help/hardware.hlp @@ -0,0 +1,513 @@ +Table of Contents +----------------- +0. Document Conventions +1. Default Configuration (GENERIC kernel) +2. Using UserConfig to change FreeBSD kernel settings +3. LINT - other possible configurations +4. Supported Hardware + +See TROUBLE.TXT for Q&A on known hardware problems. + +========================================================================= + +0. Document Conventions +-- -------------------- + +We have `underlined' text which represents user input with `-' symbols +throughout this document to differentiate it from the machine output. + +1. Default (GENERIC) Configuration +-- ------------------------------- + +The following table contains a list of all of the devices that are +present in the GENERIC kernel. This is the essential part of the +operating system that is placed in your root partition during the +installation process. A compressed version of the GENERIC kernel is +also used on the installation floppy diskette and DOS boot image. + +The table describes the various parameters used by the driver to +communicate with the hardware in your system. There are four +parameters in the table, though not all are used by each and every +device: + + Port The starting I/O port used by the device, shown in hexadecimal. + + IOMem The lowest (or starting) memory address used by the device, + also shown in hexadecimal. + + IRQ The interrupt the device uses to alert the driver to an event, + given in decimal. + + DRQ The DMA (direct memory access) channel the device uses to move + data to and from main memory, also given in decimal. + +If an entry in the table has `n/a' for a value then it means that the +parameter in question does not apply to that device. A value of `dyn' +means that the correct value should be determined automatically by the +kernel when the system boots and that you don't need to worry about +it. + +If an entry is marked with an *, it means that support is currently +not available for it but should be back as soon as someone converts +the driver to work within the new 3.0 framework. + +FreeBSD GENERIC kernel: + + Port IRQ DRQ IOMem Description + ---- --- --- ----- --------------------------------- +fdc0 3f0 6 2 n/a Floppy disk controller +wdc0 1f0 14 n/a n/a IDE/MFM/RLL disk controller +wdc1 170 15 n/a n/a IDE/MFM/RLL disk controller + +adv0 n/a n/a n/a n/a AdvanSys ADP-9xx SCSI controller +ncr0 n/a n/a n/a n/a NCR PCI SCSI controller +bt0 330 dyn dyn dyn Buslogic SCSI controller +uha0 330 dyn 6 dyn Ultrastore 14f +aha0 330 dyn 5 dyn Adaptec 154x/1535 SCSI controller +ahb0 dyn dyn dyn dyn Adaptec 174x SCSI controller +ahc0 dyn dyn dyn dyn Adaptec 274x/284x/294x SCSI controller +aic0* 340 11 dyn dyn Adaptec 152x/AIC-6360 SCSI + controller +amd0 n/a n/a n/a n/a Tekram DC-390(T) / AMD 53c974 PCI SCSI +dpt n/a n/a n/a n/a DPT RAID SCSI controllers. +nca0* 1f88 10 dyn dyn ProAudioSpectrum cards +sea0* dyn 5 dyn c8000 Seagate ST01/02 8 bit controller + +wt0 300 5 1 dyn Wangtek and Archive QIC-02/QIC-36 + +psm0 60 12 n/a n/a PS/2 Mouse + +mcd0 300 10 n/a n/a Mitsumi CD-ROM +matcd0 230 n/a n/a n/a Matsushita/Panasonic CD-ROM +scd0 230 n/a n/a n/a Sony CD-ROM + +sio0 3f8 4 n/a n/a Serial Port 0 (COM1) +sio1 2f8 3 n/a n/a Serial Port 1 (COM2) + +lpt0 dyn 7 n/a n/a Printer Port 0 +lpt1 dyn dyn n/a n/a Printer Port 1 + +de0 n/a n/a n/a n/a DEC DC21x40 PCI based cards + (including 21140 100bT cards) +ed0 280 10 dyn d8000 WD & SMC 80xx; Novell NE1000 & + NE2000; 3Com 3C503; HP PC Lan+ +eg0 310 5 dyn dyn 3Com 3C505 +ep0 300 10 dyn dyn 3Com 3C509 +ex0 dyn dyn dyn n/a Intel EtherExpress Pro/10 cards +fe0 300 dyn n/a n/a Allied-Telesis AT1700, RE2000 and + Fujitsu FMV-180 series cards. +fxp0 dyn dyn n/a dyn Intel EtherExpress Pro/100B +tl0 dyn dyn n/a dyn TI TNET100 'ThunderLAN' cards. +ie0 300 10 dyn d0000 AT&T StarLAN 10 and EN100; + 3Com 3C507; NI5210 +ix0 300 10 dyn d0000 Intel EtherExpress cards +ex0 dyn dyn dyn dyn Intel EtherExpress Pro/10 cards +le0 300 5 dyn d0000 Digital Equipment EtherWorks + 2 and EtherWorks 3 +lnc0 280 10 n/a dyn Lance/PCnet cards + (Isolan, Novell NE2100, NE32-VL, + some PCnet-PCI cards) +vx0 dyn dyn n/a dyn 3Com 3c59x ((Fast) Etherlink III) +xl0 dyn dyn n/a dyn 3Com 3c900, 3c905 and 3c905B + ((Fast) Etherlink XL) +cs0 0x300 dyn n/a n/a Crystal Semiconductor CS89x0-based + cards. +ze0 300 5 n/a d8000 IBM/National Semiconductor + PCMCIA Ethernet Controller +zp0 300 10 n/a d8000 3Com 3c589 Etherlink III + PCMCIA Ethernet Controller +--- End of table --- + + +If the hardware in your computer is not set to the same settings as +those shown in the table and the item in conflict is not marked 'dyn', +you will have to either reconfigure your hardware or use UserConfig +to reconfigure the kernel to match the way your hardware is currently set +(see the next section). + +If the settings do not match, the kernel may be unable to locate +or reliably access the devices in your system. + + +2. Using UserConfig to change FreeBSD kernel settings +-- -------------------------------------------------- + +The FreeBSD kernel on the install floppy contains drivers for every +piece of hardware that could conceivably be used to install the rest +of the system with. Unfortunately, PC hardware being what it is, some +of these devices can be difficult to detect accurately, and for some, +the process of detecting another can cause irreversible confusion. + +To make this process easier, FreeBSD provides UserConfig. With this +UserConfig, the user can configure and disable device drivers before +the kernel is loaded, avoiding potential conflicts, and eliminating +the need to reconfigure hardware to suit the default driver settings. + +Once FreeBSD is installed, it will remember the changes made using +UserConfig, so that they only need be made once. + +It is important to disable drivers that are not relevant to a system +in order to minimize the possibility of interference, which can cause +problems that are difficult to track down. + +UserConfig features a command line interface for users with serial +consoles or a need to type commands, and a full screen 'visual' +interface, which provides point-and-shoot configuration functionality. + +Here is a sample UserConfig screen shot in 'visual' mode: + +---Active Drivers---------------------------10 Conflicts------Dev---IRQ--Port-- + Storage : (Collapsed) + Network : + NE1000,NE2000,3C503,WD/SMC80xx Ethernet adapters CONF ed0 5 0x280 + NE1000,NE2000,3C503,WD/SMC80xx Ethernet adapters CONF ed1 5 0x300 + Communications : (Collapsed) + Input : (Collapsed) + Multimedia : +---Inactive Drivers-------------------------------------------Dev-------------- + Storage : + Network : (Collapsed) + Communications : + Input : + Multimedia : + PCI : + +---Parameters-for-device-ed0--------------------------------------------------- + Port address : 0x280 Memory address : 0xd8000 + IRQ number : 5 Memory size : 0x2000 + Flags : 0x0000 +------------------------------------------------------------------------------- + IO Port address (Hexadecimal, 0x1-0x2000) + [TAB] Change fields [Q] Save device parameters + + + The screen is divided into four sections : + + - Active Drivers. Listed here are the device drivers that are currently + enabled, and their basic parameters. + - Inactive Drivers. These drivers are present, but are disabled. + - Parameter edit field. This area is used for editing driver parameters. + - Help area. Keystroke help is displayed here. + +One of the Active and Inactive lists is always in use, and the current +entry in the list will be shown with a highlight bar. If there are +more entries in a list than can be shown, it will scroll. The bar can +be moved up and down using the cursor keys, and moved between lists +with the TAB key. + +Drivers in the Active list may be marked "CONF". This indicates that +one or more of their parameters conflicts with another device, and +indicates a potential for problems. The total number of conflicts is +displayed at the top of the screen. + +As a general rule, conflicts should be avoided, either by disabling +conflicting devices that are not present in the system, or by altering +their configuration so that they match the installed hardware. + +In the list areas, drivers are grouped by their basic function. +Groups can be 'Collapsed' to simplify the display (this is the default +state for all groups). If a group is collapsed, it will be shown with +'(Collapsed)' in the list, as above. To Expand a Collapsed group, +position the highlight bar over the group heading and press Enter. To +Collapse it again, repeat the process. + +When a device driver in the Active list is highlighted, its full +parameters are displayed in the Parameter edit area. Note that not +all drivers use all possible parameters, and some hardware supported +by drivers may not use all the parameters the driver supports. + +To disable a driver, go to the Active list, Expand the group it is in, +highlight the driver and press Del. The driver will move to its group +in the Inactive list. (If the group is collapsed or off the screen, +you may not see the driver in its new location.) + +To enable a driver, go to the Inactive list, Expand the group it is +in, highlight the driver and press Enter. The highlight will move to +the Active list, and the driver you have just enabled will be +highlighted, ready to be configured. + +To configure a driver, go to the Active list, Expand the group it is +in, highlight the driver and press Enter. The cursor will move to the +Parameter edit area, and the device's parameters may be edited. + +While editing parameters, the TAB and cursor keys can be used to move +between fields. Most numeric values (except IRQ) are entered in +hexadecimal, as indicated by the '0x' at the beginning of the field. +The allowable values for a given field are show in the Key Help area +when the field is active. + +To finish configuring a driver, press 'Q'. + +Note that PCI and EISA devices can be probed reliably, therefore they +are not shown in the table above nor can their settings be changed +using UserConfig. PCI drivers may be seen in the "PCI Devices" section +in the Active Devices list, if you wish to check for their presence. + + +3. LINT - other possible configurations +-- ------------------------------------ + +The following drivers are not in the GENERIC kernel but remain +available to those who do not mind compiling a custom kernel (see +section 6 of FreeBSD.FAQ). The LINT configuration file +(/sys/i386/conf/LINT) also contains prototype entries for just about +every device supported by FreeBSD and is a good general reference. + +The device names and a short description of each are listed below. The port +numbers, etc, are not meaningful here since you will need to compile a +custom kernel to gain access to these devices anyway and can thus +adjust the addresses to match the hardware in your computer in the process. +The LINT file contains prototype entries for all of the below which you +can easily cut-and-paste into your own file (or simply copy LINT and edit +it to taste): + +ctx: Cortex-I frame grabber +cx: Cronyx/Sigma multiport sync/async +cy: Cyclades high-speed serial driver +el: 3Com 3C501 +fea: DEV DEFEA EISA FDDI adapter +fpa: DEC DEFPA PCI FDDI adapter +gp: National Instruments AT-GPIB and AT-GPIB/TNT board +gsc: Genius GS-4500 hand scanner +gus: Gravis Ultrasound - Ultrasound, Ultrasound 16, Ultrasound MAX +gusxvi: Gravis Ultrasound 16-bit PCM +hea: Efficient ENI-155p ATM PCI adapter +hfa: FORE PCA-200E ATM PCI adapter +joy: Joystick +labpc: National Instrument's Lab-PC and Lab-PC+ +meteor: Matrox Meteor frame-grabber card +bktr: Brooktree Bt848 based frame-grabber cards. +mpu: Roland MPU-401 stand-alone card +mse: Microsoft, Logitech, ATI bus mouse ports +mss: Microsoft Sound System +nic: Dr Neuhaus NICCY 3008, 3009 & 5000 ISDN cards +opl: Yamaha OPL-2 and OPL-3 FM - SB, SB Pro, SB 16, ProAudioSpectrum +pas: ProAudioSpectrum PCM and MIDI +pca: PCM audio ("/dev/audio") through your PC speaker +pcm: PCM audio on most modern ISA audio codecs +psm: PS/2 mouse port +rc: RISCom/8 multiport card +sb: SoundBlaster PCM - SoundBlaster, SB Pro, SB16, ProAudioSpectrum +sbmidi: SoundBlaster 16 MIDI interface +sbxvi: SoundBlaster 16 +si: Specialix SI/XIO/SX (old and enhanced ISA, PCI, EISA) serial +spigot: Creative Labs Video Spigot video-acquisition board +uart: Stand-alone 6850 UART for MIDI +wds: Western Digital WD7000 IDE + +--- end of list --- + + +4. Supported Hardware +-- ------------------ + +FreeBSD currently runs on a wide variety of ISA, VLB, EISA and PCI bus +based PC's, ranging from 386sx to Pentium class machines (though the +386sx is not recommended). Support for generic IDE or ESDI drive +configurations, various SCSI controller, network and serial cards is +also provided. + +What follows is a list of all peripherals currently known to work with +FreeBSD. Other configurations may also work, we have simply not as yet +received confirmation of this. + + +4.1. Disk Controllers +---- ---------------- + +WD1003 (any generic MFM/RLL) +WD1007 (any generic IDE/ESDI) +IDE +ATA + +Adaptec 1535 ISA SCSI controllers +Adaptec 154x series ISA SCSI controllers +Adaptec 174x series EISA SCSI controller in standard and enhanced mode. +Adaptec 274X/284X/2940/3940 (Narrow/Wide/Twin) series ISA/EISA/PCI SCSI +controllers. +Adaptec AIC7850/AIC7895 on-board SCSI controllers. + +Support for the following controllers is rather weak: +Adaptec 1510 series ISA SCSI controllers (not for bootable devices) +Adaptec 152x series ISA SCSI controllers +Adaptec AIC-6260 and AIC-6360 based boards, which includes the AHA-152x +and SoundBlaster SCSI cards. + +** Note: You cannot boot from the SoundBlaster cards as they have no + on-board BIOS, such being necessary for mapping the boot device into the + system BIOS I/O vectors. They're perfectly usable for external tapes, + CDROMs, etc, however. The same goes for any other AIC-6x60 based card + without a boot ROM. Some systems DO have a boot ROM, which is generally + indicated by some sort of message when the system is first powered up + or reset, and in such cases you *will* also be able to boot from them. + Check your system/board documentation for more details. + + +AdvanSys (Advanced Systems) ABP510/542/5150 ISA and ABP5140/5142 ISA PnP +cards, ABP842/852 VLB cards, and ABP920/930/930U/930UA/950/960/960U/970/970U +PCI cards. + +** Note: The ADP510/5140/5150 boards were shipped by HP with the 4020i + CD-R drive but with NO BIOS, so these models cannot control boot devices + though they can be used for any secondary SCSI device. Also note that the + ABP5140/5142 boards were rebadged by SIIG as the "SpeedMaster i540/i542" + + +Buslogic 545S & 545c +Buslogic 445S/445c VLB SCSI controller +Buslogic 742A, 747S, 747c EISA SCSI controller. +Buslogic 946c PCI SCSI controller +Buslogic 956c PCI SCSI controller + +SymBios (formerly NCR) 53C810, 53C825, 53c860 and 53c875 PCI SCSI +controllers: + ASUS SC-200 + Data Technology DTC3130 (all variants) + NCR cards (all) + Symbios cards (all) + Tekram DC390W, 390U and 390F + Tyan S1365 + +Tekram DC390 and DC390T controllers (maybe other cards based on the +AMD 53c974 as well). + +NCR5380/NCR53400 ("ProAudio Spectrum") SCSI controller. + +DTC 3290 EISA SCSI controller in 1542 emulation mode. + +UltraStor 14F, 24F and 34F SCSI controllers. + +Seagate ST01/02 SCSI controllers. + +Future Domain 8xx/950 series SCSI controllers. + +WD7000 SCSI controller. + +With all supported SCSI controllers, full support is provided for +SCSI-I & SCSI-II peripherals, including Disks, tape drives (including +DAT and 8mm Exabyte) and CD ROM drives. + +The following CD-ROM type systems are supported at this time: +(cd) SCSI interface (also includes ProAudio Spectrum and + SoundBlaster SCSI) +(mcd) Mitsumi proprietary interface (all models, driver is rather stale) +(matcd) Matsushita/Panasonic (Creative SoundBlaster) proprietary + interface (562/563 models) +(scd) Sony proprietary interface (all models) +(wcd) ATAPI IDE interface. + + +4.2. Network cards +---- ------------- + +Allied-Telesis AT1700 and RE2000 cards + +AMD PCnet/PCI (79c970 & 53c974 or 79c974) + +SMC Elite 16 WD8013 ethernet interface, and most other WD8003E, +WD8003EBT, WD8003W, WD8013W, WD8003S, WD8003SBT and WD8013EBT +based clones. SMC Elite Ultra is also supported. + +Texas Instruments ThunderLAN PCI NICs, including the following: + Compaq Netelligent 10, 10/100, 10/100 Proliant, 10/100 Dual-Port + Compaq Netelligent 10/100 TX Embedded UTP, 10 T PCI UTP/Coax, 10/100 TX UTP + Compaq NetFlex 3P, 3P Integrated, 3P w/ BNC + Olicom OC-2135/2138, OC-2325, OC-2326 10/100 TX UTP + +DEC EtherWORKS III NICs (DE203, DE204, and DE205) +DEC EtherWORKS II NICs (DE200, DE201, DE202, and DE422) +DEC DC21040, DC21041, or DC21140 based NICs (SMC Etherpower 8432T, DE245, etc) +DEC FDDI (DEFPA/DEFEA) NICs + +Efficient ENI-155p ATM PCI + +FORE PCA-200E ATM PCI + +Fujitsu MB86960A/MB86965A + +HP PC Lan+ cards (model numbers: 27247B and 27252A). + +Intel EtherExpress (not recommended due to driver instability) +Intel EtherExpress Pro/10 +Intel EtherExpress Pro/100B PCI Fast Ethernet + +Isolan AT 4141-0 (16 bit) +Isolink 4110 (8 bit) + +Novell NE1000, NE2000, and NE2100 ethernet interface. + +3Com 3C501 cards + +3Com 3C503 Etherlink II + +3Com 3c505 Etherlink/+ + +3Com 3C507 Etherlink 16/TP + +3Com 3C509, 3C579, 3C589 (PCMCIA), 3C590/592/595/900/905/905B PCI and EISA +(Fast) Etherlink III / (Fast) Etherlink XL + +Toshiba ethernet cards + +PCMCIA ethernet cards from IBM and National Semiconductor are also +supported. + +Note that NO token ring cards are supported at this time as we're +still waiting for someone to donate a driver for one of them. Any +takers? + + +4.3. Misc +---- ---- + +AST 4 port serial card using shared IRQ. + +ARNET 8 port serial card using shared IRQ. +ARNET (now Digiboard) Sync 570/i high-speed serial. + +Boca BB1004 4-Port serial card (Modems NOT supported) +Boca IOAT66 6-Port serial card (Modems supported) +Boca BB1008 8-Port serial card (Modems NOT supported) +Boca BB2016 16-Port serial card (Modems supported) + +Cyclades Cyclom-y Serial Board. + +STB 4 port card using shared IRQ. + +SDL Communications Riscom/8 Serial Board. +SDL Communications RISCom/N2 and N2pci high-speed sync serial boards. + +Specialix SI/XIO/SX multiport serial cards, with both the older +SIHOST2.x and the new "enhanced" (transputer based, aka JET) host cards. +ISA, EISA and PCI are supported. + +Stallion multiport serial boards: EasyIO, EasyConnection 8/32 & 8/64, +ONboard 4/16 and Brumby. + +Adlib, SoundBlaster, SoundBlaster Pro, ProAudioSpectrum, Gravis UltraSound +and Roland MPU-401 sound cards. + +Connectix QuickCam +Matrox Meteor Video frame grabber +Creative Labs Video Spigot frame grabber +Cortex1 frame grabber +Various Frame grabbers based on Brooktree Bt848 chip. + +HP4020, HP6020, Philips CDD2000/CDD2660 and Plasmon CD-R drives. + +Bus mice + +PS/2 mice + +Standard PC Joystick + +X-10 power controllers + +GPIB and Transputer drivers. + +Genius and Mustek hand scanners. + +Floppy tape drives (some rather old models only, driver rather stale) + + +FreeBSD currently does NOT support IBM's microchannel (MCA) bus. diff --git a/release/sysinstall/help/install.hlp b/release/sysinstall/help/install.hlp new file mode 100644 index 0000000000000..dfc1697d56b07 --- /dev/null +++ b/release/sysinstall/help/install.hlp @@ -0,0 +1,513 @@ ++===================== Installing FreeBSD ==========================+ +| | +| Table of Contents: | +| | +| 0.0 Quick Start: | +| 0.1 Installing FreeBSD from CDROM or the Internet. | +| | +| 1.0 Detail on various installation types: | +| 1.1 Installing from a network CDROM | +| 1.2 Installing from Floppies | +| 1.3 Installing from a DOS partition | +| 1.4 Installing from QIC/SCSI tape | +| 1.5 Installing over a network using NFS or FTP | +| 1.5.1 NFS Installation tips | +| 1.5.2 FTP Installation tips | +| | +| 2.0 DOS User's Q&A section. | +| 2.1 How do I make space for FreeBSD? | +| 2.2 Can I use compressed DOS filesystems from FreeBSD? | +| 2.3 Can I use DOS extended partitions? | +| 2.4 Can I run DOS executables under FreeBSD? | +| | ++=====================================================================+ + +Author: Jordan K. Hubbard +Last updated: Tue Mar 24 00:56:14 PST 1998 + +0.0 Quick Start +--- ----------- + +This manual documents the process of making a new installation of +FreeBSD on your machine. If you are upgrading from a previous +release of FreeBSD, please see the file UPGRADE.TXT for important +information on upgrading. If you are not familiar with configuring +PC hardware for FreeBSD, you should also read the HARDWARE.TXT file - +it contains important information which may save you a lot of grief. + +If you're new to FreeBSD then you should also read EVERYTHING listed +in the Documentation menu on the boot floppy. It may seem like a lot +to read, but the time you spend now reading the documents will be made +up many times over because you were adequately prepared. Also, you will +know the types of information available should you get stuck later. +Once the system is installed, you can also revisit this menu and use a +WEB browser to read the installed FAQ (Frequently Asked Questions) and +Handbook HTML documentation sets for FreeBSD. You can also use the +browser to visit other WEB sites on the net (like http://www.freebsd.org) +if you have an Internet connection. See ABOUT.TXT for more information +on the resources available to you. + +The best laid plans sometimes go awry, so if you run into trouble take a +look at TROUBLE.TXT which contains valuable troubleshooting information. + +DISCLAIMER: While FreeBSD does its best to safeguard against +accidental loss of data, it's still more than possible to WIPE OUT +YOUR ENTIRE DISK with this installation! Please do not proceed to the +final FreeBSD installation menu unless you've adequately backed up any +important data first! We really mean it! + +FreeBSD requires a 386 or better processor to run (sorry, there is no +support for '286 processors), 5 megs of RAM to install and 4 megs of +ram to run. You will need at least 80 megs of free hard drive space. +See below for ways of shrinking existing DOS partitions in order to +install FreeBSD. + + +0.1 Installing FreeBSD from CDROM or the Internet +--- --------------------------------------------- + +The easiest type of installation is from CD. If you have a supported +CDROM drive and a FreeBSD installation CD from Walnut Creek CDROM, +there are 3 ways of starting the installation from it: + + 1. If your system supports bootable CDROM media (usually an option + which can be selectively enabled in the controller's setup menu + or in the PC BIOS for some systems) and you have it enabled, + FreeBSD 2.2.1 and later CDs support the "El Torrito" bootable + CD standard. Simply put the installation CD in your CDROM drive + and boot the system to begin installation. + + 2. If you have drivers which allow you to see your CDROM drive + from from DOS, first disable any fancy memory managers you may + have configured, change directory to the CDROM (E:\ in the example + below) and then type this: + + E> install + + and you should boot directly into the FreeBSD installation. + + If either steps fail, please go on to step 3. + + 3. Build a FreeBSD boot floppy from the floppies/boot.flp + file in a FreeBSD distribution. Either simply use the + ``makeflp.bat'' script from DOS or read floppies/README.TXT + for more information on creating bootable floppies under + different operating systems. Then you simply boot + from the floppy and you should go into the FreeBSD + installation. + +If you don't have a CDROM and would like to simply install over the +net using PPP, slip or a dedicated connection, simply fetch the +<FreeBSD-release>/floppies/boot.flp file from: + + ftp://ftp.freebsd.org/pub/FreeBSD + +or one of its many mirrors (http://www.freebsd.org/handbook/mirrors.html) +and follow step 3 above. You should also read the floppies/README.TXT +file as it contains important information for downloaders. + +Once you have a boot floppy made, please go to section 1.5 of this +document for additional tips on installing via FTP or NFS. + + +1.0 Detail on various installation types +--- ------------------------------------ + +Once you've gotten yourself to the initial installation screen +somehow, you should be able to follow the various menu prompts and go +from there. If you've never used the FreeBSD installation before, you +are also encouraged to read some of the documentation in the the +Documentation submenu as well as the general "Usage" instructions on +the first menu. + + REMEMBER: If you get stuck at a screen, hit F1 for the online + documentation for that section. + +If you've never installed FreeBSD before, or even if you have, the +"Novice" installation mode is the most recommended since it makes sure +that you'll visit all the various important checklist items along the +way. If you're much more comfortable with the FreeBSD installation +process and know _exactly_ what you want to do, use the Express or +Custom installation options. If you're upgrading an existing system, +use the Upgrade option. + +The FreeBSD installer supports the direct use of floppy, DOS, tape, +CDROM, FTP, NFS and UFS partitions as installation media, further tips +on installing from each type of media listed below. + + +1.1 Installing from a network CDROM +--- ------------------------------- + +If you simply wish to install from a local CDROM drive then see the +Quick Start section. If you don't have a CDROM drive on your system +and wish to use a FreeBSD distribution CD in the CDROM drive of +another system to which you have network connectivity, there are +several ways of going about it: + +1. If you would be able to FTP install FreeBSD directly from the CDROM + drive in some FreeBSD machine, it's quite easy: You simply add the + following line to the password file (using the vipw command): + + ftp:*:99:99::0:0:FTP:/cdrom:/sbin/nologin + +And anyone else on your network will now be able to chose a Media type +of FTP and type in: ``ftp://<machine with CDROM drive>'' after picking +"Other" in the ftp sites menu. + +2. If you would rather use NFS to export the CDROM directly to the + machine(s) you'll be installing from, you need to first add an + entry to the /etc/exports file (on the machine with the CDROM drive) + which looks something like this: + + /cdrom -ro ziggy.foo.com + + To allow the machine "ziggy.foo.com" to mount the CDROM directly + via NFS during installation. The machine with the CDROM must also + be configured as an NFS server, of course, and if you're not sure how + to do that then an NFS installation is probably not the best choice + for you unless you're willing to read up on rc.conf(5) and configure + things appropriately. Assuming that this part goes smoothly, you + should be able to enter: <cdrom-host>:/cdrom as the path for an NFS + installation when the target machine is installed. + + +1.2 Installing from Floppies +--- ------------------------ + +If you must install from floppy disks, either due to unsupported +hardware or just because you enjoy doing things the hard way, you must +first prepare some floppies for the install. + +First, make a boot floppy as described in floppies/README.TXT + +Second, read the file LAYOUT.TXT and pay special attention to the +"Distribution format" section since it describes which files you're +going to need to put onto floppy and which you can safely skip. + +Next you will need, at minimum, as many 1.44MB floppies as it takes to +hold all files in the bin (binary distribution) directory. If you're +preparing these floppies under DOS, then THESE floppies *must* be +formatted using the MS-DOS FORMAT command. If you're using Windows, +use the Windows File Manager format command. + +Don't trust Factory Preformatted floppies! Format them again +yourself, just to make sure. Many problems reported by our users in +the past have resulted from the use of improperly formatted media, +which is why I'm taking such special care to mention it here! + +If you're creating the floppies from another FreeBSD machine, a format +is still not a bad idea though you don't need to put a DOS filesystem +on each floppy. You can use the `disklabel' and `newfs' commands to +put a UFS filesystem on a floppy, as the following sequence of +commands illustrates: + + fdformat -f 1440 fd0.1440 + disklabel -w -r fd0.1440 floppy3 + newfs -t 2 -u 18 -l 1 -i 65536 /dev/rfd0 + +After you've formatted the floppies for DOS or UFS, you'll need to +copy the files onto them. The distribution files are split into +chunks conveniently sized so that 5 of them will fit on a conventional +1.44MB floppy. Go through all your floppies, packing as many files as +will fit on each one, until you've got all the distributions you want +packed up in this fashion. Each distribution should go into its own +subdirectory on the floppy, e.g.: a:\bin\bin.inf, a:\bin\bin.aa, +a:\bin\bin.ab, ... + +IMPORTANT NOTE: The bin.inf file also needs to go on the first floppy +of the bin set since it is read by the installation program in order +to figure out how many additional pieces to look for when fetching and +concatenating the distribution. When putting distributions onto +floppies, the <distname>.inf file MUST occupy the first floppy of each +distribution set! + +Once you come to the Media screen of the install, select "Floppy" and +you'll be prompted for the rest. + + +1.3 Installing from a DOS partition +--- ------------------------------- + +To prepare for installation from an MS-DOS partition you should simply +copy the files from the distribution into a directory called +"FREEBSD" on the Primary DOS partition ("Drive C:"). For example, to do +a minimal installation of FreeBSD from DOS using files copied from the +CDROM, you might do something like this: + + C:\> MD C:\FREEBSD + C:\> XCOPY /S E:\BIN C:\FREEBSD\BIN + +Assuming that `E:' was where your CD was mounted. + +For as many `DISTS' as you wish to install from DOS (and you have free +space for), install each one in a directory under `C:\FREEBSD' - the +BIN dist is only the minimal requirement. + +IMPORTANT NOTE: Though you can do all of the above by hand if you +really want to, all of it is much more easily accomplished now by +Robert Nordier's "setup.exe" program. It will give you a menu of +distribution choices, verify that you have enough free space and do +all the copying to C:\FREEBSD for you automatically. + +Once you've copied the directories or run setup.exe and let it do all +the work for you, you can simply launch the installation from DOS by +running the install.bat script (NOTE: Some memory managers don't like +this - disable QEMM or EMM386 if they're running before trying this) +or making a boot floppy as described in section 0.1. + + +1.4 Installing from QIC/SCSI Tape +--- ----------------------------- + +When installing from tape, the installation program expects the files +to be simply tar'ed onto it, so after fetching all of the files for +the distributions you're interested in, simply tar them onto the tape +with a command something like this: + + cd /where/you/have/your/dists + tar cvf /dev/rwt0 (or /dev/rst0) dist1 .. dist2 + +When you go to do the installation, you should also make sure that you +leave enough room in some temporary directory (which you'll be allowed +to choose) to accommodate the FULL contents of the tape you've +created. Due to the non-random access nature of tapes, this method of +installation requires quite a bit of temporary storage! You should +expect to require as much temporary storage as you have stuff written +on tape. + +SPECIAL NOTE: When going to do the installation, the tape must be in +the drive *before* booting from the boot floppy. The installation +"probe" may otherwise fail to find it. + +Now create a boot floppy as described in section 0.1 and proceed with +the installation. + + +1.5 Installing over a network using FTP or NFS +--- ------------------------------------------ + +After making a boot floppy as described in the first section, you can +load the rest of the installation over a network using one of 3 types +of connections: + + Serial port: SLIP / PPP + Parallel port: PLIP (using ``laplink'' style cable) + Ethernet: A standard Ethernet controller (including + certain PCCARD devices). + +Serial Port +----------- + +SLIP support is rather primitive, and is limited primarily to +hard-wired links, such as a serial cable running between two +computers. The link must be hard-wired because the SLIP installation +doesn't currently offer a dialing capability. If you need to dial out +with a modem or otherwise dialog with the link before connecting to +it, then I recommend that the PPP utility be used instead. + +If you're using PPP, make sure that you have your Internet Service +Provider's IP address and DNS information handy as you'll need to know +it fairly early in the installation process. You may also need to +know your own IP address, though PPP supports dynamic address +negotiation and may be able to pick up this information directly from +your ISP if they support it. + +You will also need to know how to use the various "AT commands" for +dialing out with your particular brand of modem as the PPP dialer +provides only a very simple terminal emulator. + + +Parallel Port +------------- + +If a hard-wired connection to another FreeBSD (2.0R or later) or Linux +machine is available, you might also consider installing over a +"laplink" style parallel port cable. The data rate over the parallel +port is much higher than what is typically possible over a serial line +(up to 50k/sec), thus resulting in a quicker installation. It's not +typically necessary to use "real" IP addresses when using a +point-to-point parallel cable in this way and you can generally just +use RFC 1918 style addresses for the ends of the link (e.g. 10.0.0.1, +10.0.0.2, etc). + +IMPORTANT NOTE: If you use a Linux machine rather than a FreeBSD +machine as your PLIP peer, you will also have to specify "link0" in +the TCP/IP setup screen's ``extra options for ifconfig'' field. + + +Ethernet +-------- + +FreeBSD supports most common PC Ethernet cards, a table of supported +cards (and their required settings) being provided as part of the +FreeBSD Hardware Guide (see the Documentation menu on the boot floppy +or the top level directory of the CDROM). If you are using one of the +supported PCMCIA Ethernet cards, also be sure that it's plugged in +_before_ the laptop is powered on! FreeBSD does not, unfortunately, +currently support "hot insertion" of PCMCIA cards during installation. + +You will also need to know your IP address on the network, the +"netmask" value for your address class and the name of your machine. +Your system administrator can tell you which values are appropriate to +your particular network setup. If you will be referring to other +hosts by name rather than IP address, you'll also need a name server +and possibly the address of a gateway (if you're using PPP, it's your +provider's IP address) to use in talking to it. + +If you do not know the answers to these questions then you should +really probably talk to your system administrator _first_ before +trying this type of installation! Using a randomly chosen IP address +or netmask on a live network will almost certainly get you shot at +dawn. + +Once you have a network connection of some sort working, the +installation can continue over NFS or FTP. + + +1.5.1 NFS installation tips +----- --------------------- + + NFS installation is fairly straight-forward: Simply copy the + FreeBSD distribution files you want onto a server somewhere + and then point the NFS media selection at it. + + If this server supports only "privileged port" access (as is + generally the default for Sun and Linux workstations), you + will need to set this option in the Options menu before + installation can proceed. + + If you have a poor quality Ethernet card which suffers from very + slow transfer rates, you may also wish to toggle the appropriate + Options flag. + + In order for NFS installation to work, the server must also support + "subdir mounts", e.g. if your FreeBSD 2.2 distribution directory + lives on: ziggy:/usr/archive/stuff/FreeBSD + Then ziggy will have to allow the direct mounting of + /usr/archive/stuff/FreeBSD, not just /usr or /usr/archive/stuff. + + In FreeBSD's /etc/exports file this is controlled by the + ``-alldirs'' option. Other NFS servers may have different + conventions. If you are getting `Permission Denied' messages + from the server then it's likely that you don't have this + properly enabled! + + +1.5.2 FTP Installation tips +----- --------------------- + + FTP installation may be done from any mirror site containing a + reasonably up-to-date version of FreeBSD. A full menu of + reasonable choices for almost any location in the world is + provided in the FTP site menu during installation. + + If you are installing from some other FTP site not listed in + this menu, or you are having troubles getting your name server + configured properly, you can also specify your own URL by + selecting the ``Other'' choice in that menu. A URL can + contain a hostname or an IP address, so the following would + work in the absence of a name server: + + ftp://192.216.191.11/pub/FreeBSD/2.2-RELEASE + + There are two FTP installation modes you can use: + + o FTP: + + For all FTP transfers, use the standard "Active" mode for + transfers. This will not work through most firewalls but + will often work best with older ftp servers that do not + support passive mode. If your connection hangs with + passive mode, try this one! + + o FTP Passive: + + For all FTP transfers, use "Passive" mode. This allows + the user to pass through firewalls that do not allow + incoming connections on random port addresses. + + NOTE: ACTIVE AND PASSIVE MODES ARE NOT THE SAME AS A `PROXY' + CONNECTIONS, WHERE A PROXY FTP SERVER IS LISTENING ON A + DIFFERENT PORT! + + In such instances, you should specify the URL as something like: + + ftp://foo.bar.com:1234/pub/FreeBSD + + Where "1234" is the port number of the proxy ftp server. + + +2.0 DOS user's Question and Answer section +--- -------------------------------------- + +2.1 Help! I have no space! Do I need to delete everything first? +--- -------------------------------------------------------------- + +If your machine is already running DOS and has little or no free space +available for FreeBSD's installation, all is not lost! You may find +the "FIPS" utility, provided in the tools/ subdirectory on the FreeBSD +CDROM or on the various FreeBSD ftp sites, to be quite useful. + +FIPS allows you to split an existing DOS partition into two pieces, +preserving the original partition and allowing you to install onto the +second free piece. You first "defrag" your DOS partition, using the +DOS 6.xx "DEFRAG" utility or the Norton Disk tools, then run FIPS. It +will prompt you for the rest of the information it needs. Afterwards, +you can reboot and install FreeBSD on the new partition. Also note +that FIPS will create the second partition as a "clone" of the first, +so you'll actually see that you now have two DOS Primary partitions +where you formerly had one. Don't be alarmed! You can simply delete +the extra DOS Primary partition (making sure it's the right one by +examining its size! :) + +NOTE: FIPS does NOT currently work with FAT32 or VFAT style partitions +as used by newer versions of Windows 95. To split up such a +partition, you will need a commercial product such as Partition Magic +3.0. Sorry, but this is just the breaks if you've got a Windows +partition hogging your whole disk and you don't want to reinstall from +scratch. + +2.2 Can I use compressed DOS filesystems from FreeBSD? +--- -------------------------------------------------- + +No. If you are using a utility such as Stacker(tm) or +DoubleSpace(tm), FreeBSD will only be able to use whatever portion of +the filesystem you leave uncompressed. The rest of the filesystem +will show up as one large file (the stacked/dblspaced file!). DO NOT +REMOVE THAT FILE as you will probably regret it greatly! + +It is probably better to create another uncompressed DOS extended +partition and use this for communications between DOS and FreeBSD if +such is your desire. + + +2.3 Can I mount my DOS extended partitions? +--- --------------------------------------- + +Yes. DOS extended partitions are mapped in at the end of the other +``slices'' in FreeBSD, e.g. your D: drive might be /dev/sd0s5, your E: +drive /dev/sd0s6, and so on. This example assumes, of course, that +your extended partition is on SCSI drive 0. For IDE drives, substitute +``wd'' for ``sd'' appropriately. You otherwise mount extended +partitions exactly like you would mount any other DOS drive, e.g.: + +mount -t msdos /dev/sd0s5 /dos_d + + +2.4 Can I run DOS binaries under FreeBSD? +--- ------------------------------------- + +Ongoing work with BSDI's doscmd utility is bringing this much closer to +being a reality in FreeBSD 3.0, though it still has some rough edges. +If you're interested in working on this, please send mail to +emulation@FreeBSD.org and indicate that you're interested in joining +this ongoing effort! + +There is also a neat utility called "pcemu" in the ports collection +which emulates an 8088 and enough BIOS services to run DOS text mode +applications. It requires the X Window System (provided as XFree86 +3.2) to operate. + + +---- End of Installation Guide --- diff --git a/release/sysinstall/help/partition.hlp b/release/sysinstall/help/partition.hlp index 37520bfbaefed..8e07d3dc79bbd 100644 --- a/release/sysinstall/help/partition.hlp +++ b/release/sysinstall/help/partition.hlp @@ -72,16 +72,16 @@ looking at disk storage works: In FreeBSD's new system, a device name can be broken up into up to 3 -parts. Take a typical name like ``/dev/da0s1a'': +parts. Take a typical name like ``/dev/sd0s1a'': The first three characters represent the drive name. If we had - a system with two SCSI drives on it then we'd see /dev/da0 and - /dev/da1 as the device entries representing the entire drives. + a system with two SCSI drives on it then we'd see /dev/sd0 and + /dev/sd1 as the device entries representing the entire drives. Next you have the "slice" (or "FDISK Partition") number, - as seen in the Partition Editor. Assuming that our da0 + as seen in the Partition Editor. Assuming that our sd0 contained two slices, a FreeBSD slice and a DOS slice, that - would give us /dev/da0s1 and /dev/da0s2 as device entries pointing + would give us /dev/sd0s1 and /dev/sd0s2 as device entries pointing to the entire slices. Next, if a slice is a FreeBSD slice, you can have a number of @@ -89,13 +89,13 @@ parts. Take a typical name like ``/dev/da0s1a'': These partitions are where various filesystems or swap areas live, and using our hypothetical two-SCSI-disk machine again, we might - have something like the following layout on da0: + have something like the following layout on sd0: Name Mountpoint ---- ---------- - da0s1a / - da0s1b <swap space> - da0s1e /usr + sd0s1a / + sd0s1b <swap space> + sd0s1e /usr Because of historical convention, there is also a short-cut, or "compatibility slice", that is maintained for easy access @@ -108,13 +108,13 @@ parts. Take a typical name like ``/dev/da0s1a'': Name Mountpoint ---- ---------- - da0a / - da0b <swap space> - da0e /usr + sd0a / + sd0b <swap space> + sd0e /usr Again, let it be noted: FreeBSD automatically maps the compatibility slice to the first FreeBSD slice it finds - (in this case, da0s1). You may have multiple FreeBSD slices on a + (in this case, sd0s1). You may have multiple FreeBSD slices on a drive, but only the first one will be mapped to the compatibility slice! diff --git a/release/sysinstall/help/readme.hlp b/release/sysinstall/help/readme.hlp new file mode 100644 index 0000000000000..ec53eb85aacd4 --- /dev/null +++ b/release/sysinstall/help/readme.hlp @@ -0,0 +1,115 @@ + ----------------------------------------- + FreeBSD 3.0 --- RELEASE Version , , + ----------------------------------------- /( )` + \ \___ / | +This is FreeBSD 3.0-RELEASE, the first official /- _ `-/ ' +release on the 3.0-current branch. This release (/\/ \ \ /\ +contains a lot of new technology as well as our / / | ` \ +first non-x86 architecture port (to the ALPHA) O O ) / | +and promises to be an exciting start to what will `-^--'`< ' +hopefully be many follow-on releases. (_.) _ ) / + `.___/` / + `-----' / +Feedback or offers to help with anything <----. __ / __ \ +you see in this release are most welcome <----|====O)))==) \) /==== +and should be sent to one of the approp- <----' `--' `.__,' \ +riate mailing lists - please see the | | +ABOUT.TXT file for more information. \ / /\ + ______( (_ / \______/ + ,' ,-----' | + `--{__________) + +TARGET AUDIENCE: +---------------- +This release is aimed primarily at early-adopters and the various +other folks who want to get on board with 3.0 and are willing to deal +with the various down-sides of a "dot-zero" release. We have naturally +done our best to ensure that 3.0 performs as advertised but, as the +first release on a branch which has seen some very radical changes +from 2.2.x (SMP, ELF, new boot blocks, many kernel changes, etc), it's +also very new technology and will require at least one more release +along the 3.0 branch before it's ready for "production" purposes. +This is one of the reasons why the 2.2.x branch will be continuing +into November, with the scheduled release of 2.2.8, and possibly a bit +beyond. + +If you're both technically proficient and know exactly what you're +getting into here (e.g. you've been following -current) then 3.0 is +probably for you. If you're more interested in doing business with +FreeBSD than in playing with the cutting edge of technology, however, +then 2.2.x is almost certainly your best bet. + + +ROAD MAP: + Most files here are also in the Documentation + Menu of the boot floppy + + README.TXT This file + + ABOUT.TXT All about FreeBSD, including contact information + + RELNOTES.TXT Release Notes - what's new & different in this + release + + LAYOUT.TXT Information about the layout of the release + directory. If you are installing from floppies, + it is especially important that you + *read this section!* + + ERRATA.TXT Any late-breaking errata information for this + release. On FTP sites, this file may be frequently + updated so it's a good idea to check it first + (the master copy is always on ftp.freebsd.org) + before reporting problems + + HARDWARE.TXT Information about the configuration of the + GENERIC kernel and supported hardware + + INSTALL.TXT How to make a new installation of FreeBSD + on your PC using the data you see here + + UPGRADE.TXT How to upgrade an existing FreeBSD + installation + + TROUBLE.TXT Troubleshooting information + + +o For new installation instructions, see the INSTALL.TXT + and HARDWARE.TXT files. + +o If you are upgrading from a previous FreeBSD version, + please take a look at UPGRADE.TXT. + +o It is also important to check the ERRATA.TXT file for any + late-breaking issues with this release. This file contains + the latest information on upgrade, security or other problems + which an administrator should be aware of. + +o Information regarding problems which arise after the CD + is printed can be found at: + ftp://ftp.freebsd.org/pub/FreeBSD/3.0-RELEASE/ERRATA.TXT + +For the most up-to-date software along the RELENG_2_2 branch +(also known as -Stable) which is now proceeding onwards toward +the release of FreeBSD 2.2.8, please install from: + + ftp://releng22.freebsd.org/pub/FreeBSD/ + +Or for the latest 3.0-Current (HEAD branch) snapshot releases, +please install from: + + ftp://current.freebsd.org/pub/FreeBSD + +If you plan to run either -Stable or -Current you MUST be +subscribed to the appropriate mailing list, either +freebsd-stable or freebsd-current. For information on +subscribing to either list (or both), send an e-mail to +majordomo@freebsd.org with the following in the body, not +the subject of the letter as appropriate: + +subscribe freebsd-stable +subscribe freebsd-current +end + +We hope you enjoy using FreeBSD as much as we enjoyed +creating it! diff --git a/release/sysinstall/help/relnotes.hlp b/release/sysinstall/help/relnotes.hlp new file mode 100644 index 0000000000000..cc8ebcfb220c4 --- /dev/null +++ b/release/sysinstall/help/relnotes.hlp @@ -0,0 +1,834 @@ + RELEASE NOTES + FreeBSD Release 3.0-RELEASE + +This is our first release of 3.0-CURRENT and is aimed primarily at +early adopters and developers. Some parts of the documentation may +not be updated yet and should be reported if and when seen. +Naturally, any installation failures or crashes should also be +reported ASAP by sending mail to freebsd-bugs@FreeBSD.org or using the +send-pr command (those preferring a WEB based interface can also see +http://www.freebsd.org/send-pr.html). + +For information about FreeBSD and the layout of the 3.0-RELEASE +directory (especially if you're installing from floppies!), see +ABOUT.TXT. For installation instructions, see the INSTALL.TXT and +HARDWARE.TXT files. + +This is also hardly the last release on the 3.0-current (HEAD) branch +and daily snapshot releases will continue as normal following this +release. Please install them from: + + ftp://current.freebsd.org/pub/FreeBSD + +If you wish to get the latest post-3.0-RELEASE technology. + +Table of contents: +------------------ +1. What's new since 2.2.X-RELEASE + 1.1 KERNEL CHANGES + 1.2 SECURITY FIXES + 1.3 USERLAND CHANGES + +2. Supported Configurations + 2.1 Disk Controllers + 2.2 Ethernet cards + 2.3 ATM + 2.4 Misc + +3. Obtaining FreeBSD + 3.1 FTP/Mail + 3.2 CDROM + +4. Upgrading from previous releases of FreeBSD + +5. Reporting problems, making suggestions, submitting code +6. Acknowledgements + + +1. What's new since 2.2.X-RELEASE +--------------------------------- +All changes described here are unique to the 3.0 branch unless +specifically marked as [MERGED] features. + +1.1. KERNEL CHANGES +------------------- +o The 2.2.x SCSI subsystem has been almost entirely replaced with + a new "CAM" (Common Access Method) SCSI system which offers + improved performance, better error recovery and support for more + SCSI controllers. + +o The Host ATM Research Platform ("HARP") software by Network + Computing Services, Inc. has been integrated into the system. + See /usr/src/share/examples/atm for more info. + +o The SMP (Symmetric MultiProcessing) branch has been merged. + The kernel is mostly non-reentrant as yet, but work is under way. + +o The code from 4.4BSD-Lite2 has been (finally) merged. + +o Secure RPC is now supported (and usable with NFS et al). + +o Sun's WEBNFS standard is now supported. + +o The MSDOS filesystem code now handles VFAT and FAT32 partitions. + [MERGED: Also in 2.2.7 and later releases on 2.2-STABLE branch] + +o ATAPI/IDE CD burner support (BETA). + +o ATAPI/IDE tape drive support (BETA). + +o Support for using VESA video modes. It is now possible to select and + use the modes provided by the BIOS on modern videocards. This enables + fx. 132x60 sized consoles and highres graphics in a generic manner on + hardware that supports it. There is also support for running the + console in rastermode, which allows XFree86 to run a simple 16color + server in 800x600 on otherwise unsupported video hardware. + +o Support for AdvanSys SCSI controllers + +o Support for QLogic SCSI and Fibre Channel controllers. + +o Support for Adaptec 7890, 7891, 7895, 7896 and 7897 based controllers + (new 2940/2950/3940/3950 et al). + +o The ed0 (wd8xxxx, 3c503, NE2000, HP Lan+) Ethernet device's default IRQ + has changed from IRQ 5 to IRQ 10. + The ed1 Ethernet device has been removed. Use the Userconfig utility + to change ed0's values to match your network card's settings. + [MERGED: Both changes are in 2.2.6 and later releases on 2.2-STABLE branch] + +o The code responsible for maintaining time of day has been + rewritten. New features are: true support for nanoseconds in + both kernel and userland, continuous rather than stepwise adjustment + by NTPD and support for synchronizing to high precision external time + signals. + +o Support for the PPS API described in draft-mogul-pps-api-02.txt for + TTL rising edge inputs via the parallel printer port has been added + to the printer driver. + +o Use the new if_multiaddrs list for multicast addresses rather than the + previous hackery involving struct in_ifaddr and arpcom. Get rid of the + abominable multi_kludge. + +o The new if_media selection method for ethernet drivers has been brought + in, obtained from Jason Thorpe's implementation for NetBSD. + [MERGED: Also in 2.2.5 and later releases on 2.2-STABLE branch] + +o Multi-session ISO-9660 CD-ROMs are now fully supported. By default, the + last session will be mounted (including for root mounts). For non-root + mounts, mount_cd9660(8) can take an argument to mount a particular + session instead of the default one. + +o The UPAGES are gone from the per-process address space which allows + complete address space and page table sharing by reference count. + +o Newly forked child processes return directly to user mode rather than + return up through the fork() syscall tree. This eliminates the kernel + stack copy at fork time and simplifies certain other internal operations. + It is also needed to support the removal of the UPAGES. (The idea for + this originally came from NetBSD, but we did it for different reasons.) + +o vfork() is now fully functional by taking advantage of the new sharing + semantics and a significant speedup has been measured. This can be + disabled via the kern.fast_vfork sysctl variable in case of problems. + Statically linked binaries from older releases and other BSD platforms + are a problem since there was a bug in the 4.4BSD (net2, Lite and Lite2) + popen() implementation. rfork() also has access to these facilities, + intended for supporting kernel assisted threads. + +o With the contribution of Berkeley Software Design, Inc., Jonathan Lemmon, + Mike Smith, Sean Eric Fagan, and John Dyson, VM86 support has been added + to the kernel, and BSD/OS's contributed dosemu has been ported. + +o The SA_NOCLDWAIT flags has been implemented, featuring the System V + option where a process can express its wish to never get zombies or + SIGCHLD for dead children. + +o An implementation of poll(2) is in place, the core of which is derived + from the NetBSD implementation. Both the select() and poll() syscalls + use the poll device, file and vnode ops routines. + +o An implementation of issetugid(2) that is similar to the OpenBSD call + of the same name. We set the flag in more cases than OpenBSD - our + implementation is slightly more paranoid. + +o Async IO is implemented (under non-SMP at this stage) with additional + support for kernel assisted threads. + +o Some other misc syscalls for compatability with other systems: getsid(2), + setpgid(2), nanosleep(2). + +o A new syscall signanosleep(2) which is like nanosleep(2), but a specific + signal mask is used to determine which signals will wake the sleep. In + a nutshell this is 'wait for a given set of signals for up to a certain + amount of time'. + +o sleep(3) and usleep(3) are now implemented in terms of signanosleep(2) + and now have correct SIGALRM interaction semantics and sleep(3) correctly + returns the time remaining. Some programs (notably apache httpd) bogusly + depend on a sleep() "absorbing" a SIGALRM from a timer that expires during + the life of the sleep. + +o An in-kernel linker is implemented and intended to replace the lkm system + with the bogosity that goes with it. + +o All supported network protocols have been updated to avoid the ``big + switch'' pr_usrreq(), and to pass a process pointer down to each user + request that might need process credentials or want to sleep, + replacing the previous hodgepodge of inspecting curproc (which only + occasionally did the right thing) and the SS_PRIV socket state flag. + The latter has now been eliminated, along with the SO_PRIVSTATE socket + option which cleared it. Protocols are now also given the opportunity + to override the generic send, receive, and poll routines, which will + make it possible for a more efficient, protocol-specific + implementation of these entry points in later releases. Finally, many + parts of the network code have been modified to cease storing socket + addresses and other metainformation in mbufs, in preparation for the + eventual elimination thereof. The mechanism by which socket addresses + are now returned is still highly subject to change as we experiment to + discover the most efficient method. + +o Responses to multicast ICMP ECHO REQUEST (``ping'') and ADDRESS MASK + REQUEST packets can now be disabled via sysctl. The netstat program + will print out statistics on how many times this happens. + +o A subtle and seldom encountered bug in ffs has been fixed. + +o The VFS name cache has been reworked to be more accountable and efficient. + +o The generic part of VOP_LOOKUP() has been put it in system-wide function + which filesystems can rely on for the canonical stuff. + +o Vnode freelist handling has been hauled over. Vnodes are only on the + freelist if nobody cares about them. + +o The kernel provides assistance to getcwd() from data stored in the name + cache if possible. + +o An interrupt driven configuration hook mechanism has been implemented. + This allows drivers to postpone part of their configuration until after + interrupts are fully enabled. This speeds booting because busy-waiting + is avoided for things like sub device probing (eg: SCSI bus probes). + +o The timeout(9) system in the kernel has been overhauled. This gives + O(1) insertion and removal of callouts and an O(hash chain length) + amount of work to be performed in softclock. The original paper is at: + http://www.cs.berkeley.edu/~amc/research/timer/ + +o Changes in driver buffer queuing to deal with ordered transactions. This + is intended for sequencing data and metadata writes in the filesystem code + once fully supported. + +o EISA Shared interrupts are now supported, working with the framework + originally for supporting PCI shared interrupts. + +o Support for the Comtrol Rocketport card. + +o IPFW's packet and byte counters have been expanded from 32 to 64 bits, + a `FWD' operation has been added to ipfw to support transparent + proxying and the divert operation has changed slightly - see the man + pages for natd(8) and ipfw(8) for more information. + +o New Plug and Play (PnP) support that allows you to (re)configure PnP + devices. Also support modems being detected by the PnP part and + automatically attached. + [MERGED: Also in 2.2.6 and later releases on 2.2-STABLE branch] + +o Import of new sound code from Luigi Rizzo. This code is still being + developed, but has support for a number of different cards. + [MERGED: Also in 2.2.6 and later releases on 2.2-STABLE branch] + +o The psm, mse and sysmouse drivers are improved to provide better mouse + support. In particular, the psm driver now supports various ``wheeled'' + mice. + [MERGED: Also in 2.2.6 and later releases on 2.2-STABLE branch] + +o Added support for SMC EtherPower II 10/100 Fast Ethernet card + (aka SMC9432TX based on SMC83c170 EPIC chip). + [MERGED: Also in 2.2.7 and later releases on 2.2-STABLE branch] + +o Added support for ATAPI floppy drives (LS-120). + [MERGED: Also in 2.2.7 and later releases on 2.2-STABLE branch] + +o Added support for IBM Etherjet and other Crystal Semiconductor + CS89x0-based NICs. + [MERGED: Also in 2.2.7 and later releases on 2.2-STABLE branch] + +o Added support for Texas Instruments TNET100 'ThunderLAN' PCI NIC. + [MERGED: Also in 2.2.8 and later releases on 2.2-STABLE branch] + +o Added full bus master DMA support for 3c900 and 3c905 adapters and + added support for the 3c905B. + [MERGED: Also in 2.2.8 and later releases on 2.2-STABLE branch] + + +1.2. SECURITY FIXES +------------------- +[MERGED: all changes soon after specified date in 2.2-STABLE branch] + +97/7/29 Lots of lpr/lpd security fixes merged from OpenBSD. +97/8/22 buffer overflows in tip corrected (benign since tip isn't + set[ug]id) +97/8/26 buffer overflow in glob fixed, no know exploits +97/8/27 vacation security problem with sendmail corrected (SNI) +97/8/29 inetd sleeps less when children exit, making DoS attacks much + harder. +97/8/29 fts now race-proof and find -execdir added (-current only) +97/8/31 games setuid -> setgid. Makes any games exploits benign (only + score files vulnerable). Please report any problems to + eivind@FreeBSD.org (score-file ownership problems are known) +97/12/3 Add Intel's suggested fix for the F00F bug. If you don't have + a Pentium, the NO_F00F_HACK kernel option will disable it. +98/1/20 More robust protection against LAND attacks now incorporated. + +The suidperl vulnerability mentioned in the CERT advisory CA-97.17 is +also believed to be fixed. + +KerberosIV is now merged. + + +1.3. USERLAND CHANGES +--------------------- +The default binary type (and compiler toolchain) has been +switched from a.out to ELF. This gives us access to much +newer compiler technology (much of which didn't support a.out), +allows for smaller executables and provides much better +support for languages like C++, among many other advantages. +Older a.out libraries and binaries will, of course, continue to work +and provisions have been made for having both varieties installed if +and as necessary for transitional purposes. + +Perl4 has now been replaced by Perl5 as a standard part of the +system. + +The default username length has increased to 16 characters. +Caution: Old utmp/wtmp files will NOT work with this change since +the data records will be of the old size. For a conversion utility +to aid with this, see /usr/src/tools/3.0-upgrade. + +/etc/sysconfig now replaced by more compact /etc/rc.conf file +[MERGED: Also in 2.2.1 and later releases on 2.2-STABLE branch] + +fdisk(8) now numbers disk slices from 1 to 4 rather than from 0 to 3. +This brings it in line with the numbers used in the device names +in /dev. + +The Amd automounter has been updated from the 1993 4.4BSD version to +the latest current version of am-utils. Map options have changed +somewhat, and a new configuration file, /etc/amd.conf, is supported. +See ``man 5 amd.conf''. + +The ``picobsd'' package for creating custom FreeBSD boot floppies +and "mini systems" has been brought into /usr/src/release/picobsd. +See file:/usr/src/release/picobsd/README.html for further information. + +When operating over the network, finger(1) no longer closes the socket +immediately after sending its request, but instead waits for the +remote end to close first. (The specification is ambiguous, so we are +following the behavior which interoperates with the most servers.) +This means that it is now possible to use the MIT directory and finger +people at certain broken Linux machines. + +There is a new flag to fetch(1) which allows it to talk to certain +broken HTTP implementations which react badly to a request message +immediately followed by a close of the connection. + +netstat(1) now uses sysctl(3) to retrieve more statistics groups and +uses the correct, unsigned format for printing most of them out. + +A new VGA library (/usr/src/lib/libvgl) now exists for doing simple +VGA graphics to syscons ttys (sort of like Linux's libSVGA). +[MERGED: Also in 2.2.5 and later releases on 2.2-STABLE branch] + +Xntpd's syslogging has been moved out into a facility of its own +(LOG_NTP, userland name "ntp"). + +A new pair of ioctl's has been added: SIOC[SG]IFGENERIC. The intent +is to provide for a hook to pass arbitrary ioctl subcommands down to a +network interface driver. This is for example necesseray for PPP +drivers to communicate things like CHAP names and secrets, or variable +options between the driver and a userland utility. + +sppp(4) has been improved a fair bit since FreeBSD 2.2.X. It now +employs a full-fledged PPP state machine, offers a lot more of LCP and +IPCP negotiation, making it ready for dial-on-demand connections (like +those that are often running over ISDN). It also offers PAP or CHAP +authentication. The userland counterpart spppcontrol(8) is also the +first program that utilizes the abovementioned SIOC[SG]IFGENERIC ioctl +commands. + +moused(8) has been modified to support various mice with a ``wheel''. +It also automatically recognizes mice which support the PnP COM device +standard, so that the user is no longer required to supply a mouse +protocol type on the command line. +[MERGED: Also in 2.2.6 and later releases on 2.2-STABLE branch] + +ppp(8) supports many additional features including the PPP Multilink +Protocol (rfc1990), PPP Callback (with CBCP extensions) and client +side DNS negotiation. Refer to the README.changes file in the source +directory for details of possible configuration conflicts. + +Pthread read/write locks as defined by the Single UNIX Specification, +Version 2, have been added to the POSIX threads library, libc_r. + +System files are now owned by user `root', group `wheel'. UID 0 is far +more protected than `bin'. Especially over NFS. + +/bin/sh signal and trap handling reworked. Among other things, this +makes tty-mode emacs work when called from system(2), i.e. by a mail +agent. Several syntax bugs have been fixed. +[MERGED: Also in 2.2.8 and later releases on 2.2-STABLE branch] + +systat(1), iostat(8), rpc.rstatd(8), and vmstat(8) have been +overhauled to use the new devstat(3) library and devstat(9) statistics +subsystem. Among other enhancements, these utilities (well, with the +exception of rpc.rstatd(8)) now print out more useful statistics, and can +see statistics for all devices in the system, not just the first 8. + +2. Supported Configurations +--------------------------- +FreeBSD currently runs on a wide variety of ISA, VLB, EISA and PCI bus +based PC's, ranging from 386sx to Pentium class machines (though the +386sx is not recommended). Support for generic IDE or ESDI drive +configurations, various SCSI controller, network and serial cards is +also provided. + +What follows is a list of all peripherals currently known to work with +FreeBSD. Other configurations may also work, we have simply not as yet +received confirmation of this. + + +2.1. Disk Controllers +--------------------- +WD1003 (any generic MFM/RLL) +WD1007 (any generic IDE/ESDI) +IDE +ATA + +Adaptec 1535 ISA SCSI controllers +Adaptec 154x series ISA SCSI controllers +Adaptec 174x series EISA SCSI controller in standard and enhanced mode. +Adaptec 274X/284X/2920/2940/2950/3940/3950 (Narrow/Wide/Twin) series +EISA/VLB/PCI SCSI controllers. +Adaptec AIC7850, AIC7880, AIC789x, on-board SCSI controllers. + +AdvanSys SCSI controllers (all models). + +Buslogic 545S & 545c +Buslogic 445S/445c VLB SCSI controller +Buslogic 742A, 747S, 747c EISA SCSI controller. +Buslogic 946c PCI SCSI controller +Buslogic 956c PCI SCSI controller + +DPT SCSI/RAID controllers (most variants). + +SymBios (formerly NCR) 53C810, 53C825, 53c860 and 53c875 PCI SCSI +controllers: + ASUS SC-200 + Data Technology DTC3130 (all variants) + NCR cards (all) + Symbios cards (all) + Tekram DC390W, 390U and 390F + Tyan S1365 + + +QLogic SCSI and Fibre Channel controllers. + +DTC 3290 EISA SCSI controller in 1542 emulation mode. + +With all supported SCSI controllers, full support is provided for +SCSI-I & SCSI-II peripherals, including hard disks, optical disks, +tape drives (including DAT and 8mm Exabyte), medium changers, processor +target devices and CDROM drives. WORM devices that support CDROM commands +are supported for read-only access by the CDROM driver. WORM/CD-R/CD-RW +writing support is provided by cdrecord, which is in the ports tree. + +The following CD-ROM type systems are supported at this time: +(cd) SCSI interface (also includes ProAudio Spectrum and + SoundBlaster SCSI) +(matcd) Matsushita/Panasonic (Creative SoundBlaster) proprietary + interface (562/563 models) +(scd) Sony proprietary interface (all models) +(wcd) ATAPI IDE interface + +SCSI TAPE SUPPORT: + + The CAM SCSI tape driver doesn't yet handle older (and many times broken) + tape drives very well. If you've got an older SCSI-1 tape drive, like an + Exabyte 8200 or older QIC-type tape drive, it may not work properly with + the CAM tape driver. This is obviously a known problem, and we're + working on it. + + Newer tape drives that are mostly SCSI-2 compliant should work fine. + e.g., DAT (DDS-1, 2 and 3), DLT, and newer Exabyte 8mm drives should + work fine. + + If you want to find out if your particular tape drive is supported, the + best way to find out is to try it! + +The following drivers were supported under the old SCSI subsystem, but are +NOT YET supported under the new CAM SCSI subsystem: + + Tekram DC390 and DC390T controllers (maybe other cards based on the + AMD 53c974 as well). + + NCR5380/NCR53400 ("ProAudio Spectrum") SCSI controller. + + UltraStor 14F, 24F and 34F SCSI controllers. + + Seagate ST01/02 SCSI controllers. + + Future Domain 8xx/950 series SCSI controllers. + + WD7000 SCSI controller. + + Adaptec 1510 series ISA SCSI controllers (not for bootable devices) + Adaptec 152x series ISA SCSI controllers + Adaptec AIC-6260 and AIC-6360 based boards, which includes the AHA-152x + and SoundBlaster SCSI cards. + + [ Note: There is work-in-progress to port the AIC-6260/6360 and + UltraStor drivers to the new CAM SCSI framework, but no estimates on + when or if they will be completed. ] + +Unmaintained drivers, they might or might not work for your hardware: + + Floppy tape interface (Colorado/Mountain/Insight) + + (mcd) Mitsumi proprietary CD-ROM interface (all models) + +2.2. Ethernet cards +------------------- +Allied-Telesis AT1700 and RE2000 cards + +AMD PCnet/PCI (79c970 & 53c974 or 79c974) + +SMC Elite 16 WD8013 ethernet interface, and most other WD8003E, +WD8003EBT, WD8003W, WD8013W, WD8003S, WD8003SBT and WD8013EBT +based clones. SMC Elite Ultra. SMC Etherpower II. + +Texas Instruments ThunderLAN PCI NICs, including the following: + Compaq Netelligent 10, 10/100, 10/100 Proliant, 10/100 Dual-Port + Compaq Netelligent 10/100 TX Embedded UTP, 10 T PCI UTP/Coax, 10/100 TX UTP + Compaq NetFlex 3P, 3P Integrated, 3P w/ BNC + Olicom OC-2135/2138, OC-2325, OC-2326 10/100 TX UTP + +DEC EtherWORKS III NICs (DE203, DE204, and DE205) +DEC EtherWORKS II NICs (DE200, DE201, DE202, and DE422) +DEC DC21040, DC21041, or DC21140 based NICs (SMC Etherpower 8432T, DE245, etc) +DEC FDDI (DEFPA/DEFEA) NICs + +Fujitsu MB86960A/MB86965A + +HP PC Lan+ cards (model numbers: 27247B and 27252A). + +Intel EtherExpress 16 +Intel EtherExpress Pro/10 +Intel EtherExpress Pro/100B PCI Fast Ethernet + +Isolan AT 4141-0 (16 bit) +Isolink 4110 (8 bit) + +Novell NE1000, NE2000, and NE2100 ethernet interface. + +3Com 3C501 cards + +3Com 3C503 Etherlink II + +3Com 3c505 Etherlink/+ + +3Com 3C507 Etherlink 16/TP + +3Com 3C509, 3C579, 3C589 (PCMCIA), 3C590/592/595/900/905/905B PCI and EISA +(Fast) Etherlink III / (Fast) Etherlink XL + +Toshiba ethernet cards + +Crystal Semiconductor CS89x0-based NICs, including: + IBM Etherjet ISA + +PCMCIA ethernet cards from IBM and National Semiconductor are also +supported. + +Note that NO token ring cards are supported at this time as we're +still waiting for someone to donate a driver for one of them. Any +takers? + +2.3 ATM +------- + + o ATM Host Interfaces + - FORE Systems, Inc. PCA-200E ATM PCI Adapters + - Efficient Networks, Inc. ENI-155p ATM PCI Adapters + + o ATM Signalling Protocols + - The ATM Forum UNI 3.1 signalling protocol + - The ATM Forum UNI 3.0 signalling protocol + - The ATM Forum ILMI address registration + - FORE Systems's proprietary SPANS signalling protocol + - Permanent Virtual Channels (PVCs) + + o IETF "Classical IP and ARP over ATM" model + - RFC 1483, "Multiprotocol Encapsulation over ATM Adaptation Layer 5" + - RFC 1577, "Classical IP and ARP over ATM" + - RFC 1626, "Default IP MTU for use over ATM AAL5" + - RFC 1755, "ATM Signaling Support for IP over ATM" + - RFC 2225, "Classical IP and ARP over ATM" + - RFC 2334, "Server Cache Synchronization Protocol (SCSP)" + - Internet Draft draft-ietf-ion-scsp-atmarp-00.txt, + "A Distributed ATMARP Service Using SCSP" + + o ATM Sockets interface + +2.4. Misc +--------- + +AST 4 port serial card using shared IRQ. + +ARNET 8 port serial card using shared IRQ. +ARNET (now Digiboard) Sync 570/i high-speed serial. + +Boca BB1004 4-Port serial card (Modems NOT supported) +Boca IOAT66 6-Port serial card (Modems supported) +Boca BB1008 8-Port serial card (Modems NOT supported) +Boca BB2016 16-Port serial card (Modems supported) + +Comtrol Rocketport card. + +Cyclades Cyclom-y Serial Board. + +STB 4 port card using shared IRQ. + +SDL Communications Riscom/8 Serial Board. +SDL Communications RISCom/N2 and N2pci high-speed sync serial boards. + +Stallion multiport serial boards: EasyIO, EasyConnection 8/32 & 8/64, +ONboard 4/16 and Brumby. + +Adlib, SoundBlaster, SoundBlaster Pro, ProAudioSpectrum, Gravis UltraSound +and Roland MPU-401 sound cards. (snd driver) + +Most ISA audio codecs manufactured by Crystal Semiconductors, OPTi, Creative +Labs, Avance, Yamaha and ENSONIQ. (pcm driver) + +Connectix QuickCam +Matrox Meteor Video frame grabber +Creative Labs Video Spigot frame grabber +Cortex1 frame grabber +Hauppauge Wincast/TV boards (PCI) +STB TV PCI +Intel Smart Video Recorder III +Various Frame grabbers based on Brooktree Bt848 chip. + +HP4020, HP6020, Philips CDD2000/CDD2660 and Plasmon CD-R drives. + +PS/2 mice + +Standard PC Joystick + +X-10 power controllers + +GPIB and Transputer drivers. + +Genius and Mustek hand scanners. + +Xilinx XC6200 based reconfigurable hardware cards compatible with +the HOT1 from Virtual Computers (www.vcc.com) + +Support for Dave Mills experimental Loran-C receiver. + +FreeBSD currently does NOT support IBM's microchannel (MCA) bus. + +3. Obtaining FreeBSD +-------------------- + +You may obtain FreeBSD in a variety of ways: + +3.1. FTP/Mail +------------- + +You can ftp FreeBSD and any or all of its optional packages from +`ftp.freebsd.org' - the official FreeBSD release site. + +For other locations that mirror the FreeBSD software see the file +MIRROR.SITES. Please ftp the distribution from the site closest (in +networking terms) to you. Additional mirror sites are always welcome! +Contact freebsd-admin@FreeBSD.org for more details if you'd like to +become an official mirror site. + +If you do not have access to the Internet and electronic mail is your +only recourse, then you may still fetch the files by sending mail to +`ftpmail@ftpmail.vix.com' - putting the keyword "help" in your message +to get more information on how to fetch files using this mechanism. +Please do note, however, that this will end up sending many *tens of +megabytes* through the mail and should only be employed as an absolute +LAST resort! + + +3.2. CDROM +---------- + +FreeBSD 3.0-RELEASE and 2.2.x-RELEASE CDs may be ordered on CDROM from: + + Walnut Creek CDROM + 4041 Pike Lane, Suite D + Concord CA 94520 + 1-800-786-9907, +1-925-674-0783, +1-925-674-0821 (FAX) + +Or via the Internet from orders@cdrom.com or http://www.cdrom.com. +Their current catalog can be obtained via ftp from: + + ftp://ftp.cdrom.com/cdrom/catalog + +Cost per -RELEASE CD is $39.95 or $24.95 with a FreeBSD subscription. +FreeBSD SNAPshot CDs, when available, are $39.95 or $14.95 with a +FreeBSD-SNAP subscription (-RELEASE and -SNAP subscriptions are entirely +separate). With a subscription, you will automatically receive updates as +they are released. Your credit card will be billed when each disk is +shipped and you may cancel your subscription at any time without further +obligation. + +Shipping (per order not per disc) is $5 in the US, Canada or Mexico +and $9.00 overseas. They accept Visa, Mastercard, Discover, American +Express or checks in U.S. Dollars and ship COD within the United +States. California residents please add 8.25% sales tax. + +Should you be dissatisfied for any reason, the CD comes with an +unconditional return policy. + + +4. Upgrading from previous releases of FreeBSD +---------------------------------------------- + +If you're upgrading from a previous release of FreeBSD, most likely +it's 2.2.x or 2.1.x (in some lesser number of cases) and some of the +following issues may affect you, depending of course on your chosen +method of upgrading. There are two popular ways of upgrading +FreeBSD distributions: + + o Using sources, via /usr/src + o Using sysinstall's (binary) upgrade option. + +In the case of using sources, there are simply two targets you need to +be aware of: The standard ``world'' target, which will upgrade a 2.x +system to 3.0, or the ``aout-to-elf'' target, which will both upgrade +and convert the system to ELF binary format. +In the case of using the binary upgrade option, the system will go +straight to 3.0/ELF but also populate the /<basepath>/lib/aout +directories for backwards compatibility with older binaries. + +In either case, going to ELF will mean that you'll have somewhat +smaller binaries and access to a lot more compiler goodies which have +been already been ported to other ELF environments (our older and +somewhat crufty a.out format being largely unsupported by most other +software projects), but on the downside you'll also have access to far +fewer ports and packages since many of those have not been adapted to +ELF yet. This will occur in time, but those who wish to retain access +to the greatest number of packages and 3rd-party binaries should +probably stick with a.out. + +The kernel is also still in a.out format at this time so that older +LKMs and library interfaces can continue to work, but a full +transition to ELF will occur at some point after 3.0-RELEASE. Those +wishing to generate dynamic kernel components should therefore use the +newer KLD mechanism rather than the older LKM format - the LKM format +is not long for this world and will soon be unsupported! + +[ other important upgrading notes should go here] + + +5. Reporting problems, making suggestions, submitting code. +----------------------------------------------------------- +Your suggestions, bug reports and contributions of code are always +valued - please do not hesitate to report any problems you may find +(preferably with a fix attached, if you can!). + +The preferred method to submit bug reports from a machine with +Internet mail connectivity is to use the send-pr command or use the CGI +script at http://www.freebsd.org/send-pr.html. Bug reports +will be dutifully filed by our faithful bugfiler program and you can +be sure that we'll do our best to respond to all reported bugs as soon +as possible. Bugs filed in this way are also visible on our WEB site +in the support section and are therefore valuable both as bug reports +and as "signposts" for other users concerning potential problems to +watch out for. + +If, for some reason, you are unable to use the send-pr command to +submit a bug report, you can try to send it to: + + freebsd-bugs@FreeBSD.org + +Note that send-pr itself is a shell script that should be easy to move +even onto a totally different system. We much prefer if you could use +this interface, since it make it easier to keep track of the problem +reports. However, before submitting, please try to make sure whether +the problem might have already been fixed since. + + +Otherwise, for any questions or tech support issues, please send mail to: + + freebsd-questions@FreeBSD.org + + +Additionally, being a volunteer effort, we are always happy to have +extra hands willing to help - there are already far more desired +enhancements than we'll ever be able to manage by ourselves! To +contact us on technical matters, or with offers of help, please send +mail to: + + freebsd-hackers@FreeBSD.org + + +Please note that these mailing lists can experience *significant* +amounts of traffic and if you have slow or expensive mail access and +are only interested in keeping up with significant FreeBSD events, you +may find it preferable to subscribe instead to: + + freebsd-announce@FreeBSD.org + + +All of the mailing lists can be freely joined by anyone wishing +to do so. Send mail to MajorDomo@FreeBSD.org and include the keyword +`help' on a line by itself somewhere in the body of the message. This +will give you more information on joining the various lists, accessing +archives, etc. There are a number of mailing lists targeted at +special interest groups not mentioned here, so send mail to majordomo +and ask about them! + + +6. Acknowledgements +------------------- + +FreeBSD represents the cumulative work of many dozens, if not +hundreds, of individuals from around the world who have worked very +hard to bring you this release. For a complete list of FreeBSD +project staffers, please see: + + http://www.freebsd.org/handbook/staff.html + +or, if you've loaded the doc distribution: + + file:/usr/share/doc/handbook/staff.html + + +Special mention to: + + The donors listed at http://www.freebsd.org/handbook/donors.html + + Justin M. Seger <jseger@freebsd.org> for almost single-handedly + converting the ports collection to ELF. + + Doug Rabson <dfr@freebsd.org> and John Birrell <jb@freebsd.org> + for making FreeBSD/alpha happen and to the NetBSD project for + substantial indirect aid. + + Peter Wemm <peter@freebsd.org> for the new kernel module system + (with substantial aid from Doug Rabson). + + And to the many thousands of FreeBSD users and testers all over the + world, without whom this release simply would not have been possible. + +We sincerely hope you enjoy this release of FreeBSD! + + The FreeBSD Project diff --git a/release/sysinstall/help/shortcuts.hlp b/release/sysinstall/help/shortcuts.hlp index 503a2a770cbcd..40cd1a40a69ef 100644 --- a/release/sysinstall/help/shortcuts.hlp +++ b/release/sysinstall/help/shortcuts.hlp @@ -15,7 +15,7 @@ browserBinary Which doc browser to use (default: lynx) browserPackage Which package to get browser from (default: lynx) cpioVerbose How verbose to be with cpio: high, medium or low debug Extra debugging? -disk Which disk to operate on (wd0, da0, etc). +disk Which disk to operate on (wd0, sd0, etc). domainname Domain name editor Which screen editor to use ifconfig_<iface> For each <iface> in network_devices @@ -106,9 +106,9 @@ Examples: Selects an FTP site and then goes to the package configuration menu. -/stand/sysinstall disk=da0 diskPartitionEditor +/stand/sysinstall disk=sd0 diskPartitionEditor -Invokes the disk partition editor on disk da0. +Invokes the disk partition editor on disk sd0. If /stand/sysinstall is linked to another filename, say diff --git a/release/sysinstall/help/trouble.hlp b/release/sysinstall/help/trouble.hlp new file mode 100644 index 0000000000000..ca374caa4d0a9 --- /dev/null +++ b/release/sysinstall/help/trouble.hlp @@ -0,0 +1,374 @@ +=============== +Troubleshooting +=============== + + Table of Contents: + + Repairing an Existing FreeBSD Installation + + Common Installation Problems, Q&A + + Common Hardware Problems, Q&A + +Repairing an Existing FreeBSD Installation +------------------------------------------ + +FreeBSD releases 2.2.1 and later feature a "Fixit" option in the top +menu of the boot floppy. To use it, you will also need either a +fixit.flp image floppy, generated in the same fashion as the boot +floppy, or the 2nd CDROM from Walnut Creek CDROM's FreeBSD +distribution. + +To invoke fixit, simply boot the boot floppy, chose the "Fixit" item +and insert the fixit floppy or CDROM when asked. You will then be +placed into a shell with a wide variety of commands available (in the +/stand and /mnt2/stand directories) for checking, repairing and +examining file systems and their contents. Some UNIX administration +experience *is* required to use the fixit option! + +Common Installation Problems, Q&A +--------------------------------- + +Q: I go to boot from the hard disk for the first time after installing + FreeBSD, the kernel loads and probes my hardware, but stops with + messages like: + + changing root device to wd1s1a + panic: cannot mount root + + What is wrong? What can I do? + +Q: What is this 'bios_drive:interface(unit,partition)kernel_name' thing + that is displayed with the boot help? + +A: There is a longstanding problem in the case where the boot disk is + not the first disk in the system. The BIOS uses a different numbering + scheme to FreeBSD, and working out which numbers correspond to which + is difficult to get right. + + In the case where the boot disk is not the first disk in the system, + FreeBSD can need some help finding it. There are two common situations + here, and in both of these cases, you need to tell FreeBSD where the + root filesystem is. You do this by specifying the BIOS disk number, + the disk type and the FreeBSD disk number for that type. + + The first situation is where you have two IDE disks, each configured as + the master on their respective IDE busses, and wish to boot FreeBSD from + the second disk. The BIOS sees these as disk 0 and disk 1, while + FreeBSD sees them as wd0 and wd2. + + FreeBSD is on BIOS disk 1, of type 'wd' and the FreeBSD disk number + is 2, so you would say: + + 1:wd(2,a)kernel + + Note that if you have a slave on the primary bus, the above is not + necessary (and is effectively wrong). + + The second situation involves booting from a SCSI disk when you have + one or more IDE disks in the system. In this case, the FreeBSD disk + number is lower than the BIOS disk number. If you have two IDE disks + as well as the SCSI disk, the SCSI disk is BIOS disk 2, type 'da' and + FreeBSD disk number 0, so you would say: + + 2:da(0,a)kernel + + To tell FreeBSD that you want to boot from BIOS disk 2, which is + the first SCSI disk in the system. If you only had one IDE disk, + you would use '1:' instead. + + Once you have determined the correct values to use, you can put the + command exactly as you would have typed it in the /boot.config file + using a standard text editor. + Unless instructed otherwise, FreeBSD will use the contents of this + file as the default response to the 'boot:' prompt. + +Q: I go to boot from the hard disk for the first time after installing + FreeBSD, but the Boot Manager prompt just prints `F?' at the boot menu + each time but the boot won't go any further. + +A: The hard disk geometry was set incorrectly in the Partition editor when + you installed FreeBSD. Go back into the partition editor and specify + the actual geometry of your hard disk. You must reinstall FreeBSD + again from the beginning with the correct geometry. + + If you are failing entirely in figuring out the correct geometry for + your machine, here's a tip: Install a small DOS partition at the + beginning of the disk and install FreeBSD after that. The install + program will see the DOS partition and try to infer the correct + geometry from it, which usually works. + + The following tip is no longer recommended, but is left here + for reference: + + If you are setting up a truly dedicated FreeBSD server or work- + station where you don't care for (future) compatibility with DOS, + Linux or another operating system, you've also got the option to use + the entire disk (`A' in the partition editor), selecting the + non-standard option where FreeBSD occupies the entire disk from + the very first to the very last sector. This will leave all geometry + considerations aside, but is somewhat limiting unless you're never + going to run anything other than FreeBSD on a disk. + + +Known Hardware Problems, Q & A +------------------------------ + +Q: mcd0 keeps thinking that it has found a device and this stops my Intel + EtherExpress card from working. + +A: Use the UserConfig utility (see HARDWARE.TXT) and disable the probing of + the mcd0 and mcd1 devices. Generally speaking, you should only leave + the devices that you will be using enabled in your kernel. + + +Q: FreeBSD claims to support the 3Com PCMCIA card, but my card isn't + recognized when it's plugged into my laptop. + +A: There are a couple of possible problems. First of all, FreeBSD does + not support multi-function cards, so if you have a combo + ethernet/modem card (such as the 3C562), it won't work. The + default driver for the 3C589 card was written just like all of the + other drivers in FreeBSD, and depend on the card's own configuration + data stored in NVRAM to work. You must correctly configure FreeBSD's + driver to match the IRQ, port, and IOMEM stored in NVRAM. + Unfortunately, the only program capable of reading them is the + 3COM supplied DOS program. This program must be run on a absolutely + clean system (no other drivers must be running), and the program will + whine about CARD-Services not being found, but it will continue. + This is necessary to read the NVRAM values. You want to know the + IRQ, port, and IOMEM values (the latter is called the CIS tuple by + 3COM). The first two can be set in the program, the third is + un-settable, and can only be read. Once you have these values, set + them in UserConfig and your card will be recognized. + + +Q: FreeBSD finds my PCMCIA network card, but no packets appear to + be sent even though it claims to be working. + +A: Many PCMCIA cards have the ability to use either the 10-Base2 (BNC) + or 10-BaseT connectors for connecting to the network. The driver is + unable to 'auto-select' the correct connector, so you must tell it + which connector to use. In order to switch between the two + connectors, the link flags must be set. Depending on the model of + the card, '-link0 link1' or 'link0 -link1' will choose the correct + network connector. You can set these in sysinstall by using the + 'Extra options to ifconfig:' field in the network setup screen. + + +Q: The system finds my ed network card, but I keep getting device + timeout errors. + +A: Your card is probably on a different IRQ from what is specified in the + kernel configuration. The ed driver does not use the `soft' configuration + by default (values entered using EZSETUP in DOS), but it will use the + software configuration if you specify `?' in the IRQ field of your kernel + config file. + + Either move the jumper on the card to a hard configuration setting + (altering the kernel settings if necessary), or specify the IRQ as + `-1' in UserConfig or `?' in your kernel config file. This will + tell the kernel to use the soft configuration. + + Another possibility is that your card is at IRQ 9, which is shared + by IRQ 2 and frequently a cause of problems (especially when you + have a VGA card using IRQ 2! :). You should not use IRQ 2 or 9 if at + all possible. + + +Q: I have a Matsushita/Panasonic drive but it isn't recognized by the + system. + +A: Make certain that the I/O port that the matcd driver is set to is + correct for the host interface card you have. (Some SoundBlaster DOS + drivers report a hardware I/O port address for the CD-ROM interface + that is 0x10 lower than it really is.) + + If you are unable to determine the settings for the card by examining + the board or documentation, you can use UserConfig to change the 'port' + address (I/O port) to -1 and start the system. This setting causes the + driver to look at a number of I/O ports that various manufacturers + use for their Matsushita/Panasonic/Creative CD-ROM interfaces. + Once the driver locates the address, you should run UserConfig again + and specify the correct address. Leaving the 'port' parameter set to -1 + increases the amount of time that it takes the system to boot, and + this could interfere with other devices. + + The double-speed Matsushita CR-562 and CR-563 are the only drives + that are supported. + + +Q: I booted the install floppy on my IBM ThinkPad (tm) laptop, and the + keyboard is all messed up. + +A: Older IBM laptops use a non-standard keyboard controller, so you must + tell the console driver (sc0) to go into a special mode which works + on the ThinkPads. Change the sc0 'Flags' to 0x10 in UserConfig and + it should work fine. (Look in the Input Menu for 'Syscons Console + Driver'.) + + +Q: I have a Matsushita/Panasonic CR-522, a Matsushita/Panasonic CR-523 or + a TEAC CD55a drive, but it is not recognized even when the correct I/O + port is set. + +A: These CD-ROM drives are currently not supported by FreeBSD. The command + sets for these drives are not compatible with the double-speed CR-562 + and CR-563 drives. + + The single-speed CR-522 and CR-523 drives can be identified by their + use of a CD-caddy. + + +Q: I'm trying to install from a tape drive but all I get is something like: + st0(aha0:1:0) NOT READY csi 40,0,0,0 + on the screen. Help! + +A: There's a limitation in the current sysinstall that the tape MUST + be in the drive while sysinstall is started or it won't be detected. + Try again with the tape in the drive the whole time. + + +Q: I've installed FreeBSD onto my system, but it hangs when booting from + the hard drive with the message: ``Changing root to /dev/sd0a''. + +A: This problem may occur in a system with a 3com 3c509 Ethernet adaptor. + The ep0 device driver appears to be sensitive to probes for other + devices that also use address 0x300. Boot your FreeBSD system by power + cycling the machine (turn off and on). At the ``Boot:'' prompt specify + the ``-c''. This will invoke UserConfig (see Section 1. above). Use + the ``disable'' command to disable the device probes for all devices + at address 0x300 except the ep0 driver. On exit, your machine should + successfully boot FreeBSD. + + +Q: My system hangs during boot, right after the "fd0: [my floppy drive]" + line. + +A: This is not actually a hang, simply a very LONG "wdc0" probe that + often takes a long time to complete on certain systems (where there + usually _isn't_ a WD controller). Be patient, your system will boot! + To eliminate the problem, boot with the -c flag and eliminate the wdc0 + device, or compile a custom kernel. + + +Q: My system can not find my Intel EtherExpress 16 card. + +A: You must set your Intel EtherExpress 16 card to be memory mapped at + address 0xD0000, and set the amount of mapped memory to 32K using + the Intel supplied softset.exe program. + + +Q: When installing on an EISA HP Netserver, my on-board AIC-7xxx + SCSI controller isn't detected. + +A: This is a known problem, and will hopefully be fixed in the future. + In order to get your system installed at all, boot with the -c + option into UserConfig, but _don't_ use the pretty visual mode but + the plain old CLI mode. Type + + eisa 12 + quit + + there at the prompt. (Instead of `quit', you might also type + `visual', and continue the rest of the configuration session in + visual mode.) While it's recommended to compile a custom kernel, + dset(8) now also understands to save this value. + + Refer to the FAQ topic 3.16 for an explanation of the problem, and + for how to continue. Remember that you can find the FAQ on your + local system in /usr/share/doc/FAQ, provided you have installed the + `doc' distribution. + + +Q: I have a Panasonic AL-N1 or Rios Chandler Pentium machine and I find + that the system hangs before ever getting into the installation + now. + +A: Your machine doesn't like the new i586_copyout and i586_copyin code + for some reason. To disable this, boot the installation boot floppy + and when it comes to the very first menu (the choice to drop into + kernel UserConfig mode or not) choose the command-line interface + ("expert mode") version and type the following at it: + + flags npx0 1 + + Then proceed normally to boot. This will be saved into your kernel, + so you only need to do it once. + + +Q: I have this CMD640 IDE controller that is said to be broken. + +A: Yes, it is. There's a workaround available now and it is enabled + automatically if this chip is used on your system. + For the details refer to the manual page of the disk driver (man 4 wd). + + +Q: On a Compaq Aero notebook, I get the message "No floppy devices found! + Please check ..." when trying to install from floppy. + +A: With Compaq being always a little different from other systems, they + do not announce their floppy drive in the CMOS RAM of an Aero notebook. + Therefore, the floppy disk driver assumes there is no drive configured. + Go to the UserConfig screen, and set the Flags value of the fdc0 device + to 0x1. This pretends the existence of the first floppy drive (as a + 1.44 MB drive) to the driver without asking the CMOS at all. + + +Q: When I go to boot my Intel AL440LX ("Atlanta") -based system from the + hard disk the first time, it stops with a "Read Error" message. + +A: There appears to be a bug in the BIOS on at least some of these boards, + this bug results in the FreeBSD bootloader thinking that it is booting + from a floppy disk. + This is only a problem if you are not using the BootEasy boot manager. + Slice the disk in 'compatible' mode and install BootEasy during the + FreeBSD installation to avoid the bug, or upgrade the BIOS (see Intel's + website for details). + +Q: When installing on an Dell Poweredge XE, Dell proprietary RAID controller + DSA (Dell SCSI Array) isn't recognized. + +A: Configure DSA to use AHA-1540 emulation using EISA configuration utility. + After that FreeBSD detects DSA as Adaptec AHA-1540 SCSI controller, with + irq 11 and port 340. Under emulation mode system will use DSA RAID disks, + but you cannot use DSA specific features such as watching RAID health. + + +Q: My Ethernet adapter is detected as an AMD PCnet-FAST (or similar) but + it doesn't work. (Eg. onboard Ethernet on IBM Netfinity 5xxx or 7xxx) + +A: The 'lnc' driver is currently faulty, and will often not work correctly + with the PCnet-FAST and PCnet-FAST+. You need to install a different + Ethernet adapter. + + +Q: I have an IBM EtherJet PCI card, it is detected by the 'fxp' driver + correctly, but the lights on the card don't come on and it doesn't + connect to the network. + +A: We don't understand why this happens. Neither do IBM (we asked them). + The card is a standard Intel EtherExpress Pro/100 with an IBM label + on it, and these cards normally work just fine. You may see these + symptoms only in some IBM Netfinity servers. The only solution is to + install a different Ethernet adapter. + + +Q: When I configure the network during installation on an IBM Netfinity + 3500, the system freezes. + +A: There is a problem with the onboard Ethernet in the Netfinity 3500 + which we have not been able to identify at this time. It may be + related to the SMP features of the system being misconfigured. You + will have to install another Ethernet adapter, and avoid attempting + to configure the onboard adapter at any time. + + +Q: Why does my CD-220E (rev 1.0D) IDE CD-ROM lock up the system when + I use it? + +A: There are apparently firmware problems with this drive and, + though a fix may soon be forthcoming, it should probably be avoided + for now. + +[ Please send hardware tips for this Q&A section to jkh@freebsd.org ] diff --git a/release/sysinstall/help/upgrade.hlp b/release/sysinstall/help/upgrade.hlp new file mode 100644 index 0000000000000..8b7b893e2316a --- /dev/null +++ b/release/sysinstall/help/upgrade.hlp @@ -0,0 +1,168 @@ ++===================== Upgrading FreeBSD ==========================+ +| | +| 0.0 Preface | +| 0.1 DISCLAIMER | +| 0.2 IMPORTANT NOTE | +| | +| 1.0 Introduction | +| 1.1 Upgrade Overview | +| | +| 2.0 Procedure | +| 2.1 Backup | +| 2.2 Mount Filesystems | +| 2.3 Select Distributions | +| 2.4 After Installation | +| | +| 3.0 Alternative Upgrade Techniques | +| | ++=====================================================================+ + +0.1 DISCLAIMER +--- ---------- + +While the FreeBSD upgrade procedure does its best to safeguard against +accidental loss of data, it is still more than possible to WIPE OUT YOUR +ENTIRE DISK with this installation! Please do not accept the final +confirmation request unless you have adequately backed up any important +data files. + +0.2 IMPORTANT NOTE +--- -------------- + +If you are upgrading from FreeBSD 2.2.5 or earlier, see +section 2.4 for important details regarding changes to the +/etc/fstab file required during the upgrade procedure. + +1.0 Introduction +--- ------------ + +The upgrade procedure replaces distributions selected by the user +with those corresponding to the new FreeBSD release. It preserves +standard system configuration data, as well as user data, installed +packages and other software. + +Administrators contemplating an upgrade are encouraged to study this +document in its entirety before commencing an upgrade. Failure to do so +may result in a failed upgrade or loss of data. + +1.1 Upgrade Overview +--- ---------------- +Upgrading of a distribution is performed by extracting the new version of +the component over the top of the previous version. Files belonging to +the old distribution are not deleted. + +System configuration is preserved by retaining and restoring the +previous version of the following files: + + Xaccel.ini, adduser.conf, aliases, aliases.db, amd.map, crontab, + csh.cshrc, csh.login, csh.logout, daily, disktab, dm.conf, exports, + fbtab, fstab, ftpusers, gettytab, gnats, group, host.conf, hosts, + hosts.equiv, hosts.lpd, inetd.conf, kerberosIV, localtime, login.access, + mail.rc, make.conf, manpath.config, master.passwd, mib.txt, modems, + monthly, motd, namedb, networks, passwd, phones, ppp, printcap, + profile, protocols, pwd.db, rc, rc.firewall, rc.i386, rc.local, + rc.network, rc.conf, remote, resolv.conf, rmt, security, sendmail.cf, + services, shells, skeykeys, spwd.db, supfile, syslog.conf, termcap, + ttys, uucp, weekly + +The versions of these files which correspond to the new version are +moved to /etc/upgrade/. The system administrator may peruse these new +versions and merge components as desired. Note that many of these files +are interdependent, and the best merge procedure is to copy all +site-specific data from the current files into the new. + +During the upgrade procedure, the administrator is prompted for a +location into which all files from /etc/ are saved. In the event that +local modifications have been made to other files, they may be +subsequently retrieved from this location. + +2.0 Procedure +--- --------- + +This section details the upgrade procedure. Particular attention is +given to items which substantially differ from a normal installation. + +2.1 Backup +--- ------ + +User data and system configuration should be backed up before +upgrading. While the upgrade procedure does its best to prevent +accidental mistakes, it is possible to partially or completely destroy +data and configuration information. + +2.2 Mount Filesystems +--- ----------------- + +The disklabel editor is entered with the nominated disk's filesystem +devices listed. Prior to commencing the upgrade, the administrator +should make a note of the device names and corresponding mountpoints. +These mountpoints should be entered here. DO NOT set the 'newfs flag' +for any filesystems, as this will cause data loss. + +2.3 Select Distributions +--- -------------------- + +When selecting distributions, there are no constraints on which must be +selected. As a general rule, the 'bin' distribution should be selected +for an update, and the 'man' distribution if manpages are already +installed. Other distributions may be selected beyond those originally +installed if the administrator wishes to add additional functionality. + +2.4 After Installation +--- ------------------ + +Once the installation procedure has completed, the administrator is +prompted to examine the new configuration files. At this point, checks +should be made to ensure that the system configuration is valid. In +particular, the /etc/rc.conf and /etc/fstab files should be checked. + +Read the following, but DO NOT update /etc/fstab as described below +until the new system has booted correctly. The upgrade procedure +replaces the previous FreeBSD kernel with a GENERIC kernel, and a custom +kernel may need to be generated to suit the local system configuration. + +IMPORTANT NOTE: +============== +FreeBSD 2.2.6 introduced a change in the naming of the device from +which the root filesystem is mounted. This change affects all systems, +however user intervention is only required for systems undergoing an +upgrade installation from a version prior to FreeBSD 2.2.6. + +Previously, the root filesystem was always mounted from the +compatibility slice, while other partitions on the same disk were +mounted from their true slice. This might, for example, have resulted +in an /etc/fstab file like: + +# Device Mountpoint FStype Options Dump Pass# +/dev/wd0s2b none swap sw 0 0 +/dev/wd0a / ufs rw 1 1 +/dev/wd0s2f /local0 ufs rw 1 1 +/dev/wd0s2e /usr ufs rw 1 1 + +For FreeBSD 2.2.6 and later, this format changes so that the device for +'/' is consistent with others, ie. + +# Device Mountpoint FStype Options Dump Pass# +/dev/wd0s2b none swap sw 0 0 +/dev/wd0s2a / ufs rw 1 1 +/dev/wd0s2f /local0 ufs rw 1 1 +/dev/wd0s2e /usr ufs rw 1 1 + + +If /etc/fstab is not updated manually in this case, the system will +issue a warning message whenever / is mounted (normally at startup) +indicating the change that must be made. In addition, trouble may be +experienced if the root filesystem is not correctly unmounted, whereby +the root filesystem will not be marked clean at the next reboot. + +This change should be made as soon as the upgraded system has been +successfully rebooted. + +3.0 Alternative Upgrade Techniques +--- ------------------------------ + +Those interested in an upgrade method that allows more flexibility and +sophistication should take a look at the "Upgrading FreeBSD from source" +tutorial found at http://www.freebsd.org/docs.html. This method +requires reliable network connectivity, extra disk space and spare time, +but has advantages for networks and other more complex installations. diff --git a/release/sysinstall/index.c b/release/sysinstall/index.c index 5ff2ceb7b348b..5d44d651ac11c 100644 --- a/release/sysinstall/index.c +++ b/release/sysinstall/index.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: index.c,v 1.59 1998/12/22 12:31:25 jkh Exp $ + * $Id: index.c,v 1.56 1998/10/13 07:31:37 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -65,24 +65,24 @@ static char *descrs[] = { "If you're sure of these choices, select OK.\n" "If not, select Cancel to go back to the package selection menu.\n", "All", "All available packages in all categories.", - "afterstep", "Ports to support the AfterStep window manager.", "applications", "User application software.", "astro", "Applications related to astronomy.", "archivers", "Utilities for archiving and unarchiving data.", "audio", "Audio utilities - most require a supported sound card.", - "biology", "Software related to biology.", + "biology", "Software related to Biology.", "benchmarks", "Utilities for measuring system performance.", + "benchmarking", "Utilities for measuring system performance.", "cad", "Computer Aided Design utilities.", "chinese", "Ported software for the Chinese market.", "comms", "Communications utilities.", - "converters", "Format conversion utilities.", + "converters", "Format conversion utilities..", "databases", "Database software.", "devel", "Software development utilities and libraries.", + "development", "Software development utilities and libraries.", "deskutils", "Various Desktop utilities.", "documentation", "Document preparation utilities.", "editors", "Common text editors.", - "elisp", "Things related to Emacs Lisp.", - "elisp", "Emacs lisp ports.", + "emulation", "Utilities for emulating other OS types.", "emulators", "Utilities for emulating other OS types.", "games", "Various and sundry amusements.", "german", "Ported software for Germanic countries.", @@ -95,43 +95,45 @@ static char *descrs[] = { "libraries", "Software development libraries.", "mail", "Electronic mail packages and utilities.", "math", "Mathematical computation software.", - "mbone", "Applications and utilities for the MBONE.", + "mbone", "Applications and utilities for the mbone.", "misc", "Miscellaneous utilities.", "net", "Networking utilities.", + "networking", "Networking utilities.", "news", "USENET News support software.", "numeric", "Mathematical computation software.", "offix", "An office automation suite of sorts.", "orphans", "Packages without a home elsewhere.", - "palm", "Software support for the 3Com Palm(tm) series.", - "perl5", "Utilities/modules for the PERL5 language.", - "plan9", "Software from the Plan9 operating system.", + "perl5", "Utilities/modules for the PERL5 language..", + "pilot", "Software support for the USR Palm Pilot(tm).", + "plan9", "Software from the plan9 Operating System.", "print", "Utilities for dealing with printing.", "printing", "Utilities for dealing with printing.", "programming", "Software development utilities and libraries.", - "python", "Software related to the Python language.", + "python", "Software related to the python language.", "russian", "Ported software for the Russian market.", "security", "System security software.", "shells", "Various shells (tcsh, bash, etc).", "sysutils", "Various system utilities.", "textproc", "Text processing/search utilities.", - "tcl75", "TCL v7.5 and packages that depend on it.", - "tcl76", "TCL v7.6 and packages that depend on it.", - "tcl80", "TCL v8.0 and packages that depend on it.", - "tcl81", "TCL v8.1 and packages that depend on it.", - "tk41", "Tk4.1 and packages that depend on it.", - "tk42", "Tk4.2 and packages that depend on it.", - "tk80", "Tk8.0 and packages that depend on it.", - "tk81", "Tk8.1 and packages that depend on it.", - "troff", "TROFF text formatting utilities.", + "tcl75", "TCL v7.5 and packages which depend on it.", + "tcl76", "TCL v7.6 and packages which depend on it.", + "tcl80", "TCL v8.0 and packages which depend on it.", + "tcl81", "TCL v8.1 and packages which depend on it.", + "tk41", "Tk4.1 and packages which depend on it.", + "tk42", "Tk4.2 and packages which depend on it.", + "tk80", "Tk8.0 and packages which depend on it.", + "tk81", "Tk8.1 and packages which depend on it.", + "troff", "TROFF Text formatting utilities.", + "utils", "Various user utilities.", + "utilities", "Various user utilities.", "vietnamese", "Ported software for the Vietnamese market.", - "windowmaker", "Ports to support the WindowMaker window manager.", "www", "WEB utilities (browers, HTTP servers, etc).", "x11", "X Window System based utilities.", "x11-clocks", "X Window System based clocks.", "x11-fm", "X Window System based file managers.", - "x11-fonts", "X Window System fonts and font utilities.", + "x11-fonts", "X Window System fonts.", "x11-toolkits", "X Window System based development toolkits.", - "x11-wm", "X Window System window managers.", + "x11-wm", "X Window System Window Managers.", NULL, NULL, }; diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c index fc1f42ede8f4a..c2709b14354ad 100644 --- a/release/sysinstall/install.c +++ b/release/sysinstall/install.c @@ -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.222 1999/01/20 11:56:39 jkh Exp $ + * $Id: install.c,v 1.215 1998/10/12 23:47:50 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -35,6 +35,7 @@ */ #include "sysinstall.h" +#include "uc_main.h" #include <ctype.h> #include <sys/disklabel.h> #include <sys/errno.h> @@ -48,11 +49,13 @@ #include <msdosfs/msdosfsmount.h> #undef MSDOSFS #include <sys/stat.h> -#include <sys/sysctl.h> #include <unistd.h> static void create_termcap(void); static void fixit_common(void); +#ifdef SAVE_USERCONFIG +static void save_userconfig_to_kernel(char *); +#endif #define TERMCAP_FILE "/usr/share/misc/termcap" @@ -194,7 +197,6 @@ static int installInitial(void) { static Boolean alreadyDone = FALSE; - int status = DITEM_SUCCESS; if (alreadyDone) return DITEM_SUCCESS; @@ -238,18 +240,13 @@ installInitial(void) chdir("/"); variable_set2(RUNNING_ON_ROOT, "yes"); - - /* Configure various files in /etc */ - if (DITEM_STATUS(configResolv(NULL)) == DITEM_FAILURE) - status = DITEM_FAILURE; - if (DITEM_STATUS(configFstab(NULL)) == DITEM_FAILURE) - status = DITEM_FAILURE; + configResolv(); /* stick a helpful shell over on the 4th VTY */ systemCreateHoloshell(); alreadyDone = TRUE; - return status; + return DITEM_SUCCESS; } int @@ -362,8 +359,6 @@ installFixitFloppy(dialogMenuItem *self) "or unclean filesystem. Do you want to try again?")) return DITEM_FAILURE; } - else - break; } if (!directory_exists("/tmp")) (void)symlink("/mnt2/tmp", "/tmp"); @@ -451,10 +446,8 @@ installExpress(dialogMenuItem *self) int i; variable_set2(SYSTEM_STATE, "express"); -#ifndef __alpha__ if (DITEM_STATUS((i = diskPartitionEditor(self))) == DITEM_FAILURE) return i; -#endif if (DITEM_STATUS((i = diskLabelEditor(self))) == DITEM_FAILURE) return i; @@ -476,7 +469,6 @@ installNovice(dialogMenuItem *self) Device **devs; variable_set2(SYSTEM_STATE, "novice"); -#ifndef __alpha__ dialog_clear_norefresh(); msgConfirm("In the next menu, you will need to set up a DOS-style (\"fdisk\") partitioning\n" "scheme for your hard disk. If you simply wish to devote all disk space\n" @@ -495,24 +487,14 @@ nodisks: ++tries; goto nodisks; } -#endif dialog_clear_norefresh(); -#ifdef __alpha__ - msgConfirm("First, you need to create BSD partitions on the disk which you are\n" - "installing to. If you have a reasonable amount of disk space (200MB or more)\n" - "and don't have any special requirements, simply use the (A)uto command to\n" - "allocate space automatically. If you have more specific needs or just don't\n" - "care for the layout chosen by (A)uto, press F1 for more information on\n" - "manual layout."); -#else - msgConfirm("First, you need to create BSD partitions inside of the fdisk partition(s)\n" + msgConfirm("Next, you need to create BSD partitions inside of the fdisk partition(s)\n" "just created. If you have a reasonable amount of disk space (200MB or more)\n" "and don't have any special requirements, simply use the (A)uto command to\n" "allocate space automatically. If you have more specific needs or just don't\n" "care for the layout chosen by (A)uto, press F1 for more information on\n" "manual layout."); -#endif if (DITEM_STATUS(diskLabelEditor(self)) == DITEM_FAILURE) return DITEM_FAILURE; @@ -683,6 +665,7 @@ installCommit(dialogMenuItem *self) { int i; char *str; + Boolean need_bin; if (!Dists) distConfig(NULL); @@ -698,9 +681,13 @@ installCommit(dialogMenuItem *self) if (isDebug()) msgDebug("installCommit: System state is `%s'\n", str); - /* Installation stuff we wouldn't do to a running system */ - if (RunningAsInit && DITEM_STATUS((i = installInitial())) == DITEM_FAILURE) - return i; + if (RunningAsInit) { + /* Do things we wouldn't do to a multi-user system */ + if (DITEM_STATUS((i = installInitial())) == DITEM_FAILURE) + return i; + if (DITEM_STATUS((i = configFstab())) == DITEM_FAILURE) + return i; + } try_media: if (!mediaDevice->init(mediaDevice)) { @@ -716,9 +703,11 @@ try_media: return DITEM_FAILURE | DITEM_RESTORE; } - /* Now go get it all */ + need_bin = Dists & DIST_BIN; i = distExtractAll(self); - + /* Only do fixup if bin dist was successfully extracted */ + if (need_bin && !(Dists & DIST_BIN)) + i |= installFixup(self); /* When running as init, *now* it's safe to grab the rc.foo vars */ installEnvironment(); @@ -744,35 +733,33 @@ installConfigure(void) } int -installFixupBin(dialogMenuItem *self) +installFixup(dialogMenuItem *self) { Device **devs; int i; - /* All of this is done only as init, just to be safe */ - if (RunningAsInit) { - /* Fix up kernel first */ - if (!file_readable("/kernel")) { - if (file_readable("/kernel.GENERIC")) { - if (vsystem("cp -p /kernel.GENERIC /kernel")) { - msgConfirm("Unable to copy /kernel into place!"); - return DITEM_FAILURE; - } - /* Snapshot any boot -c changes back to the new kernel */ - if (kget("/kernel.config")) { - msgConfirm("Kernel copied OK, but unable to save boot -c changes\n" - "to it. See the debug screen (ALT-F2) for details."); - } - } - else { - msgConfirm("Can't find a kernel image to link to on the root file system!\n" - "You're going to have a hard time getting this system to\n" - "boot from the hard disk, I'm afraid!"); + if (!file_readable("/kernel")) { + if (file_readable("/kernel.GENERIC")) { + if (vsystem("cp -p /kernel.GENERIC /kernel")) { + msgConfirm("Unable to link /kernel into place!"); return DITEM_FAILURE; } +#ifdef SAVE_USERCONFIG + /* Snapshot any boot -c changes back to the new kernel */ + if (!variable_cmp(VAR_RELNAME, RELEASE_NAME)) + save_userconfig_to_kernel("/kernel"); +#endif } - - /* BOGON #1: Resurrect /dev after bin distribution screws it up */ + else { + msgConfirm("Can't find a kernel image to link to on the root file system!\n" + "You're going to have a hard time getting this system to\n" + "boot from the hard disk, I'm afraid!"); + return DITEM_FAILURE; + } + } + + /* Resurrect /dev after bin distribution screws it up */ + if (RunningAsInit) { msgNotify("Remaking all devices.. Please wait!"); if (vsystem("cd /dev; sh MAKEDEV all")) { msgConfirm("MAKEDEV returned non-zero status"); @@ -788,7 +775,7 @@ installFixupBin(dialogMenuItem *self) for (i = 0; devs[i]; i++) { Disk *disk = (Disk *)devs[i]->private; Chunk *c1; - + if (!devs[i]->enabled) continue; if (!disk->chunks) @@ -803,18 +790,30 @@ installFixupBin(dialogMenuItem *self) } } } - + + /* Do all the last ugly work-arounds here */ + msgNotify("Fixing permissions.."); + /* BOGON #1: XFree86 requires various specialized fixups */ + if (directory_exists("/usr/X11R6")) { + vsystem("chmod -R a+r /usr/X11R6"); + vsystem("find /usr/X11R6 -type d | xargs chmod a+x"); + + /* Also do bogus minimal package registration so ports don't whine */ + if (file_readable("/usr/X11R6/lib/X11/pkgreg.tar.gz")) + vsystem("tar xpzf /usr/X11R6/lib/X11/pkgreg.tar.gz -C / && rm /usr/X11R6/lib/X11/pkgreg.tar.gz"); + } + /* BOGON #2: We leave /etc in a bad state */ chmod("/etc", 0755); - + /* BOGON #3: No /var/db/mountdtab complains */ Mkdir("/var/db"); creat("/var/db/mountdtab", 0644); - + /* BOGON #4: /compat created by default in root fs */ Mkdir("/usr/compat"); vsystem("ln -s /usr/compat /compat"); - + /* BOGON #5: aliases database not build for bin */ vsystem("newaliases"); @@ -828,27 +827,6 @@ installFixupBin(dialogMenuItem *self) vsystem("mtree -deU -f /etc/mtree/BSD.root.dist -p /"); vsystem("mtree -deU -f /etc/mtree/BSD.var.dist -p /var"); vsystem("mtree -deU -f /etc/mtree/BSD.usr.dist -p /usr"); - - /* Do all the last ugly work-arounds here */ - } - return DITEM_SUCCESS; -} - -/* Fix side-effects from the the XFree86 installation */ -int -installFixupXFree(dialogMenuItem *self) -{ - /* BOGON #1: XFree86 requires various specialized fixups */ - if (directory_exists("/usr/X11R6")) { - msgNotify("Fixing permissions in XFree86 tree.."); - vsystem("chmod -R a+r /usr/X11R6"); - vsystem("find /usr/X11R6 -type d | xargs chmod a+x"); - - /* Also do bogus minimal package registration so ports don't whine */ - if (file_readable("/usr/X11R6/lib/X11/pkgreg.tar.gz")) { - msgNotify("Installing package metainfo.."); - vsystem("tar xpzf /usr/X11R6/lib/X11/pkgreg.tar.gz -C / && rm /usr/X11R6/lib/X11/pkgreg.tar.gz"); - } } return DITEM_SUCCESS; } @@ -970,7 +948,7 @@ installFilesystems(dialogMenuItem *self) if (c2 == rootdev) continue; - if (tmp->newfs && (!upgrade || !msgYesNo("You are upgrading - are you SURE you want to newfs /dev/%s?", c2->name))) + if (tmp->newfs && (!upgrade || !msgYesNo("You are upgradding - are you SURE you want to newfs /dev/%s?", c2->name))) command_shell_add(tmp->mountpoint, "%s %s/dev/r%s", tmp->newfs_cmd, RunningAsInit ? "/mnt" : "", c2->name); else command_shell_add(tmp->mountpoint, "fsck -y %s/dev/r%s", RunningAsInit ? "/mnt" : "", c2->name); @@ -1014,20 +992,6 @@ installFilesystems(dialogMenuItem *self) return DITEM_SUCCESS; } -static char * -getRelname(void) -{ - static char buf[64]; - int sz = (sizeof buf) - 1; - - if (sysctlbyname("kern.osrelease", buf, &sz, NULL, 0) != -1) { - buf[sz] = '\0'; - return buf; - } - else - return "<unknown>"; -} - /* Initialize various user-settable values to their defaults */ int installVarDefaults(dialogMenuItem *self) @@ -1035,7 +999,7 @@ installVarDefaults(dialogMenuItem *self) char *cp; /* Set default startup options */ - variable_set2(VAR_RELNAME, getRelname()); + variable_set2(VAR_RELNAME, RELEASE_NAME); variable_set2(VAR_CPIO_VERBOSITY, "high"); variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE); variable_set2(VAR_INSTALL_ROOT, "/"); @@ -1045,13 +1009,13 @@ installVarDefaults(dialogMenuItem *self) cp = "/usr/bin/ee"; variable_set2(VAR_EDITOR, cp); variable_set2(VAR_FTP_USER, "ftp"); - variable_set2(VAR_BROWSER_PACKAGE, "lynx"); + variable_set2(VAR_BROWSER_PACKAGE, PACKAGE_LYNX); variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx"); variable_set2(VAR_FTP_STATE, "passive"); variable_set2(VAR_NFS_SECURE, "YES"); variable_set2(VAR_PKG_TMPDIR, "/usr/tmp"); - variable_set2(VAR_GATED_PKG, "gated"); - variable_set2(VAR_PCNFSD_PKG, "pcnfsd"); + variable_set2(VAR_GATED_PKG, PACKAGE_GATED); + variable_set2(VAR_PCNFSD_PKG, PACKAGE_PCNFSD); variable_set2(VAR_MEDIA_TIMEOUT, itoa(MEDIA_TIMEOUT)); if (getpid() != 1) variable_set2(SYSTEM_STATE, "update"); @@ -1117,3 +1081,62 @@ create_termcap(void) fclose(fp); } } + +#ifdef SAVE_USERCONFIG +static void +save_userconfig_to_kernel(char *kern) +{ + struct kernel *core, *boot; + struct list *c_isa, *b_isa, *c_dev, *b_dev; + int i, d; + + if ((core = uc_open("-incore")) == NULL) { + msgDebug("save_userconf: Can't read in-core information for kernel.\n"); + return; + } + + if ((boot = uc_open(kern)) == NULL) { + msgDebug("save_userconf: Can't read device information for kernel image %s\n", kern); + return; + } + + msgNotify("Saving any boot -c changes to new kernel..."); + c_isa = uc_getdev(core, "-isa"); + b_isa = uc_getdev(boot, "-isa"); + if (isDebug()) + msgDebug("save_userconf: got %d ISA device entries from core, %d from boot.\n", c_isa->ac, b_isa->ac); + for (d = 0; d < c_isa->ac; d++) { + if (isDebug()) + msgDebug("save_userconf: ISA device loop, c_isa->av[%d] = %s\n", d, c_isa->av[d]); + if (strcmp(c_isa->av[d], "npx0")) { /* special case npx0, which mucks with its id_irq member */ + c_dev = uc_getdev(core, c_isa->av[d]); + b_dev = uc_getdev(boot, b_isa->av[d]); + if (!c_dev || !b_dev) { + msgDebug("save_userconf: c_dev: %x b_dev: %x\n", c_dev, b_dev); + continue; + } + if (isDebug()) + msgDebug("save_userconf: ISA device %s: %d config parameters (core), %d (boot)\n", + c_isa->av[d], c_dev->ac, b_dev->ac); + for (i = 0; i < c_dev->ac; i++) { + if (isDebug()) + msgDebug("save_userconf: c_dev->av[%d] = %s, b_dev->av[%d] = %s\n", i, c_dev->av[i], i, b_dev->av[i]); + if (strcmp(c_dev->av[i], b_dev->av[i])) { + if (isDebug()) + msgDebug("save_userconf: %s (boot) -> %s (core)\n", + c_dev->av[i], b_dev->av[i]); + isa_setdev(boot, c_dev); + } + } + } + else { + if (isDebug()) + msgDebug("skipping npx0\n"); + } + } + if (isDebug()) + msgDebug("Closing kernels\n"); + uc_close(core, 0); + uc_close(boot, 1); +} +#endif diff --git a/release/sysinstall/install.cfg b/release/sysinstall/install.cfg index cade7a27ed5f6..478156d5d5791 100644 --- a/release/sysinstall/install.cfg +++ b/release/sysinstall/install.cfg @@ -25,7 +25,7 @@ mediaSetFTP ################################ # Select which distributions we want. -dists=bin doc manpages info compat21 des src sbase ssys +dists=bin doc manpages info compat21 des src sbase slkm ssys distSetCustom ################################ @@ -74,12 +74,12 @@ diskLabelEditor ################################ # And the 3rd. -disk=da0 +disk=sd0 partition=exclusive diskPartitionEditor -da0s1-1=swap 40960 none -da0s1-2=ufs 0 /tmp +sd0s1-1=swap 40960 none +sd0s1-2=ufs 0 /tmp diskLabelEditor ################################ diff --git a/release/sysinstall/installUpgrade.c b/release/sysinstall/installUpgrade.c index 3cc4c27422145..d68009707107d 100644 --- a/release/sysinstall/installUpgrade.c +++ b/release/sysinstall/installUpgrade.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: installUpgrade.c,v 1.60 1998/11/03 03:38:55 jkh Exp $ + * $Id: installUpgrade.c,v 1.58 1998/05/24 02:49:54 steve Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -164,7 +164,7 @@ installUpgrade(dialogMenuItem *self) return installUpgradeNonInteractive(self); variable_set2(SYSTEM_STATE, "upgrade"); - systemDisplayHelp("UPGRADE"); + systemDisplayHelp("upgrade"); dialog_clear_norefresh(); if (msgYesNo("Given all that scary stuff you just read, are you sure you want to\n" @@ -331,6 +331,18 @@ media: } } + if (extractingBin) { + msgNotify("OK, now it's time to go pound on your root a little bit to create all the\n" + "/dev entries and such that a new system expects to see. I'll also perform a\n" + "few \"fixup\" operations to repair the effects of splatting a bin distribution\n" + "on top of an existing system.."); + if (DITEM_STATUS(installFixup(self)) == DITEM_FAILURE) { + msgConfirm("Hmmmmm. The fixups don't seem to have been very happy.\n" + "You may wish to examine the system a little more closely when\n" + "it comes time to merge your /etc customizations back."); + } + } + msgNotify("First stage of upgrade completed successfully!\n\n" "Next comes stage 2, where we attempt to resurrect your /etc\n" "directory!"); @@ -472,6 +484,16 @@ installUpgradeNonInteractive(dialogMenuItem *self) } } + msgNotify("OK, now it's time to go pound on your root a little bit to create all the\n" + "/dev entries and such that a new system expects to see. I'll also perform a\n" + "few \"fixup\" operations to repair the effects of splatting a bin distribution\n" + "on top of an existing system.."); + if (DITEM_STATUS(installFixup(self)) == DITEM_FAILURE) { + msgNotify("Hmmmmm. The fixups don't seem to have been very happy.\n" + "You may wish to examine the system a little more closely when\n" + "it comes time to merge your /etc customizations back."); + } + msgNotify("First stage of upgrade completed successfully."); if (vsystem("tar -cpBf - -C %s . | tar --unlink -xpBf - -C /etc", saved_etc)) { msgNotify("Unable to resurrect your old /etc!"); diff --git a/release/sysinstall/kget.c b/release/sysinstall/kget.c deleted file mode 100644 index a71a25e025b79..0000000000000 --- a/release/sysinstall/kget.c +++ /dev/null @@ -1,104 +0,0 @@ -/*- - * Copyright (c) 1999 Andrzej Bialecki <abial@freebsd.org> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (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: kget.c,v 1.2 1999/01/19 23:15:56 abial Exp $ - */ - -#include "sysinstall.h" -#include "i386/isa/isa_device.h" -#include <sys/sysctl.h> - -int -kget(char *out) -{ - int len, i, bytes_written = 0; - char *buf; - char *mib = "machdep.uc_devlist"; - char name[9]; - FILE *fout; - struct isa_device *id; - char *p; - - fout = fopen(out, "w"); - if (fout == NULL) { - msgDebug("kget: Unable to open %s for writing.\n", out); - return -1; - } - - /* We use sysctlbyname, because the oid is unknown (OID_AUTO) */ - /* get the buffer size */ - i = sysctlbyname(mib, NULL, &len, NULL, NULL); - if (i) { - msgDebug("kget: error buffer sizing\n"); - return -1; - } - buf = (char *)malloc(len * sizeof(char)); - i = sysctlbyname(mib, buf, &len, NULL, NULL); - if (i) { - msgDebug("kget: error retrieving data\n"); - return -1; - } - i = 0; - while (i < len) { - id = (struct isa_device *)(buf + i); - p = (buf + i + sizeof(struct isa_device)); - strncpy(name, p, 8); - if (!id->id_enabled) { - bytes_written += fprintf(fout, "di %s%d\n", name, id->id_unit); - } else { - bytes_written += fprintf(fout, "en %s%d\n", name, id->id_unit); - if (id->id_iobase > 0) { - bytes_written += fprintf(fout, "po %s%d %#x\n", - name, id->id_unit, id->id_iobase); - } - if (id->id_irq > 0) { - bytes_written += fprintf(fout, "ir %s%d %d\n", name, - id->id_unit, ffs(id->id_irq) - 1); - } - if (id->id_drq > 0) { - bytes_written += fprintf(fout, "dr %s%d %d\n", name, - id->id_unit, id->id_drq); - } - if (id->id_maddr > 0) { - bytes_written += fprintf(fout, "iom %s%d %#x\n", name, - id->id_unit, (u_int)id->id_maddr); - } - if (id->id_msize > 0) { - bytes_written += fprintf(fout, "ios %s%d %d\n", name, - id->id_unit, id->id_msize); - } - bytes_written += fprintf(fout, "f %s%d %#x\n", name, - id->id_unit, id->id_flags); - } - i += sizeof(struct isa_device) + 8; - } - if (bytes_written) - fprintf(fout, "q\n"); - else - unlink(out); - fclose(fout); - free(buf); - return 0; -} diff --git a/release/sysinstall/label.c b/release/sysinstall/label.c index ea49bbe0a169e..858bf8d25751c 100644 --- a/release/sysinstall/label.c +++ b/release/sysinstall/label.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: label.c,v 1.83 1998/07/18 09:42:01 jkh Exp $ + * $Id: label.c,v 1.82 1998/03/13 11:09:03 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -653,9 +653,6 @@ diskLabel(Device *dev) PartInfo *p, *oldp; PartType type; Device **devs; -#ifdef __alpha__ - int i; -#endif label_focus = 0; pslice_focus = 0; @@ -668,11 +665,6 @@ diskLabel(Device *dev) } labeling = TRUE; keypad(stdscr, TRUE); -#ifdef __alpha__ - for (i = 0; devs[i]; i++) { - All_FreeBSD((Disk*) devs[i]->private, 1); - } -#endif record_label_chunks(devs, dev); clear(); @@ -1168,9 +1160,6 @@ diskLabelNonInteractive(Device *dev) d = dev->private; else d = devs[0]->private; -#ifdef __alpha__ - All_FreeBSD(d, 1); -#endif record_label_chunks(devs, dev); for (i = 0; label_chunk_info[i].c; i++) { Chunk *c1 = label_chunk_info[i].c; diff --git a/release/sysinstall/main.c b/release/sysinstall/main.c index 5840896154f2f..2769637562c2a 100644 --- a/release/sysinstall/main.c +++ b/release/sysinstall/main.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated for what's essentially a complete rewrite. * - * $Id: main.c,v 1.49 1998/03/10 13:42:02 jkh Exp $ + * $Id: main.c,v 1.48 1998/02/22 09:54:17 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -123,14 +123,8 @@ main(int argc, char **argv) while (1) { choice = scroll = curr = max = 0; dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max, TRUE); - if (getpid() != 1 -#ifdef __alpha__ - || !msgYesNo("Are you sure you wish to exit? The system will halt.") -#else - || !msgYesNo("Are you sure you wish to exit? The system will reboot\n" - "(be sure to remove any floppies from the drives).") -#endif - ) + if (getpid() != 1 || !msgYesNo("Are you sure you wish to exit? The system will reboot\n" + "(be sure to remove any floppies from the drives).")) break; } diff --git a/release/sysinstall/media.c b/release/sysinstall/media.c index 87f63f4a986f6..c5ae93e653b20 100644 --- a/release/sysinstall/media.c +++ b/release/sysinstall/media.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: media.c,v 1.93 1998/12/02 03:27:37 jkh Exp $ + * $Id: media.c,v 1.88 1998/10/10 09:43:44 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -204,6 +204,8 @@ mediaSetFloppy(dialogMenuItem *self) } else mediaDevice = devs[0]; + if (mediaDevice) + mediaDevice->private = "/dist"; return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RESTORE; } @@ -385,28 +387,18 @@ mediaSetFTP(dialogMenuItem *self) msgDebug("port # = `%d'\n", FtpPort); } if (variable_get(VAR_NAMESERVER)) { - msgNotify("Looking up host %s.", hostname); - if (isDebug()) - msgDebug("Starting DNS.\n"); kickstart_dns(); - if (isDebug()) - msgDebug("Looking up hostname, %s, using inet_addr().\n", hostname); - if (inet_addr(hostname) == INADDR_NONE) { - if (isDebug()) - msgDebug("Looking up hostname, %s, using gethostbyname().\n", - hostname); - if (gethostbyname(hostname) == NULL) { - msgConfirm("Cannot resolve hostname `%s'! Are you sure that" - " your\nname server, gateway and network interface are" - " correctly configured?", hostname); - if (networkDev) - networkDev->shutdown(networkDev); - networkDev = NULL; - variable_unset(VAR_FTP_PATH); - return DITEM_FAILURE | what; - } + if ((inet_addr(hostname) == INADDR_NONE) && (gethostbyname(hostname) == NULL)) { + msgConfirm("Cannot resolve hostname `%s'! Are you sure that your\n" + "name server, gateway and network interface are correctly configured?", hostname); + if (networkDev) + networkDev->shutdown(networkDev); + networkDev = NULL; + variable_unset(VAR_FTP_PATH); + return DITEM_FAILURE | what; } - msgDebug("Found DNS entry for %s successfully..\n", hostname); + else + msgDebug("Found DNS entry for %s successfully..\n", hostname); } variable_set2(VAR_FTP_HOST, hostname); variable_set2(VAR_FTP_DIR, dir ? dir : "/"); @@ -462,7 +454,7 @@ mediaSetNFS(dialogMenuItem *self) static Device nfsDevice; static Device *networkDev = NULL; char *cp, *idx; - char hostname[MAXPATHLEN]; + char hostname[MAXHOSTNAMELEN]; mediaClose(); dialog_clear_norefresh(); cp = variable_get_value(VAR_NFS_PATH, "Please enter the full NFS file specification for the remote\n" @@ -762,23 +754,3 @@ mediaSetCPIOVerbosity(dialogMenuItem *self) } return DITEM_SUCCESS; } - -/* A generic open which follows a well-known "path" of places to look */ -FILE * -mediaGenericGet(char *base, const char *file) -{ - char buf[PATH_MAX]; - - snprintf(buf, PATH_MAX, "%s/%s", base, file); - if (file_readable(buf)) - return fopen(buf, "r"); - snprintf(buf, PATH_MAX, "%s/releases/%s", base, file); - if (file_readable(buf)) - return fopen(buf, "r"); - snprintf(buf, PATH_MAX, "%s/%s/%s", base, variable_get(VAR_RELNAME), file); - if (file_readable(buf)) - return fopen(buf, "r"); - snprintf(buf, PATH_MAX, "%s/releases/%s/%s", base, variable_get(VAR_RELNAME), file); - return fopen(buf, "r"); -} - diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c index d5da830734f81..0fc25abdb5a88 100644 --- a/release/sysinstall/menus.c +++ b/release/sysinstall/menus.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: menus.c,v 1.179 1999/01/06 13:55:12 peter Exp $ + * $Id: menus.c,v 1.170 1998/09/30 11:49:35 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -233,11 +233,11 @@ DMenu MenuIndex = { { "Distributions, Adding", "Installing additional distribution sets", NULL, distExtractAll }, { "Distributions, XFree86","XFree86 distribution menu.", NULL, distSetXF86 }, { "Documentation", "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation }, - { "Doc, README", "The distribution README file.", NULL, dmenuDisplayFile, NULL, "README" }, - { "Doc, Hardware", "The distribution hardware guide.", NULL, dmenuDisplayFile, NULL, "HARDWARE" }, - { "Doc, Install", "The distribution installation guide.", NULL, dmenuDisplayFile, NULL, "INSTALL" }, + { "Doc, README", "The distribution README file.", NULL, dmenuDisplayFile, NULL, "readme" }, + { "Doc, Hardware", "The distribution hardware guide.", NULL, dmenuDisplayFile, NULL, "hardware" }, + { "Doc, Install", "The distribution installation guide.", NULL, dmenuDisplayFile, NULL, "install" }, { "Doc, Copyright", "The distribution copyright notices.", NULL, dmenuDisplayFile, NULL, "COPYRIGHT" }, - { "Doc, Release", "The distribution release notes.", NULL, dmenuDisplayFile, NULL, "RELNOTES" }, + { "Doc, Release", "The distribution release notes.", NULL, dmenuDisplayFile, NULL, "relnotes" }, { "Doc, HTML", "The HTML documentation menu.", NULL, docBrowser }, { "Emergency shell", "Start an Emergency Holographic shell.", NULL, installFixitHoloShell }, { "Fdisk", "The disk Partition Editor", NULL, diskPartitionEditor }, @@ -290,8 +290,8 @@ DMenu MenuIndex = { /* The initial installation menu */ DMenu MenuInitial = { DMENU_NORMAL_TYPE, - "/stand/sysinstall Main Menu", /* title */ - "Welcome to the FreeBSD installation and configuration tool. Please\n" /* prompt */ + "Welcome to FreeBSD! [" RELEASE_NAME "]", /* title */ + "This is the main menu of the FreeBSD installation system. Please\n" /* prompt */ "select one of the options below by using the arrow keys or typing the\n" "first character of the option name you're interested in. Invoke an\n" "option by pressing [ENTER] or [TAB-ENTER] to exit the installation.", @@ -303,13 +303,13 @@ DMenu MenuInitial = { { "2 Doc", "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation }, { "3 Keymap", "Select keyboard type", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap }, { "4 Options", "View/Set various installation options", NULL, optionsEditor }, - { "5 Configure", "Do post-install configuration of FreeBSD", NULL, dmenuSubmenu, NULL, &MenuConfigure }, - { "6 Novice", "Begin a novice installation (for beginners)", NULL, installNovice }, - { "7 Express", "Begin a quick installation (for the impatient)", NULL, installExpress }, - { "8 Custom", "Begin a custom installation (for experts)", NULL, dmenuSubmenu, NULL, &MenuInstallCustom }, - { "9 Fixit", "Enter repair mode with CDROM/floppy or start shell", NULL, dmenuSubmenu, NULL, &MenuFixit }, - { "U Upgrade", "Upgrade an existing system", NULL, installUpgrade }, - { "L Load Config","Load default install configuration", NULL, dispatch_load_floppy }, + { "5 Novice", "Begin a novice installation (for beginners)", NULL, installNovice }, + { "6 Express", "Begin a quick installation (for the impatient)", NULL, installExpress }, + { "7 Custom", "Begin a custom installation (for experts)", NULL, dmenuSubmenu, NULL, &MenuInstallCustom }, + { "8 Fixit", "Enter repair mode with CDROM/floppy or start shell", NULL, dmenuSubmenu, NULL, &MenuFixit }, + { "9 Upgrade", "Upgrade an existing system", NULL, installUpgrade }, + { "c Configure", "Do post-install configuration of FreeBSD", NULL, dmenuSubmenu, NULL, &MenuConfigure }, + { "l Load Config","Load default install configuration", NULL, dispatch_load_floppy }, { "0 Index", "Glossary of functions", NULL, dmenuSubmenu, NULL, &MenuIndex }, { NULL } }, }; @@ -317,7 +317,7 @@ DMenu MenuInitial = { /* The main documentation menu */ DMenu MenuDocumentation = { DMENU_NORMAL_TYPE, - "FreeBSD Documentation Menu", + "Documentation for FreeBSD " RELEASE_NAME, "If you are at all unsure about the configuration of your hardware\n" "or are looking to build a system specifically for FreeBSD, read the\n" "Hardware guide! New users should also read the Install document for\n" @@ -325,11 +325,11 @@ DMenu MenuDocumentation = { "consult the README file.", "Confused? Press F1 for help.", "usage", - { { "1 README", "A general description of FreeBSD. Read this!", NULL, dmenuDisplayFile, NULL, "README" }, - { "2 Hardware", "The FreeBSD survival guide for PC hardware.", NULL, dmenuDisplayFile, NULL, "HARDWARE" }, - { "3 Install", "A step-by-step guide to installing FreeBSD.", NULL, dmenuDisplayFile, NULL, "INSTALL" }, + { { "1 README", "A general description of FreeBSD. Read this!", NULL, dmenuDisplayFile, NULL, "readme" }, + { "2 Hardware", "The FreeBSD survival guide for PC hardware.", NULL, dmenuDisplayFile, NULL, "hardware" }, + { "3 Install", "A step-by-step guide to installing FreeBSD.", NULL, dmenuDisplayFile, NULL, "install" }, { "4 Copyright", "The FreeBSD Copyright notices.", NULL, dmenuDisplayFile, NULL, "COPYRIGHT" }, - { "5 Release" ,"The release notes for this version of FreeBSD.", NULL, dmenuDisplayFile, NULL, "RELNOTES" }, + { "5 Release" ,"The release notes for this version of FreeBSD.", NULL, dmenuDisplayFile, NULL, "relnotes" }, { "6 Shortcuts", "Creating shortcuts to sysinstall.", NULL, dmenuDisplayFile, NULL, "shortcuts" }, { "7 HTML Docs", "Go to the HTML documentation menu (post-install).", NULL, docBrowser }, { "0 Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, @@ -489,6 +489,8 @@ DMenu MenuMediaFTP = { VAR_FTP_PATH "=ftp://current.freebsd.org/pub/FreeBSD/" }, { "2.2 SNAP Server", "releng22.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://releng22.freebsd.org/pub/FreeBSD/" }, + { "2.1 SNAP Server", "releng210.freebsd.org", NULL, dmenuSetVariable, NULL, + VAR_FTP_PATH "=ftp://releng210.freebsd.org/pub/FreeBSD/" }, { "Argentina", "ftp.ar.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.ar.freebsd.org/pub/FreeBSD/" }, { "Australia", "ftp.au.freebsd.org", NULL, dmenuSetVariable, NULL, @@ -573,12 +575,6 @@ DMenu MenuMediaFTP = { VAR_FTP_PATH "=ftp://ftp.kr.freebsd.org/pub/FreeBSD/" }, { "Korea #2", "ftp2.kr.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.kr.freebsd.org/pub/FreeBSD/" }, - { "Korea #3", "ftp3.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH "=ftp://ftp3.kr.freebsd.org/pub/FreeBSD/" }, - { "Korea #4", "ftp4.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH "=ftp://ftp4.kr.freebsd.org/pub/FreeBSD/" }, - { "Korea #5", "ftp5.kr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH "=ftp://ftp5.kr.freebsd.org/pub/FreeBSD/" }, { "Poland", "ftp.pl.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.pl.freebsd.org/pub/FreeBSD/" }, { "Portugal", "ftp.pt.freebsd.org", NULL, dmenuSetVariable, NULL, @@ -763,7 +759,7 @@ DMenu MenuSubDistributions = { srcFlagCheck, distSetSrc }, { "ports", "The FreeBSD Ports collection", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PORTS }, - { "XFree86", "The XFree86 3.3.3 distribution", + { "XFree86", "The XFree86 3.3.2.3 distribution", x11FlagCheck, distSetXF86 }, { "All", "All sources, binaries and X Window System binaries", NULL, distSetEverything, NULL, NULL, ' ', ' ', ' ' }, @@ -821,6 +817,8 @@ DMenu MenuSrcDistributions = { dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIB }, { "libexec", "/usr/src/libexec (system programs)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIBEXEC }, + { "lkm", "/usr/src/lkm (Loadable Kernel Modules)", + dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LKM }, { "release", "/usr/src/release (release-generation tools)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_RELEASE }, { "bin", "/usr/src/bin (system binaries)", @@ -848,8 +846,8 @@ DMenu MenuSrcDistributions = { DMenu MenuXF86Select = { DMENU_NORMAL_TYPE, - "XFree86 3.3.3 Distribution", - "Please select the components you need from the XFree86 3.3.3\n" + "XFree86 3.3.2.3 Distribution", + "Please select the components you need from the XFree86 3.3.2.3\n" "distribution sets.", "Press F1 to read the XFree86 release notes for FreeBSD", "XF86", @@ -864,7 +862,7 @@ DMenu MenuXF86Select = { DMenu MenuXF86SelectCore = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, - "XFree86 3.3.3 base distribution types", + "XFree86 3.3.2.3 base distribution types", "Please check off the basic XFree86 components you wish to install.\n" "Bin, lib, and set are recommended for a minimum installaion.", "Press F1 to read the XFree86 release notes for FreeBSD", @@ -891,9 +889,9 @@ DMenu MenuXF86SelectCore = { dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SET }, { "9set", "XFree86 Setup Utility for PC98 machines", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_9SET }, - { "sources", "XFree86 3.3.3 standard sources", + { "sources", "XFree86 3.3.2.3 standard sources", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SRC }, - { "csources", "XFree86 3.3.3 contrib sources", + { "csources", "XFree86 3.3.2.3 contrib sources", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_CSRC }, { "All", "Select all of the above", NULL, setX11Misc, NULL, NULL, ' ', ' ', ' ' }, @@ -1064,18 +1062,11 @@ DMenu MenuInstallCustom = { "Press F1 to read the installation guide", "install", { { "1 Options", "View/Set various installation options", NULL, optionsEditor }, -#ifdef __alpha__ - { "2 Label", "Label disk partitions", NULL, diskLabelEditor }, - { "3 Distributions", "Select distribution(s) to extract", NULL, dmenuSubmenu, NULL, &MenuDistributions }, - { "4 Media", "Choose the installation media type", NULL, dmenuSubmenu, NULL, &MenuMedia }, - { "5 Commit", "Perform any pending Partition/Label/Extract actions", NULL, installCustomCommit }, -#else { "2 Partition", "Allocate disk space for FreeBSD", NULL, diskPartitionEditor }, { "3 Label", "Label allocated disk partitions", NULL, diskLabelEditor }, { "4 Distributions", "Select distribution(s) to extract", NULL, dmenuSubmenu, NULL, &MenuDistributions }, { "5 Media", "Choose the installation media type", NULL, dmenuSubmenu, NULL, &MenuMedia }, { "6 Commit", "Perform any pending Partition/Label/Extract actions", NULL, installCustomCommit }, -#endif { "0 Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { NULL } }, }; @@ -1095,7 +1086,7 @@ DMenu MenuMBRType = { " NOTE: PC-DOS users will almost certainly require \"None\"!", "Press F1 to read about drive setup", "drives", - { { "BootMgr", "Install the FreeBSD Boot Manager", + { { "BootMgr", "Install the FreeBSD Boot Manager (\"Booteasy\")", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr }, { "Standard", "Install a standard MBR (no boot manager)", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 }, diff --git a/release/sysinstall/network.c b/release/sysinstall/network.c index a20e5614ab2c9..7dde08df8252b 100644 --- a/release/sysinstall/network.c +++ b/release/sysinstall/network.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: network.c,v 1.32 1998/10/01 19:26:02 msmith Exp $ + * $Id: network.c,v 1.31 1998/07/12 17:11:53 brian Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -58,15 +58,9 @@ mediaInitNetwork(Device *dev) if (!RunningAsInit || networkInitialized) return TRUE; - if (isDebug()) - msgDebug("Init routine called for network device %s.\n", dev->name); - - if (!file_readable("/etc/resolv.conf")) { - if (DITEM_STATUS(configResolv(NULL)) == DITEM_FAILURE) { - msgConfirm("Can't seem to write out /etc/resolv.conf. Net cannot be used."); - return FALSE; - } - } + msgDebug("Init routine called for network device %s.\n", dev->name); + if (!file_readable("/etc/resolv.conf")) + configResolv(); /* Old PPP process lying around? */ if (pppPID) { diff --git a/release/sysinstall/nfs.c b/release/sysinstall/nfs.c index aeb1dc0fc584e..8ab752106177b 100644 --- a/release/sysinstall/nfs.c +++ b/release/sysinstall/nfs.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: nfs.c,v 1.18 1997/02/22 14:12:14 peter Exp $ + * $Id$ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -42,11 +42,11 @@ #include <sys/mount.h> Boolean NFSMounted; -static char mountpoint[] = "/dist"; Boolean mediaInitNFS(Device *dev) { + char *mountpoint = "/dist"; Device *netDevice = (Device *)dev->private; if (NFSMounted) @@ -68,26 +68,43 @@ mediaInitNFS(Device *dev) return FALSE; } NFSMounted = TRUE; - if (isDebug()) - msgDebug("Mounted NFS device %s onto %s\n", dev->name, mountpoint); + msgDebug("Mounted NFS device %s onto %s\n", dev->name, mountpoint); return TRUE; } FILE * mediaGetNFS(Device *dev, char *file, Boolean probe) { - return mediaGenericGet(mountpoint, file); + char buf[PATH_MAX]; + + if (isDebug()) + msgDebug("Request for %s from NFS\n", file); + snprintf(buf, PATH_MAX, "/dist/%s", file); + if (file_readable(buf)) + return fopen(buf, "r"); + snprintf(buf, PATH_MAX, "/dist/dists/%s", file); + if (file_readable(buf)) + return fopen(buf, "r"); + snprintf(buf, PATH_MAX, "/dist/%s/%s", variable_get(VAR_RELNAME), file); + if (file_readable(buf)) + return fopen(buf, "r"); + snprintf(buf, PATH_MAX, "/dist/%s/dists/%s", variable_get(VAR_RELNAME), file); + return fopen(buf, "r"); } void mediaShutdownNFS(Device *dev) { + /* Device *netdev = (Device *)dev->private; */ + char *mountpoint = "/dist"; + if (!NFSMounted) return; - msgNotify("Unmounting NFS partition on %s", mountpoint); if (unmount(mountpoint, MNT_FORCE) != 0) msgConfirm("Could not unmount the NFS partition: %s", strerror(errno)); + msgDebug("Unmount of NFS partition successful\n"); + /* if (netdev) netdev->shutdown(netdev); */ NFSMounted = FALSE; return; } diff --git a/release/sysinstall/register.c b/release/sysinstall/register.c index c3e3bf13b2507..b5200716da310 100644 --- a/release/sysinstall/register.c +++ b/release/sysinstall/register.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: register.c,v 1.8 1997/08/18 21:47:34 jkh Exp $ + * $Id: register.c,v 1.7 1997/05/26 04:57:56 jkh Exp $ * * Copyright (c) 1997 * Jordan Hubbard. All rights reserved. @@ -175,7 +175,7 @@ handle_registration(void) hotspots[COMMERCE_EMAIL].sel ? "yes" : "no", hotspots[COMMERCE_MAIL].sel ? "yes" : "no", hotspots[ANNOUNCE_LIST].sel ? "yes" : "no", hotspots[NEWSLETTER].sel == 0 ? "no" : hotspots[NEWSLETTER].sel == 1 ? "postal" : "email"); - fprintf(fp, "<version>%s</version>\n", variable_get(VAR_RELNAME)); + fprintf(fp, "<version>%s</version>\n", RELEASE_NAME); fprintf(fp, "</entry>\n"); fclose(fp); dialog_clear_norefresh(); diff --git a/release/sysinstall/sysinstall.8 b/release/sysinstall/sysinstall.8 index 2be7509309bb2..336750fb7386b 100644 --- a/release/sysinstall/sysinstall.8 +++ b/release/sysinstall/sysinstall.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: sysinstall.8,v 1.13 1998/12/02 03:27:37 jkh Exp $ +.\" $Id: sysinstall.8,v 1.10 1998/07/21 06:44:42 jkh Exp $ .\" .Dd August 9, 1997 .Dt SYSINSTALL 8 @@ -280,9 +280,9 @@ the script. For example, let's say you have a SCSI disk on which you've created a new FreeBSD partition in slice 2 (your DOS partition residing in slice 1). The slice name would be -.Ar da0s2 +.Ar sd0s2 for the whole FreeBSD partition ( -.Ar da0s1 +.Ar sd0s1 being your DOS primary partition). Now let's further assume that you have 500MB in this partition and you want to sub-partition that space into root, swap, @@ -290,13 +290,13 @@ var and usr file systems for FreeBSD. Your invocation of the .Ar diskLabelEditor function might involve setting the following variables: .Bl -tag -width findx -.It Li "da0s2-1=ufs 40960 /" +.It Li "sd0s2-1=ufs 40960 /" A 20MB root file system (all sizes are in 512 byte blocks). -.It Li "da0s2-2=swap 131072 /" +.It Li "sd0s2-2=swap 131072 /" A 64MB swap partition. -.It Li "da0s2-3=ufs 204800 /var" +.It Li "sd0s2-3=ufs 204800 /var" A 100MB /var file system. -.It Li "da0s2-4=ufs 0 /usr" +.It Li "sd0s2-4=ufs 0 /usr" With the balance of free space (around 316MB) going to the /usr file system. .El @@ -311,7 +311,7 @@ entry is created for it in the new installation. Before calling the .Ar diskLabelEditor function, we simply add an additional line: .nf - da0s1=/dos_c N + sd0s1=/dos_c N .fi before the call. This tells the label editor that you want to mount @@ -394,6 +394,8 @@ Kerberos binaries. /usr/src/lib .It Li slibexec /usr/src/libexec +.It Li slkm +/usr/src/lkm .It Li srelease /usr/src/release .It Li sbin @@ -414,94 +416,94 @@ Kerberos binaries. XFree86 official sources. .It Li XF86-co XFree86 contributed sources. -.It Li Xbin -XFree86 3.3.3 binaries. -.It Li Xcfg -XFree86 3.3.3 configuration files. -.It Li Xdoc -XFree86 3.3.3 documentation. -.It Li Xhtml -XFree86 3.3.3 HTML documentation. -.It Li Xlib -XFree86 3.3.3 libraries. -.It Li Xlk98 -XFree86 3.3.3 server link-kit for PC98 machines. -.It Li Xlkit -XFree86 3.3.3 server link-kit for standard machines. -.It Li Xman -XFree86 3.3.3 manual pages. -.It Li Xprog -XFree86 3.3.3 programmer's distribution. -.It Li Xps -XFree86 3.3.3 postscript documentation. -.It Li Xset -XFree86 3.3.3 graphical setup tool. -.It Li X8514 -XFree86 3.3.3 8514 server. -.It Li X9480 -XFree86 3.3.3 PC98 8-bit (256 color) PEGC-480 server. -.It Li X9EGC -XFree86 3.3.3 PC98 4-bit (16 color) EGC server. -.It Li X9GA9 -XFree86 3.3.3 PC98 GA-968V4/PCI (S3 968) server. -.It Li X9GAN -XFree86 3.3.3 PC98 GANB-WAP (cirrus) server. -.It Li X9LPW -XFree86 3.3.3 PC98 PowerWindowLB (S3) server. -.It Li X9NKV -XFree86 3.3.3 PC98 NKV-NEC (cirrus) server. -.It Li X9NS3 -XFree86 3.3.3 PC98 NEC (S3) server. -.It Li X9SPW -XFree86 3.3.3 PC98 SKB-PowerWindow (S3) server. -.It Li X9TGU -XFree86 3.3.3 PC98 Cyber9320 and TGUI9680 server. -.It Li X9WEP -XFree86 3.3.3 PC98 WAB-EP (cirrus) server. -.It Li X9WS -XFree86 3.3.3 PC98 WABS (cirrus) server. -.It Li X9WSN -XFree86 3.3.3 PC98 WSN-A2F (cirrus) server. -.It Li XAGX -XFree86 3.3.3 8 bit AGX server. -.It Li XI128 -XFree86 3.3.3 #9 Imagine I128 server. -.It Li XMa8 -XFree86 3.3.3 ATI Mach8 server. -.It Li XMa32 -XFree86 3.3.3 ATI Mach32 server. -.It Li XMa64 -XFree86 3.3.3 ATI Mach64 server. -.It Li XMono -XFree86 3.3.3 monochrome server. -.It Li XP9K -XFree86 3.3.3 P9000 server. -.It Li XS3 -XFree86 3.3.3 S3 server. -.It Li XS3V -XFree86 3.3.3 S3 Virge server. -.It Li XSVGA -XFree86 3.3.3 SVGA server. -.It Li XVG16 -XFree86 3.3.3 VGA16 server. -.It Li XW32 -XFree86 3.3.3 ET4000/W32, /W32i and /W32p server. -.It Li Xnest -XFree86 3.3.3 nested X server. -.It Li Xvfb -XFree86 3.3.3 virtual frame-buffer X server. -.It Li Xfnts -XFree86 3.3.3 base font set. -.It Li Xf100 -XFree86 3.3.3 100DPI font set. -.It Li Xfcyr -XFree86 3.3.3 Cyrillic font set. -.It Li Xfscl -XFree86 3.3.3 scalable font set. -.It Li Xfnon -XFree86 3.3.3 non-english font set. -.It Li Xfsrv -XFree86 3.3.3 font server. +.It Li X332bin +XFree86 3.3.2.3 binaries. +.It Li X332cfg +XFree86 3.3.2.3 configuration files. +.It Li X332doc +XFree86 3.3.2.3 documentation. +.It Li X332html +XFree86 3.3.2.3 HTML documentation. +.It Li X332lib +XFree86 3.3.2.3 libraries. +.It Li X332lk98 +XFree86 3.3.2.3 server link-kit for PC98 machines. +.It Li X332lkit +XFree86 3.3.2.3 server link-kit for standard machines. +.It Li X332man +XFree86 3.3.2.3 manual pages. +.It Li X332prog +XFree86 3.3.2.3 programmer's distribution. +.It Li X332ps +XFree86 3.3.2.3 postscript documentation. +.It Li X332set +XFree86 3.3.2.3 graphical setup tool. +.It Li X3328514 +XFree86 3.3.2.3 8514 server. +.It Li X3329480 +XFree86 3.3.2.3 PC98 8-bit (256 color) PEGC-480 server. +.It Li X3329EGC +XFree86 3.3.2.3 PC98 4-bit (16 color) EGC server. +.It Li X3329GA9 +XFree86 3.3.2.3 PC98 GA-968V4/PCI (S3 968) server. +.It Li X3329GAN +XFree86 3.3.2.3 PC98 GANB-WAP (cirrus) server. +.It Li X3329LPW +XFree86 3.3.2.3 PC98 PowerWindowLB (S3) server. +.It Li X3329NKV +XFree86 3.3.2.3 PC98 NKV-NEC (cirrus) server. +.It Li X3329NS3 +XFree86 3.3.2.3 PC98 NEC (S3) server. +.It Li X3329SPW +XFree86 3.3.2.3 PC98 SKB-PowerWindow (S3) server. +.It Li X3329TGU +XFree86 3.3.2.3 PC98 Cyber9320 and TGUI9680 server. +.It Li X3329WEP +XFree86 3.3.2.3 PC98 WAB-EP (cirrus) server. +.It Li X3329WS +XFree86 3.3.2.3 PC98 WABS (cirrus) server. +.It Li X3329WSN +XFree86 3.3.2.3 PC98 WSN-A2F (cirrus) server. +.It Li X332AGX +XFree86 3.3.2.3 8 bit AGX server. +.It Li X332I128 +XFree86 3.3.2.3 #9 Imagine I128 server. +.It Li X332Ma8 +XFree86 3.3.2.3 ATI Mach8 server. +.It Li X332Ma32 +XFree86 3.3.2.3 ATI Mach32 server. +.It Li X332Ma64 +XFree86 3.3.2.3 ATI Mach64 server. +.It Li X332Mono +XFree86 3.3.2.3 monochrome server. +.It Li X332P9K +XFree86 3.3.2.3 P9000 server. +.It Li X332S3 +XFree86 3.3.2.3 S3 server. +.It Li X332S3V +XFree86 3.3.2.3 S3 Virge server. +.It Li X332SVGA +XFree86 3.3.2.3 SVGA server. +.It Li X332VG16 +XFree86 3.3.2.3 VGA16 server. +.It Li X332W32 +XFree86 3.3.2.3 ET4000/W32, /W32i and /W32p server. +.It Li X332nest +XFree86 3.3.2.3 nested X server. +.It Li X332vfb +XFree86 3.3.2.3 virtual frame-buffer X server. +.It Li X332fnts +XFree86 3.3.2.3 base font set. +.It Li X332f100 +XFree86 3.3.2.3 100DPI font set. +.It Li X332fcyr +XFree86 3.3.2.3 Cyrillic font set. +.It Li X332fscl +XFree86 3.3.2.3 scalable font set. +.It Li X332fnon +XFree86 3.3.2.3 non-english font set. +.It Li X332fsrv +XFree86 3.3.2.3 font server. .El .It distSetDeveloper Selects the standard Developer's distribution set. @@ -540,7 +542,7 @@ Interactively select source subcomponents. .Pp \fBVariables:\fR None .It distSetXF86 -Interactively select XFree86 3.3.3 subcomponents. +Interactively select XFree86 3.3.2.3 subcomponents. .Pp \fBVariables:\fR None .It distExtractAll diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h index a50eb3ee4050f..c74c423d8831b 100644 --- a/release/sysinstall/sysinstall.h +++ b/release/sysinstall/sysinstall.h @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: sysinstall.h,v 1.152 1998/12/22 12:31:25 jkh Exp $ + * $Id: sysinstall.h,v 1.148 1998/09/30 11:49:37 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -51,9 +51,15 @@ #include "colors.h" #include "libdisk.h" #include "dist.h" +#include "version.h" /*** Defines ***/ +/* Different packages we depend on - update symlinks when versions change! */ +#define PACKAGE_GATED "gated" +#define PACKAGE_PCNFSD "pcnfsd" +#define PACKAGE_LYNX "lynx" + /* device limits */ #define DEV_NAME_MAX 64 /* The maximum length of a device name */ #define DEV_MAX 100 /* The maximum number of devices we'll deal with */ @@ -401,13 +407,13 @@ extern void command_shell_add(char *key, char *fmt, ...); extern void command_func_add(char *key, commandFunc func, void *data); /* config.c */ +extern int configFstab(void); extern void configEnvironmentRC_conf(char *config); extern void configEnvironmentResolv(char *config); extern void configRC_conf(char *config); -extern int configFstab(dialogMenuItem *self); extern int configRC(dialogMenuItem *self); extern int configRegister(dialogMenuItem *self); -extern int configResolv(dialogMenuItem *self); +extern void configResolv(void); extern int configPackages(dialogMenuItem *self); extern int configSaver(dialogMenuItem *self); extern int configSaverTimeout(dialogMenuItem *self); @@ -531,17 +537,13 @@ extern int installNovice(dialogMenuItem *self); extern int installFixitHoloShell(dialogMenuItem *self); extern int installFixitCDROM(dialogMenuItem *self); extern int installFixitFloppy(dialogMenuItem *self); -extern int installFixupBin(dialogMenuItem *self); -extern int installFixupXFree(dialogMenuItem *self); +extern int installFixup(dialogMenuItem *self); extern int installUpgrade(dialogMenuItem *self); extern int installFilesystems(dialogMenuItem *self); extern int installVarDefaults(dialogMenuItem *self); extern void installEnvironment(void); extern Boolean copySelf(void); -/* kget.c */ -extern int kget(char *out); - /* keymap.c */ extern int loadKeymap(const char *lang); @@ -587,7 +589,6 @@ extern Boolean mediaExtractDist(char *dir, char *dist, FILE *fp); extern Boolean mediaExtractDistBegin(char *dir, int *fd, int *zpid, int *cpic); extern Boolean mediaExtractDistEnd(int zpid, int cpid); extern Boolean mediaVerify(void); -extern FILE *mediaGenericGet(char *base, const char *file); /* misc.c */ extern Boolean file_readable(char *fname); diff --git a/release/sysinstall/system.c b/release/sysinstall/system.c index 97b7d57008a44..b1a12af5489c6 100644 --- a/release/sysinstall/system.c +++ b/release/sysinstall/system.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: system.c,v 1.86 1999/01/08 00:14:22 jkh Exp $ + * $Id: system.c,v 1.83 1998/09/30 11:44:29 jkh Exp $ * * Jordan Hubbard * @@ -22,12 +22,12 @@ #include <machine/console.h> #include <sys/fcntl.h> #include <sys/ioctl.h> -#include <sys/stat.h> +#include <sys/wait.h> /* Where we stick our temporary expanded doc file */ -#define DOC_TMP_DIR "/tmp/.doc" -#define DOC_TMP_FILE "/tmp/.doc/doc.tmp" +#define DOC_TMP_DIR "/tmp" +#define DOC_TMP_FILE "/tmp/doc.tmp" static pid_t ehs_pid; @@ -53,15 +53,8 @@ expand(char *fname) { char *gunzip = RunningAsInit ? "/stand/gunzip" : "/usr/bin/gunzip"; - if (!directory_exists(DOC_TMP_DIR)) { - Mkdir(DOC_TMP_DIR); - if (chown(DOC_TMP_DIR, 0, 0) < 0) - return NULL; - if (chmod(DOC_TMP_DIR, S_IRWXU) < 0) - return NULL; - } - else - unlink(DOC_TMP_FILE); + Mkdir(DOC_TMP_DIR); + unlink(DOC_TMP_FILE); if (!file_readable(fname) || vsystem("%s < %s > %s", gunzip, fname, DOC_TMP_FILE)) return NULL; return DOC_TMP_FILE; @@ -138,7 +131,6 @@ systemInitialize(int argc, char **argv) if (!getenv("HOME")) setenv("HOME", "/", 1); signal(SIGINT, handle_intr); - (void)vsystem("rm -rf %s", DOC_TMP_DIR); } /* Close down and prepare to exit */ @@ -161,18 +153,14 @@ systemShutdown(int status) /* Shut down curses */ endwin(); - /* If we have a temporary doc dir lying around, nuke it */ - (void)vsystem("rm -rf %s", DOC_TMP_DIR); + /* If we have a temporary doc file lying around, nuke it */ + unlink(DOC_TMP_FILE); /* REALLY exit! */ if (RunningAsInit) { /* Put the console back */ ioctl(0, VT_ACTIVATE, 2); -#ifdef __alpha__ - reboot(RB_HALT); -#else reboot(0); -#endif } else exit(status); @@ -235,15 +223,9 @@ systemHelpFile(char *file, char *buf) snprintf(buf, FILENAME_MAX, "/stand/help/%s.hlp.gz", file); if (file_readable(buf)) return expand(buf); - snprintf(buf, FILENAME_MAX, "/stand/help/%s.TXT.gz", file); - if (file_readable(buf)) - return expand(buf); snprintf(buf, FILENAME_MAX, "/usr/src/release/sysinstall/help/%s.hlp", file); if (file_readable(buf)) return buf; - snprintf(buf, FILENAME_MAX, "/usr/src/release/sysinstall/help/%s.TXT", file); - if (file_readable(buf)) - return buf; return NULL; } diff --git a/release/sysinstall/tape.c b/release/sysinstall/tape.c index 995a0fe0d154e..df3989288f8af 100644 --- a/release/sysinstall/tape.c +++ b/release/sysinstall/tape.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: tape.c,v 1.19 1997/02/22 14:12:21 peter Exp $ + * $Id$ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -98,7 +98,7 @@ mediaGetTape(Device *dev, char *file, Boolean probe) if (file_readable(buf)) fp = fopen(buf, "r"); else { - sprintf(buf, "%s/releases/%s", (char *)dev->private, file); + sprintf(buf, "%s/dists/%s", (char *)dev->private, file); fp = fopen(buf, "r"); } /* Nuke the files behind us to save space */ @@ -112,9 +112,8 @@ mediaShutdownTape(Device *dev) { if (!tapeInitted) return; - if (file_readable((char *)dev->private)) { - msgNotify("Cleaning up results of tape extract in %s..", - (char *)dev->private); + if (file_readable(dev->private)) { + msgNotify("Cleaning up results of tape extract in %s..", dev->private); (void)vsystem("rm -rf %s", (char *)dev->private); } tapeInitted = FALSE; diff --git a/release/sysinstall/tcpip.c b/release/sysinstall/tcpip.c index 7ef6358d2eb49..5a862f2856f81 100644 --- a/release/sysinstall/tcpip.c +++ b/release/sysinstall/tcpip.c @@ -1,5 +1,5 @@ /* - * $Id: tcpip.c,v 1.73 1998/08/31 09:02:03 jkh Exp $ + * $Id: tcpip.c,v 1.72 1997/09/17 16:18:22 pst Exp $ * * Copyright (c) 1995 * Gary J Palmer. All rights reserved. @@ -311,7 +311,7 @@ netconfig: } if (ipaddr[0]) variable_set2(VAR_IPADDR, ipaddr); - configResolv(NULL); /* XXX this will do it on the MFS copy XXX */ + configResolv(); /* XXX this will do it on the MFS copy XXX */ ret = DITEM_SUCCESS; } else diff --git a/release/sysinstall/uc_eisa.c b/release/sysinstall/uc_eisa.c new file mode 100644 index 0000000000000..12abd730c7c54 --- /dev/null +++ b/release/sysinstall/uc_eisa.c @@ -0,0 +1,166 @@ +/*************************************************** + * file: userconfig/uc_eisa.c + * + * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. The name of the author may not be used to endorse or promote products + * derived from this software withough specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (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: uc_eisa.c,v 1.4 1997/02/22 14:12:26 peter Exp $ + */ + +#include <sys/types.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <nlist.h> +#include <i386/eisa/eisaconf.h> + +#include "uc_main.h" + +struct eisa_device_node { + struct eisa_device dev; + struct eisa_device_node *next; +}; + +/* module prototypes */ +static void eisa_fill_in(struct kernel *, struct uc_eisa *, struct eisa_device_node *); + +void +get_eisa_info(struct kernel *kp){ + int i, total; + u_int *ls; + struct eisa_driver *ed; + struct uc_eisa *ep, *epc; + char *name; + + if(kp->nl[EISA_SET].n_value || kp->nl[EISA_LIST].n_value) { + ep=epc=(struct uc_eisa *)malloc(sizeof(struct uc_eisa)); + if(!kp->incore) { + if(kp->nl[EISA_SET].n_value) { + u_int ndev; + ls=(u_int *)kv_to_u(kp, kp->nl[EISA_SET].n_value, sizeof(u_int)*10); /* XXX, size? */ + ndev=ls[0]; + for(i=1;i<(ndev+1);i++){ + ep=(struct uc_eisa *)realloc(ep, sizeof(struct uc_eisa)*i); + epc = ep+(i-1); + ed=(struct eisa_driver *)kv_to_u(kp, ls[i], sizeof(struct eisa_driver)); + name=(char *)kv_to_u(kp, (u_int)ed->name, 10); /* XXX, size? */ + asprintf(&epc->device, "%s", name); + asprintf(&epc->full_name, "?"); + } + ep=(struct uc_eisa *)realloc(ep, sizeof(struct uc_eisa)*i); + epc = ep+(i-1); + bzero(epc, sizeof(struct uc_eisa)); + kp->eisa_devp=ep; + } else { /* not incore and no symbol, we have no EISA devs... */ + kp->eisa_devp=(struct uc_eisa *)0; + } + } else { + /* if we're incore, we can get data from _eisa_dev_list, */ + /* which should be much more useful, but I'll need a machine */ + /* to test :( */ + if(kp->nl[EISA_LIST].n_value) { + u_int t; + struct eisa_device_node *edn; + + t=kv_dref_p(kp, kp->nl[EISA_LIST].n_value); + total=0; + while(t) { + edn=(struct eisa_device_node *) + kv_to_u(kp, t,sizeof(struct eisa_device_node)); + ep=(struct uc_eisa *)realloc(ep, sizeof(struct uc_eisa)*(total+1)); + epc=ep+total; + eisa_fill_in(kp, epc, edn); + t=(u_int)edn->next; + free(edn); + total++; + } + + ep=(struct uc_eisa *)realloc(ep, sizeof(struct uc_eisa)*(total+1)); + epc=ep+total; + bzero(epc, sizeof(struct uc_eisa)); + kp->eisa_devp=ep; + } else { + kp->eisa_devp=(struct uc_eisa *)0; + } + } + } else { + kp->eisa_devp=(struct uc_eisa *)0; + } +} + +struct list * +get_eisa_devlist(struct kernel *kp){ + struct list *dl; + struct uc_eisa *kdp; + + dl=list_new(); + + for(kdp=kp->eisa_devp; kdp->device; kdp++){ + list_append(dl, kdp->device); + } + return(dl); +} + + +struct list * +get_eisa_device(struct uc_eisa *ep){ + struct list *list; + list=list_new(); + + list_append(list, ep->device); + list_append(list, ep->full_name); + + return(list); +} + + +static void +eisa_fill_in(struct kernel *kp, struct uc_eisa *epc, struct eisa_device_node *edn){ + struct eisa_driver *edrv; + char *n; + + edrv=(struct eisa_driver *)kv_to_u(kp, (u_int)edn->dev.driver, + sizeof(struct eisa_driver)); + + n=(char *)kv_to_u(kp, (u_int)edrv->name, 20); + asprintf(&epc->device, "%s%lu", n, edn->dev.unit); + free(n); + + n=(char *)kv_to_u(kp, (u_int)edn->dev.full_name, 40); /*XXX*/ + asprintf(&epc->full_name, "%s", n); + free(n); + free(edrv); +} + +void +eisa_free(struct kernel *kp, int writeback){ + struct uc_eisa *ep; + + for(ep=kp->eisa_devp;ep->device;ep++){ + free(ep->device); + free(ep->full_name); + } + free(kp->eisa_devp); + kp->eisa_devp=0; +} + +/* end of userconfig/uc_eisa.c */ diff --git a/release/sysinstall/uc_isa.c b/release/sysinstall/uc_isa.c new file mode 100644 index 0000000000000..624fc08daa56e --- /dev/null +++ b/release/sysinstall/uc_isa.c @@ -0,0 +1,211 @@ +/*************************************************** + * file: userconfig/uc_isa.c + * + * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. The name of the author may not be used to endorse or promote products + * derived from this software withough specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (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: uc_isa.c,v 1.4 1997/02/22 14:12:27 peter Exp $ + */ + +#include <sys/types.h> +#include <stdlib.h> +#include <string.h> +#include <stdio.h> +#include <nlist.h> +#include <i386/isa/isa_device.h> + +#include "uc_main.h" + +void +get_isa_info(struct kernel *kp){ + int total, i, j; + struct uc_isa *idp; + struct isa_device *p, *isa_dp; + struct isa_driver *drv; + char *name; + + if(kp->nl[ISA_BIOTAB].n_value || kp->nl[ISA_TTYTAB].n_value || kp->nl[ISA_NETTAB].n_value || + kp->nl[ISA_CAMTAB].n_value || kp->nl[ISA_NULLTAB].n_value || + kp->nl[ISA_WDCTAB].n_value || kp->nl[ISA_FDCTAB].n_value) { + + idp = kp->isa_devp = (struct uc_isa *)malloc(sizeof(struct uc_isa)); + total=0; /* a running total of the number of isa devices */ + + for (i=0; i<6; i++) { /* the isa devices */ + if(kp->nl[i].n_value) { + p = isa_dp = (struct isa_device *)kv_to_u(kp, kp->nl[i].n_value, /* XXX size? */ + sizeof(struct isa_device)*30); + /* build the device list */ + /* `total' keeps a running total of all the devices found */ + for (j=0; p->id_id; j++, p++, total++) { + kp->isa_devp = (struct uc_isa *)realloc(kp->isa_devp, + sizeof(struct uc_isa)*(total+1)); + idp=kp->isa_devp+total; + + drv=(struct isa_driver *)kv_to_u(kp, (u_int)p->id_driver, sizeof(struct isa_driver)); + name=(char *)kv_to_u(kp, (u_int)drv->name, 64); + + if (i==ISA_WDCTAB || i==ISA_FDCTAB) { /* special case the disk devices */ + char n[10]; + strncpy(n, name, 10); + n[strlen(n)-1]=0; /* chop off the trailing 'c' */ + asprintf(&idp->device, "%s%d", n, j); + } else { + asprintf(&idp->device, "%s%d", name, p->id_unit); + } + idp->port=p->id_iobase; + idp->irq=p->id_irq; + idp->drq=p->id_drq; + idp->iomem=(u_int)p->id_maddr & 0xFFFFFF; /* kludge to get pa from kva */ + idp->iosize=p->id_msize; + idp->flags=p->id_flags; + idp->alive=p->id_alive; + idp->enabled=p->id_enabled; + idp->modified=0; + if(!kp->incore){ + idp->idp=p; + } else { + free(name); + free(drv); + } + } + if(kp->incore){ + free(isa_dp); + } + } + } + + idp=kp->isa_devp+total; + bzero(idp, sizeof(struct uc_isa)); + } else { + kp->isa_devp=0; + } +} + + +struct list * +get_isa_devlist(struct kernel *kp){ + struct list *dl; + struct uc_isa *kdp; + + dl=list_new(); + + for(kdp=kp->isa_devp; kdp->device; kdp++){ + list_append(dl, kdp->device); + } + return(dl); +} + + +struct list * +get_isa_device(struct uc_isa *ip){ + struct list *list; + char *tmp; + + list=list_new(); + + asprintf(&tmp, "%s", ip->device ); + list_append(list, tmp); + free(tmp); + + asprintf(&tmp, "0x%04x", ip->port ); + list_append(list, tmp); + free(tmp); + + asprintf(&tmp, "%d", ip->irq>0 ? ffs(ip->irq)-1 : ip->irq); + list_append(list, tmp); + free(tmp); + + asprintf(&tmp, "%d", ip->drq ); + list_append(list, tmp); + free(tmp); + + asprintf(&tmp, "0x%08x", ip->iomem ); + list_append(list, tmp); + free(tmp); + + asprintf(&tmp, "0x%x", ip->iosize ); + list_append(list, tmp); + free(tmp); + + asprintf(&tmp, "0x%x", ip->flags ); + list_append(list, tmp); + free(tmp); + + asprintf(&tmp, "%d", ip->alive ); + list_append(list, tmp); + free(tmp); + + asprintf(&tmp, "%d", ip->enabled ); + list_append(list, tmp); + free(tmp); + + return(list); +} + +int +isa_setdev(struct kernel *kp, struct list *list){ + int r=1, irq; + struct uc_isa *ip; + + if(kp->isa_devp) + for(ip=kp->isa_devp;ip->device;ip++){ + if(strcmp(list->av[0], ip->device)==0){ + ip->modified=1; + ip->port = strtol(list->av[1], (char **)NULL, 0); + irq=strtol(list->av[2], (char **)NULL, 0); + ip->irq= irq > 0 ? 1 << (irq) : irq; + ip->drq = strtol(list->av[3], (char **)NULL, 0); + ip->iomem = strtol(list->av[4], (char **)NULL, 0); + ip->iosize = strtol(list->av[5], (char **)NULL, 0); + ip->flags = strtol(list->av[6], (char **)NULL, 0); + ip->enabled = strtol(list->av[8], (char **)NULL, 0); + r=0; + break; + } + } + return(r); +} + +void +isa_free(struct kernel *kp, int writeback){ + struct uc_isa *ip; + for(ip=kp->isa_devp; ip->device; ip++){ + if((!kp->incore) && ip->modified && writeback) { + /* save any changes */ + ip->idp->id_iobase=ip->port; + ip->idp->id_irq = ip->irq; + ip->idp->id_drq = ip->drq; + ip->idp->id_maddr = (caddr_t)ip->iomem; + ip->idp->id_msize = ip->iosize; + ip->idp->id_flags = ip->flags; + ip->idp->id_enabled = ip->enabled; + } + /* and, be free... */ + free(ip->device); + } + /* and free the whole ball of wax */ + free(kp->isa_devp); + kp->isa_devp=0; +} + +/* end of userconfig/uc_isa.c */ diff --git a/release/sysinstall/uc_kmem.c b/release/sysinstall/uc_kmem.c new file mode 100644 index 0000000000000..e0df87209a694 --- /dev/null +++ b/release/sysinstall/uc_kmem.c @@ -0,0 +1,87 @@ +/*************************************************** + * file: userconfig/uc_kmem.c + * + * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. The name of the author may not be used to endorse or promote products + * derived from this software withough specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (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$ + */ + +#include <sys/types.h> +#include <stdlib.h> +#include <unistd.h> +#include <a.out.h> + +#include <stdio.h> + +#include "uc_main.h" + +/* translate a kv pointer to user space */ +/* malloc()-ing if we aren't mmaped */ +u_int +kv_to_u(struct kernel *kp, u_int adr, u_int size){ + u_int tadr; + if(!kp->incore){ + struct exec *ep; + ep=(struct exec *)kp->core; + tadr=(u_int)((adr - ep->a_entry + (N_DATOFF(*ep) - ep->a_text))+kp->core); + } else { + caddr_t ptr; + ptr = malloc(size); + lseek(kp->fd, adr, SEEK_SET); + read(kp->fd, ptr, size); + tadr=(u_int)ptr; + } + return(tadr); +} + +/* dereference a pointer to kernel space */ +u_int +kv_dref_p(struct kernel *kp, u_int adr){ + u_int tadr; + if(!kp->incore){ + struct exec *ep; + ep=(struct exec *)kp->core; + tadr=*(u_int*)((adr - ep->a_entry + (N_DATOFF(*ep) - ep->a_text))+kp->core); + } else { + lseek(kp->fd, adr, SEEK_SET); + read(kp->fd, &tadr, sizeof(tadr)); + } + return(tadr); +} + +/* deref a pointer to kernel text */ +u_int +kv_dref_t(struct kernel *kp, u_int adr){ + u_int tadr; + if(!kp->incore){ + struct exec *ep; + ep=(struct exec *)kp->core; + tadr=*(u_int*)((adr - ep->a_entry) + N_TXTOFF(*ep) + (u_int)kp->core); + } else { + lseek(kp->fd, adr, SEEK_SET); + read(kp->fd, &tadr, sizeof(tadr)); + } + return(tadr); +} + +/* end of userconfig/uc_kmem.c */ diff --git a/release/sysinstall/uc_list.c b/release/sysinstall/uc_list.c new file mode 100644 index 0000000000000..6506c5eb6b1e2 --- /dev/null +++ b/release/sysinstall/uc_list.c @@ -0,0 +1,76 @@ +/*************************************************** + * file: userconfig/uc_isa.c + * + * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. The name of the author may not be used to endorse or promote products + * derived from this software withough specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (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$ + */ + +#include <sys/types.h> +#include <stdlib.h> +#include <string.h> +#include <stdio.h> +#include <nlist.h> +#include "uc_main.h" + +struct list * +list_new(void){ + struct list *rv; + rv=(struct list *)malloc(sizeof(struct list)); + rv->ac=0; + rv->av=(char **)0; + return(rv); +} + +void +list_append(struct list *list , char *item){ + + if(list->ac==0) { + list->av=(char **)malloc(sizeof(char *)*(list->ac+1)); + } else { + list->av=(char **)realloc(list->av, sizeof(char *)*(list->ac+1)); + } + asprintf(list->av+list->ac, "%s", item); + list->ac++; +} + +void +list_print(struct list *list, char *separator){ + int i; + for(i=0; i<list->ac; i++) + printf("%s%s", list->av[i], separator); +} + +void +list_destroy(struct list *list){ + int i; + for(i=0;i<list->ac;i++){ + free(list->av[i]); + list->av[i]=0; + } + free(list->av); + list->av=0; + free(list); +} + +/* end of userconfig/uc_list.c */ diff --git a/release/sysinstall/uc_main.c b/release/sysinstall/uc_main.c new file mode 100644 index 0000000000000..102c766d38930 --- /dev/null +++ b/release/sysinstall/uc_main.c @@ -0,0 +1,334 @@ +/*************************************************** + * file: userconfig/uc_main.c + * + * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. The name of the author may not be used to endorse or promote products + * derived from this software withough specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * library functions for userconfig library + * + * $Id: uc_main.c,v 1.23 1998/10/06 07:41:49 msmith Exp $ + */ + +#include <sys/types.h> +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <paths.h> +#include <sys/mman.h> +#include <nlist.h> +#include <sys/stat.h> +#include <fcntl.h> + +#include "uc_main.h" +#include "sysinstall.h" + +static struct nlist _nl[] = { + {"_isa_devtab_bio"}, + {"_isa_devtab_tty"}, + {"_isa_devtab_net"}, + {"_isa_devtab_cam"}, + {"_isa_devtab_null"}, + {"_isa_biotab_wdc"}, + {"_isa_biotab_fdc"}, + {"_eisadriver_set"}, + {"_eisa_dev_list"}, + {"_pcidevice_set"}, + {"_device_list"}, +#ifdef DO_SCSI + {"_scbusses"}, + {"_scsi_cinit"}, + {"_scsi_dinit"}, + {"_scsi_tinit"}, +#endif + {""}, +}; + +struct kernel * +uc_open(char *name){ + int kd, flags, incore; + struct kernel *kern; + struct stat sb; + char kname[80]; + int size, i = 0; + struct nlist *nl = _nl; + + if (strcmp(name, "-incore") == 0) + incore = 1; + else + incore = 0; + + if (incore || (strcmp(name,"-bootfile") == 0)) + SAFE_STRCPY(kname, getbootfile()); + else + SAFE_STRCPY(kname, name); + + if (isDebug()) + msgDebug("uc_open: kernel name is %s, incore = %d\n", kname, incore); + kern = (struct kernel *)malloc(sizeof(struct kernel)); + +#ifdef KERN_NO_SYMBOLS + if (incore) { + 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; + } + else if (isDebug()) + msgDebug("uc_open: opened /stand/symbols file, reading %d entries.\n", size); + + + kern->nl = nl = (struct nlist *)malloc((size + 1) * sizeof(struct nlist)); + bzero(nl, (size + 1) * sizeof(struct nlist)); + for (i = 0; i <= size; i++) { + char *cp, name[255]; + int c1; + unsigned int uc1; + short d1; + unsigned long v1; + + if (fgets(name, 255, fp) == NULL) { + msgDebug("Can't get name field for entry %d\n", i); + free(kern); + return NULL; + } + if ((cp = index(name, '\n')) != NULL) + *cp = '\0'; + nl[i].n_name = strdup(name); + if (fscanf(fp, "%u %d %hd %ld\n", &uc1, &c1, &d1, &v1) == 4) { + nl[i].n_type = (unsigned char)uc1; + nl[i].n_other = (char)c1; + nl[i].n_desc = d1; + nl[i].n_value = v1; + if (isDebug()) + msgDebug("uc_open: for entry %d, decoded: \"%s\", %u %d %hd %ld\n", i, nl[i].n_name, nl[i].n_type, nl[i].n_other, nl[i].n_desc, nl[i].n_value); + } + } + nl[i].n_name = ""; + fclose(fp); + i = 0; + } + else +#endif + i = nlist(kname, nl); + if (i == -1) { + msgDebug("uc_open: kernel %s does not contain symbols.\n", kname); + free(kern); + return NULL; + } +#ifdef KERN_NO_SYMBOLS + if (!incore) { +#else + { +#endif + kern->nl=(struct nlist *)malloc(sizeof(_nl)); + bcopy(_nl, kern->nl, sizeof(_nl)); + } + + if (incore) { + if (isDebug()) + msgDebug("uc_open: attempting to open /dev/kmem for incore.\n"); + if ((kd = open("/dev/kmem", O_RDONLY)) < 0) { + free(kern); + msgDebug("uc_open: Unable to open /dev/kmem.\n"); + return NULL; + } + kern->core = (caddr_t)NULL; + kern->incore = 1; + kern->size = 0; + } + else { + if (stat(kname, &sb) < 0) { + free(kern); + msgDebug("uc_open: Unable to stat %s.\n", kname); + return NULL; + } + kern->size = sb.st_size; + flags = sb.st_flags; + + if (chflags(kname, 0) < 0) { + free(kern); + msgDebug("uc_open: Unable to chflags %s.\n", kname); + return NULL; + } + + if (isDebug()) + msgDebug("uc_open: attempting to open %s\n", kname); + if ((kd = open(kname, O_RDWR, 0644)) < 0) { + free(kern); + msgDebug("uc_open: Unable to open %s.\n", kname); + return NULL; + } + + fchflags(kd, flags); + + if (isDebug()) + msgDebug("uc_open: attempting to mmap %d bytes\n", sb.st_size); + kern->core = mmap((caddr_t)0, sb.st_size, PROT_READ | PROT_WRITE, + MAP_SHARED, kd, 0); + kern->incore = 0; + if (kern->core == MAP_FAILED) { + free(kern); + msgDebug("uc_open: Unable to mmap from %s.\n", kname); + return NULL; + } + } + + kern->fd = kd; + get_isa_info(kern); + if (isDebug()) + msgDebug("uc_open: got isa information\n"); + + get_pci_info(kern); + if (isDebug()) + msgDebug("uc_open: got pci information\n"); + + get_eisa_info(kern); + if (isDebug()) + msgDebug("uc_open: got eisa information\n"); +#ifdef DO_SCSI + get_scsi_info(kern); + if (isDebug()) + msgDebug("uc_open: got scsi information\n"); +#else + kern->scsi_devp=(struct uc_scsi*)NULL; + kern->scsibus_devp=(struct uc_scsibus*)NULL; +#endif + return kern; +} + +int +uc_close(struct kernel *kern, int writeback) +{ + if (kern->isa_devp) + isa_free(kern, writeback); + + if (kern->eisa_devp) + eisa_free(kern, writeback); /* `writeback' isn't really useful here */ + + if (kern->pci_devp) + pci_free(kern, writeback); /* or here */ + +#ifdef DO_SCSI + if (kern->scsi_devp) + scsi_free(kern, writeback); +#endif + if (!kern->incore) + munmap(kern->core, kern->size); + + close(kern->fd); + free(kern->nl); + free(kern); + + return 0; +} + +struct list * +uc_getdev(struct kernel *kern, char *dev) +{ + struct list *list = (struct list *)0; + + if (*dev == '-') { /* asked for -isa, -eisa, -pci, -scsi, -all */ + if (strcmp(dev, "-all") == 0) { + list = list_new(); + if (kern->isa_devp) + list_append(list, "isa"); + + if (kern->eisa_devp) + list_append(list, "eisa"); + + if (kern->pci_devp) + list_append(list, "pci"); + +#ifdef DO_SCSI + if (kern->scsi_devp) + list_append(list, "scsi"); +#endif + + } + else if (strcmp(dev, "-isa") == 0) + list = get_isa_devlist(kern); + else if (strcmp(dev, "-eisa") == 0) + list = get_eisa_devlist(kern); + else if (strcmp(dev, "-pci") == 0) + list = get_pci_devlist(kern); +#ifdef DO_SCSI + else if (strcmp(dev, "-scsi") == 0) + list = get_scsi_devlist(kern); +#endif + } + else { + /* we gotta figure out which real device to report */ + struct uc_isa *ip; + struct uc_pci *pp; + struct uc_eisa *ep; + + if (kern->isa_devp) { + for (ip = kern->isa_devp; ip->device; ip++) { + if (strcmp(dev, ip->device) == 0) { + list = get_isa_device(ip); + goto end; + } + } + } + +#ifdef DO_SCSI + if (kern->scsi_devp) { + struct uc_scsi *sp; + + for (sp = kern->scsi_devp; sp->device; sp++) { + if (strcmp(dev, sp->device) == 0) { + list = get_scsi_device(sp); + goto end; + } + } + } +#endif + + if (kern->pci_devp) { + for(pp = kern->pci_devp; pp->device; pp++) { + if (strcmp(dev, pp->device) == 0) { + list = get_pci_device(pp); + goto end; + } + } + } + + if (kern->eisa_devp) { + for (ep = kern->eisa_devp; ep->device; ep++) { + if (strcmp(dev, ep->device) == 0) { + list = get_eisa_device(ep); + goto end; + } + } + } + } +end: + return(list); +} diff --git a/release/sysinstall/uc_main.h b/release/sysinstall/uc_main.h new file mode 100644 index 0000000000000..046a6646cd55f --- /dev/null +++ b/release/sysinstall/uc_main.h @@ -0,0 +1,168 @@ +/*************************************************** + * file: userconfig/uc_main.h + * + * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. The name of the author may not be used to endorse or promote products + * derived from this software withough specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (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: uc_main.h,v 1.4 1997/02/22 14:12:32 peter Exp $ + */ + +#define ISA_BIOTAB 0 +#define ISA_TTYTAB 1 +#define ISA_NETTAB 2 +#define ISA_CAMTAB 3 +#define ISA_NULLTAB 4 +#define ISA_WDCTAB 5 +#define ISA_FDCTAB 6 +#define EISA_SET 7 +#define EISA_LIST 8 +#define PCI_SET 9 +#define SCSI_LIST 10 +#define SCSI_BUSSES 11 +#define SCSI_CINIT 12 +#define SCSI_DINIT 13 +#define SCSI_TINIT 14 +/* symbols + the null terminator */ +#define NSYMBOLS 16 + +struct kernel { + int fd; /* file descriptor for the kernel image, either a binary or /dev/kmem */ + caddr_t core; /* either the mmap()ed kernel image, or a scratch area */ + u_int size; /* size of the object at ->core */ + int incore; /* true if the kernel is running */ +#ifdef UC_PRIVATE + struct nlist *nl; /* the symbol table */ +#else + void *nl; +#endif + struct uc_isa *isa_devp; /* pointer to the isa devices (if any) */ + struct uc_eisa *eisa_devp; /* pointer to the eisa devices (if any) */ + struct uc_pci *pci_devp; /* pointer to the pci devices (if any) */ + struct uc_scsi *scsi_devp; /* pointer to the scsi devices (if any) */ + struct uc_scsibus *scsibus_devp; /* internal pointer to scsibus wirings */ +}; + +struct uc_isa { + char *device; + u_short port; + u_short irq; + short drq; + u_int iomem; + int iosize; + int flags; + int alive; + int enabled; +#ifdef UC_PRIVATE + struct isa_device *idp; +#else + void *idp; +#endif + int modified; +}; + +struct uc_pci { + char *device; +}; + +struct uc_eisa { + char *device; + char *full_name; +}; + +struct uc_scsibus { + int bus_no; + int unit; + char *driver; +#ifdef UC_PRIVATE + struct scsi_ctlr_config *config; +#else + void *config; +#endif +}; + +struct uc_scsi { + char *device; + char *adapter; + u_short target; + u_short lun; + char *desc; +#ifdef UC_PRIVATE + struct scsi_device_config *config; +#else + void *config; +#endif + int modified; +}; + +/* nearly everything useful returns a list */ + +struct list { + int ac; + char **av; +}; + +/* prototypes */ + +/* uc_main.c */ +/* these are really the only public ones */ +struct kernel *uc_open(char *name); +int uc_close(struct kernel *kern, int writeback); +struct list *uc_getdev(struct kernel *kern, char *dev); + +/* uc_isa.c */ +void get_isa_info(struct kernel *kp); +struct list *get_isa_devlist(struct kernel *kp); +struct list *get_isa_device(struct uc_isa *ip); +int isa_setdev(struct kernel *kp, struct list *list); +void isa_free(struct kernel *kp, int writeback); + +/* uc_eisa.c */ +void get_eisa_info(struct kernel *kp); +struct list *get_eisa_devlist(struct kernel *kp); +struct list *get_eisa_device(struct uc_eisa *ep); +void eisa_free(struct kernel *kp, int writeback); + +/* uc_pci.c */ +void get_pci_info(struct kernel *kp); +struct list *get_pci_devlist(struct kernel *kp); +struct list *get_pci_device(struct uc_pci *pp); +void pci_free(struct kernel *kp, int writeback); + +/* uc_scsi.c */ +void get_scsi_info(struct kernel *kp); +struct list *get_scsi_devlist(struct kernel *kp); +struct list *get_scsi_device(struct uc_scsi *sp); +int scsi_setdev(struct kernel *kp, struct list *list); +void scsi_free(struct kernel *kp, int writeback); + +/* uc_kmem.c */ +u_int kv_to_u(struct kernel *kp, u_int adr, u_int size); +u_int kv_dref_p(struct kernel *kp, u_int adr); +u_int kv_dref_t(struct kernel *kp, u_int adr); + +/* uc_list.c */ +struct list *list_new(void); +void list_append(struct list *list, char *item); +void list_print(struct list *list, char *separator); +void list_destroy(struct list *list); + +/* end of userconfig/uc_main.h */ diff --git a/release/sysinstall/uc_pci.c b/release/sysinstall/uc_pci.c new file mode 100644 index 0000000000000..0b213123b4826 --- /dev/null +++ b/release/sysinstall/uc_pci.c @@ -0,0 +1,122 @@ +/*************************************************** + * file: userconfig/uc_pci.c + * + * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. The name of the author may not be used to endorse or promote products + * derived from this software withough specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (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$ + */ + +#include <sys/types.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <nlist.h> +#include <pci/pcivar.h> + +#include "uc_main.h" + +void +get_pci_info(struct kernel *kp){ + int i, total; + u_int *ls, ndev; + struct pci_device *pd; + struct uc_pci *pp,*ppc; + char *name; + + if(kp->nl[PCI_SET].n_value){ + pp = ppc = (struct uc_pci *)malloc(sizeof(struct uc_pci)); + ls=(u_int *)kv_to_u(kp, kp->nl[PCI_SET].n_value, sizeof(u_int)*30); /* XXX, size? */ + ndev=ls[0]; + total=0; + for(i=1;i<(ndev+1);i++){ + pp=(struct uc_pci *)realloc(pp, sizeof(struct uc_pci)*(total+1)); + ppc = pp+(total); + pd=(struct pci_device *)kv_to_u(kp, ls[i], sizeof(struct pci_device)); + /* don't try to dereference a null pointer */ + name=pd->pd_name ? (char *)kv_to_u(kp, (u_int)pd->pd_name, 10) : + pd->pd_name; /* XXX, size? */ + if(kp->incore){ + int u, k; + /* incore, we can get unit numbers */ + + u=kv_dref_p(kp, (u_int)pd->pd_count); + for(k=0;k<u;k++,total++){ + pp=(struct uc_pci *)realloc(pp, sizeof(struct uc_pci)*(total+1)); + ppc = pp+(total); + asprintf(&ppc->device, "%s%d", name, k); + } + free(pd); + if(name) + free(name); + } else { + asprintf(&ppc->device, "%s?", name); + total++; + } + } + pp=(struct uc_pci *)realloc(pp, sizeof(struct uc_pci)*(total+1)); + ppc = pp+(total); + bzero(ppc, sizeof(struct uc_pci)); + kp->pci_devp=pp; + } else { + kp->pci_devp=(struct uc_pci *)0; + } +} + + +struct list * +get_pci_devlist(struct kernel *kp){ + struct list *dl; + struct uc_pci *kdp; + + dl=list_new(); + + for(kdp=kp->pci_devp; kdp->device; kdp++){ + list_append(dl, kdp->device); + } + return(dl); +} + + +struct list * +get_pci_device(struct uc_pci *pp){ + struct list *list; + list=list_new(); + + list_append(list, pp->device); + + return(list); +} + +void +pci_free(struct kernel *kp, int writeback){ + struct uc_pci *pp; + + for(pp=kp->pci_devp;pp->device;pp++){ + free(pp->device); + } + free(kp->pci_devp); + kp->pci_devp=0; + +} + +/* end of userconfig/uc_pci.c */ diff --git a/release/sysinstall/uc_scsi.c b/release/sysinstall/uc_scsi.c new file mode 100644 index 0000000000000..2227bb335add6 --- /dev/null +++ b/release/sysinstall/uc_scsi.c @@ -0,0 +1,477 @@ +/*************************************************** + * file: userconfig/uc_scsi.c + * + * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. The name of the author may not be used to endorse or promote products + * derived from this software withough specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (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$ + */ + +#include <sys/types.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <nlist.h> +#include <scsi/scsiconf.h> + +#include "uc_main.h" + +/* this stuff is hidden under an #ifdef KERNEL in scsiconf.h */ +#define SCCONF_UNSPEC 255 +#define SCCONF_ANY 254 + +struct scsi_ctlr_config { + int scbus; + char *driver; + int unit; + int bus; +}; + +struct scsi_device_config { + char *name; /* SCSI device name (sd, st, etc) */ + int unit; /* desired device unit */ + int cunit; /* Controller unit */ + int target; /* SCSI ID (target) */ + int lun; /* SCSI lun */ + int flags; /* Flags from config */ +}; + +/* module prototypes */ +static void get_sl_info(struct kernel *kp, struct uc_scsi *spc, + struct scsi_link *sl); + +void +get_scsi_info(struct kernel *kp){ + int i, j, k; + + if(kp->incore){ + if (kp->nl[SCSI_BUSSES].n_value) { + u_int *es, *sba; + struct scsibus_data *sbd; + int nsbd, nscsibus, total; + struct uc_scsi *sp, *spc; + struct uc_scsibus *sbp, *sbpc; + struct scsi_link *s_l; + u_int *slp; + char *temp; + struct scsi_device *sdev; + u_int t; + char name[10]; + + sp=(struct uc_scsi*)malloc(sizeof(struct uc_scsi)); + total=0; + sbp=(struct uc_scsibus*)malloc(sizeof(struct uc_scsibus)); + nscsibus=0; + + es=(u_int *)kv_to_u(kp, kv_dref_p(kp,kp->nl[SCSI_BUSSES].n_value), + sizeof(u_int)*2); + nsbd=es[0]; + sba=(u_int *)kv_to_u(kp, es[1], sizeof(u_int)*nsbd); + free(es); + + for(i=0;i<nsbd;i++){ + if(sba[i]){ + /* first grab the adapter info */ + sbd=(struct scsibus_data *)kv_to_u(kp, sba[i], + sizeof(struct scsibus_data)); + sbp=(struct uc_scsibus *)realloc(sbp, sizeof(struct uc_scsibus)* + (nscsibus+1)); + + sp=(struct uc_scsi*)realloc(sp, (sizeof(struct uc_scsi)*(total+1))); + spc=sp+total; + s_l=(struct scsi_link*)kv_to_u(kp, (u_int)sbd->adapter_link, + sizeof(struct scsi_link)); + get_sl_info(kp, spc, s_l); + free(s_l); + + sbpc=sbp+nscsibus; + sbpc->bus_no=nscsibus; + nscsibus++; + sscanf(spc->device, "%[a-z]%d", name, &sbpc->unit); + asprintf(&sbpc->driver, "%s", name); + + total++; + t=kv_dref_p(kp, (u_int)sbd->sc_link); + t=(u_int)sbd->sc_link; + for(j=0;j<8;j++) { + slp=(u_int *)kv_to_u(kp, t+(j*8*sizeof(u_int)), /* XXX */ + (sizeof(u_int)*sbd->maxlun)); + for(k=0;k<sbd->maxlun && slp[k]; k++){ + struct scsi_link *slt; + sp=(struct uc_scsi*)realloc(sp, + (sizeof(struct uc_scsi)*(total+1))); + spc=sp+total; + slt=(struct scsi_link*)kv_to_u(kp, slp[k], + sizeof(struct scsi_link)); + get_sl_info(kp, spc, slt); + free(slt); + spc->config=(struct scsi_device_config *)0; + total++; + } + free(slp); + } + free(sbd); + } + } + /* now stuff in the list of drivers configured in the system */ + t=kv_dref_p(kp, kp->nl[SCSI_LIST].n_value); + while(t) { + sdev=(struct scsi_device*)kv_to_u(kp, t, sizeof(struct scsi_device)); + sp=(struct uc_scsi*)realloc(sp, (sizeof(struct uc_scsi)*(total+1))); + spc=sp+total; + total++; + temp=(char *)kv_to_u(kp, (u_int)sdev->name, 10); + asprintf(&spc->device, "%s*", temp); + free(temp); + asprintf(&spc->adapter, "any"); + + spc->target=SCCONF_ANY; + spc->lun=SCCONF_ANY; + + temp=(char *)kv_to_u(kp, (u_int)sdev->desc, 20); + asprintf(&spc->desc, "%s", temp); + free(temp); + + spc->config=(struct scsi_device_config *)0; + + t=(u_int)sdev->next; + free(sdev); + } + /* slap on the terminators */ + sp=(struct uc_scsi*)realloc(sp, (sizeof(struct uc_scsi)*(total+1))); + spc=sp+total; + bzero(spc, sizeof(struct uc_scsi)); + + sbp=(struct uc_scsibus *)realloc(sbp, sizeof(struct uc_scsibus)* + (nscsibus+1)); + sbpc=sbp+nscsibus; + bzero(sbpc, sizeof(struct uc_scsibus)); + + kp->scsi_devp=sp; + kp->scsibus_devp=sbp; + } else { /* no symbol, and incore, no scsi */ + kp->scsi_devp=(struct uc_scsi *)0; + kp->scsibus_devp=(struct uc_scsibus *)0; + } + } else { /* on disk */ + + if (kp->nl[SCSI_CINIT].n_value || kp->nl[SCSI_DINIT].n_value || + kp->nl[SCSI_TINIT].n_value) { + int total=0; + struct uc_scsi *sp, *spc; + struct scsi_ctlr_config *sctl_c; + struct scsi_device_config *sdev_c; + struct scsi_device *sdev; + + struct uc_scsibus *uc_scbus, *uc_scbusc; + + u_int t, ctrl_total; + char *temp; + u_int initp; + + spc=sp=(struct uc_scsi*)malloc(sizeof(struct uc_scsi)); + total=0; + ctrl_total=0; + uc_scbus = NULL; /* Just prevent unused warning */ + + /* static kernel, we'll first get the wired controllers/devices */ + if((t=kp->nl[SCSI_CINIT].n_value)){ + /* get controller info*/ + sctl_c=(struct scsi_ctlr_config*)kv_to_u(kp, t, sizeof(struct scsi_ctlr_config)); + uc_scbus=(struct uc_scsibus*)malloc(sizeof(struct uc_scsibus)); + + while(sctl_c->driver){ + + /* remember the bus info, for later */ + uc_scbus=(struct uc_scsibus*)realloc(uc_scbus, sizeof(struct uc_scsibus)*(ctrl_total+1)); + uc_scbusc=uc_scbus+ctrl_total; + uc_scbusc->bus_no=sctl_c->scbus; + temp=(char *)kv_to_u(kp, (u_int)sctl_c->driver, 20); + uc_scbusc->driver=temp; + uc_scbusc->unit=sctl_c->unit; + uc_scbusc->config=sctl_c; + + sp=(struct uc_scsi*)realloc(sp,sizeof(struct uc_scsi)*(total+1)); + spc=sp+total; + asprintf(&spc->device, "%s%d", temp, sctl_c->unit); + asprintf(&spc->adapter, "%s%d", temp, sctl_c->unit); + spc->target=0; + spc->lun=0; + spc->modified=0; + asprintf(&spc->desc, "%s", temp); + total++; + ctrl_total++; + sctl_c++; + } + } + + if((t=kp->nl[SCSI_DINIT].n_value)){ + /* get wired device info */ + sdev_c=(struct scsi_device_config*)kv_to_u(kp, t, sizeof(struct scsi_device_config)); + while(sdev_c->name){ + sp=(struct uc_scsi*)realloc(sp, sizeof(struct uc_scsi)*(total+1)); + spc=sp+total; + temp=(char*)kv_to_u(kp, (u_int)sdev_c->name, 10); + asprintf(&spc->device, "%s%d", temp, sdev_c->unit); + /* figure out controller */ + if(sdev_c->cunit == SCCONF_ANY){ + asprintf(&spc->adapter, "any"); + } else { + if(ctrl_total){ + for(i=0;i<ctrl_total;i++){ + if(sdev_c->cunit==uc_scbus[i].bus_no){ + asprintf(&spc->adapter, "%s%d", + uc_scbus[i].driver, uc_scbus[i].unit); + break; + } + } + if(i==ctrl_total) { /* made it through the whole list */ + asprintf(&spc->adapter, "any?"); + } + } else { + asprintf(&spc->adapter, "any?"); + } + } + spc->target= sdev_c->target; + spc->lun= sdev_c->lun; + spc->desc=(char *)0; /* filled in later */ + spc->config=sdev_c; + spc->modified=0; + sdev_c++; + total++; + } + } + kp->scsibus_devp=uc_scbus; + + if((t=kp->nl[SCSI_TINIT].n_value)) { + /* WARNING: This is teetering on the brink of stupid. + + this ugly little hack only works because the + <scsi driver>init routines are macro-generated, + so the offset of the device pointers will be + the same (hopefully). + */ + + while((initp=kv_dref_p(kp,t))) { + u_int tadr; + u_int sl; + + t+=4; + tadr=kv_dref_t(kp, initp+4); /* offset in *.text* */ + sdev=(struct scsi_device*)kv_to_u(kp, tadr, sizeof(struct scsi_device)); + sp=(struct uc_scsi*)realloc(sp, (sizeof(struct uc_scsi)*(total+1))); + spc=sp+total; + total++; + temp=(char *)kv_to_u(kp, (u_int)sdev->name, 10); + asprintf(&spc->device, "%s*", temp); + + asprintf(&spc->adapter, "any"); + + spc->target=SCCONF_ANY; + spc->lun=SCCONF_ANY; + spc->modified=0; + temp=(char *)kv_to_u(kp, (u_int)sdev->desc, 20); + asprintf(&spc->desc, "%s", temp); + /* now try to fill in any device descriptions from above */ + sl=strlen(spc->device)-1; + for(i=0;i<(total-1);i++){ /* don't look at this device */ + struct uc_scsi *usp; + + usp=sp+i; + if(strncmp(usp->device, spc->device, sl)==0 && usp->desc==0) { + asprintf(&usp->desc, "%s", spc->desc); + } + } + } + if(total){ + sp=(struct uc_scsi*)realloc(sp, (sizeof(struct uc_scsi)*(total+1))); + spc=sp+total; + bzero(spc, sizeof(struct uc_scsi)); + kp->scsi_devp=sp; + } else { + free(sp); + kp->scsi_devp=(struct uc_scsi *)0; + } + } + } else { + kp->scsi_devp=(struct uc_scsi *)0; + } + } +} + +struct list * +get_scsi_devlist(struct kernel *kp){ + struct list *dl; + struct uc_scsi *kdp; + + dl=list_new(); + + for(kdp=kp->scsi_devp; kdp->device; kdp++){ + list_append(dl, kdp->device); + } + + return(dl); +} + +struct list * +get_scsi_device(struct uc_scsi *sp){ + struct list *list; + char *tmp; + + list=list_new(); + + list_append(list, sp->device); + list_append(list, sp->adapter); + + asprintf(&tmp, "%d", sp->target ); + list_append(list, tmp); + free(tmp); + + asprintf(&tmp, "%d", sp->lun ); + list_append(list, tmp); + free(tmp); + + list_append(list, sp->desc); + + return(list); +} + +/* given a scsi_link and a uc_scsi pointer, fill it in */ +static void +get_sl_info(struct kernel *kp, struct uc_scsi *spc, struct scsi_link *sl){ + + struct scsi_adapter *sadp; + struct scsi_device *sdev; + char *temp; + + sadp=(struct scsi_adapter*)kv_to_u(kp, (u_int)sl->adapter, + sizeof(struct scsi_adapter)); + + sdev=(struct scsi_device*)kv_to_u(kp, (u_int)sl->device, + sizeof(struct scsi_device)); + + temp=(char *)kv_to_u(kp, (u_int)sdev->name, 20); + asprintf(&spc->device, "%s%d", temp, sl->dev_unit); + free(temp); + temp=(char *)kv_to_u(kp, (u_int)sadp->name, 20); + asprintf(&spc->adapter, "%s%d", temp, sl->adapter_unit); + free(temp); + spc->target = sl->target; + spc->lun = sl->lun; + + temp=(char *)kv_to_u(kp, (u_int)sdev->desc, 30); + asprintf(&spc->desc, "%s", temp); + free(temp); + +} + +int +scsi_setdev(struct kernel *kp, struct list *list){ + int r=1, bus_valid=0; + struct uc_scsi *sp; + struct uc_scsibus *sbp; + char *t; + + if(kp->scsi_devp) + for(sp=kp->scsi_devp;sp->device;sp++){ + if(strcmp(list->av[0], sp->device)==0){ + for(sbp=kp->scsibus_devp;sbp->driver; sbp++){ + asprintf(&t, "%s%d", sbp->driver, sbp->unit); + if(strcmp(list->av[1], t)==0) { + bus_valid=1; + } + free(t); + } + if(bus_valid){ + sp->modified=1; + free(sp->adapter); + asprintf(&sp->adapter, "%s", list->av[1]); + sp->target = strtol(list->av[2], (char **)NULL, 0); + sp->lun = strtol(list->av[3], (char **)NULL, 0); + r=0; + goto done; + } else { + r=2; + } + } + } +done: + return(r); +} + +void +scsi_free(struct kernel *kp, int writeback){ + struct uc_scsi *sp; + struct uc_scsibus *sbp; + char *t; + int scbus, i; + + for(sp=kp->scsi_devp; sp->device; sp++){ + if((!kp->incore) && sp->modified && writeback) { + /* save info */ + + /* I'm not sure this is necessary */ +#if 0 + sscanf(sp->device, "%[a-z]%d", name, &unit); + sp->config->unit= unit; +#endif + + /* figger out the controller, which may have changed */ + scbus=-1; + for(sbp=kp->scsibus_devp, i=0;sbp->driver; sbp++,i++){ + asprintf(&t, "%s%d", sbp->driver, sbp->unit); + if(strcmp(sp->adapter, t)==0) { + scbus=i; + } + free(t); + } + + /* if we fell through, don't change anything */ + if(scbus!=-1){ + sp->config->cunit= scbus; + } + + sp->config->target= sp->target; + sp->config->lun= sp->lun; + /* sp->config->flags= ; XXX this should be here*/ + + } + free(sp->device); + free(sp->adapter); + free(sp->desc); + } + free(kp->scsi_devp); + kp->scsi_devp=(struct uc_scsi *)0; + /* now free the bus info */ + if(kp->incore){ + for(sbp=kp->scsibus_devp;sbp->driver; sbp++){ +/* fprintf(stderr, "sbp: 0x%x free(0x%x)\n", sbp, sbp->driver);*/ + free(sbp->driver); + } + } + + if (kp->scsibus_devp) + free(kp->scsibus_devp); + kp->scsibus_devp=(struct uc_scsibus *)0; +} + +/* end of userconfig/uc_scsi.c */ diff --git a/release/sysinstall/ufs.c b/release/sysinstall/ufs.c index 73c06676d6ceb..8f61cbed3bda6 100644 --- a/release/sysinstall/ufs.c +++ b/release/sysinstall/ufs.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: ufs.c,v 1.13 1998/09/14 19:14:11 jkh Exp $ + * $Id: ufs.c,v 1.12 1997/02/22 14:12:35 peter Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -45,5 +45,19 @@ FILE * mediaGetUFS(Device *dev, char *file, Boolean probe) { - return mediaGenericGet((char *)dev->private, file); + char buf[PATH_MAX]; + + if (isDebug()) + msgDebug("Request for %s from UFS\n", file); + snprintf(buf, PATH_MAX, "%s/%s", (char *)dev->private, file); + if (file_readable(buf)) + return fopen(buf, "r"); + snprintf(buf, PATH_MAX, "%s/dists/%s", (char *)dev->private, file); + if (file_readable(buf)) + return fopen(buf, "r"); + snprintf(buf, PATH_MAX, "%s/%s/%s", (char *)dev->private, variable_get(VAR_RELNAME), file); + if (file_readable(buf)) + return fopen(buf, "r"); + snprintf(buf, PATH_MAX, "%s/%s/dists/%s", (char *)dev->private, variable_get(VAR_RELNAME), file); + return fopen(buf, "r"); } diff --git a/release/sysinstall/version.h b/release/sysinstall/version.h new file mode 100644 index 0000000000000..b42c26e8937df --- /dev/null +++ b/release/sysinstall/version.h @@ -0,0 +1 @@ +#define RELEASE_NAME "__RELEASE" |
