|
|
| Line 70: |
Line 70: |
| </pre> | | </pre> |
|
| |
|
| == Switch into chroot and perform basic setup == | | == Setup Scratchbox 2 around installed toolchain and dev rootfs == |
|
| |
|
| <pre> | | <pre> |
| sudo chroot $CHROOTPATH su - "`whoami`"
| | # Install sbox2 with: |
| </pre>
| |
| | |
| ==== Set up the /etc/apt/sources.list inside the chroot : ====
| |
| <pre>
| |
| sudo su -c 'echo "# Squeeze cross sources list
| |
| deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free
| |
| deb http://www.emdebian.org/debian squeeze main
| |
| deb [arch=i386] http://ftp.fi.debian.org/debian/ squeeze main contrib non-free
| |
| deb [arch=armel] http://ftp.fi.debian.org/debian/ squeeze main contrib non-free
| |
| deb-src http://ftp.fi.debian.org/debian/ squeeze main contrib non-free
| |
| " > /etc/apt/sources.list'
| |
| </pre>
| |
| | |
| ==== In /etc/apt/apt.conf.d/10local disable installing recommends: ====
| |
| <pre>
| |
| sudo su -c 'echo "APT::Install-Recommends \"0\";
| |
| APT::Install-Suggests \"0\";" > /etc/apt/apt.conf.d/10local'
| |
| sudo apt-get update
| |
| </pre>
| |
|
| |
|
| ==== Install toolchain and essentials ====
| | sudo apt-get install scratchbox2 |
| <pre>
| |
| sudo apt-get update
| |
| sudo apt-get install apt-utils xapt g++-4.4-arm-linux-gnueabi build-essential pkg-config unzip zip autoconf2.13 gdb-arm-linux-gnueabi -y --force-yes | |
| </pre>
| |
|
| |
|
| ==== Create cross arm pkg-config:====
| | # or use these instructions: |
| <pre>
| | # http://russelldavis.org/2011/09/07/setting-up-scratchbox2-from-scratch-for-the-raspberry-pi/ |
| echo '#!/bin/sh
| |
| triplet=`basename $0 | sed -e "s:-pkg-config::"`
| |
| PKG_CONFIG_LIBDIR=/usr/${triplet}/lib/pkgconfig pkg-config $@
| |
| ' > /tmp/arm-linux-gnueabi-pkg-config
| |
| sudo mv /tmp/arm-linux-gnueabi-pkg-config /usr/local/bin/arm-linux-gnueabi-pkg-config
| |
| sudo chmod a+x /usr/local/bin/arm-linux-gnueabi-pkg-config
| |
| </pre> | | </pre> |
|
| |
|
| ==== Add some useful packages for development environment ==== | | ==== Initialize sb2 config ==== |
| <pre>
| |
| sudo apt-get install automake libtool debhelper mercurial git-core openssh-client wget -y --force-yes
| |
| </pre>
| |
|
| |
|
| ==== Setup mercurial config ====
| |
| <pre> | | <pre> |
| echo "[ui]
| | cd $CHROOTPATH |
| username = UserName
| | sb2-init Raspi /opt/cross/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc |
| [extensions]
| | sb2-config -d Raspi |
| hgext.mq =
| |
| hgext.color =
| |
| hgext.graphlog =
| |
| hgext.rebase =
| |
| " > ~/.hgrc
| |
| </pre> | | </pre> |
|
| |
|