Gentoo Archives: gentoo-embedded

From: Derick Swanepoel <dswanepoel@×××××.com>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] Building a cross-compile environment for ARM
Date: Mon, 10 Apr 2006 11:10:05
Message-Id: fdcd80670604100409xf60ace0h22406cee0a1afa0b@mail.gmail.com
In Reply to: Re: [gentoo-embedded] Building a cross-compile environment for ARM by "Stanisław Raczyński"
1 On 30/03/06, Stanis³aw Raczyñski <sraczynski@××.pl> wrote:
2 > Derick Swanepoel wrote:
3 >
4 > >Hi,
5 > >
6 > >I'm busy building a cross-compile environment for an ARM (XScale) in an x86
7 > >host environment, but I'm having trouble emerging packages like procps and
8 > >gdb which require headers from /usr/include.
9 > >
10 > >
11 > What do you need procps for? If you're using busybox, it already
12 > contains ps, free, top and kill and it should be enough for most
13 > embedded systems.
14
15 I am building a small ramdisk with busybox, but I would also like to
16 build a more complete, full-featured environment such as the ARM
17 stage3. However, I have the same __fixdfsi symbol problem with many of
18 the busybox applets, e.g. awk and top.
19
20 > >I've built an armeb-softfloat-linux-uclibc cross toolchain with crossdev
21 > >which can successfully compile uclibc, bash, baselayout, etc. and install
22 > >in ROOT=/gentoo-arm. However, when I try to emerge something like procps,
23 > >it fails to find curses.h and termcap.h. Where should the cross-compiler be
24 > >looking for these headers?
25 > >
26 > >
27 > Is ROOT the only variable you set? There are some other important vars,
28 > like ARCH, CBUILD, CHOST, CTARGET. Many others are also useful while
29 > cross-emerging.
30
31 I have a wrapper script that sets these variables when I emerge.
32
33 > >Another problem I have is that gawk (3.1.4-r4) fails to execute with:
34 > >awk: can't resolve symbol '__fixdfsi'
35 > >As far as I can determine, __fixdfsi is one of GCC's softfloat library routines.
36
37 I have since had to modify my cross-gcc to generate binaries using the
38 FPA floating point mode instead of VFP, and now several other busybox
39 applets can't resolve symbol __udivsi3. df, du, ping and wget all fail
40 this way. I am still trying to determine what code generates this
41 function, and why certain binaries contain it while others don't.
42
43 Any help in this regard would be greatly appreciated. I'm becoming
44 quite desperate :/
45
46 Thanks,
47 Derick
48
49 > >I would really like to know how the armeb-uclibc-softfloat stages (found in
50 > >experimental/arm/embedded on various Gentoo mirrors) were built.
51 > >
52 > >
53 > As far as I know, they use catalyst.
54 >
55 > >Thanks,
56 > >Derick
57 > >
58 > >
59 > >
60 > I am building small Embedded Gentoo systems for i686 and ARM920T
61 > architectures and for that I wrote a little script called egg
62 > (attached). Perhaps you will find it useful. To create such a system for
63 > arm920t (baselayout+uclibc+busybox), I'd simply run:
64 >
65 > # crossdev -t arm-unknown-linux-uclibc
66 > # egg -l uclibc -a arm920t -o /home/gentoo-for-arm
67 >
68 > Later, to add some packages (e.g. dropbear and ncurses) I'd write:
69 >
70 > # egg -l uclibc -a arm920t -o /home/gentoo-for-arm -fn dropbear ncurses
71 >
72 > And finally, when I'm satisfied with my rootfs, I can strip it off
73 > unnecessary trash:
74 >
75 > # egg -l uclibc -arm920t -o /home/gentoo-for-arm -fns
76 >
77 > This is an extremely simple tool (e.g. you can't set USE flags for
78 > individual packages), but still I find it quite sufficient for my work.
79 > You can use it to generate a rootfs for an armeb architecture just by
80 > adding it to parse_arch() function. If you do that, don't forget to send
81 > me the updated version.
82 >
83 > Hope you find it useful,
84 > Stanislaw Raczynski
85
86 --
87 gentoo-embedded@g.o mailing list