Confirmed users
180
edits
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
# Basic Setup and minimal dependencies for toolkit-X-less Gecko build | |||
# based on instructions from https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/FirefoxCrossCompile | |||
<pre> | <pre> | ||
# Prepare multiarch chroot | # Prepare multiarch chroot | ||
sudo debootstrap --variant=buildd precise /home/precise | sudo debootstrap --variant=buildd precise /home/precise | ||
sudo cp -f /etc/apt/apt.conf /home/precise/etc/apt/ | |||
sudo cp -f /etc/resolv.conf /home/precise/etc/ | |||
sudo chroot /home/precise/ | sudo chroot /home/precise/ | ||
mount -t proc proc /proc | mount -t proc proc /proc | ||
#Set up the /etc/apt/sources.list inside the chroot : | #Set up the /etc/apt/sources.list inside the chroot : | ||
echo "# use arch=amd64 if you have 32bit Linux install | echo "# use arch=amd64 if you have 32bit Linux install | ||
deb [arch=i386] http://archive.ubuntu.com/ubuntu precise main universe | deb [arch=i386] http://archive.ubuntu.com/ubuntu precise main universe multiverse | ||
deb [arch= | deb [arch=armel] http://ports.ubuntu.com/ubuntu-ports precise main universe multiverse | ||
#deb [arch=armel] http://ports.ubuntu.com/ubuntu-ports/ precise-updates main universe multiverse | |||
#deb [arch=armel] http://ppa.launchpad.net/linaro-maintainers/overlay/ubuntu precise main | |||
#deb [arch=armel] http://ppa.launchpad.net/linaro-maintainers/staging-overlay/ubuntu precise main | |||
deb-src http://ppa.launchpad.net/linaro-maintainers/overlay/ubuntu precise main | |||
deb-src http://ppa.launchpad.net/linaro-maintainers/staging-overlay/ubuntu precise main | |||
deb-src http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | deb-src http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | ||
| Line 30: | Line 32: | ||
#Enable multiarch for dpkg in in /etc/dpkg/dpkg.cfg.d/multiarch | #Enable multiarch for dpkg in in /etc/dpkg/dpkg.cfg.d/multiarch | ||
echo "foreign-architecture | echo "foreign-architecture armel" > /etc/dpkg/dpkg.cfg.d/multiarch | ||
#In /etc/apt/apt.conf.d/10local disable installing recommends: | #In /etc/apt/apt.conf.d/10local disable installing recommends: | ||
| Line 40: | Line 42: | ||
apt-get update | apt-get update | ||
apt-get install g++-arm-linux-gnueabihf build-essential pkg-config unzip zip autoconf2.13 | apt-get install vim bash-completion | ||
apt-get install g++-arm-linux-gnueabihf build-essential pkg-config unzip zip autoconf2.13 | |||
# Finally, we need to create a symlink for pkg-config: | # Finally, we need to create a symlink for pkg-config: | ||
| Line 53: | Line 49: | ||
cd /usr/bin | cd /usr/bin | ||
ln -s /usr/share/pkg-config-crosswrapper arm-linux-gnueabihf-pkg-config | ln -s /usr/share/pkg-config-crosswrapper arm-linux-gnueabihf-pkg-config | ||
</pre> | |||
Prepare Mozilla source tree with Embedding IPC patches and HONK (plain linux port) | |||
Clone mozilla repository + patch queue (for IPC Embedding), better to create some folder like /build | |||
<pre> | |||
mkdir /build | |||
cd /build | |||
hg clone http://hg.mozilla.org/mozilla-central | |||
cd mozilla-central | |||
hg clone http://hg.mozilla.org/users/romaxa_gmail.com/embedipc_queue .hg/patches | |||
hg update `cat .hg/patches/changeset` | |||
hg qpush -a | |||
</pre> | |||
Mozilla toolkit-Xlib-less HONK port, b2g, for rendering into Framebuffer | |||
<pre> | |||
# Install main Mozilla B2G Honk port base dependencies | |||
apt-get install libfreetype6-dev:armhf libfontconfig1-dev:armhf libasound-dev:armhf libudev-dev:armhf | |||
# X deps (only for X build) | |||
apt-get install libasound2-dev:armhf libxt-dev:armhf libxext-dev:armhf | |||
# This part is basically enough to build honk (plain linux gecko port ab be able to run it on Framebuffer or SGX EGL fb context) | |||
cd mozilla-central | |||
MOZCONFIG=$(pwd)/.hg/patches/mozconfig.cross.precise-honk make -f client.mk build_all | |||
To launch b2g clone and copy https://github.com/andreasgal/gaia to your local PC apache /var/www folder or put it into device /var/www folder | |||
Copy b2g stub to device | |||
cp -rfL obj-build-linaro-honk/dist/bin ./b2g-build | |||
arm-linux-gnueabihf-strip ./b2g-build/* | |||
scp -r ./b2g-build/ root@device-ip:/opt | |||
on device: | |||
cd /opt/b2g-build | |||
B2G_HOMESCREEN=http://server[local-server]/gaia/homescreen.html ./b2g | |||
</pre> | |||
Qt build with X | |||
<pre> | |||
# Install main Mozilla Qt port dependencies | |||
apt-get install libqt4-dev:armhf libqt4-opengl-dev:armhf libpango1.0-dev:armhf libdbus-glib-1-dev:armhf libasound2-dev:armhf libxt-dev:armhf mesa-common-dev:armhf | |||
# make sure that required build libraries are still in the system | |||
apt-get install pkg-config unzip zip autoconf2.13 libglib2.0-dev | |||
# XXX Minor trick in order to get host version of qt moc/rcc | # XXX Minor trick in order to get host version of qt moc/rcc | ||
# install host qt-dev version, and backup moc/rcc/uic | # install host qt-dev version, and backup moc/rcc/uic | ||
apt-get install libqt4-dev | apt-get install libqt4-dev | ||
cp /usr/bin/moc-qt4 /tmp/ | cp /usr/bin/moc-qt4 /tmp/ | ||
| Line 64: | Line 106: | ||
cp /usr/bin/uic-qt4 /tmp/ | cp /usr/bin/uic-qt4 /tmp/ | ||
# install | # install armel version back | ||
apt-get install libqt4-dev:armhf libqt4-opengl-dev:armhf | apt-get install libqt4-dev:armhf libqt4-opengl-dev:armhf | ||
# and replace arm version of moc/uic/rcc | # and replace arm version of moc/uic/rcc | ||
| Line 74: | Line 113: | ||
cp /tmp/rcc /usr/bin/rcc | cp /tmp/rcc /usr/bin/rcc | ||
cp /tmp/uic-qt4 /usr/bin/uic-qt4 | cp /tmp/uic-qt4 /usr/bin/uic-qt4 | ||
# Create mozconfig | # Create mozconfig | ||
| Line 110: | Line 136: | ||
LDFLAGS="$FIX_LINK_LDFLAGS" | LDFLAGS="$FIX_LINK_LDFLAGS" | ||
ac_add_options -- | ac_add_options --target=arm-linux-gnueabihf | ||
ac_add_options --prefix=/usr | ac_add_options --prefix=/usr | ||
ac_add_options --enable-application=mobile | ac_add_options --enable-application=mobile | ||
| Line 134: | Line 159: | ||
ac_add_options --enable-optimize | ac_add_options --enable-optimize | ||
mk_add_options MOZ_MAKE_FLAGS="-j4" | mk_add_options MOZ_MAKE_FLAGS="-j4" | ||
mk_add_options MOZ_OBJDIR="@TOPSRCDIR@/obj-build- | mk_add_options MOZ_OBJDIR="@TOPSRCDIR@/obj-build-linaro" | ||
ac_add_options --with-arm-kuser | ac_add_options --with-arm-kuser | ||
ac_add_options --with-thumb=toolchain-default | ac_add_options --with-thumb=toolchain-default | ||
| Line 140: | Line 165: | ||
ac_add_options --with-system-zlib | ac_add_options --with-system-zlib | ||
ac_add_options --enable-force-egl | ac_add_options --enable-force-egl | ||
ac_add_options --with-gl-provider=EGL | |||
#ac_add_options --enable-debug | #ac_add_options --enable-debug | ||
#ac_add_options --enable-logging | #ac_add_options --enable-logging | ||
#*********************************** | #*********************************** | ||
MOZCONFIG=$(pwd)/mozconfig.linaro | MOZCONFIG=$(pwd)/mozconfig.linaro make -f client.mk build_all | ||
</pre> | </pre> | ||