[HOWTO] ✏ Compiling Fairphone Open OS / Rooting

I didn’t see where you mentioned it before (this forum layout is confusing :slight_smile:

Sometimes there’s issues with copy/pasting adding weird line breaks, depending on where you copy/paste from so I thought I’d mention that too. (I’ve had that issue before when adding keys to my authorized_keys file.)

I just have deleted my whole branch yesterday :confused: and now i need a halfway latest FFOS Image which is working. Can someone please send me a build from the last week? Downloadspeed 200kps sucks for another buildingstart. Would be great! :slightly_smiling: jom

Obviously a new version of FPOS has been released today. Would you guys know if the sources are updated as well, i.e. would it make sense to download and compile again?

And would I still need to apply the Unified NLP patches to have network-based location on a Google-free FPOSOS?

1 Like

I have to admit that I didn’t check myself, but I would assume that you can answer your questions by looking at their gerrit… Afaik some pull requests have still been open.

Thank you!!! sigh If only I understood more about Geerit & co…

I tried cloning the fairphone osos repos as described in the build instructions, but the given http-address 404s and the ssh-address gives “Permission denied” although i did add my key in gerrit. Does anyone know where else i can get the sources?

If you are running Ubuntu 16.04 which uses OpenSSH 7 then you will need to add a .ssh/config file with the gerrit host to allow the right cypher: http://www.openssh.com/legacy.html

For Example:

user@skylake:~/fairphone_os$ repo init -u ssh://code.fairphone.com:29418/fp2-dev/manifest -b fp2-sibon
Unable to negotiate with 37.187.31.110 port 29418: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

Edit needed:

user@skylake:~$ cat .ssh/config
Host code.fairphone.com
KexAlgorithms +diffie-hellman-group1-sha1

1 Like

@tom.longshine did you also do a ssh-add on your private key?

elajoie@skylake:~$ ssh-add .ssh/id_rsa
Identity added: .ssh/id_rsa (.ssh/id_rsa)

Thanks for your help, but i already did allow the legacy cypher. ssh-add is just for the ssh-agent and didn’t have an effect.

@tom.longshine Have you tried looking at debugging?

This setting enables level 3 debugging:

elajoie@skylake:~$ cat .ssh/config
Host code.fairphone.com KexAlgorithms +diffie-hellman-group1-sha1 LogLevel DEBUG3

The last time I sync’ed I did not see any new code (lastest changes/commits Jan 2016). Do other people see more commits? Maybe I’m doing it wrong.

Here is a log: http://termbin.com/5xdj
It basically just rejects my key, but i did add the key to gerrit, so i suspect that the repo is gone/changed location (especially in conjunction with the http-access 404ing). Can you please test whether the repo init -u ssh://code.fairphone.com:29418/fp2-dev/manifest -b fp2-sibon command currently works, to exclude that possibility.

@tom.longshine
Works for me:
elajoie@skylake:~/fairphone_os$ repo init -u ssh://code.fairphone.com:29418/fp2-dev/manifest -b fp2-sibon

Your identity is: Eric Lajoie elajoie@ericlajoie.com
If you want to change this, please re-run ‘repo init’ with --config-name

repo has been initialized in /home/elajoie/fairphone_os

Maybe line 46 in your .ssh/known_hosts file needs to be removed and you can add the one below:

[code.fairphone.com]:29418 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCTQ1o0jhAfkLvMbXwUXLGdPWZ7VvyFLaMTxT6/LmiLqg20E/6oKEw/2Hw5mINhpFRvd7BGZ7n8FieXqJ1Z+FIsAyZA90e5tpqAihRU9Lmh2s4IeADRxEv0gLxiVvkc7DmcCIZM6SDEKq5xuZZqSvSy/VQxxfGRfUt6PykVRLw7jw==

Also can you confirm you did a ssh-add .ssh/id_rsa on your private key as I had same issue and it started working after I added it.

Thanks for your testing.
Replacing the line in the known_hosts-file had no effect (eyeballing, the old line had the same fingerprint). I can confirm that i did a ssh-add and ssh-add -l shows that the key is indeed added

$ ssh-add -l 2048 SHA256:nL03OxEiqvxK0QA98fv4pgXxrtARuxgm9lPhnVZF5sw /home/tom/.ssh/id_rsa (RSA)

@tom.longshine

Only thing I can imagine is Gerrit might not have the full key or your local client may have an older private ket added.

Can you try this:

  1. ssh-keygen (without pass phrase)
  2. ssh-add .ssh/id_rsa
  3. Log into Gerrit and make sure it looks simular with your new public key from .ssh/id_rsa.pub
  4. repo sync (make sure this works as your debug output showed googlesource.com connections I did not have)
  5. repo init -u ssh://code.fairphone.com:29418/fp2-dev/manifest -b fp2-sibon

I moved my ~/.ssh directory, generated a new key, added it to gerrit and modified ~/.ssh/config and ~/.ssh/known_hosts as necessary. repo sync fails, saying that it requires repo init first. The googlesource.com connections are missing if i do not delete the .repo directory, so you probably had that still lying around (Did you try in a completely fresh directory?). repo init -u ssh://code.fairphone.com:29418/fp2-dev/manifest -b fp2-sibon still fails with “Permission denied”. :frowning:

However, I noticed when using http, that despite http://code.fairphone.com/gerrit/fp2-dev/manifest 404ing repo sync still seems to do its thing (throwing a lot more 404s on the go). The 404 of http://code.fairphone.com/gerrit/fp2-dev/manifest seems to be quiet on some plattforms and confused me into assuming the repo init failed.

Thank you very much for your help! :slight_smile:

@tom.longshine
Did you follow all these steps before?
https://code.fairphone.com/projects/fp-osos/dev/fairphone-os-build-instructions.html#fairphone-os-build-instructions

Specifically grabbing the repo file and updating path variable.

I played around with repo today and changed my manifest to: default remote="origin" revision="fp2-sibon-2.0.2" Will I get more recent code with this branch?

Update: I do not understand how the manifest works. Can someone explain me how to switch to the latest “meta” branch/revision that matches the code from the latest update (1.2.8)?

I still don’t understand why Fairphone team don’t bring (more) help on this thread. :neutral_face:

Maybe @anon12454812 or @keesj can give some informations?

1 Like

Yes, I did. As said, the http-repo-url seems to work despite the 404, so I don’t care about the broken ssh-auth anymore (I just need the repo to build a google-free image, would be much easier if fairphone offered a prebuilt image …).

Unfortunately, the build fails with some obscure linker error (log: http://termbin.com/545w). :frowning: