aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-10-04 16:45:22 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-10-04 16:45:22 -0300
commit1814b00dfc475545b83b7a5ada15f49946a17512 (patch)
treea15bff6d141ae1e54de017a285b8cdd765198295
parentf7f37465059c995a32ef7242f4d2e0dee17d2e11 (diff)
downloaddebian-1814b00dfc475545b83b7a5ada15f49946a17512.tar.gz
debian-1814b00dfc475545b83b7a5ada15f49946a17512.tar.bz2
Crosscompilation
-rw-r--r--cross.md71
-rw-r--r--index.md1
2 files changed, 72 insertions, 0 deletions
diff --git a/cross.md b/cross.md
new file mode 100644
index 0000000..eb8f79a
--- /dev/null
+++ b/cross.md
@@ -0,0 +1,71 @@
+# Crosscompilation
+
+* [BuildingCrossCompilers - Debian Wiki](http://wiki.debian.org/BuildingCrossCompilers).
+* [EmdebianToolchain - Debian Wiki](http://wiki.debian.org/EmdebianToolchain).
+* [EmDebian/CrossDebootstrap - Debian Wiki](http://wiki.debian.org/EmDebian/CrossDebootstrap).
+* [QemuUserEmulation - Debian Wiki](http://wiki.debian.org/QemuUserEmulation).
+* [software development - How do I build a GCC 4.7 toolchain for cross-compiling? - Raspberry Pi Stack Exchange](http://raspberrypi.stackexchange.com/questions/1/how-do-i-build-a-gcc-4-7-toolchain-for-cross-compiling).
+* [ARM cross-compiling howto - K's cluttered loft](http://www.ailis.de/~k/archives/19-arm-cross-compiling-howto.html).
+* [Debian ARM Cross-compile - Manuals](http://wiki.micromint.com/index.php/Debian_ARM_Cross-compile).
+* [How to cross-compile Git for ARM?](http://stackoverflow.com/questions/15516168/how-to-cross-compile-git-for-arm).
+* [Allow to compile with Debian/Ubuntu ARM toolchain · Issue #34 · libopencm3/libopencm3](https://github.com/libopencm3/libopencm3/issues/34).
+
+## Configuração básica
+
+ (0) [20130426 13:37:57] vagrant@vagrant-debian-wheezy:~ $ cat /etc/apt/sources.list.d/emdebian.list
+ #
+ # -- Emdebian cross toolchains
+ #
+ # deb http://www.emdebian.org/debian/ unstable main
+ # deb http://www.emdebian.org/debian/ testing main
+ deb http://www.emdebian.org/debian wheezy main
+ (0) [20130426 13:38:12] vagrant@vagrant-debian-wheezy:~ $
+
+ (0) [20130426 13:38:12] vagrant@vagrant-debian-wheezy:~ $ cat /etc/apt/sources.list.d/squeeze.list
+ deb http://http.debian.net/debian/ squeeze main contrib non-free
+ deb-src http://http.debian.net/debian/ squeeze main contrib non-free
+ (0) [20130426 13:38:44] vagrant@vagrant-debian-wheezy:~ $
+
+## Exemplo: git
+
+Instalando as dependências do git:
+
+ xapt -a armel -m asciidoc comerr-dev cvs cvsps docbook-xml docbook-xsl krb5-multidev libapr1 libaprutil1 libcurl4-gnutls-dev libdbd-sqlite3-perl libdbi-perl libexpat1-dev libgcrypt11-dev libgnutls-dev libgnutls-openssl27 libgnutlsxx27 libgpg-error-dev libidn11-dev libkadm5clnt-mit8 libkadm5srv-mit8 libkdb5-6 libkrb5-dev libldap2-dev libneon27-gnutls libnet-daemon-perl libp11-kit-dev libplrpc-perl librtmp-dev libssh2-1-dev libsvn-perl libsvn1 libtasn1-3-dev libxml2-utils libxslt1.1 libyaml-perl pkg-config sgml-data subversion xmlto xsltproc zlib1g-dev libssl-dev
+
+Tentando compilar com a [seguinte instrução](https://www.olimex.com/forum/index.php?topic=496.0):
+
+ ./configure --build=arm --host=arm-linux-gnueabi
+ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi install prefix=$(pwd)/../destdir/
+
+## Criando um toolchain
+
+Primeiro, como `root`, vamos criar o chroot:
+
+ mkdir -p /var/chroot
+ debootstrap --verbose --arch armel --foreign wheezy /var/chroot/wheezy-armel http://ftp.debian.org/debian
+ cp /usr/bin/qemu-arm-static /var/chroot/wheezy-armel/usr/bin/
+ DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
+ LC_ALL=C LANGUAGE=C LANG=C chroot /var/chroot/wheezy-armel /debootstrap/debootstrap --second-stage
+
+Opcionalmente, dê permissão ao usuário comum:
+
+ chown -R vagrant. /var/chroot/wheezy-armel
+
+Como usuário comum:
+
+ cd /var/chroot/wheezy-armel
+ sb2-init -n -m emulate -c /usr/bin/qemu-arm wheezy-armel "arm-linux-gnueabi-gcc"
+
+## Referências
+
+Script [provision-chroot](https://git.fluxo.info/hydra/tree/share/hydractl/provision-chroot).
+* [Set up sb2 with armel debootstrap - maemo.org - Talk](http://talk.maemo.org/showthread.php?t=83713).
+* [Installing scratchbox 1 and 2 for ARM cross-compilation | Felipe Contreras](https://felipec.wordpress.com/2009/06/07/installing-scratchbox-1-and-2-for-arm-cross-compilation/).
+* [MobileRead Wiki - Boox M92 Development with Scratchbox2](http://wiki.mobileread.com/wiki/Boox_M92_Development_with_Scratchbox2).
+* [Cross Compile environment using debootstrap and scratchbox2 | Rogerio Moraes](http://rogeriomoraes.com/wp/?p=41).
+* [Using scratchbox2 and Ubuntu 11.10 | Hamilton Vera](https://hvera.wordpress.com/2011/12/07/using-scratchbox2/).
+* [Setting up Scratchbox2 to build software for zubuntu « Executing Gummiworms](http://russelldavis.org/2010/10/20/setting-up-scratchbox2-to-build-software-for-zubuntu/).
+
+## Problemas encontrados
+
+* [debootstrap --second-stage fails because of /dev/ mapping](http://comments.gmane.org/gmane.comp.compilers.scratchbox.user/1420).
diff --git a/index.md b/index.md
index 9106e1e..a829e1b 100644
--- a/index.md
+++ b/index.md
@@ -19,6 +19,7 @@ Index
* [Checking sources](checking).
* [Building](building).
* [Repositories](repositories).
+* [Cross compilation](cross).
* [References](references).
* [TODO](todo).
* Custom procedures: