This repository contains open-source build scripts and closed-source binary blobs for building a Lighthouse image. Compiling the sources using this build system should result in an image identical to the one that is found on the Lighthouses.
This repository supersedes the [Lighthouse firmware repository](https://github.com/Outernet-Project/lighthouse-firmware) used to build the Lighthouse images.
The complete code for the build system is released under GPLv2. See the COPYING file in the source tree for more information.
The ONDD binary located in the rootfs/rootfs_overlay/usr/sbin directory is
released under a different proprietary license. Please see ONDD_LICENSE in the
source tree for more information.
You will need a Linux system to build the image.
The following should be installed on the build box:
- build tools gcc, make, etc
- util-linux
- git
- hg (mercurial)
- libstdc++6 32-bit (on 64-bit systems)
Note that the build may require as much as 40GB of free storage space to complete, and more than 4GB of RAM.
Depending on your machine's CPU and RAM speed, the build may take anywhere from 40 minutes to over 4 hours.
- ::
- $ git clone --recursive https://github.com/Outernet-Project/outerbox.git
To build the rootfs, run make with default target:
$ make
The image file in .pkg format will be available in images directory when
the build is finished. Note that this file is not signed. Outernet will not
provide the signing keys to 3rd parties.
This repository contains two build targets:
- rootfs
- sdboot
These targets result in the exact same userspace, but support different boot
methods. The rootfs target creates a boot image that is suitable for
flashing Lighthouse devices. The sdboot target creates files used to make
live SD cards for booting on Lighthouse and the Wetek Play STB.
The build target can be specified using the B variable:
$ make B=<target name>
Default target is rootfs.
When modifying files in the rootfs overlay, use the following command to rebuild:
$ make rebuild
Before you can modify the build, you should become familiar with Buildroot.
The build can be modified by adding new packages, and editing files in the roofs overlay. The bring up the build configuration menu, use the following command:
$ make menuconfig
Note that when changing the options in the build configuration menu, the
configuration is saved in a temporary directory (rootfs/output/.config).
This gets removed when running make clean. To make the change more
permanent, run make savedefconfig.
To change the Linux kernel configuration you can run:
$ make linux-menuconfig
Similarly, to change the Busybox configuration:
$ make busybox-menuconfig
To have all configurations, run:
$ make saveconfig
When you are happy with the changes, run:
$ make
If you get stuck during the build, it's helpful to show the build log. You can save the build log messages to a file like so:
$ make 2>&1 | tee build.log
The structure of the build is made similar to ORx firmware build and the toolchain is now the buildroot's built-in toolchain rather than the external crosstool-ng one.
The major difference in terms of workflow is that all modifications are
contained within this single repository as opposed to using multiple submodules
as in the previous build. You will find the configuration files in
rootfs/config directory, and the rootfs overlay in the
rootfs/rootfs_overlay directory.