Scratchbox2安装配置

 

主要参考文档:

http://biffengineering.com/wiki/index.php?title=HowToSetupCrossCompileEnvironment

http://www.freeworkzz.com/html/2010/07/scratchbox2%E7%9A%84readme%E7%BF%BB%E8%AF%91.html 里面的链接 2 old 了

http://maemo-sdk.garage.maemo.org/sb2-man.html  sb2 man

--------------------------------------------------------------------------------------------------------------------------

sudo apt-get install mercurial bison flex texinfo libtool build-essential libncurses-dev

安装zlib

apt-get install zlib1g-dev

apt-get install libglib2.0-dev

apt-get install realpath

 

mkdir –p ~/sbox2/src/

cd ~/sbox2/src/

下载:

git被防火墙屏蔽,用https下载,主页http://maemo.gitorious.org/scratchbox2

git clone https://git.gitorious.org/scratchbox2/scratchbox2.git

 

编译Scratchbox2:

cd scratchbox2

./autogen.sh

make install prefix=$HOME/sb2

 

下载qemu:http://wiki.qemu.org/Download

mkdir –p ~/qemu/src/

~/qemu# git clone https://github.com/qemu/QEMU.git

cd QEMU

./configure --prefix=$HOME/sb2 --target-list=arm-linux-user

make && make install

 

mkdir $HOME/buildroot
cd $HOME/buildroot

cp -a ../cross/arm-mv5sft-linux-gnueabi/sys-root/{lib,etc,usr} .

 

sb2-init marvell arm-mv5sft-linux-gnueabi-gcc

发现ldconfig 失败,所以拷贝sbin目录过来(里面有ldconfig)

cp -a ../cross/arm-mv5sft-linux-gnueabi/sys-root/sbin .

sb2-init marvell arm-mv5sft-linux-gnueabi-gcc

……

sb2-init completed successfully, have fun!

 

sb2登陆内部使用:
root@james-desktop:~/buildroot# sb2

gcc hello.c –o hello

 

sb2外面使用:

$ sb2 gcc -o hello hello.c
$ sb2 ./hello
Hello, World!

 

 

sb2 ./configure

sb2 make

sb2 -eR make install

sb2 -R -m emulate make install

 

 

~/sbox2/src/scratchbox2/docs# man ./sb2.1

MAPPING MODES

There are three development-oriented modes, that are intended for cross-compilation:

3个开发模式,用来交叉编译

"simple"  makes  only  the  very  basic  modifications  to  the  file  environment:  For  example, /usr/include refers to
/usr/include in the target root file system, not to the real /usr/include of the host (and  the  same  applies  to  /lib,
/usr/lib, and many other directories).  Typical toolchain commands, i.e. commands that are used to create binary programs
(like gcc, as and ld) refer to tools that were supplied with the the cross-compiler which was  configured  with  sb2-init
(also when used with full pathname: /usr/bin/gcc, /usr/bin/as, etc)

simple根文件用的是target root,工具链用的是配置的工具链(如arm的),其他的工具来自主机。

The  "simple" mode usually takes other tools directly from the host OS.  This approach means that simple tools work fine,
and well-behaving OSS projects can be compiled with the "simple" mode. The drawback is that there are some  cases,  where
such a simple approach fails.

 

 

 

apt-get install debootstrap

debootstrap --verbose --arch armel --foreign lenny  rootfs/armel/ http://ftp.at.debian.org/debian

这个不知道怎么用??

发现mount上去这个根文件可以用。

 

构建ubuntu根文件:

http://www.plugcomputer.org/plugwiki/index.php/Ubuntu_9.0.4_Plug_Computer_Distribution

https://wiki.ubuntu.com/ARM/RootfsFromScratch

apt-get install rootstock

rootstock -f ubuntu -l james -p 123 -d lucid --serial ttyS0

rootstock --seed option problem:可以添加安装包 https://answers.launchpad.net/project-rootstock/+question/153564

root@james-desktop:~# du -hs *
77M armel-rootfs-201112131534.tgz

但是通过nfs运行ubuntu根文件时候发现segment fault,运行不了。

-------------------------------------------------------------------------------------------------------------

 

参考:

lenny 是debian的版本代号:http://blog.sina.com.cn/s/blog_4d31d83201011t5p.html

ubuntu的版本号:http://zh.wikipedia.org/wiki/Ubuntu

Ubuntu 9.10 - Karmic Koala (幸运的 无尾熊) Ubuntu 10.04 - Lucid Lynx (清醒的 猞猁) Ubuntu 10.10 - Maverick Meerkat (标新立异的的 狐獴) Ubuntu 11.04 - Natty Narwhal (敏捷的 独角鲸) Ubuntu 11.10 - Oneiric Ocelot (有梦的 虎猫) Ubuntu 12.04 - Precise Pangolin (精准的 穿山甲
[编辑] 版本代号命名

Ubuntu版本的命名规则是根据正式版发行的年月命名,Ubuntu 8.10也就意味着2008年10月发行的Ubuntu,研发人员与用户可从版本号码就知道正式发布的时间。Ubuntu是基于Debian开发的Linux发行版,Debian的开发代号来自于电影玩具总动员,不过,Ubuntu各版本的代号却固定是形容词加上动物名称,而且这2个词的英文首字母一定是相同的。从Ubuntu 6.06开始,两个词的首字母按照英文字母表的排列顺序取用

 

armel解释:

The ARM EABI port is the default port in Debian for the ARM architecture, named armel. The old (OABI) port (named "arm") was last released with 5.0.x (Lenny). An even newer port targeted at newer hardware with another ABI ("armhf") is currently under development and is expected to ship with 7.0 (Wheezy) -

Armel (EABI) was released with Lenny as it was in good shape by then. That release thus contained both arm and armel. Arm was dropped in Squeeze.

armel就是eabi,arm是旧的oabi

http://wiki.debian.org/ArmEabiPort

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值