* [gentoo-embedded] Embedded Handbook (5)(b) clarification
@ 2009-10-06 2:18 John Poole
2009-10-06 5:51 ` Patrice Tisserand
0 siblings, 1 reply; 2+ messages in thread
From: John Poole @ 2009-10-06 2:18 UTC (permalink / raw
To: gentoo-embedded
[-- Attachment #1: Type: text/plain, Size: 3997 bytes --]
I'd like to get some clarification on the Embedded Handbook,
particularly Chapter 5, subsection 5(b) "Filesystem Setup"
I'm trying to cross-compile on an AMD64 for two Marvel ARM architectures:
a) SheevaPlug which as the ARMv5TE without a numeric coprocessor "softfloat"
http://en.wikipedia.org/wiki/SheevaPlug
b) OpenRD Client which has the ARMv5TE
http://globalscaletechnologies.com/t-openrdcdetails.aspx#features
I previously had problems trying to install and work my cross compiler,
so I simply rebuilt my AMD box and see that the Embedded Handbook has
recently been updated in September, 2009. I had considerable help from
Mike Frysinger back in May and June on IRC, but I lost my chat logs due
to a crash on Windows which I was going to use to refer to and to
reconstruct what I had learned. I haven't had the time to devote to
this project until now and find myself not fully understanding the
instructions.
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?
Question #2: I don't understand what you mean by "files you remove from
a normal installed package".
Question #3: "this tree is not suitable..." What tree?
I'm basically lost for the remainder of the paragraph.
When I find I have questions, I will read on past the problem part to
see if I can make sense of it by reading subsequent content.
Unfortunately, this tricky stuff (I apparently broke my previous
environment making assumptions and trying to follow the previous version
of the documentation) and I don't want to make any assumptions which
later cause me to taint, or "hose", my environments.
I do have several questions about subsection 5.c, but will reread that
subsection once I know I'm fully following subsection 5.b.
Thank you for you anticipated help/explanations.
A suggestion. You use an example in the previous chapters, e.g. Chapter
4 "sh4-unknown-linux-gnu". It would be really helpful if subsequent
discussions continued with that example to illustrate the point being
made. This would help provide continuity.
John
--
John Laurence Poole
P.O. Box 6566
Napa CA 94581-6566
Home: 707-265-7572
Office: 650-607-0853
Skype: JohnLPoole My status <skype:JohnLPoole?call>
email: jlpoole@pon.net
[-- Attachment #2: jlpoole.vcf --]
[-- Type: text/x-vcard, Size: 235 bytes --]
begin:vcard
fn:John Poole
n:Poole;John
adr:;;P.O. Box 6566;Napa;CA;94581-6566;USA
email;internet:jlpoole@pon.net
tel;work:650-607-0853
tel;home:707-265-7572
note:For street address, email me.
x-mozilla-html:TRUE
version:2.1
end:vcard
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-embedded] Embedded Handbook (5)(b) clarification
2009-10-06 2:18 [gentoo-embedded] Embedded Handbook (5)(b) clarification John Poole
@ 2009-10-06 5:51 ` Patrice Tisserand
0 siblings, 0 replies; 2+ messages in thread
From: Patrice Tisserand @ 2009-10-06 5:51 UTC (permalink / raw
To: gentoo-embedded, jlpoole
From: John Poole <jlpoole@pon.net>
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-06 5:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-06 2:18 [gentoo-embedded] Embedded Handbook (5)(b) clarification John Poole
2009-10-06 5:51 ` Patrice Tisserand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox