* building a cross-native for arm
@ 2014-10-12 11:10 Mauro Condarelli
2014-10-12 20:16 ` Mauro Condarelli
0 siblings, 1 reply; 3+ messages in thread
From: Mauro Condarelli @ 2014-10-12 11:10 UTC (permalink / raw)
To: crossgcc
Hi,
first of all many thanks for the effort and time spent on crossgcc-NG.
This is my first attempt at using it, so I might be very mistaken
everywhere.
I need a native compiler (and related stuff, including make and other
installation tools) running on a small ARM board (I wouldn't want to
cross-compile for it).
I built the cross compiler (arm-mconc-linux-gnueabi) with almost no
problem, in spite of the very terse documentation I found.
Only stumbling was because I didn't have libncurses-dev installed on my
build system.
Now I have a nice $HOME/x-tools/arm-mconc-linux-gnueabi subdir.
If I understand it correctly I now need to use this cross-gcc to build
the native.
I changed Tuple's vendor string to "mconn".
I activated the "canadian" type and selected "arm-conc-linux-gnueabi" as
Host system Tuple.
First problem was ct-ng wouldn't find the cross-toolchain, so I resorted to:
$ PATH=$HOME/x-tools/arm-mconc-linux-gnueabi/bin:$PATH ct-ng build
This seems to work, but, building gdb, I get again the error about
"missing termcap library".
I presently disabled GDB to finish the build and test results, but
that's not a real solution, obviously.
Is there some "tutorial" documentation available somewhere? I didn't
find any and, as said docs coming with crossgcc-NG seem a bit too terse.
Other question: it seems the option about "Companion tools" seems to
apply to upgrade old tools running on build machine; is there a way to
build the same tools for the host (==target, in my case)? That would be
very useful.
Last, but not least, I am a bit confused about what, exactly, I should
copy on the target machine and where, to use the generated native toolchain.
Now cross-compilation of native has finished without errors and I have a
confusing PATH=$HOME/x-tools/arm-mconn-linux-gnueabi directory ("..."
stand for this directory):
1) executable are in .../bin
2) but .../include is empty and .../lib contains only the
gcc-specific stuff
3) .../arm-mconn-linux-gnueabi/bin contains only binutils
(without prefix)
4) .../arm-mconn-linux-gnueabi/include contains only "c++" subdir
5) .../arm-mconn-linux-gnueabi/sysroot seems to have correct libs and
include, but has neither compiler nor binutils
What is the "approved" way to deploy all this stuff to target?
Sorry if these are very naive questions, I searched, but I couldn't find
an answer to them (shame on me).
Thanks again and Regards
Mauro Condarelli
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: building a cross-native for arm
2014-10-12 11:10 building a cross-native for arm Mauro Condarelli
@ 2014-10-12 20:16 ` Mauro Condarelli
2014-11-16 18:09 ` Bill Pringlemeir
0 siblings, 1 reply; 3+ messages in thread
From: Mauro Condarelli @ 2014-10-12 20:16 UTC (permalink / raw)
To: crossgcc
I'm answering to myself to add a few comments.
0) cross-compiler seems to work ok (arm-mcon-linux-gnueabi) I am
"deploying" it merely doing a:
( cd /usr/local/bin ; ln -s
$HOME/x-tools/arm-mcon-linux-gnueabi/bin/* . )
on my build machine.
1) I got to the end of cross-native toolchain compilation (disabling
GDB), but I'm unable to make it run on target board because of many
missing libs.
2) I tried using the "staging", but that doesn't fit well (IF I used it
correctly!) because many libs are pushed in the standard /lib &
/usr/lib, while I would like to have some sort of self-contained package
(probably to deploy it in /usr/local/arm-mcon-linux-gnueabi/... or
something similar).
What am I doing wrong?
TiA
Mauro
On 10/12/2014 01:09 PM, Mauro Condarelli wrote:
> Hi,
> first of all many thanks for the effort and time spent on crossgcc-NG.
> This is my first attempt at using it, so I might be very mistaken
> everywhere.
>
> I need a native compiler (and related stuff, including make and other
> installation tools) running on a small ARM board (I wouldn't want to
> cross-compile for it).
>
> I built the cross compiler (arm-mconc-linux-gnueabi) with almost no
> problem, in spite of the very terse documentation I found.
> Only stumbling was because I didn't have libncurses-dev installed on
> my build system.
> Now I have a nice $HOME/x-tools/arm-mconc-linux-gnueabi subdir.
>
> If I understand it correctly I now need to use this cross-gcc to build
> the native.
> I changed Tuple's vendor string to "mconn".
> I activated the "canadian" type and selected "arm-conc-linux-gnueabi"
> as Host system Tuple.
>
> First problem was ct-ng wouldn't find the cross-toolchain, so I
> resorted to:
> $ PATH=$HOME/x-tools/arm-mconc-linux-gnueabi/bin:$PATH ct-ng build
>
> This seems to work, but, building gdb, I get again the error about
> "missing termcap library".
> I presently disabled GDB to finish the build and test results, but
> that's not a real solution, obviously.
>
> Is there some "tutorial" documentation available somewhere? I didn't
> find any and, as said docs coming with crossgcc-NG seem a bit too terse.
>
> Other question: it seems the option about "Companion tools" seems to
> apply to upgrade old tools running on build machine; is there a way to
> build the same tools for the host (==target, in my case)? That would
> be very useful.
>
> Last, but not least, I am a bit confused about what, exactly, I should
> copy on the target machine and where, to use the generated native
> toolchain.
> Now cross-compilation of native has finished without errors and I have
> a confusing PATH=$HOME/x-tools/arm-mconn-linux-gnueabi directory
> ("..." stand for this directory):
> 1) executable are in .../bin
> 2) but .../include is empty and .../lib contains only the
> gcc-specific stuff
> 3) .../arm-mconn-linux-gnueabi/bin contains only binutils
> (without prefix)
> 4) .../arm-mconn-linux-gnueabi/include contains only "c++" subdir
> 5) .../arm-mconn-linux-gnueabi/sysroot seems to have correct libs
> and include, but has neither compiler nor binutils
> What is the "approved" way to deploy all this stuff to target?
> Sorry if these are very naive questions, I searched, but I couldn't
> find an answer to them (shame on me).
>
> Thanks again and Regards
> Mauro Condarelli
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: building a cross-native for arm
2014-10-12 20:16 ` Mauro Condarelli
@ 2014-11-16 18:09 ` Bill Pringlemeir
0 siblings, 0 replies; 3+ messages in thread
From: Bill Pringlemeir @ 2014-11-16 18:09 UTC (permalink / raw)
To: Mauro Condarelli; +Cc: crossgcc
On 12 Oct 2014, mauro@mailgate.soft-in.com wrote:
> I'm answering to myself to add a few comments.
> 0) cross-compiler seems to work ok (arm-mcon-linux-gnueabi) I am
> "deploying" it merely doing a:
> ( cd /usr/local/bin ; ln -s
>> HOME/x-tools/arm-mcon-linux-gnueabi/bin/* . )
> on my build machine.
> 1) I got to the end of cross-native toolchain compilation (disabling
> GDB), but I'm unable to make it run on target board because of many
> missing libs.
> 2) I tried using the "staging", but that doesn't fit well (IF I used
> it correctly!) because many libs are pushed in the standard /lib &
> /usr/lib, while I would like to have some sort of self-contained
> package (probably to deploy it in
> /usr/local/arm-mcon-linux-gnueabi/... or something similar).
Investigate the populate scripts. It should be names something like
'arm-mcon-linux-gnueabi-populate'.
See:
http://crosstool-ng.org/git/crosstool-ng/tree/scripts/populate.in
http://crosstool-ng.org/git/crosstool-ng/tree/docs/5%20-%20Using%20the%20toolchain.txt#137
You can use 'chroot' to test the compiler on the target. Ie, make a
complete parallel directory structure and use it to test a shell. You
can also change your mount options and linux 'root=' to point to
alternate mount points.
This is a fairly difficult topic that is really outside of ct-ng. You
should research 'linux+root filesystem'. It may also be possible to
have two sets of 'libc' existing at the same time. However, this is not
very efficient and you would want to eliminate this eventually. It
seems to make most sense to start with either a completely different
'mount point' or directory and use 'chroot' to test it out.
Fwiw,
Bill Pringlemeir.
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-16 18:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-12 11:10 building a cross-native for arm Mauro Condarelli
2014-10-12 20:16 ` Mauro Condarelli
2014-11-16 18:09 ` Bill Pringlemeir
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).