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
-- 
Loïc Minier

-- 
Ubuntu-mobile mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile

Reply via email to