Note: Due to technical difficulties, the Archives are currently not up to date.
GMANE provides an alternative service for most mailing lists. c.f. bug 424647
List Archive: gentoo-embedded
From: John Poole <jlpoole@...>
Subject: [gentoo-embedded] Embedded Handbook (5)(b) clarification
Date: Mon, 05 Oct 2009 19:18:08 -0700
> I'd like to get some clarification on the Embedded Handbook,
> particularly Chapter 5, subsection 5(b) "Filesystem Setup"
[cut]
>
> From
> http://www.gentoo.org/proj/en/base/embedded/handbook/index.xml?part=1&chap=5
>
> vvvvvvvvvv
> 5.b. Filesystem Setup
>
> Cross-compiling a system generally involves two directory trees. The
> first is where all development files are normally installed. This is
> your sysroot. The other tree is where only your runtime files are
> installed. You emerge all of your fun packages into your sysroot
> (without trimming down any files), and then either install via binary
> packages or copying files by hand all the stuff you need in your
> runtime tree.
>
> The common convention is to use your /usr/CTARGET/ tree as your
> sysroot as the include/library directories in this tree are already
> encoded into the gcc cross-compiler for searching. You could use
> another directory and then add custom -I/-L paths to your
> CPPFLAGS/LDFLAGS, but this has historically proven to be
> problematic. Yes, it works most of the time, but the corner cases are
> why this method is discouraged. In the embedded handbook, we'll assume
> you're using the sysroot as your development ROOT.
>
> For your runtime system, you'll need a much slimmer/trimmed-down
> setup. The files you remove from a normal installed package is why
> this tree is not suitable for compiling against. If you build binary
> packages while installing into your sysroot, then you can use those
> binary packages in conjunction with the INSTALL_MASK variable to trim
> out most things. See man make.conf for more information.
>
> ^^^^^^^^^^
>
> In my case, I have a CTARGET of "arm-softfloat-linux-gnueabi" so
> "/usr/arm-softfloat-linux-gnueabi" is my sysroot. My
> "arm-softfloat-linux-gnueabi-gcc" compiler knows to look under
> $CTARGET.
>
> All questions below reference paragraph 3.
>
> Question #1: What does "runtime system" mean? Is that the directory
> tree underneath /usr/$CTARGET?
>
"Runtime system" mean a tree containing only files required at runtime.
Since we are doing embedded, we usually reduce as much as possible the disk
space used by the system.
As explain in 5.b, this is usually done with 2 trees.
Tree 1: "sysroot": contains everything required for building packages
Tree 2: "runtime system": contains only files required at runtime.
Directory tree /usr/$CTARGET is "sysroot"
> Question #2: I don't understand what you mean by "files you remove
> from a normal installed package".
>
E.g: when you install a gentoo package, you have some headers files.
Headers files are not required at runtime, so you can remove it in the "runtime
system" tree.
> Question #3: "this tree is not suitable..." What tree?
>
The "runtime system" tree is not suitable for compiling since usually you remove
headers and other files not required at runtime.
Regards,
Patrice
|
|