如何为ARM Raspberry Pi交叉编译debian包

如何为ARM Raspberry Pi交叉编译debian包,debian,raspberry-pi,cross-compiling,Debian,Raspberry Pi,Cross Compiling,我使用arm-bcm2708工具链进行交叉编译器 现在我想构建debian包 我出错了 我不想把它建立在pi上。那么如何在PC上交叉编译RPi debian包呢 第一种方法是使用与Raspberry Pi Debian相同的主机Debian分布。例如7.0。添加debhttp://www.emdebian.org/debian/ 主电源不稳定 到您的/etc/apt/sources。列出并安装工具链: apt-get update apt-get install emdebian-archive

我使用arm-bcm2708工具链进行交叉编译器

现在我想构建debian包

我出错了


我不想把它建立在pi上。那么如何在PC上交叉编译RPi debian包呢

第一种方法是使用与Raspberry Pi Debian相同的主机Debian分布。例如7.0。添加
debhttp://www.emdebian.org/debian/ 主电源不稳定
到您的
/etc/apt/sources。列出
并安装工具链:

apt-get update
apt-get install emdebian-archive-keyring
apt-get install gcc-4.7-arm-linux-gnueabihf g++-4.7-arm-linux-gnueabihf
apt-get install build-essential git debootstrap u-boot-tools
然后可以通过安装交叉编译的依赖项。也许您可以使用
dpkg buildpackage

备选方案:

您可以将包转换为使用,并使用生成deb文件。这种方法也适用于其他发行版,如openSuSe、Fedora

更新:


由于Emdebian发行版更新已停止,建议切换到较新的Debian版本并使用此功能。

“自2014年7月起,Emdebian发行版更新已停止。将不再有进一步的更新和稳定的发行版。”
... (ELF format: 'elf32-littlearm'; RPATH: '')
dpkg-shlibdeps: error: cannot continue due to the error above
Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
To help dpkg-shlibdeps find private libraries, you might need to set LD_LIBRARY_PATH.
apt-get update
apt-get install emdebian-archive-keyring
apt-get install gcc-4.7-arm-linux-gnueabihf g++-4.7-arm-linux-gnueabihf
apt-get install build-essential git debootstrap u-boot-tools