Commit Graph

1368 Commits

Author SHA1 Message Date
Adrian Schmutzler 065a6ac354 build_patches: add support for TP-Link CPE210 v3.20
This adds new strings to the support list for the TP-Link CPE210 v3
that are supposed to work with the existing setup.

Without it, the factory image won't be accepted by the vendor UI on
these newer revisions.

This has been merged upstream in commit 4a2380a1e778.

Backport to 19.07 is planned already, so the patch can be removed
again when we move to the next point release.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2020-07-31 20:46:39 +02:00
Adrian Schmutzler 2e3da1556c build_patches: add updates for vxlan support
This adds a few improvements and fixes for vxlan support.

The following two patches are already backported to openwrt-1907 and
can be dropped after bumping to the next point release:

0011-vxlan-fix-udp-checksum-control.patch
0012-vxlan-bump-and-change-to-PKG_RELEASE.patch

The other two patches won't be backported and have to be kept until
we move up to 20.xx:

0013-vxlan-remove-mandatory-peeraddr.patch
0014-vxlan-add-capability-for-multiple-fdb-entries.patch

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
Tested-by: Johannes Kimmel <fff@bareminimum.eu>
2020-07-31 20:41:21 +02:00
Fabian Bläse ce4146cf4a mt7621: Add support for Netgear R6220
The factory image can either be flashed via the vendor WebUI or
the bootloader using nmrpflash.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-20 14:30:39 +02:00
Fabian Bläse b886c938dc fff-gateway: Add mtr package
mtr can be a very helpful tool when debugging unstable
networks. The tool is able to list packet loss to all
routers to a destination in a nice console-based interface.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-07-14 13:54:46 +02:00
Fabian Bläse 906add6efa README: Adjust some build instructions for recent changes to our firmware
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-06 10:14:20 +02:00
Adrian Schmutzler de8f99005c fff-hoods/fff-web: create link to hood file in fff-hoods
For the layer-3 firmware, we currently do not support a hood file
for automatically creating a mesh. However, the link for the
hood file is still created in fff-web.

Move this setup to fff-hoods, which is specific to the node firmware.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-06-18 13:05:49 +02:00
Fabian Bläse 1faaec432a fff-network: Group network files by arch, not by target
OpenWrt only builds and installs a packet for each architecture.
If a package is already fully built and installed for a architecture,
it is not rebuilt.

Because we have two different BSPs building two different targets (BOARDs)
using the same architecture (ath79 and ar71xx, mips), the fff-network package
is not reinstalled when switching between those.

However, we have defined an install step, which copies the necessary network
files seperated by board. But because the package is not rebuilt when switching
targets, the wrong network files might be present in the package.

To resolve this issue, the network files are now seperated by ARCH instead of
the target (i.e. the BOARD variable).

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Robert Langhammer <rlanghammer@web.de>
[bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-18 12:47:05 +02:00
Adrian Schmutzler 1cf4d762ff treewide: move devices from ar71xx to ath79
This patch moves device support for ar71xx devices that are supported
in ath79. Building them with ath79 will be the new default.

The only devices remaining in ar71xx will be the following, as backporting
them to openwrt-19.07 is too complicated:
- cpe210-v1
- cpe510-v1

Accordingly, no tiny devices are left in ar71xx and we can drop the relevant
patches, and build ar71xx as generic again.

For the tl-wr741nd-v2, in ath79 the tplink_tl-wr741-v1 image is used.

The move from ar71xx to ath79 requires some adjustments on the way:
- The board names and image names on ath79 contain the vendor name,
  where the former have it separated by a comma (tplink,cpe210-v2)
  and the latter use an underscore (tplink_cpe210-v2). It is
  safe to assume that this is the only difference between board and
  image names.
  Consequently, the ath79 devices will use their full board name also
  in our firmware. A lot of renames in fff-boardname can be dropped.
  The rename for fff-sysupgrade is already present in fff-upgrade.sh
  While at it, fix that for the WDR4900 v1 as well.
- Due to a different switch driver, the startup of ethernet devices
  is altered, which leads to eth0 and eth1 being swapped for some ath79
  devices compared to ar71xx. This has been adjusted for SWITCHDEV/WANDEV
  and MAC address setup.
- Since we have direct support for the AC Mesh now, use the proper
  name instead of the AC Lite image. For Ubiquiti, different device
  variants are now available as separate images.
- Remove left-over power-m-xw entry in cpuport file

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2020-06-18 12:41:03 +02:00
Fabian Bläse 823bcd774a build_patches: backport fix for squashfs build with gcc 10
This patch is already included in the openwrt-19.07 branch,
so our backport can be removed when upgrading to or past
OpenWrt 19.07.4.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[adjust commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-18 12:29:33 +02:00
Fabian Bläse 328beebe32 fff-wireguard: Use babel type wired for wireguard babel peers
The babel interface type 'tunnel' has some disadvantageous properties for
our network.

First, babel tries to evaluate the tunnel performance using the rtt. However,
this makes the network quite unstable, as rtt might fluctuate a lot, especially
on less reliable connections (e.g. LTE). Instead of fully falling back to an alternate
route, this rtt evaluation leads to a lot of flapping routes. Additionally, rtt
evaluation changes the metric of routes quite often, which leads to many unnessessary
babel messages in our network.

Also, babeld disables split-horizon processing on 'tunnel' interfaces per default.
However, split-horizon processing can be done in our point-to-point tunnel setup without
any issues and has the advantage of significantly reduced babel messages on a link with
many uplink routes.

Therefore, wireguard babel peers now use the interface type 'wired'.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
[bump PKG_RELEASE, adjust commit title prefix]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-18 12:24:40 +02:00
Fabian Bläse 9d000c96e0 alfred-proxy: Make curl silent
As we now log output of cron scripts to syslog, the debug
output of curl spams the rather short-lived syslog. As this
debug output is unessesary most of the time, it now is disabled.

Instead, curl's silent option is used, together with '-S', which
reenables error output.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-18 12:22:22 +02:00
Fabian Bläse 5cd46fb17b fff-hoods: Remove hardcoded IPv4 address and foreign domain
IPv4 is not a requirement for VPN nodes. However, a working DNS
is a requirement for nodes connecting via VPN. Therefore the
hardcoded IPv4 address is removed from the internet test.

To improve readability, a loop is used instead of having a seperate
ping command for each host. The ping utility built into our firmware
supports both IPv4 and IPv6.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-18 12:04:07 +02:00
Adrian Schmutzler 225116dfd2 OpenWrt: bump to 19.07.3
Bump main repo, packages and routing repos.

Refresh patches, drop upstreamed ones.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-06-18 11:58:54 +02:00
Fabian Bläse 65f2af1ced fff-hoods: Add missing dependencies
The configurehood script unconditionally sources various
libraries from other packages, which previously have not
been included in the fff-hoods package dependencies.

Add the missing dependencies to fff-network, fff-wireless,
fff-timeserver and jshn.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-05-05 13:45:04 +02:00
Adrian Schmutzler d237fe5598 fff-timeserver: remove -q from uci and drop unused library source
Do not suppress errors from uci command without a reason.

While at it, remove unused sourcing of library. This is a left-over
from the transition to KeyXchangeV2.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-05-05 13:44:30 +02:00
Adrian Schmutzler 5e4339e954 fff-alfred-proxy: remove uci -q and execute bit for uci-defaults
Do not suppress errors from uci command without a reason.

Despite, remove executable bit for sourced file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-05-05 13:43:45 +02:00
Adrian Schmutzler 7a54c56531 fff-gateway: Use return for errors in config version check
The concept of configuregateway is to respond on the return codes
of the gateway.d files, and exit if anyone returns something different
than zero.

Thus, let's not exit in gateway.d files directly, but stick to that
logic and return 1.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-05-05 13:42:42 +02:00
Adrian Schmutzler 6d91d805a7 fff-gateway: improve order of commands for config version check
Move retrieval of config version, as it makes sense to check for
existance of containing file beforehand.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-05-05 13:42:19 +02:00
Adrian Schmutzler 4791c24608 fff-gateway: explicitly return status code 0 for version check
We check the return code in configuregateway, so let's give success
explicitly. This might not be strictly necessary now, but providing
it will make our lifes easier if the file is changed later.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-05-05 13:41:53 +02:00
Adrian Schmutzler 2f9e5f4af1 fff-gateway: provide specific error if config version is not set
This explicitly checks whether the config version is set at all,
instead of just comparing it, and provides a specific error message
for that case.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-05-05 13:41:10 +02:00
Adrian Schmutzler f8ced0cc04 fff-gateway: suppress unwanted error for config existance check
We provide our own error message, so suppress the built-in one.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-05-05 13:40:18 +02:00
Fabian Bläse f7c5f949f7 ath10k: Increase buffer to fix >1500 MTU frames
The ath10k seems to have an issue with large frames
transmitted over 802.11s. This issue has been worked around
in ath10k-ct. The same patch has now been merged into OpenWrt.

As this might fix mesh issues with ath10k devices, it is backported
to our firmware using a build patch.

Link: 066ec97167
Link: https://github.com/greearb/ath10k-ct/issues/89
Link: 9e5ab25027

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-05-01 17:48:06 +02:00
Fabian Bläse eac8292dba fff-macnock: update to latest revision
This updates the macnocker to a newer revision,
which moves 'interface not running' log messages to
log_trace, so it only appears when the highest debugging
level is activated.

Fixes: #139
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-05-01 17:47:25 +02:00
Adrian Schmutzler d649151399 fff-network: set correct CPUPORT for new mt76x8 devices
When adding support for the TP-Link Archer C50 v3 and TL-WR841N v13,
their CPU port provided for layer-3 setup has not been set correctly.

Do it now.

Fixes: d165915178 ("ramips/mt76x8: Add support for TP-Link Archer C50 v3")
Fixes: 9343153547 ("ramips/mt76x8: Add support for TP-Link TL-WR841N v13")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-05-01 17:47:18 +02:00
Fabian Bläse b9fe20c8e7 fff-macnock: Update to latest revision
This updates the macnocker to a newer revision, which
fixes log spamming if the batman interface is not running.

Fixes: #104
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-23 12:00:17 +02:00
Adrian Schmutzler 173ce577ae fff-macnock: clean up package variables
This removes unnecessary package variables and rearranges the
remaining ones based on the common style in OpenWrt trunk.

In particular, this drops PKG_VERSION in favor of PKG_SOURCE_DATE,
since it does not seem reasonable to tag a version every time we
want to pull it. Despite, while we effectively pull via the
variable PKG_SOURCE_VERSION anyway, the PKG_VERSION might even
have hidden changes if not properly adjusted.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-23 12:00:17 +02:00
Adrian Schmutzler 776cfe9f86 treewide: add "exit 0" for uci-defaults files
uci-defaults scripts are supposed to be run once after firstboot
and then removed. However, the removal only takes place if the
subshell created for the sourced scripts returns exit code 0.

For some of the files, the last command returned a different exit
code, though, leading to the script remaining in its location and
being executed for every boot.

To prevent cases like the latter, this adds an "exit 0" to all
uci-defaults files in our package store. While at it, remove the
shebang for all these files since they are sourced (and not
executed).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-23 12:00:17 +02:00
Adrian Schmutzler 961c4da648 packages/micrond: show stdout and stderr in log
So far, all output created by scripts run with micrond has been
discarded. Since there is no reason for that and it also does not
match the expected behavior, this enables both stdout and stderr
output for the service.

If not desired, a user can still use >/dev/null or similar in his/her
micrond jobs to disable output easily and similar to what it would be
on other systems.

For our firmware, this will mean that all micrond script will now
start to spam logread.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-23 12:00:17 +02:00
Adrian Schmutzler da6013ec97 fff-simple-tc: provide status via nodewatcher
Add traffic control status and rates to alfred data, which is also
available for the Monitoring then.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-23 12:00:17 +02:00
Fabian Bläse ed73e00588 babeld: Update babeld to 1.9.2
babeld is updated to 1.9.2 using a feed patch.
The new version includes fixes a few minor issues.

With babeld 1.9.2 a fix for IPv4 xroutes has been
introduced. Therefore, our own patch isn't necessary anymore,
so it is removed.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-23 12:00:17 +02:00
Fabian Bläse c7e9f514a5 nodewatcher: Only report batman_adv version if installed
The version of batman_adv is read in a script inside fff-nodewatcher,
so it is possible that batman_adv is not installed.

Therefore, a new test is added to check if batman_adv is installed,
before reading and reporting its version.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-23 12:00:17 +02:00
Fabian Bläse f26463628b nodewatcher: Exit nodewatcher if subscript fails
If a subscript exits with an exit status != 0, its output should not
be used. Because sending incomplete data sets might result in weird
edge cases, the nodewatcher is terminated and the output of other
subscripts is discarded.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-23 12:00:11 +02:00
Fabian Bläse 25c5edcf3c nodewatcher: Add prefix to debug messages
Because nodewatcher is executed using a cron, but
our cron has no way to report the origin of a specific
log entry, a 'nodewatcher:' prefix is added to all debug
output.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-23 11:56:28 +02:00
Fabian Bläse 2eb675790e nodewatcher.d: Remove $(date) from debug output
Debug output is written to stderr now.
Therefore the output is happening in real time and
the current date and time are not necessary anymore.

Typically the date and time are added by the syslog
daemon.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-23 11:56:19 +02:00
Fabian Bläse c1f694c319 nodewatcher: Output to stderr instead of log file
Maintaining a logfile manually is complicated and
has no major improvements over just logging to stderr,
because nodewatcher is no deamon and can be run manually
for debugging purposes.

Also, the debug output from subscripts currently is not
written to the log file anyway and the debug level is not
used eiher.

Therefore, the file logging and debug level is removed
from nodewatcher, which simplifies the code a bit.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-23 11:56:01 +02:00
Adrian Schmutzler 6c947f8c91 fff-hoods: Replace wifi command with reload_config
If wireless config has changed, reload_config will automatically
adjust wireless interfaces.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00
Adrian Schmutzler a8f7dce6fc vpn-select: indent contents of make_config function
This is a purely cosmetic change to enhance the readability
of the function.

Also add some empty lines and comments for overview.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00
Adrian Schmutzler 91808ad710 nodewatcher: Use Makefile version for nodewatcher data
So far, nodewatcher version has to be specified twice, once in the
Makefile and again in the nodewatcher script.

With this patch, a version file is created during build than can
be read in nodewatcher script, so version only has to be specified
once anymore. The file name mimics the version files already present
for OpenWrt and our firmware.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00
Adrian Schmutzler 498c6ad963 fff-nodewatcher: Consolidate code in nodewatcher.d/10-systemdata.sh
This consolidates the code in nodewatcher.d/10-systemdata.sh by:

- Slightly reordering data retrieval
- Moving XML node assembly to corresponding data retrieval, making
  the whole file easier to read
- Changing some if statements to shorter binary condition shortcuts
- Reduce the number of variables by merging some code into the XML
  node assembly

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00
Adrian Schmutzler 18e00a4e70 nodewatcher.d: Tiny cosmetic improvements
This applies some tiny improvements to just-moved nodewatcher.d code:

- Remove comments about obvious things
- Introduce newlines to make code easier to read
- Use shorter conditional syntax for easy cases

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00
Adrian Schmutzler 1c3243dd18 fff-nodewatcher: Tidy up uci-defaults script
This solves the following issues with the uci-defaults script in
fff-nodewatcher:

- Remove /bin/sh in non-executable file
- Only commit to changed config
- Use "-1" for uci node indexing, as this will be the node just
  created

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00
Tim Niemeyer b6c7acd704 nodewatcher: split into nodewatcher.d scripts for individual task
This splits up the data extraction/assembly of the nodewatcher
script into several parts and distributes them across packages, so
that each nodewatcher.d subscript is located in the package providing
the relevant functionality. This allows to extend the nodewatcher data
by enabling/disabling packages.
This scheme is not perfectly fulfilled for fff-network vs. fff-wireless,
as data cannot uniquely assigned there and the XML syntax does not allow
separation anyway.

In general, this moves code without applying code improvements, yielding
at an easy comparison of moved fragments. However, the following changes
were done to improve experience:

- The function writing debug output has been renamed from "err" to "debug"
- Since we catch the stdout of the nodewatcher.d functions anyway,
  those scripts were adjusted to echo output directly instead of first
  writing it into a variable and then outputting it at the end.
- The uci config has been kept, but initialization for the network part
  has been moved to the fff-network package.
- Space indent has been changed to tab, which is more common in the
  firmware and requires less space.
- Remove support for nodewatcher run without uci config. Script-based
  nodewatcher on other platforms will have altered code anyway, and
  splitting it up will prevent effective use as a blueprint for those
  cases. After this change, nodewatcher in firmware is supposed to be
  used only for this firmware.

Note that since the nodewatcher.d scripts are evaluated by using their
echo output, having a function created uncaught output to stdout there
will corrupt the XML.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
[rebase and adjustments for current master, use simpler mechanism to
call nodewatcher.d scripts, use tab indent, remove debug() definition
where not needed, do not remove uci config, add commit message, use
echo -n]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[remove 'local' modifier for variable not inside a function, fix typo]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00
Fabian Bläse 9957cd4318 fff-gateway: make uci query for vlan ports quiet
The user might create a vlan without any ports.
This setup lead to "uci: Entry not found" error messages,
while still working as intended.

The '-q' flag is added to the corresponding uci query to
hide this error. While this isn't strictly necessary, the
uci subcommand is quoted to bring it in line with the other
subcommands.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-17 17:08:16 +02:00
Adrian Schmutzler 12422a5ea4 buildscript: check selected_bsp link target
While buildscript checks whether selected_bsp exists, it does not
verify whether it is pointing to a sensible direction.

Since we use the target file name and content to derive build folders
etc., though, this patch adds a check and exits the script if the
link is broken.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-17 17:05:08 +02:00
Fabian Bläse 5e37a2e9ba buildscript: clean feeds before updating them
When installing feed packages that already have been installed
from a different feed, OpenWrts feeds script does not change
the feed, but keeps the already installed package.

Therefore, packages are not updated to the correct feed on
updatefeeds, when the package is moved to a different feed
in our buildscript.

The update_feeds function already contains code to clean the already
installed feeds, but only removes the symlinks to the feed directory.
OpenWrts package installation directory (packages/feeds/*) is not
removed, however.

The 'clean' command of the scripts/feeds script properly cleans up
both directories. Hence, the 'rm' command is replaced with it.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-17 17:04:58 +02:00
Adrian Schmutzler 9b90dcb98e buildscript: update gluon packages repository
Our checkout of the Gluon packages is from 2017. This uses a recent
version which pulls in some improvements for simple-tc.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-17 15:50:09 +02:00
Adrian Schmutzler 958f9d09ca buildscript: use micrond from official package repo
micrond has been accepted into the official OpenWrt package repo
and is available in the openwrt-19.07 stable branch. Use this
source instead of the Gluon packages.

During merge, a few fixes/adjustments were made, including transfer
to procd.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-17 15:50:02 +02:00
Adrian Schmutzler 311bc8fc0f buildscript: remove kmod-batman-adv-legacy from package list
We do not use this package anymore, so remove it from package
selector as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-17 15:49:51 +02:00
Fabian Bläse 11ab5f15a7 bsp: autogenerate machine variable from filename
Because we nowadays only use bsp files as a wrapper for
OpenWrt targets, the machine variable got obsolete.
It's only use today is to locate the configuration folder for
a specific bsp.

Instead of explicitly defining this variable, it is now generated
from the filename of the bsp.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-17 15:49:46 +02:00
Johannes Kimmel a16800c683 fff-gateway: add vxlan package
This adds vxlan support to facilitate testing future uses for vxlan.

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-15 16:21:29 +02:00