Problems.

Paul Matthews (paul@matthews.com)
Fri, 23 Feb 1996 18:49:50 -0500


pj22298@xx.acs.appstate.edu writes:
> This maybe directed to the wronge place, but here it goes.
> I've been running a Linux box for a few years now, but have recently
> re-vamped(deleted, repartitioned, reinstalled) my system.
> Now, Under slackware 3.0.0, I can't get the kernal to compile at all.
> I know this is almost definatly not a problem with the kernal, so if you
> realy don't want to talk about it, just send me who to ask, but I realy am
> getting tired of no sound & ethernet and a bulky kernal.
> TIA.

All,

The following message has a number of good hints. I did not follow it,
but I did use it as a checklist after I had independently tried to do
the same thing ... with mixed results.

I have used somewhat different versions of the software and repeated
the process several times. It's down to a practiced routine now. You
may find it interesting.

Obviously, you need to rebuild your compiler and the associated
libraries and utilities. This message is a very good pointer as to how
to do that.

Regards,
__________________________________________________________________
Paul Matthews
McLean, VA
e-mail: paul@matthews.com
==================================================================

From: Bob Allison <ballison@scitexdpi.com>
Received: by server.scitexdpi.com (5.67b) id AA29138; Fri, 16 Feb 1996 14:16:34 -0500
Date: Fri, 16 Feb 1996 14:16:34 -0500
Message-Id: <199602161916.AA29138@server.scitexdpi.com>
To: D.Traenapp@nwofs2.nwowhv.de, daniel.barlow@sjc.ox.ac.uk,
labash@lcjones.aclib.siue.edu, mfburgo@lrkimball.com, mrodin@imsa.edu,
paul@matthews.com, rossg@vale.co.uk
Subject: a.out to ELF Steps
Status: RO

Here is the procedure I followed to get my SlackWare systems ELFified.
This procedure basically follows the procedure from the ELF-HOWTO, but I had
to make the following changes:
-- Move the a.out libraries before installing ld.so
-- Remaking make before installing libc
-- Call my backup directory /usr/i486-save, which is not used by
anything being installed (There may be a reason why Daniel used
/usr/i486-linuxaout, but it appears to me that everything there
gets replaced.)
-- A lot of steps have specific commands instead of general rules since
I am starting with a "clean" system with almost nothing on it.

In addition to the people who requested it by mail, I am also sending a
copy to the ELF-HOWTO author so he can update his instructions as he
sees fit. (Probably means throws the mail away.)

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

Started with Slackware 2.2.0 CD, except with 1.3.59 a.out kernel compiled at
home with ELF support (required to support my Adaptec 2940). I only installed
the base system from disk set A, the diff package from disk set AP, and the
required development stuff (except kernel source) from disk set D. I figured
that there was no reason to spend the time installing things like XFree86
until I got the conversion to ELF completed.

***NOTE***: Please be sure to compile a custom kernel with ELF support (in
a.out format) and boot it before starting.

Acquired the following and placed in /tmp:
binutils-2.6.0.2.bin.tar.gz
gcc272-no-sr-bug.lbin.tar.gz
ld.so-1.7.14.tar.gz
libc-5.2.18.bin.tar.gz
linux-1.3.64.tar.gz
make-3.74.tar.gz
release.binutils-2.6.0.2
release.libc-5.2.18

NOTE: I'm not sure if anything else needs changing after this process is
complete, so don't be surprised if something else starts complaining. Check
the ELF-HOWTO for more information.

Installation process:

1. Install the Linux source (NOTE: The last two commands are my personal
preference so I know which Linux versions I have available. I doubt they
are necessary.) If you have another Linux version in /usr/src/linux, you
probably want to move it before starting this step.
cd /usr/src
tar xvfz /tmp/linux-1.3.64.tar.gz
mv linux linux-1.3.64
ln -s linux-1.3.64 linux

2. Configure the Linux source
cd /usr/src/linux
make config

3. Install make
cd /usr/src
tar /tmp/xvfz make-3.74.tar.gz
cd make-3.74
--Patch according to instructions in release.libc-5.2.18--
make install

4. Add a line in /etc/ld.so.conf to include /usr/i486-save/lib (if
/usr is not in the root filesystem, also add /lib-aout)

5. Move the a.out stuff out of harm's way (NOTE: if /usr is a separate
partition, mkdir /lib-aout and move the stuff from /lib there instead)
cd /usr
mkdir -p i486-save/{lib,bin,ldscripts,include,gcc}
cd lib
mv *.a *.so* *.sa* ../i486-save/lib
mv ldscripts/* ../i486-save/ldscripts
cd ../bin
mv ar as c++filt gasp gprof ld nm objcopy ../i486-save/bin
mv objdump ranlib size strings strip ../i486-save/bin
cd ../include
mv io*.h localeinfo.h netinet net ../i486-save/include
cd /lib
mv libcu* libe* libss* /usr/i486-save/lib
ldconfig -v

6. Install ld.so
cd /usr/src
tar xvfz /tmp/ld.so-1.7.14.tar.gz
cd ld.so-1.7.14
sh instldso.sh

7. Install libc binary
cd /
tar -xzf /tmp/libc-5.2.18.bin.tar.gz

8. Install binutils
cd /
tar xfz /tmp/binutils-2.6.0.2.bin.tar.gz

9. Move the Slackware-supplied compiler out of the way
cd /usr/lib/gcc-lib
mv i486-linux /usr/i486-save/gcc
cd /usr/bin
mv gcc cc g++ c++ protoize unprotoize ../i486-save/bin
cd /lib
mv cpp /usr/i486-save/bin

10. Install compiler (the last couple commands fix a bug in the binary dist)
cd /
tar xvfz /tmp/gcc272-no-sr-bug.lbin.tar.gz
cd /lib
rm cpp
ln -s /usr/lib/gcc-lib/i486-linux/2.7.2/cpp .

11. Adjust the locations of /var/adm/utmp and /var/adm/wtmp
cd /var
mv adm log
ln -s log adm
cd log
mv utmp ../run
ln -s ../run/utmp .

12. Reboot your system.

Congratulations! You've been ELFed! (Since elves are much shorter than
humans, you may need a phone book to sit on so you can still reach
your keyboard... ;-)

Instructions compiled 16-Feb-96 by Bob Allison (bob.allison@scitexdpi.com)
while crossing his fingers hoping everything is going OK...