Subject: NOTICE: i386 port switched to ELF binary format
To: None <,>
From: Frank van der Linden <>
List: current-users
Date: 07/05/1999 11:42:29
I have switched the i386 port to ELF. People running -current should
be aware that ELF is now the default binary format, so you'll have
to deal with this after you next updated your sources and want to
recompile your system.

You can do it by hand, but I won't recommend that. The easier way is to
use the snapshot in /pub/NetBSD/arch/i386/snapshot/07041999 on (and its mirrors soon). This snapshot also contains
the recently added ipv6 code, so it's a good opportunity to try
that out as well.

It is a full snapshot in release format. The upgrade option in sysinst may
not be the best way to go; I recommend that you do a plain extract of
most sets (except for the "etc" set) of the .tgz files.

Short upgrade procedure:

	* Get the snapshot.
	* Make sure that you have recent bootblocks, ones that will be
	  able to load ELF binaries. To make sure of this, you can:
		- cd /usr/src/sys/arch/i386/stand/biosboot
		- make && make install
		- /usr/mdec/installboot /usr/mdec/biosboot.sym <your_root_part>
		  (<your_root_part will probably be /dev/rwd0a or /dev/rsd0a)

	* Create /emul/aout/usr/lib and /emul/aout/usr/libexec
	* Copy all shared libraries in /usr/lib to /emul/aout/usr/lib
	* Copy /usr/libexec/ to /emul/aout/usr/libexec
	* Compile and boot a kernel with the COMPAT_AOUT and EXEC_ELF32 options.
	  (you can use the GENERIC kernel from the snapshot)
	* Extract the ELF pax(1) binary from the sets. This is to make sure
	  that no confusion ensues with the a.out emulation shadow root
	  in /emul/aout.
		- cd /../.
		  (needed to escape the /emul/aout shadow tree)
		- pax -zrvpe -f <your_set_dir>/base.tgz ./bin/pax
	* Extract the the sets:
		- pax -zrvpe -f <your_set_dir>/xxxx.tgz
		  (where xxxx is {base,comp,games,man,misc,text})

        * Optionally, you can also extract kern.tgz if you want a GENERIC
          ELF kernel. Beware that this will overwrite your current kernel.

After this, it is advisable that you recompile all of your a.out binaries
eventually. This may be too much to do at once. Be sure to at least
recompile the shells you may be using that are still present in a.out
format. The safest way is to log in using a "standard" shell (i.e. /bin/sh,
/bin/ksh or /bin/csh), and then recompile/reinstall the shells. The
/emul/aout shadow tree will cause some confusion with things like
commandline completion in /usr/lib and /usr/libexec, and other things.
If you're using packages, pkg_delete the shells and reinstall them,
again, using a "standard" shell when logged in.

I have found no problems so far with any packages, things should just
work with the ELF binary format. I have not tried all packages, though.

If you have any problems, let me know.

- Frank