zoukankan      html  css  js  c++  java
  • 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

查看全文
  • 相关阅读:
    c/c++ 传统数组的缺点
    在Eclipse中搭建C/C++环境
    web服务编码设置
    锋利的jQuery学习总结
    SQL调优常用方法
    C#(KeyChar和KeyCord值,KeyDown/KeyPress事件区别)
    winform 屏蔽 空格键
    $.ajax与$.post、$.get的一点区别
    jquery $.ajax $.get $.post的区别?
    $(function() {}),即$(document).ready(function(),什么时候执行?以此为准
  • 原文地址:https://www.cnblogs.com/cute/p/2285209.html
  • Copyright © 2011-2022 走看看