Subject: Re: NetBSD pmax binaries on Gregorio.Stanford.EDU:/pub/NetBSD/pmax (part 1 of 4)
To: None <port-pmax@NetBSD.ORG>
From: Andrew Cagney <cagney@highland.com.au>
List: port-pmax
Date: 04/25/1996 23:33:40
>From owner-port-pmax  Mon Oct 24 20:11:25 1994
          via MS.5.6.dobson.highland.sun4_41;
          Tue, 25 Oct 1994 09:18:06 +1000 (EST)
Message-ID: <4if42i702QUnQ74oBP@highland.com.au>
Date: Tue, 25 Oct 1994 09:18:06 +1000 (EST)
From: Andrew Cagney <cagney@highland.com.au>
To: port-pmax@NetBSD.ORG
Subject: Re: NetBSD pmax binaries on Gregorio.Stanford.EDU:/pub/NetBSD/pmax
In-Reply-To: <199410240030.RAA18611@Pescadero.Stanford.EDU>
References: <199410240030.RAA18611@Pescadero.Stanford.EDU>

Excerpts from mail: 23-Oct-94 NetBSD pmax binaries on Gre.. Jonathan
Stone@DSG.Stanf (1739)

> Notably, the usr.gnu.tar.gz contains an ``as'' and ``ld'' hacked from
> GNU binutils, version 2.4. They produce (and understand) NetBSD-style
> a.out files for little-endian machines. The changes I have to the
> Cygnus source to produce these binaries is kind of ugly, and it isn't
> the assembler/loader that other NetBSD ports use. 

I've kicked out a set of changes to binutils-2.5 that are intended to
make doing this easier.  If a person is steping forward to adapt
JonathanS's changes, they may also want to have a look at:

	ftp.ci.com.au:pub/clayton/binutils-2.5+netbsd-0.00.tar.gz
	ftp.ci.com.au:pub/clayton/README.binutils

							Andrew

>From owner-port-pmax  Tue Oct 25 11:25:39 1994
	id AA06591; Tue, 25 Oct 94 09:25:39 MDT
Message-Id: <9410251525.AA06591@fsa.ca>
To: Andrew Cagney <cagney@highland.com.au>
Cc: port-pmax@netbsd.org
Subject: Re: NetBSD pmax binaries on Gregorio.Stanford.EDU:/pub/NetBSD/pmax 
In-Reply-To: Your message of "Tue, 25 Oct 1994 09:18:06 +1000."
             <4if42i702QUnQ74oBP@highland.com.au> 
Date: Tue, 25 Oct 1994 09:25:35 -0600
From: Dean Huxley <dean@fsa.ca>

Andrew Cagney <cagney@highland.com.au> writes:

> I've kicked out a set of changes to binutils-2.5 that are intended to
> make doing this easier.  If a person is steping forward to adapt
> JonathanS's changes, they may also want to have a look at:

>         ftp.ci.com.au:pub/clayton/binutils-2.5+netbsd-0.00.tar.gz
>         ftp.ci.com.au:pub/clayton/README.binutils

Great!  I'll have a look at these too!

Dean Huxley (dean@fsa.ca) 
(pmax port maintainer)

>From owner-port-pmax  Thu Oct 27 01:04:26 1994
Message-Id: <199410270502.AAA10176@MindBender.HeadCandy.com>
To: deraadt@fsa.ca
cc: port-pmax@netbsd.org, explorer@vorpal.com
Subject: NetBSD/pmax
Date: Thu, 27 Oct 1994 00:02:46 -0500
From: "Michael L. VanLoon -- HeadCandy.com" <michaelv@HeadCandy.com>


Michael Graff and I just absconded with a DECstation 2100 with 16MB of
RAM here in the Computation Center last night (shhh! don't tell...).
:-)

We have a 300MB hard drive we might be able to throw at it, and a mono
19" monitor.  We're going to install NetBSD/pmax on it in our office
as time permits (this weekend?).  We think this is extremely cool.

Where would we start looking for docs/pointers/tips on getting
NetBSD/pmax up and running from scratch?

-----------------------------------------------------------------------------
   Michael L. VanLoon     michaelv@HeadCandy.com     michaelv@iastate.edu
  Free your mind and your machine -- NetBSD free un*x for PC/Mac/Amiga/etc.
     Working NetBSD ports: 386+PC, Mac, Amiga, HP300, Sun3, Sun4c, PC532
               In progress: DEC pmax (MIPS R2k/3k), VAX, Sun4m
-----------------------------------------------------------------------------



>From owner-port-pmax  Thu Oct 27 07:09:25 1994
From: explorer@iastate.edu
	id <AA03582@tbird.cc.iastate.edu>; Thu, 27 Oct 1994 06:09:19 -0500
Date: Thu, 27 Oct 1994 06:09:19 -0500
Message-Id: <9410271109.AA03582@tbird.cc.iastate.edu>
To: port-pmax@netbsd.org
Subject: Making NetBSD go on our new toy


I've installed Ultrix on it now, so I'm ready to dig into NetBSD on it.

Will gcc-2.4.3 compile the kernel in a reasonable manner, or should I
get a more recent version?  What versions are ``known to work''?

Thanks,
--Michael

>From owner-port-pmax  Thu Oct 27 20:03:56 1994
Message-Id: <199410280003.TAA05705@packrat.vorpal.com>
To: port-pmax@netbsd.org
Subject: Some success
Date: Thu, 27 Oct 1994 19:03:47 -0500
From: "Michael Graff" <explorer@vorpal.com>


Ok, we now have a bootable pmax NetBSD system.  There are few binaries and 
the / partition is a bit too small to be of any real use, but it's booting.

Now for the hard part -- getting the root partition to be something reasonable,
like 20 meg, and getting a /usr going.

I tried to newfs /dev/rrz0e, which is partitioned at a bit under 900M.  It died
on some sort of write error.  I suppose I could bring my i386 box in and
newfs it and such, and even copy the binaries onto the partition.  But that's
cheating and a big hassle unless there is no other way.

So far, so good.  Thanks for getting me this far.  Any and all suggestions
welcome.  This whole things reminds me of getting 386BSD up and running all
those years ago on my then 4M 386/dx33.  :)

--Michael

--
Michael Graff <explorer@vorpal.com>       NetBSD is the way to go!
PGP key on a key-server near you!         Rayshade the world!

>From owner-port-pmax  Fri Oct 28 11:21:20 1994
	id <AA04079@ponderous.cc.iastate.edu>; Fri, 28 Oct 1994 10:21:15 -0500
Message-Id: <9410281521.AA04079@ponderous.cc.iastate.edu>
To: port-pmax@netbsd.org
Cc: michaelv@iastate.edu, dean@fsa.ca
Subject: Some serious stuff working now  ;)
Date: Fri, 28 Oct 1994 10:21:13 CDT
From: "Michael Graff" <explorer@iastate.edu>


I've managed to build a 24M root partition (which gzips nicely down to about
3.4M since most of it is empty) and with a ``full'' /bin and /sbin installed.
I am in the process of fleshing out /etc so I can at least telnet and ping
from the machine.

I haven't been brave enough to kick the box into multiuser yet though, but
more than likely will tonight or this weekend.

I can place my partition up for FTP, or you can build your own.  ;)

Here's what I did to make a dd'able file:

Logged into my NetBSD/i386 box at home.  Wrote a small program to write out a
specified number of 512-byte sectors to a file.  I then told it to write out
47909 of them -- the size of my a partition.

Then, run this sequence of commands (or close to these -- this is from memory)

	vnconfig -cv /dev/vnd0c our_root
	newfs -t 15 -u 71 -s 47909 /dev/rvnd0c rz57
[I think any disk type will work -- we're overriding all the options anyway!]
	mount /dev/vnd0c /mnt
[copy in binaries, /etc, you get the idea.  When done: ]
	umount /mnt
	vnconfig -uv /dev/vnd0c our_root

dd this to the NetBSD disk using the command
	dd if=our_root of=/dev/rrz0c seek=16
and there you have it, a bigger root, hopefully.

I assume the same thing would work with /usr, but for now I'm using a
read-only Ultrix-mounted partition.  I still cannot newfs the disk, but
disklabel does find the correct partitions and such.  That's nice at least.
I've not tried to ALTER them under NetBSD -- when the Ultrix disk becomes the
spare I'll experiment  ;)

The exact message:
#newfs /dev/rrz0e
rz0: error 0 scsi status 0x2
rz0: Illegal request, blk 1954050
write error: 1762574
wtfs: Input/output error

I was told the reason newfs will not work is because it cannot find the
disklabel.  Also, in the .tar.gz files I have for pmax, gcc is incomplete and
cannot find as.  Is it even self hosting yet, or will I still need to compile
using Ultrix?

--Michael

--
Michael Graff    Iowa State University Computation Center      Project Vincent
215 Durham                voice: (515) 294-4994           explorer@iastate.edu
Ames, IA  50011           fax:   (515) 294-1717           gg.mlg@isumvs.bitnet

>From owner-port-pmax  Fri Oct 28 12:18:30 1994
Date: Fri, 28 Oct 1994 09:17:53 -0700
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Message-Id: <199410281617.JAA21630@Pescadero.Stanford.EDU>
To: port-pmax@NetBSD.ORG
Cc: michaelv@iastate.edu, dean@fsa.ca
Subject:  pmax NetBSD as, ld [Some serious stuff working now]


A suitable GNU as and ld are anon-ftpable from
gregorio:/pub/NetBSD/pmax/usr.gnu.tar.gz.

I  separated them from usr.bin.tar.gz because they're significantly
different from the usual NetBSD as and ld, and from any current GNU
distribution. If binutils-2.5 can be made to work, the binaies
in /pub/NetBSD/pmax/usr.gnu.tar.gz should be discarded.


>From owner-port-pmax  Sun Oct 30 12:10:25 1994
  (5.67a/IDA1.5hp); Sun, 30 Oct 1994 11:01:22 -0600
From: Ted Spradley <tsprad@metronet.com>
Message-Id: <199410301701.AA29570@metronet.com>
Subject: Re: Looking for cross-compiled disklabel or bootblocks
To: dean@fsa.ca (Dean Huxley)
Date: Sun, 30 Oct 1994 11:01:20 -0600 (CST)
Cc: port-pmax@sun-lamp.cs.berkeley.edu
In-Reply-To: <9410280240.AA01525@fsa.ca> from "Dean Huxley" at Oct 27, 94 08:40:57 pm
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 1887      

> Quick and dirty method:
> 
> ftp fsa.ca:pmax/bootblock.pmax
> cat bootblock.pmax miniroot > /dev/rrz#c
> halt
> boot -f rz(0,#,0)netbsd

I did this, and it did boot!

I had tried the
> Slower more customizable method (still dirty though):
and botched it, so I tried the dummy's version and it booted up and gave
me the tic-tac-toe prompt!

The label that it put on my disk didn't match the disk well at all, so I
went back and did the customizable method again.

I've got two versions of the 8 Kbyte bootblock file, and I'm not sure
now which one's Jonathon's and which is Dean's.  I used the 'mi1578hack'
one, since the disk is a Micropolis 1578, but I used Dean's
cross-disklabel to change some parameters to match what Ultrix's 'rzdisk
-g default' said about the disk (1224 cylinders and 36 sectors/track,
for 631053 blocks total).  I adjusted the root partition to start at
block 16, then i dd'ed Jonathon's miniroot onto it with 'seek=16' and
booted it, and it came right up!  Great work, guys!

So now I've got the miniroot up and I need to figure out how to make a
complete system.  I've got Jonathon's userland binaries from gregorio,
and I saw that the miniroot has ifconfig and rcp, and I thought, "Can it
be this easy?"

No, it can't, of course.  ifconfig worked fine, but rcp always tells me:

    rcp: unknown user 0


The code in rcp.c is:

	if (!(pwd = getpwuid(userid = getuid()))) {
		(void)fprintf(stderr, "rcp: unknown user %d.\n", (int)userid);
		exit(1);
	}

There is an /etc/passwd file with an entry for root that looks fine to
me.  Anybody got a clue?  Or should I do the hardware hack and make
a tape and temporarily put a tape drive on the DECstation?


-- 
Ted Spradley                tsprad@metronet.com             +1-214-484-5356
Brisco: "...the more I learn the less I know."
Bowler: "At the rate we're learning things we won't know nothing in no time."

>From owner-port-pmax  Sun Oct 30 12:37:22 1994
	id AA23407; Sun, 30 Oct 94 10:37:03 MST
Message-Id: <9410301737.AA23407@fsa.ca>
To: Ted Spradley <tsprad@metronet.com>
Cc: dean@fsa.ca (Dean Huxley), port-pmax@sun-lamp.cs.berkeley.edu
Subject: Re: Looking for cross-compiled disklabel or bootblocks 
In-Reply-To: Your message of "Sun, 30 Oct 1994 11:01:20 CST."
             <199410301701.AA29570@metronet.com> 
Date: Sun, 30 Oct 1994 10:37:01 -0700
From: Dean Huxley <dean@fsa.ca>

> > Quick and dirty method:
> > 
> > ftp fsa.ca:pmax/bootblock.pmax
> > cat bootblock.pmax miniroot > /dev/rrz#c
> > halt
> > boot -f rz(0,#,0)netbsd
> 
> I did this, and it did boot!
> 
> I had tried the
> > Slower more customizable method (still dirty though):
> and botched it, so I tried the dummy's version and it booted up and gave
> me the tic-tac-toe prompt!
> 
> The label that it put on my disk didn't match the disk well at all, so I
> went back and did the customizable method again.

Yes, the label is matches my test drive.  You can change it with disklabel
when the miniroot is booted.

> So now I've got the miniroot up and I need to figure out how to make a
> complete system.  I've got Jonathon's userland binaries from gregorio,
> and I saw that the miniroot has ifconfig and rcp, and I thought, "Can it
> be this easy?"
> 
> No, it can't, of course.  ifconfig worked fine, but rcp always tells me:
> 
>     rcp: unknown user 0

Easy fix:

mount /
cd /etc
pwd_mkdb master.passwd

You'll want to eventually get your 'a' partition the size you want it and
newfs it.  This can be tricky... (you may want to create the partition on
another NetBSD machine using vnode pseudo disk stuff, then dd it on)

Good luck!

Dean.



>From owner-port-pmax  Sun Oct 30 12:41:49 1994
Message-Id: <9410301741.AA08652@alpha.bostic.com>
To: Ted Spradley <tsprad@metronet.com>
Cc: dean@fsa.ca (Dean Huxley), port-pmax@netbsd.org
Subject: Re: Looking for cross-compiled disklabel or bootblocks 
In-Reply-To: Your message of "Sun, 30 Oct 1994 11:01:20 CST."
             <199410301701.AA29570@metronet.com> 
          consent of the author.
Date: Sun, 30 Oct 1994 12:41:51 -0500
From: "Chris G. Demetriou" <cgd@alpha.bostic.com>

> The code in rcp.c is:
> 
> 	if (!(pwd = getpwuid(userid = getuid()))) {
> 		(void)fprintf(stderr, "rcp: unknown user %d.\n", (int)userid);
> 		exit(1);
> 	}
> 
> There is an /etc/passwd file with an entry for root that looks fine to
> me.  Anybody got a clue?  Or should I do the hardware hack and make
> a tape and temporarily put a tape drive on the DECstation?

Well:
	(1) you need an /etc/master.passwd file, in addition to that
		passwd file,
	(2) you need to have the password db's made, too.  (This can
		be accomplished with 'pwd_mkdb'


chris

>From owner-port-pmax  Sun Oct 30 13:18:29 1994
Message-Id: <199410301818.MAA03319@packrat.vorpal.com>
To: "Chris G. Demetriou" <cgd@alpha.bostic.com>
cc: Ted Spradley <tsprad@metronet.com>, dean@fsa.ca (Dean Huxley),
        port-pmax@netbsd.org, explorer@vorpal.com