[HOWTO] ✏ Compiling Fairphone Open OS / Rooting

Just run make clean and you should be ready to recompile :slight_smile:

If I understand your question correctly, you want to root the self-compiled OS. In that case:

  1. Go until the point where you just finished make -j8
  2. fastboot flashall
  3. Go to recovery mode and sideload the .zip

And that should do the trick :slight_smile:

1 Like

I just started compilation after the modifications etc. Unfortunately the compilation fails again with the following error message:

make: *** No rule to make targetout/target/product/FP2/obj/SHARED_LIBRARIES/libwpa_client_intermediates/export_includes’, needed by out/target/product/FP2/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates/import_includes'. Stop.

Anybody having an idea?

Run make clean and make again. Make sure you have the correct gcc version. If it persists, try make -j1 but that will take ages.

1 Like

Ok, tried these: with -j8 the same result. -j1 still running…
gcc-version is 4.8.4, I am on Trusty (Ubuntu 14.04 LTS).

Edit: -j1 looks far better - compiling something right now :slight_smile:

Edit 2: Unfortunately, even with -j1 the build failed after 85 min with the same error: make: *** No rule to make targetout/target/product/FP2/obj/SHARED_LIBRARIES/libwpa_client_intermediates/export_includes’, needed by out/target/product/FP2/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates/import_includes'. Stop. :frowning:

I had this effect also. I do have the impression that somewhere dependencies are not correct and it’s possible that one sub make runs too early… Not always, but it can happen

Hey,

I deleted to whole folder an then used the docker file and it worked. But this morning after 9 houres, I had 8 java zombies and all four cores up to 50% There was no time to try it again ths morning. So I’ll try to find what the problem might be later.

Yesterday I found out, that libhybris looks quite finished, so I’m not sad at all! :wink:

If this happens from time to time but not always, do you think it is worth another try?

I’ve had this too since my last repo sync. Seems the repo is broken for now.

Yes. As vivia said, it works with only one parallel make, or most of the time with a repeated make -jX

Except, if, as Arvil stated, the repo is broken…

Sorry, I was too busy to try a Debian docker myself to test your setup. @jftr mentioned something about java hanging, in his dockerfiles. But I haven’t look into it. It depends on the kernel, I guess.

Yep, the phone is similar to a Oneplus One, I’m sure basic Sailfish will work fine on the FP2.

I wonder, will it make sense to make split the howto to get a “clean” ‘Compiling AOSP & bin blobs’ and a ‘Rooting’ howto? It’s related, but not always the same.

1 Like

I just want to say that compiling (without root, so just as described on code.fairphone.com) worked on first try without any problems on Debian 8.0 (gcc (Debian 4.9.2-10) 4.9.2) today with “make -j4”. Took about 3-4 hours, because i only used my notebook with an i5 4210u.
I do not know if this helps somebody, but it does no harm anyway, so …

The one and only problem: I have no FP 2 :smiley:

bigCrash

Same error happens for me on Gentoo. It also happened with the Docker image, but after a fresh sync, clean and rebuild it worked most of the time. Would be great if someone finds a solution for that.
Edit: I once thought this comes from the version >3.82 of GNU Make. But not sure about that.

I think it comes from these ugly binary blobs. libwpa.so is provided as binary with that and I guess its copied (together with export_includes) to output directory. If you do a “make clean” and not installing the binaries again, the build will fail here.
At least for me it was working after I installed binaries again. Maybe someone can check the “out” folder after a clean and installing the blobs. I’m on a fresh compilation at the moment :tired_face:

The Android guide states something about a clobber target, which seems to preserve the binaries. At least that’s how I understand it. But as I said, I don’t want to try it right now :wink:
If it works, we should use this instead of clean.

Maybe we should just add that step to the Makefile.

Compilation doesn’t work any longer here, too. However, I still had an older version of “.repo” on my root server, so I copied the 7GB to an Ubuntu-VM and it works fine again. It’s not the fault of >make-3.82. When you have the .repo, make sure to use “repo sync -l” so it doesn’t fetch the broken source as update.
If anyone is in need, here’s the 7GB-repo-tar file: http://kripton.kripserver.net/fp2/repo.tar

Since yesterday building on gentoo works for me now. There would be something totally wrong if compiling sources wouldn’t work on Gentoo :smile:
Only thing I needed to do was a

make update-api

as already stated in this thread. And of course I needed to switch back to Python 2.7. make-4.1 didn’t make a problem.

Would be easiest of course. I didn’t check if it’s possible, but I assume it’s intended to be applied in that way, because you need to agree with this license/legal agreements. This proprietary stuff is really a sad thing in the Android world :grimacing:

After a simple repo sync I was able to build from source again today.

I took courage from @Arvil’s successful build after another repo sync and started a new compilation (-j8) and got a new error message:
make: *** [out/target/product/FP2/obj/GYP/shared_intermediates/blink/platform/ColorData.cpp] Error 127

Did they change code to amend for LED problem and got something wrong? Or has this got nothing to do with the real problem?

Edit: Same fail error for -j2 and -j1

Hi! I’d really like to compile as well. As I want to flash this to my FP2, I don’t want to use an unencrypted connection (http) to get the code, so I wanted to register a Gerrit account and use an SSH key as described in the build instructions. I thought that I could directly register for Gerrit … But from this site it seems that I need an account from one of the services mentioned there or have an own website to register at OpenID. (Btw I’m a complete newbie to Gerrit and git (as you now may have already noticed)) However, I neither have a Google, Yahoo or Launchpad account nor do I have a website on my own. Is there another possibility to get a Gerrit account? Or are there providers usable via OpenID other than Google, Yahoo and the others mentioned on the linked page? I hope somone can help me out.

This would be a nice solution as well. Do you suggest to replace “http” by “https” in the following command?

$ repo init --depth=1 \ -u http://code.fairphone.com/gerrit/fp2-dev/manifest \ -b fp2-sibon

I tried this and it gave me the following error:

fatal: unable to access 'https://code.fairphone.com/gerrit/fp2-dev/manifest/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

Do I have to provide the certificate for authentication here?

Edit: See this post below for a solution.