Subject: Re: something to play with
To: None <port-pmax@sun-lamp.cs.berkeley.edu>
From: Marc Evans - Contract Software Hacker <marc@Synergytics.Com>
List: port-pmax
Date: 06/21/1994 15:04:17
I have followed the instructions in the doc/pmax/BUILD file, and made some 
additional notes in the process. I am including them for others, though most 
of the issues should be pretty obvious. Also, I should note that I am using 
Ultrix 4.4 as the bootstrap host environment, so your results may vary if you 
are using something else. My notes are indicated by the (marc) at the 
beginning of a line.

0)
(marc) cd src/lib/libc/string
(marc) cc -Du_int="unsigned int" -c strdup.c
(marc) mv strdup.o ../../../usr.bin/make
1) cd src/usr.bin/make (contains berkeley make)
(marc) cd ../../../usr.bin/make
2) change in Makefile.bootstrap:
        MACHINE="whatever" to MACHINE="pmax"
        MACHINE_ARCH="whatever" to MACHINE_ARCH="mips"
(marc) Add -I/usr/include -I../../sys to CFLAGS
(marc) Add strdup.o to OBJ
(marc) Add -I/usr/include -I../../../sys to lst.lib/Makefile
3) make -f Makefile.bootstrap
4) install:
        copy binary into your path as 'bmake' to avoid confusion.
        copy ../../share/mk to /usr/share/mk
                and change in sys.mk, cc -> gcc, and add to CFLAGS '-G 0'
5) cd ../../config (config.new is not used by this port)
(marc) ../../usr.sbin/config
6) bmake to build it.
(marc) ignore nroff error
7) install config under 'config.netbsd' to avoid confusion.
8) cd to ../../sys/lib/libkern
9) bmake
10) copy libkern.a to src/sys/arch/pmax/compile
11) cd src/sys/arch/pmax/conf
12) copy to GENERIC.pmax config file to something more descriptive
    like 'TIMESINK'.
13) You will likely want to modify the config file to fit your hardware.
    I suggest you start out w/ a generic kernel and make it more specific
    later.
13) config YOUR-KERNEL-NAME
14) cd ../compile/YOUR-KERNEL-NAME
15) bmake depend
(marc) At "sh: bad substitution" error:
(marc) AWK=nawk sh5 ../../../../kern/vnode_if.sh ../../../../kern/vnode_if.src
(marc) be sure mkdep is on your system at this point
(marc) bmake depend
(marc) edit ../../pmax/locore.s line 3111 so that the .globl line is actually
(marc) 4 seperate .globl lines. 
16) bmake (cross your fingers)
(marc) beware of gnu-as vs dec-as. It appears that the dec-as is the desired
(marc) flavor.
17) copy to /netbsd
18) and boot your machine specifying that kernel name.

After step 16, I get the follow unresolved:

rm -f netbsd
ld -x -N -o netbsd -e start -Ttext 80030000 ${SYSTEM_OBJ} vers.o ../libkern.a
ld:
Undefined:
iteattach

A quick look in ioconf.c indicates that this may be able to simply be 
commented out for the moment, which is what I will attempt next. I will 
followup with more information if people are interrested.

Lastly, many thanks to Adam and Ralph for the work they've done to get to this 
stage 8-).

- Marc
===============================================================================
Marc Evans, Software Consultant       WB1GRH      Synergytics
E-Mail: Marc@Synergytics.Com                      21 Hinds Lane, Suite 23L
URL: http://WWW.Synergytics.Com/marc              Pelham, NH, USA 03076-3013
PGP-2.6 key available upon request                +1 603 635 3857 (voice/fax)
MIME-1.0 & Enriched-Text mail accepted            Unix & X11 internals/apps
===============================================================================


------------------------------------------------------------------------------

Reply-To: Marc@Synergytics.Com