Subject: Re: steps to upgrade to ELF (was Re: NOTICE: i386 port switched to
To: David Brownlee <abs@anim.dreamworks.com>
From: Paul Goyette <paul@whooppee.com>
List: port-i386
Date: 07/07/1999 02:15:37
Well, this is _exactly_ the steps I ran, and I'm now successfully
running ELF. I ran the originally posted sequence on machine #1,
found a few problems, updated the instructions to what's below, and
ran it on machine #2. Both machines are now succesfully updated.
0) Get the -current sources
1) Copy all the shared objects from /usr/lib to /emul/aout/usr/lib
(you don't need the *.a, *_p.a, or *_pic.a files, just *.so.*)
2) Boot from a kernel with EXEC_ELF, EXEC_AOUT, and COMPAT_AOUT all
defined
3) setenv DESTDIR /../.
setenv OBJECT_FMT ELF
(I don't know why, but I did not have to use /../../.
to back up two levels from /emul/aout; just /../. worked
fine.)
4) cd /usr/src; make includes
5) cd /usr/src/share/mk; make install
6) setenv BOOTSTRAP_ELF 1
6.1) Check in /../usr/lib to make sure that you don't have any
mismatched libxxx_p.a or libxxx_pic.a vs libxxx.so.m.n or
you'll get some major compile/link errors!
6.5) cd /usr/src/gnu/lib/libbfd && make cleandir && make bfd.h
# (at least if you're going from straight 1.4)
I didn't have to do this step, but it might be necessary if
you're starting at 1.4; I started from last week's -current
7) cd /usr/src/gnu/usr.bin
for i in binutils/common binutils/* gas.new ld.new egcs/common \
egcs/*; do
(cd $i; make cleandir; make depend; make; \
setenv OBJECT_FMT a.out; make; setenv OBJECT_FMT ELF)
done
# (expect the link in the first make to fail)
# (you need to build the common subdirectories separately, first)
8) for i in binutils gas.new ld.new egcs; do
(cd $i, make install)
9) cd /usr/src/libexec/ld.elf_so;
make cleandir; make depend; make; make install
10) cd /usr/src/lib/csu
make cleandir; make depend; make; make install
10.5) cd /../..
mkdir etc-old ; pax -rw -pe etc etc-old
(I didn't need to do this, but it might be a good idea to save
a copy of your old /etc if you're going to make any changes.)
11) cd /usr/src
make build
--------------------------------------------------------------------------
| Paul Goyette | PGP DSS Key fingerprint: | E-mail addresses: |
| Network Engineer | BCD7 5301 9513 58A6 0DBC | paul@whooppee.com |
| and kernel hacker | 91EB ADB1 A280 3B79 9221 | pgoyette@juniper.net |
--------------------------------------------------------------------------