Mobile/Fennec/RaspberryPi: Difference between revisions
Jump to navigation
Jump to search
| Line 70: | Line 70: | ||
</pre> | </pre> | ||
== | == Setup Scratchbox 2 around installed toolchain and dev rootfs == | ||
<pre> | <pre> | ||
# Install sbox2 with: | |||
sudo apt-get install scratchbox2 | |||
sudo apt-get install | |||
# or use these instructions: | |||
# http://russelldavis.org/2011/09/07/setting-up-scratchbox2-from-scratch-for-the-raspberry-pi/ | |||
</pre> | </pre> | ||
==== | ==== Initialize sb2 config ==== | ||
<pre> | <pre> | ||
cd $CHROOTPATH | |||
sb2-init Raspi /opt/cross/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc | |||
sb2-config -d Raspi | |||
</pre> | </pre> | ||
Revision as of 08:45, 14 February 2013
Build Qt5 Mozilla for Raspberry Pi
Build crosstool-ng toolchain
Install crosstool-ng using this tutorial: http://www.bootc.net/archives/2012/05/26/how-to-build-a-cross-compiler-for-your-raspberry-pi
In addition to step 13. enable C++
Prepare target wheezy armhf chroot
Download raspbian public key from root
sudo su wget http://archive.raspbian.org/raspbian.public.key;apt-key add raspbian.public.key CTRL^D sudo apt-get install qemu-user-static
Debootstrap wheezy chroot
export CHROOTPATH=$HOME/wheezy-armhf export CHROOTPREFIX=whrp sudo debootstrap --verbose --arch=armhf --keyring /etc/apt/trusted.gpg --include=apt wheezy $CHROOTPATH http://archive.raspbian.org/raspbian sudo cp /usr/bin/qemu-arm-static $CHROOTPATH/usr/bin/ sudo cp -f /etc/apt/apt.conf $CHROOTPATH/etc/apt/ sudo cp -f /etc/apt/apt.conf.d/* $CHROOTPATH/etc/apt/apt.conf.d/ sudo cp -f /etc/resolv.conf $CHROOTPATH/etc/ sudo cp -f /etc/hosts $CHROOTPATH/etc/
Install required packages inside chroot
sudo chroot $CHROOTPATH apt-get update sudo chroot $CHROOTPATH apt-get install -y --force-yes sudo adduser python2.7 bash-completion
make chroot alias
echo "alias o"$CHROOTPREFIX"chroot='sudo chroot $CHROOTPATH su - " >> ~/.bashrc . ~/.bashrc
Make chroot shell different from host
echo "PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]-"$CHROOTPREFIX":\[\033[01;34m\]\w\[\033[00m\]\$ '" >> $CHROOTPATH/root/.bashrc
Make sure that proc mounted in order to avoid some warnings
echo "sudo mount -t proc proc /proc" >> $CHROOTPATH/root/.bashrc
fix undefined locale warnings, and enable bash completion
echo " export LANGUAGE=C export LC_ALL=C export LANG=C if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi " >> $CHROOTPATH/root/.bashrc
Setup Scratchbox 2 around installed toolchain and dev rootfs
# Install sbox2 with: sudo apt-get install scratchbox2 # or use these instructions: # http://russelldavis.org/2011/09/07/setting-up-scratchbox2-from-scratch-for-the-raspberry-pi/
Initialize sb2 config
cd $CHROOTPATH sb2-init Raspi /opt/cross/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc sb2-config -d Raspi
Build Qt5-Mozilla inside chroot
mkdir ~/build && cd ~/build
install pre-compiled Qt5 and GLES libraries into chroot SDK
wget http://romaxa.info/raspberrypi/qt5rmx.tar.gz wget http://romaxa.info/raspberrypi/vc.tar.gz sudo tar -zxvf qt5rmx.tar.gz -C /opt/ sudo tar -zxvf vc.tar.gz -C /opt/
Install common Mozilla build dependencies
sudo xapt -k -a armel libpango1.0-dev libasound-dev libfreetype6-dev
Fix pango dependencies pkg-config path
sudo ln -s /usr/arm-linux-gnueabi/share/pkgconfig/pthread-stubs.pc /usr/arm-linux-gnueabi/lib/pkgconfig/pthread-stubs.pc
Clone Mozilla-Central and build
hg clone http://hg.mozilla.org/mozilla-central cd mozilla-central # Qt5 No-X11 mozconfig wget http://romaxa.info/raspberrypi/mozconfig # Minimal build patch queue, (hope will be 0 soon) hg clone http://hg.mozilla.org/users/romaxa_gmail.com/rmxmq .hg/patches hg update -C raspberrypi -R .hg/patches hg update -C `cat .hg/patches/changeset` hg qpush -a # Finally build MOZCONFIG=$(pwd)/mozconfig make -f client.mk build_all