1 |
I'd like to get some clarification on the Embedded Handbook, |
2 |
particularly Chapter 5, subsection 5(b) "Filesystem Setup" |
3 |
|
4 |
I'm trying to cross-compile on an AMD64 for two Marvel ARM architectures: |
5 |
a) SheevaPlug which as the ARMv5TE without a numeric coprocessor "softfloat" |
6 |
http://en.wikipedia.org/wiki/SheevaPlug |
7 |
|
8 |
b) OpenRD Client which has the ARMv5TE |
9 |
http://globalscaletechnologies.com/t-openrdcdetails.aspx#features |
10 |
|
11 |
I previously had problems trying to install and work my cross compiler, |
12 |
so I simply rebuilt my AMD box and see that the Embedded Handbook has |
13 |
recently been updated in September, 2009. I had considerable help from |
14 |
Mike Frysinger back in May and June on IRC, but I lost my chat logs due |
15 |
to a crash on Windows which I was going to use to refer to and to |
16 |
reconstruct what I had learned. I haven't had the time to devote to |
17 |
this project until now and find myself not fully understanding the |
18 |
instructions. |
19 |
|
20 |
From |
21 |
http://www.gentoo.org/proj/en/base/embedded/handbook/index.xml?part=1&chap=5 |
22 |
|
23 |
vvvvvvvvvv |
24 |
5.b. Filesystem Setup |
25 |
|
26 |
Cross-compiling a system generally involves two directory trees. The |
27 |
first is where all development files are normally installed. This is |
28 |
your sysroot. The other tree is where only your runtime files are |
29 |
installed. You emerge all of your fun packages into your sysroot |
30 |
(without trimming down any files), and then either install via binary |
31 |
packages or copying files by hand all the stuff you need in your runtime |
32 |
tree. |
33 |
|
34 |
The common convention is to use your /usr/CTARGET/ tree as your sysroot |
35 |
as the include/library directories in this tree are already encoded into |
36 |
the gcc cross-compiler for searching. You could use another directory |
37 |
and then add custom -I/-L paths to your CPPFLAGS/LDFLAGS, but this has |
38 |
historically proven to be problematic. Yes, it works most of the time, |
39 |
but the corner cases are why this method is discouraged. In the embedded |
40 |
handbook, we'll assume you're using the sysroot as your development ROOT. |
41 |
|
42 |
For your runtime system, you'll need a much slimmer/trimmed-down setup. |
43 |
The files you remove from a normal installed package is why this tree is |
44 |
not suitable for compiling against. If you build binary packages while |
45 |
installing into your sysroot, then you can use those binary packages in |
46 |
conjunction with the INSTALL_MASK variable to trim out most things. See |
47 |
man make.conf for more information. |
48 |
|
49 |
^^^^^^^^^^ |
50 |
|
51 |
In my case, I have a CTARGET of "arm-softfloat-linux-gnueabi" so |
52 |
"/usr/arm-softfloat-linux-gnueabi" is my sysroot. My |
53 |
"arm-softfloat-linux-gnueabi-gcc" compiler knows to look under $CTARGET. |
54 |
|
55 |
All questions below reference paragraph 3. |
56 |
|
57 |
Question #1: What does "runtime system" mean? Is that the directory |
58 |
tree underneath /usr/$CTARGET? |
59 |
|
60 |
Question #2: I don't understand what you mean by "files you remove from |
61 |
a normal installed package". |
62 |
|
63 |
Question #3: "this tree is not suitable..." What tree? |
64 |
|
65 |
I'm basically lost for the remainder of the paragraph. |
66 |
|
67 |
When I find I have questions, I will read on past the problem part to |
68 |
see if I can make sense of it by reading subsequent content. |
69 |
Unfortunately, this tricky stuff (I apparently broke my previous |
70 |
environment making assumptions and trying to follow the previous version |
71 |
of the documentation) and I don't want to make any assumptions which |
72 |
later cause me to taint, or "hose", my environments. |
73 |
|
74 |
I do have several questions about subsection 5.c, but will reread that |
75 |
subsection once I know I'm fully following subsection 5.b. |
76 |
|
77 |
Thank you for you anticipated help/explanations. |
78 |
|
79 |
A suggestion. You use an example in the previous chapters, e.g. Chapter |
80 |
4 "sh4-unknown-linux-gnu". It would be really helpful if subsequent |
81 |
discussions continued with that example to illustrate the point being |
82 |
made. This would help provide continuity. |
83 |
|
84 |
John |
85 |
|
86 |
-- |
87 |
|
88 |
John Laurence Poole |
89 |
P.O. Box 6566 |
90 |
Napa CA 94581-6566 |
91 |
Home: 707-265-7572 |
92 |
Office: 650-607-0853 |
93 |
Skype: JohnLPoole My status <skype:JohnLPoole?call> |
94 |
email: jlpoole@×××.net |