[parisc-linux] Initial setup of the `glibc' in the target rootfile system

Rafael E. Herrera raffo@neuronet.pitt.edu
Sat, 24 Feb 2001 00:56:47 -0500


Christoph Plattner wrote:
> 
> First of all, the make install has to be done twice !
> 
> One time for the tool chain to find the things like crt?.o, libs, etc..
> For this the builtin tree is defined (given by --prefix).
> 
>         make install user-defined-trusted-dirs=/lib
> 
> The second time install it to the nfs root file system
> 
>         make install user-defined-trusted-dirs=/lib \
>           install_root=/tftpboot/nfsroot
> 
> For the target the `/lib' is the builtin search path, for the
> cross tool chain the '/usr/parisc/hppa-linux/lib' (in my case).
> 
> AND A VERY IMPORTANT POINT: You have to run `ldconfig'. I tried
> this on the target machine (apollo 720) by booting from the
> NFS-ROOT of palinux-0.5 (I copied the contents of the CD to a
> path exported by NFS). After booting I mounted my new NFSROOT to
> `/mnt' and run
>         ldconfig -v -r /mnt
> 
> After that I could boot from the new root file system starting the
> `init' process (but nothing else....)

export MACH=i386-linux
export DEST=~/parisk/palinux
export ROOT=~/parisk

HOSTCC=gcc CC=hppa-linux-gcc $ROOT/source/glibc/configure \
--prefix=$DEST/hppa-linux --build=$MACH \
--host=hppa-linux --target=hppa-linux \
--with-headers=$ROOT/source/linux/include --disable-profile \
--without-cvs --enable-add-ons
make MAKE="make -j 10" user-defined-trusted-dirs=/lib
make install user-defined-trusted-dirs=/lib
make install user-defined-trusted-dirs=/lib \
 install_root=/tmp/glibc

Then copied all the new files onto a second copy of nfsroot.
Booted the original, mounted the second under /mnt and run:

	parisc:/etc# ldconfig -v -r /mnt

and I got this:

ldconfig: Can't open configuration file /mnt//etc/ld.so.conf: No such
file or directory

I rebooted with the second nfsroot and got a login prompt. However, I
can't run ldconfig again and I get this error msg.:

parisc:/etc# ldconfig -v       
ldconfig: Can't open configuration file
/usr1/users/raffo/parisk/palinux/hppa-linux/etc/ld.so.conf: No such file
or directory
/usr1/users/raffo/parisk/palinux/hppa-linux/lib:
ldconfig: Can't open directory
/usr1/users/raffo/parisk/palinux/hppa-linux/lib: No such file or
directory
ldconfig: Can't create temporary cache file
/usr1/users/raffo/parisk/palinux/hppa-linux/etc/ld.so.cache~: No such
file or directory

I I create those directories and a ld.so.conf, it works, but the files
are out of place. Maybe if it were possible to configure and install the
files in the x86 machine under a pseudo /, it would install properly.
Would 'chroot' work here?

-- 
     Rafael