Mobile/Fennec/RaspberryPi: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
= Build Qt5 Mozilla for Raspberry Pi =
= Build Qt5 Mozilla for Raspberry Pi =


== Prepare multiarch chroot ==
== 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 ====
<pre>
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
 
</pre>
 
==== Debootstrap wheezy chroot ====


<pre>
<pre>
sudo apt-get install debootstrap
export CHROOTPATH=$HOME/wheezy-armhf
export CHROOTPATH=$HOME/squeezeRP
export CHROOTPREFIX=whrp
export CHROOTPREFIX=sqrp
sudo debootstrap --verbose --arch=armhf --keyring /etc/apt/trusted.gpg  --include=apt  wheezy $CHROOTPATH http://archive.raspbian.org/raspbian
sudo debootstrap --arch=i386 --variant=buildd squeeze $CHROOTPATH
 
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 $CHROOTPATH/etc/apt/
sudo cp -f /etc/apt/apt.conf.d/* $CHROOTPATH/etc/apt/apt.conf.d/
sudo cp -f /etc/apt/apt.conf.d/* $CHROOTPATH/etc/apt/apt.conf.d/
Line 14: Line 34:
</pre>
</pre>


==== Better to make user inside chroot, same as your host user, with sudo permissions ====
==== Install required packages inside chroot ====
<pre>
 
sudo chroot $CHROOTPATH apt-get install -y --force-yes sudo adduser vim bash-completion
</pre>
==== Setup chroot sdk user, enter password and name ====
<pre>
sudo chroot $CHROOTPATH adduser `whoami`
</pre>
==== Setup sudo group ====
<pre>
<pre>
sudo chroot $CHROOTPATH adduser `whoami` sudo
sudo chroot $CHROOTPATH apt-get update
sudo chroot $CHROOTPATH apt-get install -y --force-yes sudo adduser python2.7 bash-completion
</pre>
</pre>


==== make chroot alias ====
==== make chroot alias ====
<pre>
<pre>
echo "alias o"$CHROOTPREFIX"chroot='sudo chroot $CHROOTPATH su - "`whoami`"'" >> ~/.bashrc
echo "alias o"$CHROOTPREFIX"chroot='sudo chroot $CHROOTPATH su - " >> ~/.bashrc
  . ~/.bashrc
  . ~/.bashrc
</pre>
</pre>
Line 35: Line 49:
==== Make chroot shell different from host ====
==== Make chroot shell different from host ====
<pre>
<pre>
echo "PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]-"$CHROOTPREFIX":\[\033[01;34m\]\w\[\033[00m\]\$ '" >>  $CHROOTPATH/home/`whoami`/.bashrc
echo "PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]-"$CHROOTPREFIX":\[\033[01;34m\]\w\[\033[00m\]\$ '" >>  $CHROOTPATH/root/.bashrc
</pre>
</pre>


==== Make sure that proc mounted in order to avoid some warnings ====
==== Make sure that proc mounted in order to avoid some warnings ====
<pre>
<pre>
echo "sudo mount -t proc proc /proc" >> $CHROOTPATH/home/`whoami`/.bashrc
echo "sudo mount -t proc proc /proc" >> $CHROOTPATH/root/.bashrc
</pre>
</pre>


Line 52: Line 67:
   . /etc/bash_completion
   . /etc/bash_completion
fi
fi
" >> $CHROOTPATH/home/`whoami`/.bashrc
" >> $CHROOTPATH/root/.bashrc
</pre>
 
==== Setup non-passwd sudo, Make user sudo without password requests ====
 
<pre>
sudo echo `whoami`" ALL=(ALL)NOPASSWD: ALL" > $CHROOTPATH/tmp/user_full
sudo chmod 0440 $CHROOTPATH/tmp/user_full
sudo chown root: $CHROOTPATH/tmp/user_full
sudo chroot $CHROOTPATH mv /tmp/user_full /etc/sudoers.d/
</pre>
</pre>


Confirmed users
180

edits

Navigation menu