ubuntu16.04环境下载scratchbox2

背景介绍:scratchbox2是很好的交叉编译工具,ubuntu10.04发布时使用sudo apt-get install scratchbox2很容易就下载并安装好。时至今日,scratchbox2源已经消失,因此我们从git下载。

1. 下载git工具

sudo apt-get install git

2. 通过git下载scratchbox2

git clone https://git.merproject.org/mer-core/scratchbox2

实际上链接的是 git clone https://git.sailfishos.org/mer-core/scratchbox2.git

下载完毕,切换到目录下的scratchbox2/scratchbox2

如果Ubuntu没有安装debhelper与autoconf,请通过下面的命令进行安装(稍后编译scratchbox2的命令dpkg-buildpackage -rfakeroot会用到)

sudo apt-get install debhelper

sudo apt-get install autoconf

然后执行dpkg-buildpackage -rfakeroot,最后有告警与报错,暂时不用管。

回到上级目录,cd ..会发现生成了libsb2_2.3.90_i386.deb与scratchbox2_2.3.90_i386.deb

执行下面的命令

sudo dpkg -i libsb2*deb

sudo dpkg -i scratchbox2*.deb

这样scratchbox2就安装好了,测试方法:输入sb2-init回车。

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

sudo apt-get install qemu-kvm用于安装qemu

将交叉编译环境压缩包解压缩到/xxx/xxx/xxxx/gcc-4.3.2-glibc-2.7

sudo sb2-init -c /usr/bin/qemu-arm arm /xxx/xxx/xxxx/gcc-4.3.2-glibc-2.7/bin/arm-vfp-linux-gnu-gcc

出现"sb2-init completed successfully, have fun!"表示成功

 

posted @ 2020-03-27 15:13  zhangxiuyuan  阅读(547)  评论(0编辑  收藏  举报