Commit Graph

184 Commits

Author SHA1 Message Date
lemoer
57516fe4e7
Add GLUON_MINIFY flag to allow skipping the minification process (#1916) 2020-05-13 00:45:06 +02:00
Matthias Schiffer
a3569da164
Revert "build: use .SILENT instead of adding @ to each recipe"
This reverts commit 2a8943e516.

.SILENT gets passed down to OpenWrt make as -s through MAKEFLAGS. This
hides certain messages from the build log with V=s.
2020-05-12 01:00:57 +02:00
Matthias Schiffer
53690d83be
build: move package list generation to target_config_lib.lua, fix precedence
The precedence of different package lists was broken since #1876,
disallowing removal of GLUON_FEATURES packages via GLUON_SITE_PACKAGES.

Including all package selections, both implicit defaults and explicit
handling in Gluon, the order of precedence is now the following:

1.  OpenWrt defaults (including target-specific defaults)
2.  Device-specific packages from OpenWrt
3.  Generic default packages (from target/generic)
4.  Target default packages (target/$(GLUON_TARGET))
5.  Removal of opkg for tiny targets
6.  Packages derived from GLUON_FEATURES + GLUON_FEATURES_$(class)
7.  GLUON_SITE_PACKAGES
8.  GLUON_SITE_PACKAGES_$(class)
9.  Device-specific packages from target/$(GLUON_TARGET)
10. Device-specific packages from GLUON_$(device)_SITE_PACKAGES

This also contains various pieces of cleanup:

- No hardcoded order of device classes for target_config.lua arguments
  anymore (in fact, the Makefile doesn't know anything about device
  classes now)
- target_conifg_lib.lua only hardcodes the fallback class for x86, no
  other occurences of specific class names
- Feature -> package list mapping is moved from Makefile to the Lua code
  as well (still implemented in Shell though)
2020-05-03 22:05:20 +02:00
Matthias Schiffer
2a8943e516 build: use .SILENT instead of adding @ to each recipe 2020-04-09 14:30:44 +02:00
Matthias Schiffer
584d215f56 build: allow overriding the base feed list 2020-04-09 14:30:44 +02:00
Matthias Schiffer
6155bf82c8 build: reduce build environment pollution
Instead of exporting various variables (unintendedly making them
available to the OpenWrt build, possibly bypassing .config), pass the
environment only to commands that need it.
2020-04-09 14:30:44 +02:00
Matthias Schiffer
a180bb8689 build: use .ONESHELL
By using .ONESHELL and adding -e to .SHELLFLAGS, we can simplify complex
shell commands (like manifest generation) and gain a simple way to pass
multi-line environment variables into shell commands.

The @ and + flags for recipe commands are moved to the top of each
recipe.
2020-04-09 14:30:44 +02:00
Matthias Schiffer
47f1509e75 build: indent non-recipe Makefile lines with two spaces 2020-04-09 14:30:44 +02:00
David Bauer
051b275055 build: add class specific GLUON_SITE_PACKAGES
This allows to define a list of packages, which are only installed
for a specific device-class.
2020-03-25 02:05:18 +01:00
David Bauer
88bed04679 build: remove hostapd from default packages 2020-03-25 02:05:18 +01:00
David Bauer
1df243d1b3 build: add class specific GLUON_FEATURES 2020-03-25 02:05:18 +01:00
David Bauer
9c52365077 build: introduce device classes
This commit allows to define a device-class flag in the target
definitions. This way, it is possible to distinguish between groups
of devices in the build-process in terms of package or feature
selection.
2020-03-25 02:05:18 +01:00
Jan-Tarek Butt
a2ced263ab
build: add make targets lint, lint-sh, lint-lua
[Matthias Schiffer: minor script improvements]
2019-12-29 15:18:50 +01:00
Matthias Schiffer
335fae1025 build: drop GLUON_WLAN_MESH variable 2019-11-07 19:48:16 +01:00
Matthias Schiffer
912490c026
Add GLUON_DEPRECATED flag
This new build flag is mandatory for now (it may default to 0 in a future
Gluon version). It may be set to the following values:

* 0 - Do not build any images for deprecated devices.
* upgrade - Only build sysupgrade images for deprecated devices.
* full - Build both sysupgrade and factory images for deprecated devices.

"Other" images are handled like factory images, as they are also used for
the initial installation of Gluon on a device.
2019-06-15 23:34:07 +02:00
Matthias Schiffer
071cf7b20f
Switch to Lua for target definitions
The old bash-based parsing code was way too complex. Replace it with Lua.
2019-06-15 23:34:07 +02:00
Petr Štetiar
9dc1ac7f58
build: replace hardcoded paths with overridable variables
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-04-22 22:00:45 +02:00
Matthias Schiffer
134a6460a7
build: move hostapd-mini package from generic target to Makefile
By passing the package name through merge_packages, it becomes possible to
override the package choice in GLUON_SITE_PACKAGES again, for example:

	GLUON_SITE_PACKAGES += -hostapd-mini hostapd
2019-04-19 13:53:09 +02:00
bobcanthelpyou
2c4f022994 build: rename DEVICES to GLUON_DEVICES (#1686) 2019-04-12 01:05:04 +02:00
Matthias Schiffer
210d97c53e
Switch to OpenWrt 18.06 branch 2018-07-10 22:57:40 +02:00
Matthias Schiffer
07dbfea617
gluon-site: disable multidomain support by default 2018-01-26 12:32:46 +01:00
Matthias Schiffer
faceb3932c
config: check if GLUON_DEBUG is 1 rather than nonempty 2018-01-26 12:32:46 +01:00
Matthias Schiffer
020afc856f
gluon-site: install domain configs
The domain configs are not checked yet, and not used for anything.

Based-on-patch-by: lemoer <git@irrelefant.net>
2018-01-19 05:44:25 +01:00
Tata
919dda90b3 build: introduce GLUON_WLAN_MESH build variable (#1298)
defaults to 11s, allowing to build devices without IBSS-support

obsoletes GLUON_ATH10K_MESH
2018-01-10 15:49:33 +01:00
edeso
ab16cea161
build: allow passing relative paths
Allow using relative paths for GLUON_SITEDIR, GLUON_OUTPUTDIR, ...

We also check for whitespace in paths now, as build will not work properly
with whitespace anyways, and Make's abspath would require escaping
otherwise.

[Matthias Schiffer: minor changes, rewrite commit message]
2017-12-25 17:54:42 +01:00
Matthias Schiffer
08cbbf9925
build: move all generic config generation to targets/generic
As the default package list is now handled using the 'packages' directive,
explicit wpad-mini removals in target definitions can be dropped.
2017-09-07 03:21:42 +02:00
Matthias Schiffer
587c5016cb
build: handle generic and target-specific config in the same run of target_config{,_check}.sh
This, together with a new try_config directive, will allow checking the
generic config and make it more flexible.
2017-09-07 00:17:57 +02:00
Matthias Schiffer
b4caa7f766
build: make GLUON_FEATURES error handling compatible with older Make versions
.SHELLSTATUS was not available before Make 4.2.
2017-07-11 04:44:56 +02:00
Matthias Schiffer
6ca841bad5
build: introduce GLUON_FEATURES
To reduce the number of packages that need to be listed in
GLUON_SITE_PACKAGES, this adds a new variable GLUON_FEATURES. Sets of
packages are enabled automatically based on the combination of listed
feature flags.

Site-specified package feeds can provide their own feature flag
definitions.
2017-07-09 02:31:38 +02:00
kb-light
f9f68535aa build: add show-release make target (#1159)
`make show-release` can be used to discover the current release in scripts.
2017-06-26 20:52:22 +02:00
Matthias Schiffer
f9aa784600
build: fix error message in case of missing site repository 2017-02-22 22:40:36 +01:00
Matthias Schiffer
31d3f08f25
treewide: convert all LuCI-based packages to gluon-web 2017-02-22 01:31:25 +01:00
Matthias Schiffer
134ddd411c
build: add list-targets make target
`make list-targets` can be used to discover the available targets in
scripts.
2017-02-16 18:36:20 +01:00
Christof Schulze
b40d94111e build: add GLUON_DEBUG flag, if enabled set CONFIG_DEBUG and do not strip binaries (#1028) 2017-02-11 23:33:07 +01:00
Matthias Schiffer
aaa4150613
build: fix inclusion of site/modules 2017-01-19 17:27:14 +01:00
Matthias Schiffer
78b2775eec
Use LEDE as base for Gluon 2017-01-18 17:21:43 +01:00
Matthias Schiffer
689de50c27
build: ensure that target-specific default packages are built 2016-12-20 13:36:19 +01:00
Matthias Schiffer
b6285800d1
build: clean up postinst scripts after build
OpenWrt does this by default to save some space.
2016-11-22 18:32:07 +01:00
Matthias Schiffer
f98b175da1
build: fix setting of opkg tmpdir
Don't use system /tmp for build.
2016-11-22 18:32:07 +01:00
Matthias Schiffer
acd5cc903e
build: allow profiles to supply an additional file to be copied to the image directory 2016-06-23 00:24:54 +02:00
Matthias Schiffer
9b63127aa5 build: fix race condition on make clean without preceeding normal make 2016-04-27 20:27:26 +02:00
Matthias Schiffer
19f248c755 build: ensure the early path doesn't leak into later build steps
Leads to broken symlink setup by OpenWrt, usually breaking the build with
a "Too many levels of symbolic links" message.

Fixes #716.
2016-04-02 04:31:50 +02:00
Matthias Schiffer
33d028783f build: remove rather useless "patch" and "unpatch" make targets 2016-03-25 23:57:15 +01:00
Matthias Schiffer
86894548c5 Explicitly set SHELL to bash
Fixes some messages if /bin/sh doesn't support 'echo -e'.

Suggested-by: Steffen Möller <steffen_moeller@gmx.de>
2016-03-22 13:01:18 +01:00
Matthias Schiffer
0fd4ff0a68 build: don't overwrite opkg key when it already exists 2016-02-13 17:02:11 +01:00
Matthias Schiffer
f23e024787 Convert site.conf to JSON during build
This will allow us to use its content from other languages than Lua as
well.
2016-01-02 23:49:25 +01:00
Matthias Schiffer
87dd5bb3bb build: copy opkg keypair to target openwrt tree instead of linking it
Fixes #579
2015-12-02 15:11:38 +01:00
Matthias Schiffer
c456fb231f build: improve feed update fix (and remove accidentially committed part) 2015-11-25 11:35:34 +01:00
Matthias Schiffer
2ffd05357c build: ensure the feeds are updated when modules or site modules change 2015-11-25 02:28:37 +01:00
Matthias Schiffer
6e79982442 build: improve logging of tool build 2015-11-02 17:40:29 +01:00