Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Illegal instruction when running some of the cross compiled binaries
@ 2011-01-11 12:25 Divick Kishore
  2011-01-11 13:45 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Divick Kishore @ 2011-01-11 12:25 UTC (permalink / raw)
  To: buildroot

Hi,
    I have built a custom root filesystem using build root, but
certain binaries (built with the packages selected during menuconfig)
when run give "Illegal Instruction".

# sshd
Illegal instruction

Having looked at the logs, the compiler flags used to build the binary
seems fine (-mtune=arm920t -march=armv4t -mabi=aapcs-linux
-msoft-float ) i.e. right for my H/W (ATMEL AT91RM9200).

1. Toolchain used CodeSourcery G++ Lite 2010.09-50
(arm-none-linux-gnueabi-gcc-4.5.1).
2. Linux kernel using the above mentioned toolchain.
3. Version of buildroot used is buildroot-2010.11.

Could anyone please suggest what is going wrong? It seems people have
similar kind of issue
(http://www.embeddedrelated.com/groups/AT91SAM/show/3547.php)
but the bug pointed for the issue doesn't seem to exist.

Another related issue that I see is that the pthreads libraries are
not copied in the rootfilesystem image from toolchain for some
reasons. Is it a known issue?

Thanks & Regards,
DivKis

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

* [Buildroot] Illegal instruction when running some of the cross compiled binaries
  2011-01-11 12:25 [Buildroot] Illegal instruction when running some of the cross compiled binaries Divick Kishore
@ 2011-01-11 13:45 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2011-01-11 13:45 UTC (permalink / raw)
  To: buildroot

Hello Divick,

On Tue, 11 Jan 2011 17:55:15 +0530
Divick Kishore <divick.kishore@gmail.com> wrote:

>     I have built a custom root filesystem using build root, but
> certain binaries (built with the packages selected during menuconfig)
> when run give "Illegal Instruction".
> 
> # sshd
> Illegal instruction
> 
> Having looked at the logs, the compiler flags used to build the binary
> seems fine (-mtune=arm920t -march=armv4t -mabi=aapcs-linux
> -msoft-float ) i.e. right for my H/W (ATMEL AT91RM9200).

During compilation yes, but at the link stage of sshd, the
-march=armv4t flag is missing. Therefore, some ARMv5-only code gets
added to the binary. Maybe we need to add -march=armv4t to the
TARGET_LDFLAGS, or some other trick. I haven't tested anything for the
moment, so feel free to experiment.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

end of thread, other threads:[~2011-01-11 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-11 12:25 [Buildroot] Illegal instruction when running some of the cross compiled binaries Divick Kishore
2011-01-11 13:45 ` Thomas Petazzoni

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