getting_started.rst 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. Getting Started
  2. ===============
  3. Selecting the right version
  4. ---------------------------
  5. The versions of gluon are managed with tags and branches. Every tag is a stable release (like v2014.2 or v2014.3.1), every branch is a development branch, where 2014.3.x is a branch for 2014.3 bugfix releases and master is the unstable branch for the upcoming release. Branches should be used for development purposes, while tags can be used for productive releases. To check out a tag do:
  6. ::
  7. git clone https://github.com/freifunk-gluon/gluon.git gluon
  8. cd gluon
  9. git checkout v2014.3
  10. Please keep in mind that you need the appropriate site configuration for that gluon version.
  11. Building the image
  12. ------------------
  13. To build Gluon, after checking out the repository change to the source root directory as shown above and perform the following commands:
  14. ::
  15. git clone git://github.com/freifunk-gluon/site-ffhl.git site # Get the Freifunk Lübeck site repository - or use your own!
  16. make update # Get other repositories used by Gluon
  17. make # Build Gluon
  18. When calling make, the OpenWRT build environment is prepared/updated. To rebuild
  19. the images only, just use:
  20. ::
  21. make images
  22. The built images can be found in the directory `images`. Of these, the factory
  23. images are to be used when flashing from the original firmware a device came with,
  24. and sysupgrade is to upgrade from other versions of Gluon or any other OpenWRT-based
  25. system.
  26. For the build reserve 6GB of disk space. The build requires packages
  27. for `subversion`, ncurses headers (`libncurses-dev`) and zlib headers
  28. (`libz-dev`).
  29. There are two levels of `make clean`:
  30. ::
  31. make clean
  32. will ensure all packages are rebuilt; this is what you normally want to do after an update.
  33. ::
  34. make dirclean
  35. will clean the entire tree, so the toolchain will be rebuilt as well, which is
  36. not necessary in most cases, and will take a while.
  37. Environment variables
  38. ---------------------
  39. Gluon's build process can be controlled by various environment variables.
  40. GLUON_SITEDIR
  41. Path to the site configuration. Defaults to ``site/``.
  42. GLUON_IMAGEDIR
  43. Path where images will be stored. Defaults to ``images/``.
  44. GLUON_BUILDDIR
  45. Working directory during build. Defaults to ``build/``.
  46. So all in all, to update and rebuild a Gluon build tree, the following commands should be used:
  47. ::
  48. git pull
  49. (cd site && git pull)
  50. make update
  51. make clean
  52. make