Cannot execute ARM binary in scratchbox

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 19, 2007 at 03:18:29PM +0530, Sharath Mudalamane wrote:
> I am trying to execute an arm binary on 386 using qemu-arm.  I am unable to
> execute the binary generated. Can anyone who is familiar with this, help me?
> Please, see the logs to know what I have done. Please, correct me if have
> missed anything.
...
> scratchbox-core-1.0.7-i386.tar.gz
> scratchbox-libs-1.0.7-i386.tar.gz
> scratchbox-toolchain-cs2005q3.2-glibc-arm-1.0.5-i386.tar.gz
> scratchbox-devkit-cputransp-1.0.3-i386.tar.gz
...
> To setup TARGET (N800), I took guidance from
> 
> http://scratchbox.org/documentation/docbook/tutorial.html

There was once an install script at
http://repository.maemo.org/stable/bora/maemo-sdk-install_3.0.sh
that made the process easier, but now it's gone, and I don't see a
easier way.  Or perhaps there's a newer version than 3.0, wasn't 3.1
released a while ago?

*checks*

Yes it was, and the installer script is at
http://repository.maemo.org/stable/3.1/maemo-scratchbox-install_3.1.sh

The Maemo 3.2 SDK install instructions
(http://repository.maemo.org/stable/3.2/INSTALL.txt) say that you need
to have 3.1 installed first, and only then you can upgrade.  Which to me
seems like a silly way to do things, but what do I know?

Anyway, I'd suggest following the Maemo SDK instructions.

Disclaimer: The rest of this email is based on my personal experience
with Maemo 3.0 and 2.1.  Things might have changed in newer SDK
versions.

> [sbox-dummy: ~] > sb-conf setup N800 -c cs2005q3.2-glibc-arm -t qemu-arm
> 
> sb-conf: No such CPU-transparency method: 'qemu-arm'.

You want something like

  sb-conf setup N800 --compiler=cs2005q3.2-glibc-arm --devkits=cputransp:debian --cputransp=qemu-arm-0.8.1-sb2

> Perhaps you forgot to select the devkit which includes it.
> 
> [sbox-dummy: ~] > sb-conf setup N800 -c cs2005q3.2-glibc-arm -d cputransp -t
> qemu-arm

You'll also need the debian devkit to build N800 packages.

I don't know if -t qemu-arm will work, or if you need to be more
specific.

> [sbox-dummy: ~] > sb-conf select N800
> Shell restarting...
> [sbox-N800: ~] > sb-conf install -c

With older Maemo versions you had to do things like

  sb-conf rootstrap Maemo_Dev_Platform_v2.1_armel-rootstrap.tgz
  sb-conf install --etc --devkits --fakeroot

I wouldn't be surprised if it's the rootstrap that contains
ld-linux.so.3 that seems to be missing from your scratchbox target:

> [sbox-N800: ~] > cd programs/
> [sbox-N800: ~/programs] > gcc -Wall hello.c -o arm-hello
> [sbox-N800: ~/programs] > file arm-hello
> arm-hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux
> 2.4.17, dynamically linked (uses shared libs), not stripped
> [sbox-N800: ~/programs] > ./arm-hello
> /lib/ld-linux.so.3: No such file or directory

Marius Gedminas
-- 
<AdamV> SamB: PHP's basic control structure is the "database 
        timeout error".                       -- from Twisted.Quotes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.maemo.org/pipermail/maemo-users/attachments/20071019/610448da/attachment.pgp 


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Big List of Linux Books]    

  Powered by Linux