From: Christoph Plattner <christoph.plattner@dot.at>
To: Alan Modra <alan@linuxcare.com.au>
Cc: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] Initial setup of the `glibc' in the target rootfile system
Date: Sun, 18 Feb 2001 11:28:40 +0100 [thread overview]
Message-ID: <3A8FA3D8.19E69EF6@dot.at> (raw)
In-Reply-To: Pine.LNX.4.21.0102091056000.9776-100000@front.linuxcare.com.au
Hello again !
I have found the method working here.
The GLIBC must be built with the line:
make user-defined-trusted-dirs=/lib
This adds the `/lib' to the internal trusted search path, which is
defined in the
generated files ./elf/trusted-dirs.{st,h}. After this the normal
installation to the
configured prefix (in my case /usr/parisc/hppa-linux)
make install user-defined-trusted-dirs=/lib
and the installation to the NFS root directory can be done by repeating
install with
make install user-defined-trusted-dirs=/lib
install_root=/tftpboot/apollo/root
On the workstation (booted from the palinux-0.5 root file system) I
mounted my new
NFS root to /mnt and used the command
ldconfig -v -r /mnt
And after that I booted from tne new root, and the error was, that there
was no inittab
and no process left......
So I have success !!!! (I know, that there is nothing to boot further,
except the init
itself !!)
Now a further question. How to build successfully a `bash', with other
tools (expect
strace) I have not so big problems.
The `bash' built process has problems in `configure' in a cross compiled
environment.
It tries some functions via C examples, and they have difficulties to
determine the
result of a compile option, as this is not native....
I tried with
HOSTCC=gcc CC=hppa-linux-gcc ../configure --host=hppa-linux \
--prefix=/usr/parisc/hppa-linux
Configure stops with:
checking for working alloca.h... yes
checking for alloca... yes
checking whether getpgrp takes no argument... configure: error: cannot
check getpgrp if cross compiling
How to build a bash (I am always interested in building from the scratch
(hobby)) !
With friendly regards
Christoph P.
Alan Modra wrote:
>
> On Thu, 8 Feb 2001, Christoph Plattner wrote:
>
> > After the glibc builts perfect, I have a problem in setting up the root
> [snip]
> > with page fault or with "cannot find libc.6.so". Only the root of the
> [snip]
>
> "with page fault" is possibly due to the glibc bug I mentioned in
> http://lists.parisc-linux.org/pipermail/parisc-linux/2001-February/011686.html
>
> "cannot find libc.so.6" is a different problem, a result of
> cross-compiling glibc with --prefix different to final install location.
> Let's see if I can explain the problem...
>
> Suppose you want to cross-compile the toolchain and glibc from an
> i686-linux system, and you have chosen --target=hppa-linux. Further
> suppose you decide to install to /usr/ on your host x86 system (This
> does work safely, despite various recipes recommending /usr/parisc,
> or /opt/parisc). Now when cross-compiling glibc, you obviously _don't_
> want to install glibc on your host to /usr, as the glibc you create is an
> hppa-linux binary, which doesn't run very well on x86-linux! So the
> proper install destination for glibc is given by --prefix=/usr/hppa-linux.
> This is also the root of directories where your hppa-linux cross-tools
> will look first for libraries and system header files etc. If you chooes
> some other prefix (ie. not <compiler prefix>/<compiler target>) then
> you'll have problems cross compiling.
>
> However, trying to install the glibc that works for a cross-compiler
> tool-chain to your target system, at a different location, fails
> miserably because shared libraries specify where to look for their
> "interpreter" (dynamic linker). Your cross-compiled glibc will be looking
> for /usr/hppa-linux/lib/ld.so.1, while a native glibc will look for
> /lib/ld.so.1. Also, a cross-compiled dynamic linker knows to look under
> /usr/hppa-linux/ for libraries and ld.so.cache. On the other hand, you
> probably want your libraries in their normal locations so that you don't
> accidentally use the wrong library.
>
> Of course, it's very useful to be able to install your cross-compiled
> glibc to your target :-), and hopefully the above explanation suggests one
> way around the problems:
> - Install your glibc to a temp dir on your nfs server
> eg. "make install_root=/var/tmp/install"
> - Move files from /var/tmp/install to /tftpboot/<proper locataion>
> It helps if you know what <proper location> is! Compile glibc native
> for x86 and install to another temp dir if you don't know.
> - Make relative symbolic links in /tftpboot/.../usr/hppa-linux/lib/ to
> the shared libs you installed to /tftpboot/.../lib/
> - ln -s ../../etc /tftpboot/.../usr/hppa-linux/etc too
> - What else? Oh yeah, /usr/lib/libc.so and some of the files installed
> to /usr/bin/ are text files, and some have paths to /usr/hppa-linux.
> Edit them.
>
> It would be nice if you could cross-compile glibc with --prefix=/usr, but
> last time I tried this, quite some time ago, it failed because
> /usr/include/ was being used for headers. Maybe there's an easy way
> around this.
>
> Alan Modra
> --
> Linuxcare. Support for the Revolution.
>
> _______________________________________________
> parisc-linux mailing list
> parisc-linux@lists.parisc-linux.org
> http://lists.parisc-linux.org/cgi-bin/mailman/listinfo/parisc-linux
--
-------------------------------------------------------------------------
private: christoph.plattner@dot.at
company: christoph.plattner@alcatel.at
next prev parent reply other threads:[~2001-02-18 10:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-08 22:49 [parisc-linux] Initial setup of the `glibc' in the target root file system Christoph Plattner
2001-02-09 3:56 ` Alan Modra
2001-02-18 10:28 ` Christoph Plattner [this message]
2001-02-18 11:19 ` [parisc-linux] Initial setup of the `glibc' in the target rootfile system Alan Modra
2001-02-18 16:49 ` [parisc-linux] Initial setup of the `glibc' in the target rootfilesystem Christoph Plattner
2001-02-22 7:45 ` [parisc-linux] Initial setup of the `glibc' in the target rootfile system Rafael E. Herrera
2001-02-22 8:34 ` Christoph Plattner
2001-02-24 5:56 ` Rafael E. Herrera
2001-02-24 6:26 ` Ulrich Drepper
2001-02-24 7:27 ` Rafael E. Herrera
2001-02-24 7:42 ` Ulrich Drepper
2001-02-24 8:15 ` Rafael E. Herrera
2001-02-24 8:26 ` Alan Modra
2001-02-27 19:52 ` Christoph Plattner
2001-02-24 7:53 ` Alan Modra
2001-02-24 8:04 ` Ulrich Drepper
2001-02-24 8:21 ` Alan Modra
2001-02-24 8:43 ` Ulrich Drepper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3A8FA3D8.19E69EF6@dot.at \
--to=christoph.plattner@dot.at \
--cc=alan@linuxcare.com.au \
--cc=parisc-linux@lists.parisc-linux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.