2014-02-20 16:22:06 +00:00
|
|
|
Getting Started
|
|
|
|
===============
|
|
|
|
|
2014-10-12 10:17:02 +00:00
|
|
|
Selecting the right version
|
|
|
|
---------------------------
|
|
|
|
|
2014-10-13 10:23:41 +00:00
|
|
|
Gluon's releases are managed using `Git tags`_. If you're a community getting
|
2015-02-26 11:29:53 +00:00
|
|
|
started with Gluon we recommend to use the latest stable release of Gluon.
|
2014-10-12 10:17:02 +00:00
|
|
|
|
2014-10-13 10:23:41 +00:00
|
|
|
Take a look at the `list of gluon releases`_ and notice the latest release,
|
|
|
|
e.g. *v2014.3*.
|
|
|
|
|
|
|
|
Please keep in mind that a matching site configuration for your community
|
|
|
|
is required. Due to new features being added (or sometimes being removed)
|
|
|
|
the format of the site configuration changes slightly between releases.
|
2014-10-12 10:17:02 +00:00
|
|
|
|
2014-10-13 10:23:41 +00:00
|
|
|
Recent releases (starting with *v2014.3.1*) will come with an example
|
|
|
|
configuration located in *docs/site-example/*.
|
2014-10-12 10:17:02 +00:00
|
|
|
|
2014-10-13 10:23:41 +00:00
|
|
|
.. _Git tags: http://git-scm.com/book/en/Git-Basics-Tagging
|
|
|
|
.. _list of gluon releases: https://github.com/freifunk-gluon/gluon/releases
|
2014-10-12 10:17:02 +00:00
|
|
|
|
|
|
|
Building the image
|
|
|
|
------------------
|
|
|
|
|
2014-10-13 10:29:24 +00:00
|
|
|
To build Gluon, first check out the repository. Replace *RELEASE* with the
|
|
|
|
version you'd like to checkout, e.g. *v2014.3*.
|
2014-10-08 21:38:58 +00:00
|
|
|
|
|
|
|
::
|
|
|
|
|
2014-10-13 10:29:24 +00:00
|
|
|
git clone https://github.com/freifunk-gluon/gluon.git gluon -b RELEASE
|
2014-10-08 21:38:58 +00:00
|
|
|
|
2014-10-13 10:23:41 +00:00
|
|
|
This command will create a directory named *gluon/*.
|
|
|
|
It might also tell a scary message about being in a *detached state*.
|
|
|
|
**Don't panic!** Everything's fine.
|
|
|
|
Now, enter the freshly created directory:
|
2014-10-08 21:38:58 +00:00
|
|
|
|
|
|
|
::
|
|
|
|
|
2014-10-13 10:23:41 +00:00
|
|
|
cd gluon
|
|
|
|
|
|
|
|
It's time to add (or create) your site configuration.
|
|
|
|
So let's create the directory *site/*:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
mkdir site
|
|
|
|
cd site
|
|
|
|
|
|
|
|
Copy *site.conf* and *site.mk* from *docs/site-example*:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
cp ../docs/site-example/site.conf .
|
|
|
|
cp ../docs/site-example/site.mk .
|
|
|
|
|
|
|
|
.. note:: On **v2014.3**, take both files from
|
|
|
|
https://github.com/freifunk-gluon/gluon/tree/2014.3.x/docs/site-example
|
2014-10-08 21:38:58 +00:00
|
|
|
|
2014-10-13 10:23:41 +00:00
|
|
|
Edit both files to match your community, then go back to the top-level Gluon
|
|
|
|
directory and build Gluon:
|
2014-07-09 10:43:10 +00:00
|
|
|
|
|
|
|
::
|
|
|
|
|
2014-10-13 10:23:41 +00:00
|
|
|
cd ..
|
2015-03-14 18:20:11 +00:00
|
|
|
make update # Get other repositories used by Gluon
|
|
|
|
make GLUON_TARGET=ar71xx-generic # Build Gluon
|
2014-07-09 10:43:10 +00:00
|
|
|
|
2015-03-14 18:20:11 +00:00
|
|
|
When calling make, the OpenWrt build environment is prepared/updated.
|
2014-10-08 21:38:58 +00:00
|
|
|
In case of errors read the messages carefully and try to fix the stated issues (e.g. install tools not available yet).
|
2014-07-09 10:43:10 +00:00
|
|
|
|
2015-03-14 18:20:11 +00:00
|
|
|
``ar71xx-generic`` is the most common target and will generated images for most of the supported hardware.
|
|
|
|
To see a complete list of supported targets, call ``make`` without setting ``GLUON_TARGET``.
|
2014-07-09 10:43:10 +00:00
|
|
|
|
|
|
|
The built images can be found in the directory `images`. Of these, the factory
|
|
|
|
images are to be used when flashing from the original firmware a device came with,
|
|
|
|
and sysupgrade is to upgrade from other versions of Gluon or any other OpenWRT-based
|
|
|
|
system.
|
|
|
|
|
|
|
|
For the build reserve 6GB of disk space. The build requires packages
|
|
|
|
for `subversion`, ncurses headers (`libncurses-dev`) and zlib headers
|
|
|
|
(`libz-dev`).
|
|
|
|
|
|
|
|
|
|
|
|
There are two levels of `make clean`:
|
|
|
|
|
2014-02-20 16:22:06 +00:00
|
|
|
::
|
|
|
|
|
2015-03-14 18:20:11 +00:00
|
|
|
make clean GLUON_TARGET=ar71xx-generic
|
2014-07-09 10:43:10 +00:00
|
|
|
|
2015-03-14 18:20:11 +00:00
|
|
|
will ensure all packages are rebuilt for a single target; this is what you normally want to do after an update.
|
2014-07-09 10:43:10 +00:00
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
make dirclean
|
|
|
|
|
|
|
|
will clean the entire tree, so the toolchain will be rebuilt as well, which is
|
|
|
|
not necessary in most cases, and will take a while.
|
|
|
|
|
2014-08-30 17:55:17 +00:00
|
|
|
|
|
|
|
Environment variables
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
Gluon's build process can be controlled by various environment variables.
|
|
|
|
|
|
|
|
GLUON_SITEDIR
|
|
|
|
Path to the site configuration. Defaults to ``site/``.
|
|
|
|
|
|
|
|
GLUON_IMAGEDIR
|
|
|
|
Path where images will be stored. Defaults to ``images/``.
|
|
|
|
|
|
|
|
GLUON_BUILDDIR
|
|
|
|
Working directory during build. Defaults to ``build/``.
|
|
|
|
|
|
|
|
|
2015-03-14 18:20:11 +00:00
|
|
|
So all in all, to update and rebuild a Gluon build tree, the following commands should be used (repeat the
|
|
|
|
``make clean`` and ``make`` for all targets you want to build):
|
2014-07-09 10:43:10 +00:00
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
git pull
|
|
|
|
(cd site && git pull)
|
|
|
|
make update
|
2015-03-14 18:20:11 +00:00
|
|
|
make clean GLUON_TARGET=ar71xx-generic
|
|
|
|
make GLUON_TARGET=ar71xx-generic
|