Skip to content

Commit

Permalink
docs/build: add a short summary for some scripts
Browse files Browse the repository at this point in the history
This summaries giving an overview of a scripts function and a short summary how
it's doing this.
Only the scripts are covered, that are used by the Freifunk-Berlin firmwarebuiler too.
  • Loading branch information
SvenRoederer committed May 8, 2020
1 parent c90b400 commit d023311
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions docs/dev/build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,47 @@ GLUON_BASE_FEEDS
verbatim. By default, this contains a reference to the Gluon base packages;
when using the Gluon build system to build a non-Gluon system, the variable
can be set to the empty string.

Helper scripts
--------------

Several tasks of the buildprocess have been separated from the Makefile into
external scripts, which are stored in the *scripts* directory. This was done to
ease maintenance of these scripts and the Makefile, by avoiding a lot of escaping.
These scripts are eighter bash or lua scripts that run on the build-system.

default_feeds.sh
Defines the CONSTANT *DEFAULT_FEEDS* with the names of all feeds listed in
*openwrt/feeds.conf.default*

feeds.sh
Creates the *openwrt/feeds.conf* file from *FEEDS* and *DEFAULT_FEEDS*. The
feeds from *FEEDS* are linked to the matching subfolder of *packages/* and not
explicitly defined feeds of *DEFAULT_FEEDS* are setup as dummy (src-dummy).
This *openwrt/feeds.conf* is used to reinstall all packages of all feeds with
the *openwrt/scripts/feeds* tool.

modules.sh
Defines the CONSTANT *GLUON_MODULES* and *FEEDS* by reading the *modules*
file of the root-folder and the site-folder. The returned variables look
like:

- *FEEDS*: "*feedA feedB ...*"
- *GLUON_MODULES*: "*openwrt packages/feedA packages/feedB ...*"

patch.sh
(Re-)applies the patches from the *patches* directory to all *GLUON_MODULES*.
This is done for each repo by:

- create a temporary clone of the downloaded repo from the *packages* folder
- use only branch *base*
- apply all patches via *git am* on top of the *base* branch
- name this branch *patched*
- copy the temporary clone to the *packages* folder
- update all git submodules

update.sh
Sets up a working clone of the *GLUON_MODULES* (external repos) from the external
source and installs it into *packages/* directory. It simply tries to set the *base*
branch of the cloned repo to the correct commit. If this fails it fetches the
upstream branch and tries again to set the local *base* branch.

0 comments on commit d023311

Please sign in to comment.