Scratchbox on Ubuntu Hardy troubleshooting

Posted on Mon 21 April 2008 in Maemo (EN) • Tagged with maemo, nokia, scratchbox, SDK, tablet

Yesterday I upgraded from Ubuntu 7.10 to the new 8.04 RC and I "broke" my Scratchbox installation. I tried to install it again and I had still some problems logging into Scratchbox and installing the SDK.

The I found this page: http://suppressingfire.livejournal.com/35277.html

that explain how to fix these problems. In particular if you get this kind of error trying to log into Scratchbox:

Inconsistency detected by ld.so: rtld.c: 1192: dl_main: Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!

You can fix it in this way:

echo 0 | sudo tee /proc/sys/vm/vdso_enabled

You can read the complete fix in my updated wiki: http://www.ptlug.org/wiki/Howto_Installing_Maemo_SDK_4


Installing qemu-arm-eabi patch into Scratchbox

Posted on Fri 16 November 2007 in HowTo, Linux, Maemo (EN), Programmazione • Tagged with maemo, qemu, scratchbox, SDK

Using Scratchbox and in particular the Maemo SDK with ARMEL target, very often when we try to execute some application we can get into this kind of errors (for example):

sem_post: Function not implemented

This happens because not all the functions have been implemented in the emulated environment.[ Lauro VenĂ¢ncio]{style="font-weight: bold;"} has created a patched version of qemu-arm called [qemu-arm-eabi].

Thanks to Marcelo Lira, we have a simple howto to install the patch into the Scratchbox environment.

Note: you have to execute these commands from outside the Scratchbox environment and you should not be logged into the environment at the same time.

You need gcc 3.4, SDL dev library andZlib dev:

sudo apt-get install gcc-3.4 libsdl1.2-dev zlib1g-dev

Get the patched qemu-arm. Notice that the patches are already applied, everything is here, and you don't need to get the qemu sources.

svn co https://qemu-arm-eabi.svn.sourceforge.net/svnroot/qemu-arm-eabi qemu-arm-eabi 
cd qemu-arm-eabi 
./configure --target-list=arm-linux-user --static make

Copy qemu to the cputransp dir on scratchbox:

sudo cp arm-linux-user/qemu-arm /scratchbox/devkits/cputransp/bin/qemu-arm-eabi-sb2

Add it to the list of cputransp methods. Open the file:

sudo vim /scratchbox/devkits/cputransp/etc/cputransp-methods

and add this line:

qemu-arm-eabi-sb2

Configure the target to use the patched qemu as transparency method. Edit the file:

vim /scratchbox/users/USERNAME/targets/CHINOOK_ARMEL.config

and change this line:

SBOX_CPUTRANSPARENCY_METHOD=/scratchbox/devkits/cputransp/bin/qemu-arm-eabi-sb2

That's all! You're now ready to log again into your Scratchbox environment.