Fairphone 2 build


please can you apply that to: https://github.com/mozilla-b2g/platform_frameworks_native/tree/b2g-fp2
Im trying now 5h and started 3 times from scratch but i can’t. Git is hard. I can’t find a doc that describes how to clone a branch and PR against it that branch again after some work.

(Lissyx) #122

This is what I already described in post #54: do this, it will get you a branched named caf_atomic_cpp push that to your repo, and you can create a PR from this branch against b2g-fp2 from there :slight_smile:


frome where?
from within frameworks/native path?


still your sugestion to branch is not clear to me. I wold apreciate a lession on how…
I did it out of the VM build environement directly on my mac.

It’s done. You can merge. Thanks a lot.

(Lissyx) #125

I don’t know what I can explain better, I gave you all the command lines in post #54. But your PR looks good now :slight_smile:


just this:
I have a B2G repo in ~/B2G with all the folders generated by ./config.sh fairphone2 in it.
Now to do this branching command below where do you cd to first? (what path do i have to use)

(Lissyx) #127

oh, well, now you have nothing to do, since your PR was good :).

But in this case, you have to place yourself into the directory of the git repo that needs this operation. To find that, read XML file and search for your repo name (platform_frameworks_native) and use the path in that same line: that is the place where this repo is checked out, so this is where you want to work :slight_smile:


Thank you! I was near.


I can now say for sure that FP2 blobFULL is ported.
who ever whants to try is able to build like this:

​normalized setup 4 b2g
execute line by line:

sudo dpkg --add-architecture i386
sudo dpkg --add-architecture amd64
sudo apt-get install git

git config --global user.email "name@url.tls"
git config --global user.name "username"
git config --global color.ui False

execute full block in once:

sudo apt-get install --no-install-recommends autoconf2.13 bison bzip2 ccache
curl flex gawk gcc g++ g+±multilib git lib32ncurses5-dev lib32z1-dev
libgconf2-dev zlib1g:amd64 zlib1g-dev:amd64 zlib1g:i386 zlib1g-dev:i386
libgl1-mesa-dev libx11-dev make zip lzop libxml2-utils openjdk-7-jdk
nodejs unzip python mercurial && ccache -M 50G && echo $PWD

and this block in once:

echo “commanding: git clone
git://github.com/mozilla-b2g/B2G.git” &&
git clone git://github.com/mozilla-b2g/B2G.git && cd B2G && echo
$PWD && echo “commanding: ./config.sh fairphone2” &&
./config.sh fairphone2 && echo $PWD && echo “commanding:
cd … " && cd … && echo $PWD && echo
"commanding: curl -O
&& curl -O
&& echo “commanding: unzip android-ndk-r11b-linux-x86_64.zip -d
~/ -home dir- " && unzip android-ndk-r11b-linux-x86_64.zip -d
~/ && echo $PWD && echo “commanding: curl -O
&& curl -O
https://nodejs.org/download/release/v4.4.7/node-v4.4.7.tar.gz &&
echo “commanding: tar -zxvf node-v4.4.7.tar.gz” && tar -zxvf
node-v4.4.7.tar.gz && echo “commanding: cd node-v4.4.7”
&& cd node-v4.4.7 && echo “commanding: ./configure”
&& ./configure && echo “commanding: make install”
&& sudo make install && echo $PWD && echo
"commanding: back to B2G folder!” && cd ~/B2G

make a file called “.userconfig” in path ~/B2G
Fill it with this block and change the ndk path username to your system username

echo “*** entering .userconfig "
export B2G_ANDROID_NDK_PATH=/home/ fill in here your system-username /android-ndk-r11b
export B2G_DIR=${B2G_DIR:-$(cd $(dirname $0); pwd)}
echo "B2G_DIR=${B2G_DIR}"
echo "
exit .userconfig ***”

Change the gaia branch to kanikani

gedit .repo/manifests/base.xml

change this line:

project name=“gaia” path=“gaia” remote=“mozillaorg” revision=“master”


project name=“gaia” path=“gaia” remote=“b2g” revision=“kanikani”

and execute line by line:

$ cd gaia
$ git reset --hard b2g/kanikani
$ cd …
$ ./repo sync

Then you are ready to build


If you run in to problems:

​./build.sh -j1 showcommands 2>&1 | tee 1-build.log

And send me the file 1-build.log from path ~/B2G


The collegues from fairphone forum are informed…

I pointed out the roadmap a bit earlyer in this thread…


im going on to blobfree build i made a test build with a edited proprietary-files.txt.
This file is hosted in the https://github.com/mozilla-b2g/device-fairphone2 repo.
with the ./config.sh fairphone2 command it gets copied to ~/B2G/devices/fairphone_devices/FP2
Thats the place where i changed the content of proprietary-files.txt.
The file contains a tonn of path’s eatch in a new line that looks like:


Previous i recognized that the path to download a blob from the hardware during B2G-Installer work is set in this file and it didn’t work because it tried to download in


i changed the path’s in to proprietary-files.txt to


And at that point it worked to pull the blobs from the Device during installation with B2G-Installer.
Now i wasn’t sure what else is done with this file so i made a test build with the shortend pahts in proprietary-files.txt what run throu successfuly. Also on the device there was no difference between the build without changed proprietary-files.txt and the one with shortend path’s.
That leads me to assume the file is only used by pulling blobs from the device in B2G-Installer and that it then wold be safe to shorten the path’s.
Is that assuption correct?

(Lissyx) #132

As far as I can remember, this file has been created explicitely for us for generating the list of blobs, the FP2 blobs being installed via a shell script. So if changing fixing it, we should just verify if we are not circumventing a bug in the shell code that handles generation of the blobs list, in gonk-misc/Android.mk.

If not, then we could just change this file :). @atilag do you have an opinion?

(Juan Gómez) #133

The propietary-files.txt it’s a relative path which base is taken from FP2.mk -> TARGET_DEVICE_BLOBS_SRC_DIR variable. In this case, we need to change both files so the final result would be:

and the FP2.mk should be:
TARGET_DEVICE_BLOBS_SRC_DIR := out/target/product/FP2/system/

I already did that changes, so let me push them to the main repository and update your local copy.



Hi Juan, i had a build failure so i tried to understand whats going on an what you are describing to be wrong. Something i don’t understand is “TARGET_DEVICE_BLOBS_SRC_DIR” / SRC sounds like source to me. Are you shure that this is the source path to pull blobs? It seams to be that i have exactly this path within B2G to some blobs. As if it wold be the path to the source during blobFULL build…

Im currently building a -j1 to get a detailed log.
Regards, Novski


I was wrong. With -j1 it ran through successfully. Blobfree although doesn’t want to work.
http://pastebin.com/yhA9mwSk - with telemetry and debug set to default

(Lissyx) #136

Something is missing in your blobfree distribution, can you share your zip file?


do we have a storage that lets me upload about 180MB? else than dropbox that you disslike…

(Lissyx) #138

I fear we don’t


maybe this printscreen is enough…

(Lissyx) #140

No send it to dropbox I’ll live with it :slight_smile:

Mozilla Discourse a écrit :


September 14

maybe this printscreen is enough...

Visit Topic or reply to this email to respond.

In Reply To


September 14I fear we don’t

Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

Envoyé depuis Firefox OS