Author Topic: Geeksphone Revolution FFOS V2.0 build guide  (Read 9330 times)

Offline jesus.geeksphone

  • Administrator
  • Jr. Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 76
  • Karma: 20
    • View Profile
Geeksphone Revolution FFOS V2.0 build guide
« on: February 13, 2015, 09:46:14 AM »
This guide will describe the process to build your own versions of Firefox OS v2.0 for Geeksphone Revolution.

GP Team have published in Github all the projects needed to accomplish the entire build process.

First of all, you need a configured build environment, you should review this guide to be sure that your system is ready to build Firefox OS compilations.

https://developer.mozilla.org/en-US/Firefox_OS/Firefox_OS_build_prerequisites

When your build environment is ready, you will need to clone our B2G project:

Code: [Select]
git clone https://github.com/gp-b2g/B2G -b master
You will get a new folder named B2G, inside of it you will have the entire source code tree.

To get all the source code, you need to type the following command inside B2G folder:

Code: [Select]
BRANCH=v2.0 ./config.sh revolution
This process will last depending on your internet connection speed, but you can go to take a coffee... or two, several gigabytes will be downloaded.

After that, we need to patch CM-10.1 sources, to do that you need to go inside cm10_patches folder and execute:

Code: [Select]
./patch.sh
When the process ends, you should start the compile stage, to do this, you only need to type (inside B2G directory) (NOTE: You need to have Firefox OS v2.0 on your Geeksphone Revolution and pluged to your computer because the build system needs to extract some proprietary files from a running system):

Code: [Select]
./build.sh
If all goes well, the last line of the compilation will be:

Code: [Select]
Run |./flash.sh| to flash all partitions of your device
The last steps you need to do is to compress the system.img with gzip, because we need to do it before flashing it.

Code: [Select]
cd out/target/product/revolution
gzip system.img

Now you can flash this system in your phone and enjoy your own build.

Code: [Select]
adb reboot-bootloader
fastboot flash system system.img.gz
« Last Edit: February 15, 2015, 10:35:00 AM by jesus.geeksphone »

Offline vandyswa

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
  • Karma: 0
    • View Profile
    • Andy Valencia home page
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #1 on: February 14, 2015, 05:22:02 PM »
git clone https://github.com/gp-b2g -b master B2G
Cloning into 'B2G'...
error: The requested URL returned error: 403 while accessing https://github.com/gp-b2g/info/refs
fatal: HTTP request failed

Can you check your permissions?  Thanks!

Offline soupytwist

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 73
  • Karma: 9
    • View Profile
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #2 on: February 14, 2015, 06:33:39 PM »
git clone https://github.com/gp-b2g -b master B2G
Cloning into 'B2G'...
error: The requested URL returned error: 403 while accessing https://github.com/gp-b2g/info/refs
fatal: HTTP request failed

Can you check your permissions?  Thanks!

Looks like the wrong clone url, try this:

Code: [Select]
git clone https://github.com/gp-b2g/B2G.git -b master B2G

Offline vandyswa

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
  • Karma: 0
    • View Profile
    • Andy Valencia home page
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #3 on: February 14, 2015, 07:00:41 PM »
Ok, that got me something, and the checkout is proceeding.  Thanks again!

Offline a-dead-trousers

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 5
  • Posts: 38
  • Karma: 5
    • View Profile
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #4 on: February 15, 2015, 03:33:18 AM »
hi!

Can i use this guide with Peak too?
Code: [Select]
BRANCH=v2.0 ./config.sh peakWould this be the right way?

wkr ADT

Offline vedsa

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #5 on: February 15, 2015, 12:25:14 PM »
this take very much time (not good connection speed)

speed downloading: 50 to 200 KiB/s

begin at 15h30 now it's 21h2x
folder have 6 510 file (6,4 Go)
62% (95/172)

that take very many time take care for those have very low speed

---------edit-------
after do this line code
Code: [Select]
BRANCH=v2.0 ./config.sh revolutionand when it's end
the folder have 289 853 files (25,4 Go)

-------edit2-------
What we suppossed to do for do that?
Code: [Select]
./build.shwe need to plug device with usb? in recovery mode? or when device is ON and we enable "debug usb" in setting?

if someone have time to do a "detailed tutorial" that can be help some people who have the same problem, (i just want to know how build it and install (flash??) in the devices without changing anything)
thx for help
good night
« Last Edit: February 17, 2015, 07:12:26 AM by vedsa »

Offline balzug

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
  • Karma: 1
    • View Profile
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #6 on: February 18, 2015, 02:46:40 AM »
Hi,

I got this message when issue "./build.sh":

 error: insufficient permission for device

Then the build script seems to hang, so I press Ctrl + C to get back the prompt.

Any ideas what could be wrong?

Then I tried to do it with "sudo ./build.sh", it seems to be ok. Maybe this could be mentioned in your guide.

Best Regards,
Zoltan
« Last Edit: February 18, 2015, 02:51:16 AM by balzug »

Offline nbourdais

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 37
  • Karma: 3
    • View Profile
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #7 on: February 18, 2015, 03:50:22 AM »
Hi,

I got this message when issue "./build.sh":

 error: insufficient permission for device
...

Had you add a udev rule as stated in Readme at https://github.com/gp-b2g/B2G ?

Udev Permissions

If you get "error: insufficient permissions for device"...

Obtain ID of device manufacturer (first 4 hexidecimal digits before colon):

$ lsusb

Add a line to /etc/udev/rules.d/android.rules (replacing XXXX with 4 digit ID):

SUBSYSTEM=="usb", ATTRS{idVendor}=="XXXX", MODE="0666"

Restart udev before re-plugging your device for it to be detected:

$ sudo service udev restart

Re-run configure:

./config.sh [device name]

Offline jcerdan

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 24
  • Karma: 2
    • View Profile
    • Arch User
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #8 on: February 18, 2015, 05:40:36 AM »
Hi, (SOLVED!)

I encounter a problem with python3 under Archlinux, Can anyone point me a solution?
It looks like the system has python3 as default...

$ BRANCH=v2.0 ./config.sh revolution
Initialized empty Git repository in /home/jcerdan/geeksphone/revolution/b2gos/B2G/tmp_manifest_repo/.git/
cp: opción no reconocida '--python=pyton2'
Pruebe 'cp --help' para más información.
warning: Python 3 support is currently experimental. YMMV.
Please use Python 2.6 - 2.7 instead.
Traceback (most recent call last):
  File "./repo", line 775, in <module>
    main(sys.argv[1:])
  File "./repo", line 742, in main
    _Init(args)
  File "./repo", line 258, in _Init
    _CheckGitVersion()
  File "./repo", line 312, in _CheckGitVersion
    ver_act = ParseGitVersion(ver_str)
  File "./repo", line 282, in ParseGitVersion
    if not ver_str.startswith('git version '):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
Repo sync failed

SOLUTION:

put in first line
#!/usr/bin/env python2

in B2G/repo file instead of
#!/usr/bin/env python
« Last Edit: February 18, 2015, 05:45:17 AM by jcerdan »

Offline dcarlos

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #9 on: February 25, 2015, 08:01:47 AM »
Hi Geeksphone community,
I'm using Ubuntu 14.04 to try and compile FFOS 2.0 for the revolution myself.
However the config.sh repo init/fetching of projects seems to hang.

This is where it apparently stops:
Code: [Select]
$ BRANCH=v2.0 ./config.sh revolution
...
Fetching project CyanogenMod/android_system_extras
Fetching projects:  93% (142/152)  Fetching project CyanogenMod/android_external_speex
Fetching projects:  94% (143/152)  Fetching project vex
Fetching project CyanogenMod/android_external_libvpx
Fetching projects:  95% (145/152)  Fetching project CyanogenMod/android_external_gcc-demangle
Fetching projects:  96% (146/152)  Fetching project CyanogenMod/android_sdk
Fetching project CyanogenMod/android_frameworks_opt_emoji
Fetching projects:  97% (148/152)  Fetching project CyanogenMod/android_external_harfbuzz
Fetching projects:  98% (149/152)  error: Cannot fetch CyanogenMod/android_external_harfbuzz

Anyone else having the issue or knows what I'm missing?

Thanks

Offline marksant

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #10 on: February 26, 2015, 02:17:25 AM »
Was it a transient error possibly?
I just ran a "repo sync" and see no issues.

Offline dcarlos

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #11 on: February 26, 2015, 03:02:15 AM »
Yes it was a temporary/transient error I guess.

I had already tried several times, but with your helpful tip here is what solved it:
Removed the folders ./.repo/project-objects/CyanogenMod/android_external_harfbuzz.git ./.repo/projects/external/harfbuzz.git.
Did a manual (no script) repo sync.
Repeated the original command:
Code: [Select]
BRANCH=v2.0 ./config.sh revolutionAnd voila:
Code: [Select]
Fetching projects: 100% (152/152), done. 
Syncing work tree: 100% (152/152), done. 

Run |./build.sh| to start building

Thank you very much.

Offline Cwiiis

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
  • Karma: 4
    • View Profile
    • ChrisLord.net
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #12 on: March 21, 2015, 04:06:11 AM »
These build instructions complete, but flashing the system image leaves you with a phone that won't boot.

Am I missing something?

ftr, also tried wiping the userdata after flashing system, like the flash script does in the packages distributed from downloads.geeksphone.com, but no luck.
« Last Edit: March 21, 2015, 04:57:32 AM by Cwiiis »

Offline Cwiiis

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
  • Karma: 4
    • View Profile
    • ChrisLord.net
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #13 on: March 21, 2015, 04:59:07 AM »
I notice that the system image generated by this build tree is significantly smaller than the one included from downloads.geeksphone.com (109mb vs. 177mb) - I guess it's possible that could be due to missing localisations and such though...

Offline rjadot

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
  • Karma: 2
    • View Profile
    • Hôdo
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #14 on: March 21, 2015, 01:23:26 PM »
Hello, I'd like to spread the news on some french forums or websites, is there a blog post that gather all informations or should I take all from this forum?