Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Problems using buildroot with crosstoll-ng
@ 2011-04-15 20:14 Ettore Campion
  2011-04-15 22:55 ` Charles Krinke
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Ettore Campion @ 2011-04-15 20:14 UTC (permalink / raw)
  To: buildroot

Hi list,

I'm trying to use buildroot with crosstool-ng to create a glibc based
cross-toolchain and root filesystem image for a mipsel target.
I'm using the default settings everywhere besides the kernel-headers:
I'm using here a custom linux tarball based on linux 2.6.22.
The toolchain seems to be correctly generated but there are some
problems in the copy of the generated libraries files to the target
directory.

The fist problem I faced was the following:
CTNG_TUPLE='mipsel-unknown-linux-gnu'
CTNG_SYSROOT='/home/tora/Projects/buildroot-2011.02/output/host/usr/mipsel-unknown-linux-gnu/sys-root'
Copy external toolchain libraries to target...
/bin/sh: line 6: cd:
/home/tora/Projects/buildroot-2011.02/output/host/usr/mipsel-unknown-linux-gnu/sys-root:
No such file or directory
/bin/sh: line 6: cd:
/home/tora/Projects/buildroot-2011.02/output/host/usr/mipsel-unknown-linux-gnu/sys-root:
No such file or directory
/bin/sh: line 6: cd:
/home/tora/Projects/buildroot-2011.02/output/host/usr/mipsel-unknown-linux-gnu/sys-root:
No such file or directory
....
This kind of error does not stop buildroot that continues anyway till
the creation of the root filesystem.. with en empty target/lib.
This seemed to me to be related to a wrong path in
toolchain/toolchain-crosstool-ng/crosstool-ng.mk line 63.
In crosstool-ng menuconfig I specified the sysroot dir like default as
"sysroot", not "sys-root".
I simply modified correspondently the crosstool-ng.mk file and
everything seemed to work beside the fact that flashing the generated
rootfs.jjfs2 led me to a "kernel panic - not syncing: no init found"
message from the kernel.
Taking again a look to crosstool-ng.mk and target/lib I noticed that
was missing ld.so.1, manually adding the lib to target/lib I got rid
of the missing init message but in the serial console I do not see
either any daemons starting nor the login prompt (I got all these
things with a rootfs created selecting a buildroot-uclibc toolchain);
the last messages I read from the serial console are:

VFS: Mounted root (jffs2 filesystem).
Freeing unused kernel memory: 472k freed

Here target/lib
total 3288
drwxr-xr-x  2 tora tora    4096 2011-04-14 22:47 .
drwxr-xr-x 16 tora tora    4096 2011-04-14 22:19 ..
-rwxr-xr-x  1 tora tora  164040 2011-04-14 22:28 ld-2.9.so
lrwxrwxrwx  1 tora tora       9 2011-04-14 22:47 ld.so.1 -> ld-2.9.so
-rwxr-xr-x  1 tora tora 1562336 2011-04-14 22:20 libc-2.9.so
-rwxr-xr-x  1 tora tora   43664 2011-04-14 22:20 libcrypt-2.9.so
lrwxrwxrwx  1 tora tora      15 2011-04-14 22:18 libcrypt.so.1 ->
libcrypt-2.9.so
lrwxrwxrwx  1 tora tora      11 2011-04-14 22:18 libc.so.6 -> libc-2.9.so
-rwxr-xr-x  1 tora tora   14648 2011-04-14 22:20 libdl-2.9.so
lrwxrwxrwx  1 tora tora      12 2011-04-14 22:18 libdl.so.2 -> libdl-2.9.so
-rwxr-xr-x  1 tora tora  224488 2011-04-14 22:20 libgcc_s.so.1
-rwxr-xr-x  1 tora tora  905392 2011-04-14 22:20 libm-2.9.so
lrwxrwxrwx  1 tora tora      11 2011-04-14 22:18 libm.so.6 -> libm-2.9.so
-rwxr-xr-x  1 tora tora   98052 2011-04-14 22:20 libnsl-2.9.so
lrwxrwxrwx  1 tora tora      13 2011-04-14 22:18 libnsl.so.1 -> libnsl-2.9.so
-rwxr-xr-x  1 tora tora   22456 2011-04-14 22:20 libnss_dns-2.9.so
lrwxrwxrwx  1 tora tora      17 2011-04-14 22:18 libnss_dns.so.2 ->
libnss_dns-2.9.so
-rwxr-xr-x  1 tora tora   53748 2011-04-14 22:20 libnss_files-2.9.so
lrwxrwxrwx  1 tora tora      19 2011-04-14 22:18 libnss_files.so.2 ->
libnss_files-2.9.so
-rwxr-xr-x  1 tora tora  105032 2011-04-14 22:20 libpthread-2.9.so
lrwxrwxrwx  1 tora tora      17 2011-04-14 22:18 libpthread.so.0 ->
libpthread-2.9.so
-rwxr-xr-x  1 tora tora   87824 2011-04-14 22:20 libresolv-2.9.so
lrwxrwxrwx  1 tora tora      16 2011-04-14 22:18 libresolv.so.2 ->
libresolv-2.9.so
-rwxr-xr-x  1 tora tora   37176 2011-04-14 22:20 librt-2.9.so
lrwxrwxrwx  1 tora tora      12 2011-04-14 22:18 librt.so.1 -> librt-2.9.so
-rwxr-xr-x  1 tora tora    9980 2011-04-14 22:20 libutil-2.9.so
lrwxrwxrwx  1 tora tora      14 2011-04-14 22:18 libutil.so.1 -> libutil-2.9.so


What is going wrong? Is still missing something? Did I do something
conceptually wrong?
I do not know how to debug further. Any help would be appreciated.

Thank you in advance,
Ettore

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] Problems using buildroot with crosstoll-ng
  2011-04-15 20:14 [Buildroot] Problems using buildroot with crosstoll-ng Ettore Campion
@ 2011-04-15 22:55 ` Charles Krinke
  2011-04-17  7:58   ` Ettore Campion
  2011-04-15 23:04 ` ANDY KENNEDY
  2011-04-17 15:40 ` Yann E. MORIN
  2 siblings, 1 reply; 10+ messages in thread
From: Charles Krinke @ 2011-04-15 22:55 UTC (permalink / raw)
  To: buildroot

At a glance, it looks like there shous be a "gcc" or some other toolchain
tool at the end of "mipsel-unknown-linux-gnu".
On Apr 15, 2011 1:14 PM, "Ettore Campion" <ecampion@gmail.com> wrote:
> Hi list,
>
> I'm trying to use buildroot with crosstool-ng to create a glibc based
> cross-toolchain and root filesystem image for a mipsel target.
> I'm using the default settings everywhere besides the kernel-headers:
> I'm using here a custom linux tarball based on linux 2.6.22.
> The toolchain seems to be correctly generated but there are some
> problems in the copy of the generated libraries files to the target
> directory.
>
> The fist problem I faced was the following:
> CTNG_TUPLE='mipsel-unknown-linux-gnu'
>
CTNG_SYSROOT='/home/tora/Projects/buildroot-2011.02/output/host/usr/mipsel-unknown-linux-gnu/sys-root'
> Copy external toolchain libraries to target...
> /bin/sh: line 6: cd:
>
/home/tora/Projects/buildroot-2011.02/output/host/usr/mipsel-unknown-linux-gnu/sys-root:
> No such file or directory
> /bin/sh: line 6: cd:
>
/home/tora/Projects/buildroot-2011.02/output/host/usr/mipsel-unknown-linux-gnu/sys-root:
> No such file or directory
> /bin/sh: line 6: cd:
>
/home/tora/Projects/buildroot-2011.02/output/host/usr/mipsel-unknown-linux-gnu/sys-root:
> No such file or directory
> ....
> This kind of error does not stop buildroot that continues anyway till
> the creation of the root filesystem.. with en empty target/lib.
> This seemed to me to be related to a wrong path in
> toolchain/toolchain-crosstool-ng/crosstool-ng.mk line 63.
> In crosstool-ng menuconfig I specified the sysroot dir like default as
> "sysroot", not "sys-root".
> I simply modified correspondently the crosstool-ng.mk file and
> everything seemed to work beside the fact that flashing the generated
> rootfs.jjfs2 led me to a "kernel panic - not syncing: no init found"
> message from the kernel.
> Taking again a look to crosstool-ng.mk and target/lib I noticed that
> was missing ld.so.1, manually adding the lib to target/lib I got rid
> of the missing init message but in the serial console I do not see
> either any daemons starting nor the login prompt (I got all these
> things with a rootfs created selecting a buildroot-uclibc toolchain);
> the last messages I read from the serial console are:
>
> VFS: Mounted root (jffs2 filesystem).
> Freeing unused kernel memory: 472k freed
>
> Here target/lib
> total 3288
> drwxr-xr-x 2 tora tora 4096 2011-04-14 22:47 .
> drwxr-xr-x 16 tora tora 4096 2011-04-14 22:19 ..
> -rwxr-xr-x 1 tora tora 164040 2011-04-14 22:28 ld-2.9.so
> lrwxrwxrwx 1 tora tora 9 2011-04-14 22:47 ld.so.1 -> ld-2.9.so
> -rwxr-xr-x 1 tora tora 1562336 2011-04-14 22:20 libc-2.9.so
> -rwxr-xr-x 1 tora tora 43664 2011-04-14 22:20 libcrypt-2.9.so
> lrwxrwxrwx 1 tora tora 15 2011-04-14 22:18 libcrypt.so.1 ->
> libcrypt-2.9.so
> lrwxrwxrwx 1 tora tora 11 2011-04-14 22:18 libc.so.6 -> libc-2.9.so
> -rwxr-xr-x 1 tora tora 14648 2011-04-14 22:20 libdl-2.9.so
> lrwxrwxrwx 1 tora tora 12 2011-04-14 22:18 libdl.so.2 -> libdl-2.9.so
> -rwxr-xr-x 1 tora tora 224488 2011-04-14 22:20 libgcc_s.so.1
> -rwxr-xr-x 1 tora tora 905392 2011-04-14 22:20 libm-2.9.so
> lrwxrwxrwx 1 tora tora 11 2011-04-14 22:18 libm.so.6 -> libm-2.9.so
> -rwxr-xr-x 1 tora tora 98052 2011-04-14 22:20 libnsl-2.9.so
> lrwxrwxrwx 1 tora tora 13 2011-04-14 22:18 libnsl.so.1 -> libnsl-2.9.so
> -rwxr-xr-x 1 tora tora 22456 2011-04-14 22:20 libnss_dns-2.9.so
> lrwxrwxrwx 1 tora tora 17 2011-04-14 22:18 libnss_dns.so.2 ->
> libnss_dns-2.9.so
> -rwxr-xr-x 1 tora tora 53748 2011-04-14 22:20 libnss_files-2.9.so
> lrwxrwxrwx 1 tora tora 19 2011-04-14 22:18 libnss_files.so.2 ->
> libnss_files-2.9.so
> -rwxr-xr-x 1 tora tora 105032 2011-04-14 22:20 libpthread-2.9.so
> lrwxrwxrwx 1 tora tora 17 2011-04-14 22:18 libpthread.so.0 ->
> libpthread-2.9.so
> -rwxr-xr-x 1 tora tora 87824 2011-04-14 22:20 libresolv-2.9.so
> lrwxrwxrwx 1 tora tora 16 2011-04-14 22:18 libresolv.so.2 ->
> libresolv-2.9.so
> -rwxr-xr-x 1 tora tora 37176 2011-04-14 22:20 librt-2.9.so
> lrwxrwxrwx 1 tora tora 12 2011-04-14 22:18 librt.so.1 -> librt-2.9.so
> -rwxr-xr-x 1 tora tora 9980 2011-04-14 22:20 libutil-2.9.so
> lrwxrwxrwx 1 tora tora 14 2011-04-14 22:18 libutil.so.1 -> libutil-2.9.so
>
>
> What is going wrong? Is still missing something? Did I do something
> conceptually wrong?
> I do not know how to debug further. Any help would be appreciated.
>
> Thank you in advance,
> Ettore
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110415/48068e73/attachment.html>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] Problems using buildroot with crosstoll-ng
  2011-04-15 20:14 [Buildroot] Problems using buildroot with crosstoll-ng Ettore Campion
  2011-04-15 22:55 ` Charles Krinke
@ 2011-04-15 23:04 ` ANDY KENNEDY
  2011-04-17  8:08   ` Ettore Campion
  2011-04-17 15:40 ` Yann E. MORIN
  2 siblings, 1 reply; 10+ messages in thread
From: ANDY KENNEDY @ 2011-04-15 23:04 UTC (permalink / raw)
  To: buildroot

> -----Original Message-----
> From: buildroot-bounces at busybox.net [mailto:buildroot-
> bounces at busybox.net] On Behalf Of Ettore Campion
> Sent: Friday, April 15, 2011 3:14 PM
> To: buildroot at busybox.net
> Subject: [Buildroot] Problems using buildroot with crosstoll-ng
> 
> CTNG_TUPLE='mipsel-unknown-linux-gnu'
> CTNG_SYSROOT='/home/tora/Projects/buildroot-
> 2011.02/output/host/usr/mipsel-unknown-linux-gnu/sys-root'

This looks screwy.  Are you building with an internal or external CTNG
toolchain?

Andy 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] Problems using buildroot with crosstoll-ng
  2011-04-15 22:55 ` Charles Krinke
@ 2011-04-17  7:58   ` Ettore Campion
  0 siblings, 0 replies; 10+ messages in thread
From: Ettore Campion @ 2011-04-17  7:58 UTC (permalink / raw)
  To: buildroot

Hello Charles,

thank you for your answer.
I probably did not explained me correctly.
This
>> CTNG_TUPLE='mipsel-unknown-linux-gnu'
>> CTNG_SYSROOT='/home/tora/Projects/buildroot-2011.02/output/host/usr/mipsel-unknown-linux-gnu/sys-root'
>> Copy external toolchain libraries to target...
is the output I get from buildroot after building crosstoll-ng is build.

The toolchain is actually correctly build, in
[BUILDROOT_DIR]/output/host/bin/
I have all the cross tools (mipsel-unknown-linux-gnu-gcc,
mipsel-unknown-linux-gnu-as, etc)

On Sat, Apr 16, 2011 at 12:55 AM, Charles Krinke
<charles.krinke@gmail.com> wrote:
> At a glance, it looks like there shous be a "gcc" or some other toolchain
> tool at the end of "mipsel-unknown-linux-gnu".
>
> On Apr 15, 2011 1:14 PM, "Ettore Campion" <ecampion@gmail.com> wrote:
>> Hi list,
>>
>> I'm trying to use buildroot with crosstool-ng to create a glibc based
>> cross-toolchain and root filesystem image for a mipsel target.
>> I'm using the default settings everywhere besides the kernel-headers:
>> I'm using here a custom linux tarball based on linux 2.6.22.
>> The toolchain seems to be correctly generated but there are some
>> problems in the copy of the generated libraries files to the target
>> directory.
>>
>> The fist problem I faced was the following:
>> CTNG_TUPLE='mipsel-unknown-linux-gnu'
>>
>> CTNG_SYSROOT='/home/tora/Projects/buildroot-2011.02/output/host/usr/mipsel-unknown-linux-gnu/sys-root'
>> Copy external toolchain libraries to target...
>> /bin/sh: line 6: cd:
>>
>> /home/tora/Projects/buildroot-2011.02/output/host/usr/mipsel-unknown-linux-gnu/sys-root:
>> No such file or directory
>> /bin/sh: line 6: cd:
>>
>> /home/tora/Projects/buildroot-2011.02/output/host/usr/mipsel-unknown-linux-gnu/sys-root:
>> No such file or directory
>> /bin/sh: line 6: cd:
>>
>> /home/tora/Projects/buildroot-2011.02/output/host/usr/mipsel-unknown-linux-gnu/sys-root:
>> No such file or directory
>> ....
>> This kind of error does not stop buildroot that continues anyway till
>> the creation of the root filesystem.. with en empty target/lib.
>> This seemed to me to be related to a wrong path in
>> toolchain/toolchain-crosstool-ng/crosstool-ng.mk line 63.
>> In crosstool-ng menuconfig I specified the sysroot dir like default as
>> "sysroot", not "sys-root".
>> I simply modified correspondently the crosstool-ng.mk file and
>> everything seemed to work beside the fact that flashing the generated
>> rootfs.jjfs2 led me to a "kernel panic - not syncing: no init found"
>> message from the kernel.
>> Taking again a look to crosstool-ng.mk and target/lib I noticed that
>> was missing ld.so.1, manually adding the lib to target/lib I got rid
>> of the missing init message but in the serial console I do not see
>> either any daemons starting nor the login prompt (I got all these
>> things with a rootfs created selecting a buildroot-uclibc toolchain);
>> the last messages I read from the serial console are:
>>
>> VFS: Mounted root (jffs2 filesystem).
>> Freeing unused kernel memory: 472k freed
>>
>> Here target/lib
>> total 3288
>> drwxr-xr-x 2 tora tora 4096 2011-04-14 22:47 .
>> drwxr-xr-x 16 tora tora 4096 2011-04-14 22:19 ..
>> -rwxr-xr-x 1 tora tora 164040 2011-04-14 22:28 ld-2.9.so
>> lrwxrwxrwx 1 tora tora 9 2011-04-14 22:47 ld.so.1 -> ld-2.9.so
>> -rwxr-xr-x 1 tora tora 1562336 2011-04-14 22:20 libc-2.9.so
>> -rwxr-xr-x 1 tora tora 43664 2011-04-14 22:20 libcrypt-2.9.so
>> lrwxrwxrwx 1 tora tora 15 2011-04-14 22:18 libcrypt.so.1 ->
>> libcrypt-2.9.so
>> lrwxrwxrwx 1 tora tora 11 2011-04-14 22:18 libc.so.6 -> libc-2.9.so
>> -rwxr-xr-x 1 tora tora 14648 2011-04-14 22:20 libdl-2.9.so
>> lrwxrwxrwx 1 tora tora 12 2011-04-14 22:18 libdl.so.2 -> libdl-2.9.so
>> -rwxr-xr-x 1 tora tora 224488 2011-04-14 22:20 libgcc_s.so.1
>> -rwxr-xr-x 1 tora tora 905392 2011-04-14 22:20 libm-2.9.so
>> lrwxrwxrwx 1 tora tora 11 2011-04-14 22:18 libm.so.6 -> libm-2.9.so
>> -rwxr-xr-x 1 tora tora 98052 2011-04-14 22:20 libnsl-2.9.so
>> lrwxrwxrwx 1 tora tora 13 2011-04-14 22:18 libnsl.so.1 -> libnsl-2.9.so
>> -rwxr-xr-x 1 tora tora 22456 2011-04-14 22:20 libnss_dns-2.9.so
>> lrwxrwxrwx 1 tora tora 17 2011-04-14 22:18 libnss_dns.so.2 ->
>> libnss_dns-2.9.so
>> -rwxr-xr-x 1 tora tora 53748 2011-04-14 22:20 libnss_files-2.9.so
>> lrwxrwxrwx 1 tora tora 19 2011-04-14 22:18 libnss_files.so.2 ->
>> libnss_files-2.9.so
>> -rwxr-xr-x 1 tora tora 105032 2011-04-14 22:20 libpthread-2.9.so
>> lrwxrwxrwx 1 tora tora 17 2011-04-14 22:18 libpthread.so.0 ->
>> libpthread-2.9.so
>> -rwxr-xr-x 1 tora tora 87824 2011-04-14 22:20 libresolv-2.9.so
>> lrwxrwxrwx 1 tora tora 16 2011-04-14 22:18 libresolv.so.2 ->
>> libresolv-2.9.so
>> -rwxr-xr-x 1 tora tora 37176 2011-04-14 22:20 librt-2.9.so
>> lrwxrwxrwx 1 tora tora 12 2011-04-14 22:18 librt.so.1 -> librt-2.9.so
>> -rwxr-xr-x 1 tora tora 9980 2011-04-14 22:20 libutil-2.9.so
>> lrwxrwxrwx 1 tora tora 14 2011-04-14 22:18 libutil.so.1 -> libutil-2.9.so
>>
>>
>> What is going wrong? Is still missing something? Did I do something
>> conceptually wrong?
>> I do not know how to debug further. Any help would be appreciated.
>>
>> Thank you in advance,
>> Ettore
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] Problems using buildroot with crosstoll-ng
  2011-04-15 23:04 ` ANDY KENNEDY
@ 2011-04-17  8:08   ` Ettore Campion
  0 siblings, 0 replies; 10+ messages in thread
From: Ettore Campion @ 2011-04-17  8:08 UTC (permalink / raw)
  To: buildroot

Hello Andy,

Thank you for answering.

In buildroot's menu configuration I've chosen as toolchain type
crosstool-ng, not an external toolchain.

Ettore

On Sat, Apr 16, 2011 at 1:04 AM, ANDY KENNEDY <ANDY.KENNEDY@adtran.com> wrote:
>> -----Original Message-----
>> From: buildroot-bounces at busybox.net [mailto:buildroot-
>> bounces at busybox.net] On Behalf Of Ettore Campion
>> Sent: Friday, April 15, 2011 3:14 PM
>> To: buildroot at busybox.net
>> Subject: [Buildroot] Problems using buildroot with crosstoll-ng
>>
>> CTNG_TUPLE='mipsel-unknown-linux-gnu'
>> CTNG_SYSROOT='/home/tora/Projects/buildroot-
>> 2011.02/output/host/usr/mipsel-unknown-linux-gnu/sys-root'
>
> This looks screwy. ?Are you building with an internal or external CTNG
> toolchain?
>
> Andy
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] Problems using buildroot with crosstoll-ng
  2011-04-15 20:14 [Buildroot] Problems using buildroot with crosstoll-ng Ettore Campion
  2011-04-15 22:55 ` Charles Krinke
  2011-04-15 23:04 ` ANDY KENNEDY
@ 2011-04-17 15:40 ` Yann E. MORIN
  2011-04-19 21:01   ` Peter Korsgaard
  2011-04-21  7:42   ` Ettore Campion
  2 siblings, 2 replies; 10+ messages in thread
From: Yann E. MORIN @ 2011-04-17 15:40 UTC (permalink / raw)
  To: buildroot

Ettore, All,

On Friday 15 April 2011 22:14:06 Ettore Campion wrote:
> I'm trying to use buildroot with crosstool-ng to create a glibc based
> cross-toolchain and root filesystem image for a mipsel target.
> I'm using the default settings everywhere besides the kernel-headers:
> I'm using here a custom linux tarball based on linux 2.6.22.
> The toolchain seems to be correctly generated but there are some
> problems in the copy of the generated libraries files to the target
> directory.
> 
> The fist problem I faced was the following:
> CTNG_TUPLE='mipsel-unknown-linux-gnu'
> CTNG_SYSROOT='/home/tora/Projects/buildroot-2011.02/output/host/
> usr/mipsel-unknown-linux-gnu/sys-root' 
                               ^^^^^^^^
Bummer... There's an issue here.
It should be 'sysroot', not 'sys-root'. I'm testing a fix here.

> In crosstool-ng menuconfig I specified the sysroot dir like default as
> "sysroot", not "sys-root".

Which should be hidden in this case. I'm testing a fix here.

> Taking again a look to crosstool-ng.mk and target/lib I noticed that
> was missing ld.so.1, manually adding the lib to target/lib I got rid
> of the missing init message

OK, I'll see if it has anything to do with the above issue.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] Problems using buildroot with crosstoll-ng
  2011-04-17 15:40 ` Yann E. MORIN
@ 2011-04-19 21:01   ` Peter Korsgaard
  2011-04-21  7:42   ` Ettore Campion
  1 sibling, 0 replies; 10+ messages in thread
From: Peter Korsgaard @ 2011-04-19 21:01 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@anciens.enib.fr> writes:

 >> The fist problem I faced was the following:
 >> CTNG_TUPLE='mipsel-unknown-linux-gnu'
 >> CTNG_SYSROOT='/home/tora/Projects/buildroot-2011.02/output/host/
 >> usr/mipsel-unknown-linux-gnu/sys-root' 
 Yann>                                ^^^^^^^^
 Yann> Bummer... There's an issue here.
 Yann> It should be 'sysroot', not 'sys-root'. I'm testing a fix here.

I noticed that as well earlier today, and fixed it in git.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] Problems using buildroot with crosstoll-ng
  2011-04-17 15:40 ` Yann E. MORIN
  2011-04-19 21:01   ` Peter Korsgaard
@ 2011-04-21  7:42   ` Ettore Campion
  2011-04-21 14:28     ` Yann E. MORIN
  1 sibling, 1 reply; 10+ messages in thread
From: Ettore Campion @ 2011-04-21  7:42 UTC (permalink / raw)
  To: buildroot

Hi Yann,

I just cloned the buildroot git repository (with your fixed applied)
and tried again.
With my configuration (glibc 2.9) is always missing ld.so.1 in target/lib.
This seems to me because in
toolchain/toolchain-crosstool-ng/crosstool-ng.mk we're looking for
ld-linux.so and nor for ld.so.

Regards,
Ettore

On Sun, Apr 17, 2011 at 5:40 PM, Yann E. MORIN
<yann.morin.1998@anciens.enib.fr> wrote:
> Ettore, All,
>
> On Friday 15 April 2011 22:14:06 Ettore Campion wrote:
>> I'm trying to use buildroot with crosstool-ng to create a glibc based
>> cross-toolchain and root filesystem image for a mipsel target.
>> I'm using the default settings everywhere besides the kernel-headers:
>> I'm using here a custom linux tarball based on linux 2.6.22.
>> The toolchain seems to be correctly generated but there are some
>> problems in the copy of the generated libraries files to the target
>> directory.
>>
>> The fist problem I faced was the following:
>> CTNG_TUPLE='mipsel-unknown-linux-gnu'
>> CTNG_SYSROOT='/home/tora/Projects/buildroot-2011.02/output/host/
>> usr/mipsel-unknown-linux-gnu/sys-root'
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^^^^^^^^
> Bummer... There's an issue here.
> It should be 'sysroot', not 'sys-root'. I'm testing a fix here.
>
>> In crosstool-ng menuconfig I specified the sysroot dir like default as
>> "sysroot", not "sys-root".
>
> Which should be hidden in this case. I'm testing a fix here.
>
>> Taking again a look to crosstool-ng.mk and target/lib I noticed that
>> was missing ld.so.1, manually adding the lib to target/lib I got rid
>> of the missing init message
>
> OK, I'll see if it has anything to do with the above issue.
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> | ?Yann E. MORIN ?| Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software ?Designer | \ / CAMPAIGN ? ? | ?___ ? ? ? ? ? ? ? |
> | +33 223 225 172 `------------.-------: ?X ?AGAINST ? ? ?| ?\e/ ?There is no ?|
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL ? ?| ? v ? conspiracy. ?|
> '------------------------------^-------^------------------^--------------------'
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] Problems using buildroot with crosstoll-ng
  2011-04-21  7:42   ` Ettore Campion
@ 2011-04-21 14:28     ` Yann E. MORIN
  2011-04-22 10:30       ` Ettore Campion
  0 siblings, 1 reply; 10+ messages in thread
From: Yann E. MORIN @ 2011-04-21 14:28 UTC (permalink / raw)
  To: buildroot

Ettore, All,

On Thursday 21 April 2011 09:42:50 Ettore Campion wrote:
> I just cloned the buildroot git repository (with your fixed applied)
> and tried again.
> With my configuration (glibc 2.9) is always missing ld.so.1 in target/lib.
> This seems to me because in
> toolchain/toolchain-crosstool-ng/crosstool-ng.mk we're looking for
> ld-linux.so and nor for ld.so.

The file should be named by its SONAME. Please run:
  readelf -d ld.so.1 |grep SONAME

That's why we usually care about ld-linux.so, and not ld.so.1.

What is requiring ld.so.1 on your target?


Quoting your original post:
> flashing the generated
> rootfs.jjfs2 led me to a "kernel panic - not syncing: no init found"
> message from the kernel.

Read below, and then run:
  readelf -d /sbin/init

> Taking again a look to crosstool-ng.mk and target/lib I noticed that
> was missing ld.so.1, manually adding the lib to target/lib I got rid
> of the missing init message but in the serial console I do not see
> either any daemons starting nor the login prompt (I got all these
> things with a rootfs created selecting a buildroot-uclibc toolchain);
                                                     ^^^^^^
[--SNIP--]
> drwxr-xr-x ?2 tora tora ? ?4096 2011-04-14 22:47 .
> drwxr-xr-x 16 tora tora ? ?4096 2011-04-14 22:19 ..
> -rwxr-xr-x ?1 tora tora ?164040 2011-04-14 22:28 ld-2.9.so
                                                   ^^^^^^^^^
This is not a uClibc library. It is a glibc library.
Ditto for all the others.

Did you mix binaries built with uClibc with others built with
glibc?

Once you have started to run buildroot, and that the toolchain is built,
and the first program is ./configured, it is not possible to switch to
another C library.

If you need to change the C library, you'll have to restart from scratch.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] Problems using buildroot with crosstoll-ng
  2011-04-21 14:28     ` Yann E. MORIN
@ 2011-04-22 10:30       ` Ettore Campion
  0 siblings, 0 replies; 10+ messages in thread
From: Ettore Campion @ 2011-04-22 10:30 UTC (permalink / raw)
  To: buildroot

Hi Yann,

First of all thank you for your patience and your answers.

Here the result of the command:
$ readelf -d output/host/usr/mipsel-unknown-linux-gnu/sysroot/lib/ld.so.1
|grep SONAME
 0x0000000e (SONAME)                     Library soname: [ld.so.1]

I really do not know why I get such a name, this is the result of the
creation of the toolchain by crosstool-ng: I selected a mipsel target,
kernel headers are based on linux 2.6.22 (custom tarball), binutils is
2.20, gcc is 4.4.3 with c++ support and finally glibc is 2.9 (quite
everywhere, apart from the kernel headers and c++ support, default
settings in crosstool-ng for my target).

About the possible uclibc/glibc mix, I did not explained my good enough.
What I meant was that as I first tried buildroot as tool to generate a
toolchain+rootfs I let where possible all the default settings, i.e. I
generated a buildroot-uclibc cross toolchain + rootfs. I was quite
surprised that everything went smoothly and at the end I had working
toolchain + rootfs, after the boot of the kernel I had on the serial
port  of the target the random number generator starting and a login
console (yes I selected System Configuration->Generic serial port
config->ttyS0..).
Since I wanted a glibc toolchain (I'm currently using an old glibc
based cross-toolchain on that target) I deleted the output dir,
I ran again make menuconfig, I selected differently than before only
crosstool-ng as toolchain, I run make ctng-menuconfig to select c++
support and
my custom kernel tarball and finally ran make... and I got the
problems I told in my first post.

Here also the readelf from init
$ readelf -d output/target/sbin/init

Dynamic section at offset 0x164 contains 22 entries:
 Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x0000000c (INIT)                       0x4039d0
 0x0000000d (FINI)                       0x4a708c
 0x00000004 (HASH)                       0x40023c
 0x00000005 (STRTAB)                     0x4026b8
 0x00000006 (SYMTAB)                     0x400cd8
 0x0000000a (STRSZ)                      3867 (bytes)
 0x0000000b (SYMENT)                     16 (bytes)
 0x70000016 (MIPS_RLD_MAP)               0x4d6144
 0x00000015 (DEBUG)                      0x0
 0x00000003 (PLTGOT)                     0x4d6150
 0x70000001 (MIPS_RLD_VERSION)           1
 0x70000005 (MIPS_FLAGS)                 NOTPOT
 0x70000006 (MIPS_BASE_ADDRESS)          0x400000
 0x7000000a (MIPS_LOCAL_GOTNO)           17
 0x70000011 (MIPS_SYMTABNO)              414
 0x70000012 (MIPS_UNREFEXTNO)            37
 0x70000013 (MIPS_GOTSYM)                0x7
 0x6ffffffe (VERNEED)                    0x403910
 0x6fffffff (VERNEEDNUM)                 1
 0x6ffffff0 (VERSYM)                     0x4035d4
 0x00000000 (NULL)                       0x0


Regards,
Ettore


On Thu, Apr 21, 2011 at 4:28 PM, Yann E. MORIN
<yann.morin.1998@anciens.enib.fr> wrote:
> Ettore, All,
>
> On Thursday 21 April 2011 09:42:50 Ettore Campion wrote:
>> I just cloned the buildroot git repository (with your fixed applied)
>> and tried again.
>> With my configuration (glibc 2.9) is always missing ld.so.1 in target/lib.
>> This seems to me because in
>> toolchain/toolchain-crosstool-ng/crosstool-ng.mk we're looking for
>> ld-linux.so and nor for ld.so.
>
> The file should be named by its SONAME. Please run:
>  readelf -d ld.so.1 |grep SONAME

> That's why we usually care about ld-linux.so, and not ld.so.1.
>
> What is requiring ld.so.1 on your target?
>
>
> Quoting your original post:
>> flashing the generated
>> rootfs.jjfs2 led me to a "kernel panic - not syncing: no init found"
>> message from the kernel.
>
> Read below, and then run:
>  readelf -d /sbin/init
>
>> Taking again a look to crosstool-ng.mk and target/lib I noticed that
>> was missing ld.so.1, manually adding the lib to target/lib I got rid
>> of the missing init message but in the serial console I do not see
>> either any daemons starting nor the login prompt (I got all these
>> things with a rootfs created selecting a buildroot-uclibc toolchain);
>                                                     ^^^^^^
> [--SNIP--]
>> drwxr-xr-x  2 tora tora    4096 2011-04-14 22:47 .
>> drwxr-xr-x 16 tora tora    4096 2011-04-14 22:19 ..
>> -rwxr-xr-x  1 tora tora  164040 2011-04-14 22:28 ld-2.9.so
>                                                   ^^^^^^^^^
> This is not a uClibc library. It is a glibc library.
> Ditto for all the others.
>
> Did you mix binaries built with uClibc with others built with
> glibc?
>
> Once you have started to run buildroot, and that the toolchain is built,
> and the first program is ./configured, it is not possible to switch to
> another C library.
>
> If you need to change the C library, you'll have to restart from scratch.
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-04-22 10:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-15 20:14 [Buildroot] Problems using buildroot with crosstoll-ng Ettore Campion
2011-04-15 22:55 ` Charles Krinke
2011-04-17  7:58   ` Ettore Campion
2011-04-15 23:04 ` ANDY KENNEDY
2011-04-17  8:08   ` Ettore Campion
2011-04-17 15:40 ` Yann E. MORIN
2011-04-19 21:01   ` Peter Korsgaard
2011-04-21  7:42   ` Ettore Campion
2011-04-21 14:28     ` Yann E. MORIN
2011-04-22 10:30       ` Ettore Campion

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox