*BSD News Article 6740


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!uunet!kithrup!wilson
From: wilson@kithrup.COM (Jim Wilson)
Subject: solved: Problems with getting 386BSD 0.1 to run on Micronics 486VL
Organization: Kithrup Enterprises, Ltd.
Date: Mon, 19 Oct 1992 18:33:25 GMT
Message-ID: <1992Oct19.183325.6828@kithrup.COM>
References: <1992Oct12.061945.530@kithrup.COM>
Lines: 83

In article <1992Oct12.061945.530@kithrup.COM> sef@kithrup.COM (Sean Eric Fagan) writes:
>My apartmentmate just bought a 486 machine, and we've been trying to get
>386bsd 0.1 to boot.  In the meantime, I also tried to get it running on my
>machine, and it failed there, also.

I have managed to get 386BSD 0.1 booted on my Micronics 486DX33 ISA/VL-Bus
motherboard.

It would not boot with any of the available boot floppies.  In all cases
it gave the same behaviour: the floppy drive light would come on, the
floppy would spin, but the floopy drive never seeked, and no messages
appeared on the screen.

After much trial and error experimentation, I determined that it was
going into an infinite loop in the fdboot code.  It repeatedly reads
a programmable interrupt controller register waiting for the value 6
to appear.  On my machine, it never does, instead the value 7 appears
in the controller register.  After patching binaries to check for 7
instead of 6, I was able to successfully boot both the dist.fs and
fixit.fs floppies.  I don't know whether this is the correct change.
The correct fix may be that this low bit should be masked out before
the comparion.  I don't have any info on the PIC chip, so I can't
tell which is the better solution.

I have a second problem now, in that about half the time after the
machine boots, it won't respond to the keyboard, but you can login
across the network fine.  This was much more common when booting from
floppies than it is when booting from the harddisk.  I do not know
the solution for this but will probably investigate it when I have
the time.

To patch a boot floppy, edit a *.fs file with emacs, seach for
the string '<^F', and change the ^F to a ^G.  This change will enable
a boot floopy to boot on a Micronics 486VL motherboard, but I haven't
tested it on any other machine.

In source:
Alternative 1 (which is the same as the emacs patch above):

*** fdbootblk.c.or	Mon Jun 22 06:56:47 1992
--- fdbootblk.c	Sat Oct 17 20:37:29 1992
*************** dodisk:
*** 249,255 ****
  	NOP
  	inb	%dx,%al
  	andb	$0x7f,%al
! 	cmpb	$6,%al
  	jne	2b
  	NOP
  	movb	$0x20,%al	# do a eoi
--- 249,255 ----
  	NOP
  	inb	%dx,%al
  	andb	$0x7f,%al
! 	cmpb	$0x7,%al
  	jne	2b
  	NOP
  	movb	$0x20,%al	# do a eoi

Alternative 2:

*** fdbootblk.c.or	Mon Oct 19 12:01:11 1992
--- fdbootblk.c	Mon Oct 19 12:01:46 1992
*************** dodisk:
*** 248,254 ****
  	outb	%al,%dx
  	NOP
  	inb	%dx,%al
! 	andb	$0x7f,%al
  	cmpb	$6,%al
  	jne	2b
  	NOP
--- 248,254 ----
  	outb	%al,%dx
  	NOP
  	inb	%dx,%al
! 	andb	$0x7e,%al
  	cmpb	$6,%al
  	jne	2b
  	NOP
-- 
Jim Wilson	wilson@cygnus.com, wilson@kithrup.com
Cygnus Support, 814 University Avenue, Palo Alto, CA 94301, +1 415 322 5167