Coder Social home page Coder Social logo

b2g_inari_nightly's Introduction

#Nightly Firefox OS builds for the ZTE Open

NOTE: Bug #965180 is currently preventing me from successfully building nightlies. Will update this script when that bug is resolved

This is the code I'm using to build nightly versions of Firefox OS (Boot-2-Gecko, or b2g for short) for the ZTE Open (config name: inari). I am building on a VPS with 3GB of RAM and Debian 7. I based these steps off of the official Firefox OS Build instructions: https://developer.mozilla.org/en-US/Firefox_OS/Building_and_installing_Firefox_OS

The build_branches.sh and README.md is released under the GPLv2. The other files (boot_adapted_for_zte_open_commercial_editions.img and backup-inari.zip) are released under their owner's respective licenses.

##Download Nightly Builds

You can find the output nightly builds of this script here:

https://daylightpirates.org/b2g_inari_nightly_builds/

##Disclaimer

I offer NO guarantee and NO warranty for these builds. They are purely experimental and NOT official builds. If you brick your phone, it's your own damn fault. I have only tried several of these on the ZTE Open US version, so flashing them to the UK or other country versions may not work as well (I'm open to forks making UK-friendly builds). Also, flashing them to non-ZTE Open devices will probably brick your phone (so don't do it).

##Steps to flash one of these builds to your ZTE Open (US version)

  1. Make sure your ZTE Open has fastboot enabled. If you don't have fastboot enabled (or don't know if you do), follow my instructions here. NOTE: if you updated to ZTE's 1.1 release, FASTBOOT WILL BE DISABLED AGAIN. They say they are working on another release that enables fastboot, but I haven't seen it yet.

  2. Install adb and fastboot.

  3. Enable remote debugging on the device.

  4. Configure udev rules for your device (Linux only, I had to have two lines, one for adb, one for fastboot).

    SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666", GROUP="plugdev" # ZTE Open
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev" # Google device
    
  5. Plug in your phone and make sure it is recognized on adb.

    adb devices
    
  6. Download one of the latest builds from https://daylightpirates.org/b2g_inari_nightly_builds/ (the three nightly build versions are master, v1.2, and v1.3).

  7. Extract all the files to a b2g_inari directory.

    tar -zxvf b2g_inari_<version>_<date>_<commit>.tar.gz
    
  8. Run the flash script in the extracted directory.

    ./flash.sh
    

##Steps to setup your own nightly builder

  1. Install the prerequisites.

    sudo dpkg --add-architecture i386
    sudo apt-get install autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib gcc-4.6 g++-4.6 g++-4.6-multilib cpp g++-4.7 gcc-4.7 gcc-multilib g++-4.7-multilib git lib32ncurses5-dev lib32z1-dev zlib1g:amd64 zlib1g-dev:amd64 zlib1g:i386 zlib1g-dev:i386 libgl1-mesa-dev libx11-dev make zip cmake libxml2-utils openjdk-7-jre openjdk-7-jdk libdbus-glib-1-2 libxt-dev patch
    
  2. Clone the night builder files from github.

    git clone https://github.com/diafygi/b2g_inari_nightly.git ~/b2g_inari_nightly
    
  3. Clone the b2g repo from github.

    git clone git://github.com/mozilla-b2g/B2G.git ~/B2G
    
  4. Create the builds folder.

    mkdir ~/builds
    
  5. Create an entry in your cron (example below runs every morning at 1:00 a.m. local time).

    0 1 * * * ~/b2g_inari_nightly/build_branches.sh &> /tmp/buildlog.log
    
  6. Add a location to your web server to serve the files (I used nginx).

    location /b2g_inari_nightly_builds {
        alias /path/to/builds/;
        autoindex on;
    }
    

##Manually building

If you ever want to run the build script manually.

  1. Follow steps 1-5 of the above "Steps to setup your own nightly builder".

  2. Manually run the "build_branches.sh" script (I'd recommend running it in a screen (since it will take a while).

    screen -S b2g
    ~/b2g_inari_nightly/build_branches.sh
    <ctrl>+a d (detaches the screen)
    screen -r b2g (attaches the screen so you can check on the status)
    

##Support

I am subscribed to the dev-b2g mailing list, so you can post questions about installing the builds there:

https://lists.mozilla.org/listinfo/dev-b2g

If there are bugs with the builds after you install them, please submit bug reports to the main mozilla bug tracker, and please include the branch (master, v1.2, v1.3) and commit hash (from the filename):

https://bugzilla.mozilla.org/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.