Onion's fork of Lede Project's source build system. The firmware for the Omega2 and Omega2+ is based on the lede-17.01 branch. Please send your PRs against the lede-17.01 branch.
Switch branches/tags
Clone or download
Pull request Compare This branch is 62 commits ahead, 533 commits behind lede-project:lede-17.01.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Add Issue submission template (redirect to bugs.lede-project.org) Sep 1, 2016
config x86: Set default baud rate on Geode images to 115200 Feb 17, 2017
files/etc b201 - starting mountd service earlier in boot sequence Dec 4, 2018
include image: fix ar71xx legacy images Jul 14, 2017
package set higher priority to start mountd service Dec 2, 2018
scripts changed minimal build script to keep kernel intact - need this to com… Nov 20, 2018
target added python3 adc exp module to package repo; factory partition is no… Sep 10, 2018
toolchain toolchain/gdb: update to version 7.12.1 May 29, 2017
tools firmware-utils: fix dgn3500sum compiler warnings Jun 26, 2017
.config v0.2.2: latest i2c lib version, removed device client Nov 7, 2018
.gitattributes add .gitattributes to prevent the git autocrlf option from messing wi… May 8, 2012
.gitignore kernel patch for morse led trigger Jul 19, 2017
BSDmakefile add missing copyright header Feb 26, 2007
CHANGELOG.md updated OnionOS code editor app Dec 8, 2018
Config.in branding: add LEDE branding Mar 24, 2016
DISCLAIMER.md added disclaimer and changelog Jul 21, 2017
Dockerfile fixes to dockerfile Sep 5, 2017
LICENSE finally move buildroot-ng to trunk Mar 20, 2016
Makefile Makefile: ensure that BIN_DIR exists for diffconfig Jan 8, 2017
README.md clarified that Ubuntu linux should be used for the build system Nov 21, 2018
build_info.json v0.2.2: latest i2c lib version, removed device client Nov 7, 2018
feeds.conf b201 - starting mountd service earlier in boot sequence Dec 4, 2018
feeds.conf.default onion feed and build system configuration, package selection, etc Jul 19, 2017
rules.mk build: use mkhash to replace various quirky md5sum/openssl calls Jan 5, 2017


Onion Omega2 Firmware Build System

This buildsystem for the LEDE Linux distribution has been modified by Onion Corporation to build firmware for the Onion Omega2 family of devices.


Onion Corporation is not responsible for any damage to your device caused by using custom firmware or packages not built and released by Onion Corporation.


  • Due to incompatibilities with recent kernel updates, building a firmware with the Ralink APSoC WiFi SoftAP driver will cause a kernel panic during boot
    • This can be fixed by reflashing the Omega's firmware using the Omega's Bootloader and Ethernet Expansion
    • We are working on a new implementation of the WiFi driver, stay tuned!
    • Fixed with release of Onion WiFi Warp Core driver in March 2018

Additional Reading

  • See CHANGELOG.md for a listing of the changes for each firmware version and build
  • See DISCLAIMER.md for Onion's disclaimer regarding this build system

Using this Build System

This buildsystem can be used to create packages and firmware for the Omega2 device. There are two preferred ways to use the buildsystem:

  1. Using the onion/omega2-source Docker image Recommended method
  2. Running the build system on a Linux system

Using the Docker Image

The Docker image takes care of all environmental configuration and is the recommended method. We recommend getting familiar with how Docker before trying this procedure.


  1. Install Docker on your system: https://www.docker.com/get-started
  2. Pull our Docker image by running:
docker pull onion/omega2-source
  1. Once the image has been pulled to your computer, you can run your own container based on the image:
docker run -it onion/omega2-source /bin/bash
  1. Your container will now be up and running, and you can compile the build system by running:

We recommend running Docker on a Ubuntu Linux system. Some users have reported compilation issues when running Docker on Windows and Mac OS.

For more details, see: https://onion.io/2bt-cross-compiling-c-programs-part-1/

Using a Linux System

Not recommended for beginners

Procedure to setup the build system on a Ubuntu Linux System:

  1. Setup Linux environment by installing the required packages:
sudo apt-get update
sudo apt-get install -y build-essential vim git wget curl subversion build-essential libncurses5-dev zlib1g-dev gawk flex quilt git-core unzip libssl-dev python-dev python-pip libxml-parser-perl default-jdk
  1. Download the Build System from Github:
git clone https://github.com/OnionIoT/source.git
cd source
  1. Prepare build system:
sh scripts/onion-feed-setup.sh
git checkout .config

This will initialize & configure all the package feeds as well as setup the .config file to match this repo. With these commands, the firmware built will match the official firmware released by Onion.

  1. Compile Build System:
make -j

Updating the Build System

Applies to both Docker and Linux System installations

Once you've setup your build system and have been using it, you'll want to update it from time to time.

Updating the Package Makefiles

To grab the latest package makefiles for the Onion Package Repo, run this command:

./scripts/feeds update onion

Run this command if you're seeing compilation issues errors in Onion packages, this will likely fix the problem. If not, let us know on the Onion Community.

Grabbing the Latest Build System Code

To grab the latest code from this repo, run:

git pull

If you've made modifications to which packages are built/included in the firmware, these changes will be reflected in your local .config file.

Create a backup copy of your .config file before proceeding. The git pull command will not work unless the .config file is restored to it's original state by running git checkout .config and running git pull again. Note that this will REMOVE all of your customizations!


If you're encountering errors during compilation, you'll likely see something like the following:

make -r world: build failed. Please re-run make with -j1 V=s to see what's going on
/root/source/include/toplevel.mk:198: recipe for target 'world' failed
make: *** [world] Error 1

To get more visibility into the error, re-run your compilation as the error prompt suggests:

make -j1 V=s

The error messages will point you in the direction of the package responsible for the compilation error.

  • If the problematic package is from Onion, see the Updating the Package Makefiles section above. This will likely resolve your issue.
  • If the problematic package is not related to Onion packages, it's likely due to environment issues or issues with the code. Please check with the original authors to get pointers for debugging.

For Docker users, note that we recommend running Docker on a Linux System. Some users have reported compilation issues when running the build system in Docker on Windows and Mac OS, that are not observed on Docker on Linux.

LEDE Linux Distribution

This is the buildsystem for the LEDE Linux distribution.

Please use "make menuconfig" to choose your preferred configuration for the toolchain and firmware.

You need to have installed gcc, binutils, bzip2, flex, python, perl, make, find, grep, diff, unzip, gawk, getopt, subversion, libz-dev and libc headers.

Run "./scripts/feeds update -a" to get all the latest package definitions defined in feeds.conf / feeds.conf.default respectively and "./scripts/feeds install -a" to install symlinks of all of them into package/feeds/.

Use "make menuconfig" to configure your image.

Simply running "make" will build your firmware. It will download all sources, build the cross-compile toolchain, the kernel and all choosen applications.

To build your own firmware you need to have access to a Linux, BSD or MacOSX system (case-sensitive filesystem required). Cygwin will not be supported because of the lack of case sensitiveness in the file system.

Sunshine! Your LEDE Community http://www.lede-project.org