文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>INSTALLATION OF SBOX2 ON UBUNTU 8.04

INSTALLATION OF SBOX2 ON UBUNTU 8.04

时间:2009-06-25  来源:iibull

Trouble running maemo's scratchbox under Ubuntu Hardy?
I’ve been having trouble running scratchbox after upgrading to hardy. I’ve finally found some workarounds for the issues that creep up.

  • For the Inconsistency detected by ld.so: rtld.c: 1192: dl_main: Assertion ‘(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso’ failed! problem, it’s necessary to disable “vdso”:
    echo 0 | sudo tee /proc/sys/vm/vdso_enabled

  • For problems when building packages (mmap: permission denied when building), it’s necessary to reduce the mmap minimum address:
    echo 4096 | sudo tee /proc/sys/vm/mmap_min_addr



Update: (Thanks to colinleroy):

...to make these changes permanent across reboots, one can add these settings to /etc/sysctl.conf:

vm.vdso_enabled = 0
vm.mmap_min_addr = 4096

Then run
sudo sysctl -p


Sbox2 Ubuntu Tutorial

Contents

[hide]
  • 1 INSTALLATION OF SBOX2 ON UBUNTU 8.04
    • 1.1 1. Packages
    • 1.2 2. Directories
    • 1.3 3. Scratchbox installation
    • 1.4 4. Qemu
    • 1.5 5. PATH variable
    • 1.6 6. Target armle
      • 1.6.1 6.1 Toolchain
      • 1.6.2 6.2 Rootfs
      • 1.6.3 6.3 Configuration
      • 1.6.4 6.4 Remove warnings
    • 1.7 7. List of commands
    • 1.8 8. Configuration of Laika Plugin for Eclipse
[edit]

INSTALLATION OF SBOX2 ON UBUNTU 8.04

This is a step-by-step guide about how to install Scratchbox2 on Ubuntu 8.04.


[edit]

1. Packages

The installation requires the following packages:

  • autoconf
  • autogen
  • automake
  • autotools-dev
  • binutils
  • fakeroot
  • gcc-3.4 (needed by Qemu)
  • git-core
  • g++
  • libsdl1.2-dev (needed by Qemu)
  • make
  • sbrsh
  • subversion (needed for Qemu)

So, type:

sudo apt-get install autoconf autogen automake autotools-dev binutils fakeroot gcc-3.4 git-core g++ libsdl1.2-dev make sbrsh subversion 

We're going to install a custom version of Qemu, so remove any existing version of Qemu by typing:

sudo apt-get --purge remove qemu


[edit]

2. Directories

$ rm -fr $HOME/sbox2 $HOME/.scratchbox2

$ mkdir -p $HOME/sbox2 $HOME/sbox2/bin $HOME/sbox2/bin/qemu $HOME/sbox2/rootfs/armle $HOME/sbox2/src


[edit]

3. Scratchbox installation

$ cd $HOME/sbox2/src

$ git clone git://anongit.freedesktop.org/git/sbox2

$ cd sbox2

$ ./autogen.sh

$ ./configure --prefix=$HOME/sbox2/bin/scratchbox

$ make install

Edit $HOME/sbox2/bin/scratchbox/bin/sb2-build-libtool and add

--host=i386

to to the "./configure" command.

Edit $HOME/sbox2/bin/scratchbox/bin/sb2-init and remove the option

-Wno-poison-system-directories

from the SBOX_EXTRA_CROSS_COMPILER_ARGS variable.


[edit]

4. Qemu

Download Qemu:

$ cd $HOME/sbox2/src

$ svn co svn://svn.savannah.nongnu.org/qemu

Armeb support in Qemu does not work properly. To make it work a bit better, open the qemu/trunk/linux-user/syscall_defs.h file and change

 abi_ulong st_blocks; /* Number 512-byte blocks allocated. */
abi_ulong __pad4; /* future possible st_blocks high bits */

to

#ifndef TARGET_WORDS_BIGENDIAN
abi_ulong st_blocks; /* Number 512-byte blocks allocated. */
abi_ulong __pad4; /* future possible st_blocks high bits */
#else
abi_ulong __pad4; /* future possible st_blocks high bits */
abi_ulong st_blocks; /* Number 512-byte blocks allocated. */
#endif


Then, install Qemu:

$ cd qemu/trunk/

$ ./configure --prefix=$HOME/sbox2/bin/qemu/

$ make

$ make install
[edit]

5. PATH variable

Edit $HOME/.bashrc and append at the end of the file the following line:

export PATH=$PATH:$HOME/sbox2/bin/scratchbox/bin:$HOME/sbox2/bin/qemu/bin

Close and re-open the console.

[edit]

6. Target armle


[edit]

6.1 Toolchain

We get the toolchain from Codesourcery:

$ cd $HOME/sbox2/src

$ wget http://www.codesourcery.com/gnu_toolchains/arm/portal/package1787/public/arm-none-linux-gnueabi/arm-2007q3-51-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

$ tar -xvjf arm-2007q3-51-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 -C $HOME/sbox2/bin/
[edit]

6.2 Rootfs

$ cd $HOME/sbox2/src

$ wget http://repository.maemo.org/stable/diablo/armel/maemo-sdk-rootstrap_4.1_armel.tgz

$ tar -xvzf maemo-sdk-rootstrap_4.1_armel.tgz -C $HOME/sbox2/rootfs/armle


[edit]

6.3 Configuration

$ cd $HOME/sbox2/rootfs/armle

$ sb2-init armle $HOME/sbox2/bin/arm-2007q3/bin/arm-none-linux-gnueabi-gcc


[edit]

6.4 Remove warnings

Since the toolchain is from CodeSourcery, we have to edit $HOME/.scratchbox2/armle/sb2.config and add the option

-Wno-poison-system-directories

to the SBOX_EXTRA_CROSS_COMPILER_ARGS variable.


[edit]

7. List of commands

  • sb2 to enter sbox2
  • sb2 <command> to execute a command in sbox2
  • sb2 -t <target> to switch target
  • sb2-config -l to have the list of targets
  • sb2-config -d <target> to set default target


[edit]

8. Configuration of Laika Plugin for Eclipse

  • Sandbox directory:
$HOME/sbox2/workspace
  • Invoking Scratchbox commands:
cd $HOME/sbox2/workspace${directory} ; sb2 `echo ${command} | sed 's|${directory}|.|g'` ${args}
  • Listing build targets:
directory=none; sb2-config -l
  • The syntax for choosing a build target:
sb2-config -d ${target}
文件: 应用Scratchbox构建基于CF卡的嵌入式linux系统.doc.rar
大小: 14KB
下载: 下载
排行榜 更多 +
单挑幸存者安卓版

单挑幸存者安卓版

飞行射击 下载
决战战地指挥官

决战战地指挥官

飞行射击 下载
鸡仔幸存者最新版

鸡仔幸存者最新版

飞行射击 下载