FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Mobile and Embedded

 
 
LinkBack Thread Tools
 
Old 11-18-2007, 07:22 PM
Loc Minier
 
Default Building packages for chinook/armel in scratchbox2

Hi there,

UME is based on maemo.org software and they just released 4.0
"chinook": I wanted to give it a try, and in general I am interested
in being able to run some upstream source code as downloaded from
garage.maemo.org projects (or even running arm binaries directly).
The scratchbox2 package just landed in Ubuntu after the big sync from
Debian, here are my notes on using it; I hope this is useful to others.

0) install scratchbox2 with your favorite package manager

1) download a rootstrap; for example you can get the chinook / 4.0
rootstrap for armel from the maemo archive:
wget http://repository.maemo.org/stable/4.0/armel/maemo-sdk-rootstrap_4.0_armel.tgz
(NB: this will 401 if you're behind a HTTP proxy [1])

2) download a toolchain; scratchbox2's README recommends toolchains
from CodeSourcery:
http://www.codesourcery.com/gnu_toolchains/arm/download.html
make sure you select "ARM GNU/Linux" (it is EABI); the "ARM EABI" is
not currently supported by the CPU emulator used by scratchbox2 (qemu)
and you'll get segfaults from the resulting binaries if you try to
combine these.

3) extract the rootstrap in the root of your choice, e.g.
~/chroots/maemo:
mkdir -p ~/chroots/maemo
tar -C ~/chroots/maemo -xvzf ~/maemo-sdk-rootstrap_4.0_armel.tgz

4) make the toolchain available from somewhere e.g. ~/toolchains/arm:
mkdir -p ~/toolchains
tar -C ~/toolchains -xvjf
~/arm-2007q3-51-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
cd ~/toolchains
ln -s arm-2007q3 arm

5) create a scratchbox2 profile, for example "maemo", pointing at your
root and your toolchain:
cd ~/chroots/maemo
sb2-init maemo ~/toolchains/arm/bin/arm-none-linux-gnueabi-gcc
this should build libtool for your toolchain (stored in your profile at
~/.scratchbox2/maemo/lib) and complete with "sb2-init completed
successfully".


Installation is complete, and the first profile being the default
profile you can simply launch "sb2" and it should start a shell where
arm binaries are transparently runnable, but you can still use your
host's file and binaries:
sb2 bash -version
GNU bash, version 3.2.25(1)-release (i486-pc-linux-gnu)
Copyright 2005 Free Software Foundation, Inc.

=> that's the Ubuntu one. "sb2 -e" will fully emulate CPU and file
accesses so:
sb2 -e bash -version
GNU bash, version 2.05b.0(1)-release (arm-unknown-linux-gnueabi)
Copyright (C) 2002 Free Software Foundation, Inc.

=> that's the maemo one.

It's then trivial to build packages within scratchbox2. I built
fakeroot for armel thanks to scratchbox2 (simply run debuild from sb2),
but then I did not manage to install it with the host's or the chroot's
dpkg. So I can build and run armel programs, but only for the most
current system calls.

Bye,

[1] https://bugs.maemo.org/show_bug.cgi?id=798
https://bugs.maemo.org/show_bug.cgi?id=1896
--
Loc Minier

--
Ubuntu-mobile mailing list
Ubuntu-mobile@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile
 
Old 11-19-2007, 02:16 AM
"Lauro Moura"
 
Default Building packages for chinook/armel in scratchbox2

On Nov 18, 2007 5:22 PM, Loc Minier <loic.minier@ubuntu.com> wrote:
> 2) download a toolchain; scratchbox2's README recommends toolchains
> from CodeSourcery:
> http://www.codesourcery.com/gnu_toolchains/arm/download.html
> make sure you select "ARM GNU/Linux" (it is EABI); the "ARM EABI" is
> not currently supported by the CPU emulator used by scratchbox2 (qemu)
> and you'll get segfaults from the resulting binaries if you try to
> combine these.
>

Maybe using this [1] unofficial version of Qemu can help.

"The use of the new ARM ABI (EABI) is increasing, but the upstream
version of Qemu doesn't support it yet. Many people have contributed
with patches that are scattered around the web. So, it's important to
keep these patches up to date with Qemu Head while it still doesn't
support the ARM EABI."

[1] - http://qemu-arm-eabi.wiki.sourceforge.net/

--
Lauro Moura ("lmoura" on Freenode)
http://lauro.wordpress.com
--
Ubuntu-mobile mailing list
Ubuntu-mobile@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile
 

Thread Tools




All times are GMT. The time now is 07:44 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org