【发布时间】:2011-11-08 22:05:35
【问题描述】:
我目前正在使用 Scratchbox2 进行交叉编译。我可以从我的工具链提示中执行./configure、make install:
[SB2 mapping-armv7 armv7]
有没有办法在使用apt-get install时进行交叉编译?
【问题讨论】:
标签: linux command-line cross-compiling apt-get scratchbox
我目前正在使用 Scratchbox2 进行交叉编译。我可以从我的工具链提示中执行./configure、make install:
[SB2 mapping-armv7 armv7]
有没有办法在使用apt-get install时进行交叉编译?
【问题讨论】:
标签: linux command-line cross-compiling apt-get scratchbox
dpkg-buildpackage -us -uc -aarmel
但是:Debian(还)不完全适合轻松交叉编译每个包。创建包时考虑了本机编译。 Debian 甚至不包含任何交叉编译器。如果您仍然想进行交叉编译,那么使用 Debian 最简单的方法是添加 emdebian 存储库。例如:
apt-get install emdebian-archive-keyring
echo deb http://www.emdebian.org/debian/ squeeze main >> /etc/apt/sources.list
apt-get update
apt-get install gcc-4.4-arm-linux-gnueabi
export ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
但是对于大多数软件包,您会遇到可能难以修复的问题,因此我建议您运行 qemu 或在目标平台上本地构建。
如果您仍然想进行交叉编译,请考虑在 irc.debian.org 加入 #emdebian 或订阅 debian-embedded 邮件列表。这些人有兴趣在 Debian 中引入更好的交叉编译支持。
【讨论】: