Commit Graph

1277 Commits

Author SHA1 Message Date
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
Fabian Bläse 1a86626f17 bsp: Rename files to include subtarget
Because we might want to support different subtargets
inside a single target in the future, the name is changed
so it includes the subtarget as well.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-15 16:13:50 +02:00
Dominik Heidler 9343153547 ramips/mt76x8: Add support for TP-Link TL-WR841N v13
Flashing instructions:

The image can only be flashed via TFTP, not via WebUI.

1. Configure PC with static IP 192.168.0.66/24 and tftp server.
2. Rename "...-tftp-recovery.bin" to "tp_recovery.bin" and place
   it in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
   the router and keep button pressed for around 6-7 seconds, until
   device starts downloading the file.
4. Router will download file from server, write it to flash and reboot.

ref: 24043a0d2e

Signed-off-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[add commit message, rebase]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-15 16:08:44 +02:00
Fabian Bläse d165915178 ramips/mt76x8: Add support for TP-Link Archer C50 v3
This adds support for the TP-Link Archer C50 v3 and adds the
necessary mt76x8 (sub-)target to our firmare.

Flashing instructions:

The image can only be flashed via TFTP, not via WebUI.

1. Configure PC with static IP 192.168.0.66/24 and tftp server.
2. Rename "...-tftp-recovery.bin" to "tp_recovery.bin" and place it
   in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
   the router and keep button pressed for around 6-7 seconds, until
   device starts downloading the file.
4. Router will download file from server, write it to flash and reboot.

ref: 14951e8f8e

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[extend commit title and add commit message, rebase]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-15 16:08:28 +02:00
Adrian Schmutzler 157ddf2bc9 buildscript: copy all squashfs images for one device
So far, we are selecting specific squashfs images to be copied
from openwrt bin folder to our "final" bin directory. This has
the disadvantage that additional image types/names have to be
added explicitly, bloating the relevant code in buildscript.

With this patch, this behavior is changed in order to copy all
squashfs images for a particular device. To achieve that, the
image names in the bsp files are changed to contain a wildcard
that will be evaluated in buildscript.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-15 15:59:28 +02:00
Adrian Schmutzler 873dd49d99 bsp: rename mpc85xx target according to common scheme
So far, the bsp for the mpc85xx target has been named "wdr4900" since
this device was the only one built from it.

Since all other files use the target name, though, use the target
name for mpc85xx as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-15 15:56:51 +02:00
Adrian Schmutzler 6a39109fec bsp: harmonize settings across targets
This patch harmonizes the options in the OpenWrt .config files
across targets. Many of them have evolved somewhat independently,
and unifying them should make maintenance easier in the future.

The most important change is the consistent per-device build applied:
When building devices with OpenWrt, you have the option to either
build a default image for the (sub)target, an image for a single
device, or images for multiple devices. This is controlled by
CONFIG_TARGET_MULTI_PROFILE. In addition, the option
CONFIG_TARGET_PER_DEVICE_ROOTFS will toggle whether packages
are selected per-device or per-target.

When we build only a single device per target, setting these options
will only have minor effect. As soon as a second device is added
though, impact will be heavy, and devices may end up with no/wrong
packages.

Thus, this patch sets both options to "y" on all targets, which
essentially eliminates this problem for the future (and corresponds
to what the OpenWrt build bots do).

The only option not harmonized is the CONFIG_TARGET_SQUASHFS_BLOCK_SIZE.

All ath10k settings are target-dependent as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-02 13:08:55 +02:00
Adrian Schmutzler eb784bd0db fff-sysupgrade: replace comma by underscore in image file names
On modern targets in OpenWrt, the board name follows the
"vendor,model" syntax. Since commas in file names are uncommon
and ugly, file names use the same pattern with an underscore,
"vendor_model".

Since this also applies to image file names, this patch
adjusts fff-upgrade.sh to replace the comma from board name
by an underscore for all devices. This should be possible
without harm as OpenWrt images can safely be expected to
either contain a comma in the right place or no comma at all.

It has been discussed whether the same should be applied to
the network.* files as well. However, expecting those to
be removed in the foreseeable future does make this undesirable,
as a lot of code would be inserted now and be removed again a few
months later, only to fix the name for one device.

For the same reason, we won't touch the board name replace
for the TL-WDR4900 v1 for now.

Suggested-by: Fabian Bläse <fabian@blaese.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-02 13:07:26 +02:00
Adrian Schmutzler aca1223f06 bsp: use mainline/QCA driver and firmware for ath10k WiFi
OpenWrt offers two variants of ath10k driver and firmware, the
"normal" mainline/QCA variant and the "CT" variant [1]
developed as fork by Candela Technologies.
Both deviate from each other with respect to their feature set,
level of support and system impact (i.e. memory consumption).

Since the 19.07 release, OpenWrt has made the "CT" variant its
default for supporting (almost) all ath10k chips. [2]
However, for this firmware the CT driver/firmware introduces a number
of (potential) drawbacks:

- CT memory consumption seems to be higher. (This still needs to be
  verified for the new kmod-ath10k-ct-smallbuffers variant.) This
  is particularly a problem on several ath10k devices with 64 MB RAM,
  where the devices run into OOM regularly (i.e. C60 v1/v2). [3]
- Though CT has active support, it is still just a fork effectively
  maintained by one person.
- With CT driver/firmware there are frequent reports that the
  combination of AP and 802.11s is not working. [4] While this issue
  couldn't be reproduced in recent tests, it still is explicitly
  not supported, and there is no interest to change that at the
  moment. [5]

Due to these reasons, it seems more appropriate for us to use the
mainline/QCA variant of ath10k driver and firmwares. This patch
applies that to all affected devices.

Note that currently the mainline driver also benefits from a local
patch in OpenWrt that reduces the memory footprint. This patch has
been removed in master, so we will need to keep it locally when using
a 20.xx OpenWrt release. [6]

[1] https://github.com/greearb/ath10k-ct.git
[2] 61b5b4971e
[3] 1ac627024d
[4] https://github.com/freifunk-berlin/firmware/issues/696
    https://forum.openwrt.org/t/ath10k-ct-and-802-11s-mesh-not-working-on-archer-c7/13877
[5] https://github.com/openwrt/openwrt/pull/2341#issuecomment-580904873
[6] 1e27befe63

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-04-02 13:06:40 +02:00
Fabian Bläse 44e9376a37 kernel: Reduce memory usage by reducing squashfs fragment cache size
Reducing the amount of squashfs fragments cached in memory might reduce
memory usage, especially for systems with very little memory and
big squashfs blocksizes.

Because only ar71xx-tiny contains 32/4 (memory/flash) devices, the
reduction of the fragment cache is only applied to the ar71xx bsp.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-02 13:06:31 +02:00
Adrian Schmutzler be80e17c57 ar71xx: remove non-existant ubnt-power-m-xw
The ubnt-power-m-xw identifier was introduced in 0447d0c709
("fff-boardname: introduce new ubnt boards") assuming that the
Ubiquiti Powerbeam M2 XW had a separate model identifier in
/var/sysinfo/model (otherwise, it was derived from loco-m-xw image).

However, OpenWrt has never known about a PowerBeam device. Consequently,
on devices nothing changed, and all PowerBeam devices were still
recognized as Nanostation Loco M XW.

Thus, this patch removes all references to a ubnt-power-m-xw, as it's
never been working anyway.

Note that this also implies that any user of a PowerBeam would have
used the wrong antenna_gain values of the Loco M XW by default (and
will continue to do so).

However, actually the Loco M XW has never been tested or supported
officially for this firmware. The image was only used for the
support of the Powerbeam M2 XW in 68314ea943 ("Add support for
Powerbeam M2 XW"). However, since the firmware is expected to work
and seems to be installed on several devices already, we won't remove
the image for now.

For further reference:
The board and model names set in ar71xx are found in the OpenWrt file
target/linux/ar71xx/base-files/lib/ar71xx.sh

Fixes: 0447d0c709 ("fff-boardname: introduce new ubnt boards")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-31 23:35:40 +02:00
Christian Dresel e3df4720f8 fff-webui: show fastd public key in webui
User can see the fastd public key in the webui

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-30 11:57:15 +02:00
Fabian Bläse 3a845b541b Add support for Archer C2600
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-03-30 11:56:17 +02:00
Fabian Bläse d02ea69801 mt7621: adjust for new filenames in OpenWrt 19.07
The suffix for Edgerouter X (SFP) have been changed
from '.tar' to '.bin'. Therefore our BSP has to be adjusted
to copy the correct file path.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-03-22 20:17:28 +01:00
Adrian Schmutzler 4bb31a75f2 show_info: Treat case of missing simple-tc package
Suppress error in show_info when simple-tc is not built into the
firmware.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-22 20:01:12 +01:00
Adrian Schmutzler 93cebbf3f7 packages/fff: Add fff-simple-tc
This new packages is meant to serve as meta-package to store
setup for simple-tc.

This achieves two objectives:
- Increase general maintainability by having relevant code in one
  location.
- Provide the option to include/exclude simple-tc functionality
  just by selecting/deselecting the fff-simple-tc package.

This will allow for easier testing of image size impact of this
functionality, too.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-22 20:00:55 +01:00
Adrian Schmutzler aa0d237fa9 fff-network: apply upstream swap of MAC addresses for Archer C60
The ethernet MAC addresses of the Archer C60 v1/v2 were swapped
compared to the vendor assignment. This has been fixed in OpenWrt
after 19.07.2.

Apply this to our firmware already, so we cannot forget it later
and prevent having messed-up br-mesh MAC addresses.

The OpenWrt patches can be removed again when bumping to 19.07.3.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-15 22:04:56 +01:00
Adrian Schmutzler aa42a39ce2 fff-network: use static MAC address location for TL-WR1043ND v4
At the moment, the ETHMESHMAC for the TL-WR1043ND v4 is loaded from
the config partition. The data there is written by the stock firmware,
and thus is dependent on the version installed before and may even
vary in position.

Instead, this patch uses the product-info partition, which is not
modified by stock firmware.

While at it, update the sourced library files and the comment for
both v4 and v5.

ref: 53839da46e

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-15 22:04:55 +01:00
Adrian Schmutzler 73e227cdc8 fff-network: account for MAC address change of TL-WDR3600/43x0
In OpenWrt commit 27eea249213b ("ar71xx: fix MAC address setup for
TL-WDR4300 board") the LAN/WAN MAC addresses for the TL-WDR3600,
TL-WDR4300 and TL-WDR4310 were changed.

This creates an overlap of the LAN und 5 GHz MAC addresses, where
the first will also affect the BATMAN interface eth0.3.

To keep BATMAN interfaces with separate addresses, this patch will
set the ETHMESHMAC to eth0 +1, corresponding to the virtual WAN device
(VLAN 2) OpenWrt sets up (which we aren't using anyway).

ref: https://github.com/openwrt/openwrt/commit/27eea249213b04a372491009850926f9282d13

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-15 22:04:54 +01:00
Adrian Schmutzler 7614dc5584 fff-network: account for MAC address change of Archer C7 v2
In OpenWrt commit 8a21bc36229d ("ar71xx: fix MAC addresses for
Archer C5 v1, C7 v1/v2, WDR4900 v2") the WiFi MAC addresses for
the Archer C7 v2 were changed.

This creates an overlap of the LAN und 2.4 GHz MAC addresses, where
the first will also affect the BATMAN interface eth1.3.

To keep BATMAN interfaces with separate addresses, this patch will
set the ETHMESHMAC from eth0, corresponding to the separate WAN
device we are not using in our firmware anyway.

ref: https://github.com/openwrt/openwrt/commit/8a21bc36229d3eabad213ae47fddb4d86d76ac

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-15 22:04:53 +01:00
Adrian Schmutzler cabb8eca74 bsp: remove rssileds package for all devices
The rssileds package has never been working for our firmware, and
most probably there is no way to make it work with the current
frequent status changes of WiFi interfaces.

So, the package is just wasted space on the flash, particularly for
the "tiny" TP-Link WA850RE v1. Despite, it has a dependency on
libiwinfo, which we plan to remove as well.

Consequently, this patch removes the package for all devices. As the
package is selected per-device, we also have to remove it per-device.

The choice of devices is based on which of them includes the package
in OpenWrt 19.07.2.

The script for disabling rssileds is kept as well, as the manual
removal of the package is prone to have it overlooked for newly added
devices or when OpenWrt changes the setting for existing ones.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-03-15 22:04:52 +01:00
Fabian Bläse 7046d5b563 build: remove iwinfo and libiwinfo to save space
The iwinfo utility is not used anywhere, so it can be removed.
This saves an additional xy KiB of space in the compressed binary,
which allows building our firmware with OpenWRT 19.07.2 for
non-LZMA 4 MiB flash devices.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-03-15 22:04:49 +01:00
Fabian Bläse 0c3429f3fb fff-web: Use iw instead of iwinfo for wifiscan
This prepares the fff-web package for removal of the iwinfo binary.

Instead of using the 'iwinfo' wrapper, the nl80211 utility 'iw' is used
from now on, which is possible, because we only support devices with
nl80211 drivers anyway.

Because iw reports the frequency instead of the channel, and does not allow
easily parsing the mode and encryption parameters, the table is adjusted accordingly.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-03-15 22:04:48 +01:00
Fabian Bläse 99cd4f4027 ar71xx: Use OpenWRT default for squashfs blocksize
Previously, the squashfs blocksize has been increased to 512 bytes,
to increase compression efficiency, because the OpenWRT default blocksize
has been only 256 bytes.

Since OpenWRT 18.06 the blocksize has been increased to 1024 bytes for
devices with a small flash. Because increased blocksize gives us additional
headroom for devices with only 4 MiB flash, our own 512 byte override is removed.

The default blocksize for the other targets in our firmware is 256, which is lower
than our current override. Therefore it is not changed in this commit.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-03-15 22:04:47 +01:00
Fabian Bläse 2184d226ad Replace wpad-mini with hostapd-mini
A wpa_supplicant is not necessary for our firmware,
because it does not connect to encrypted WiFi networks.

Therefore it is possible to use the smaller hostapd-mini
instead of the combined wpad-mini packages.

Some user might use an unsupported setup, where an encrypted
wifi is used for wan uplink. This is not possible anymore.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2020-03-15 22:04:46 +01:00
Fabian Bläse fe6ae924aa fff-hoods: manually create wifi station interface
The mac80211 interface script in OpenWrt depends on wpa_supplicant
for the creation of station interfaces. While this is conveniant, it
isn't strictly necessary for connecting to unencrypted networks.

To be able to create station interfaces if wpa_supplicant is removed,
the station interface for obtaining the initial configuration is now
created using iw commands only.

This makes it possible to replace wpad-mini with hostapd-mini, which
does not include wpa_supplicant and therefore shrinks the uncompressed
binary by around 200KiB.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-03-15 22:04:45 +01:00
Adrian Schmutzler 5ebb60f0ef fff-batman-adv/-server: Remove KMOD for symbols
This follows the changes introduced in
6a25fd5ce5

This is a result of the switch to openwrt-19.07.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[fabian@blaese.de: Rebase onto fff firmware master]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2020-03-15 22:04:44 +01:00
Adrian Schmutzler 9f25f5dc35 batman-adv: Split batadv proto in meshif and hardif part
This migrates to the new configuration architecture introduced
and required in
54af5a209e

This is a side-effect of the switch to openwrt-19.07.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[fabian@blaese.de: Rebase onto fff firmware master]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2020-03-15 22:04:43 +01:00
Fabian Bläse 68f9bae58f bsp: Adjust configs for updated OpenWRT defaults
The bsp .config only contain configuration, which differs from
the OpenWRT defaults. With OpenWRT 19.07, some defaults were
changed, so overriding them isn't necessary anymore.

This includes the switch from ath10k to ath10k-ct, which is now
default in OpenWRT. Our previous setup used the ct driver, but the
non-ct firmware for some devices. All devices are now reverted to
the OpenWRT default, which uses the ct variant for both the firmware
and the driver. According to some reports, the ct driver breaks
802.11s mesh for some devices, therefore these changes should be tested
before release if possible.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-03-15 22:04:42 +01:00
Fabian Bläse 7ffb75633b build_patches: Rebase onto OpenWrt 19.07.2
Refresh patches for main repo, packages and routing.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-03-15 22:04:41 +01:00
Fabian Bläse c962c8465b buildscript: Move to OpenWrt 19.07.2
Bumped openwrt main repo, packages and routing to 19.07.2.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-03-15 22:03:46 +01:00
Adrian Schmutzler 47de26817b fff-wireless: always disable rssileds if package is installed
This always disables rssileds if the package is installed, and thus
saves us from specifying particular devices.

Since rssileds do not work with our concept of resetting WiFi
interfaces, we cannot use it anyway.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-01-18 19:50:54 +01:00
Christian Dresel 38d2a5a704 fastd: make secret key update-safe
To use a whitelist easily, it is necessary to make the fastd key
update-safe.
This patch saves the key to uci fff config and recovers it for
use after a firmware upgrade.

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: lemmi <lemmi@nerd2nerd.org>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[bump PKG_RELEASE, rephrase commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-01-10 14:31:58 +01:00
Adrian Schmutzler 1c014d04f4 fff-boardname: start uci-defaults script early
The WiFi configuration scripts have been moved to an earlier point
in initialization sequence in c39de8f7d5 ("fff-wireless: initialize
WiFi config before setting up wXsta"), which has them run before
the script setting board name in uci config files. Since the script
setting manual antenna gain and fixing rssileds depends on having a
board name, though, the move broke this functionality.

Since the board name set up script itself does not depend on anything
else in the uci-defaults scripts, let's move this one to a relatively
early point in initialization (and save us from touching anything
else).

Fixes: c39de8f7d5 ("fff-wireless: initialize WiFi config before setting up wXsta")
Fixes: #135

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-01-04 13:46:23 +01:00
Christian Dresel 08c210a309 gateway.d: use correct function name for apply hook
The configuregateway script calls only "apply" and not "commit".

Signed-off-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
[commit title and message facelift, bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-12-30 15:18:14 +01:00
Robert Langhammer cbaea3ffe2 Add a README to folder tools.
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[fabian@blaese.de: Fix whitespace issues, introduce markdown code blocks, rename to README.md]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2019-12-24 12:52:05 +01:00
Robert Langhammer 4a159bc647 Add skript dep-tree.
This script collects all fff-package dependencies.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2019-12-24 12:52:05 +01:00
Fabian Bläse 99bce95f80 fff-wireless: Use previous HT/VHT mode instead of detecting capabilities
Previously the HT/VHT mode was detected using the output of iw phy. This
command erroneously used the $radio variable, which doesn't contain the
phy name. Therefore it doesn't work like it is supposed to.

As we don't completely configure the wifi-device sections, but only adjust
some of OpenWRTs default values, the HT/VHT detection can easily be done by
just checking if the previous mode did contain "VHT".

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-12-24 12:52:05 +01:00
Fabian Bläse 32740ed90c buildscript: Put binaries in seperate folders per variant.
To make it easier to find the correct binary, this creates
a seperate folder for every variant and copies the binaries
appropriately.

The folder is created with "-p" to suppress errors, if it already
exists. This means the misplaced creation of the "bin"-folder inside
the build function can be ommited.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-12-24 12:52:05 +01:00
Adrian Schmutzler 6a43b7dfdb fff-sysupgrade: move /etc/sysupgrade.sh to /sbin/fff-upgrade.sh
The old name "sysupgrade.sh" is easy to be confused with OpenWrt's
/sbin/sysupgrade. Rename our script to clearly indicate its
purpose.

While at it, move from /etc to /sbin, as the former is an odd location
for an executable script.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-12-14 12:08:03 +01:00
Robert Langhammer 5756f9b906 Add bash-completion for the buildscript.
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-12-10 10:22:46 +01:00
Fabian Bläse bcec4e6a20 bsp/ar71xx: Build ath10k-firmware-qca9888-ct as module
The qca9888-ct firmware is used as a device package for the
C60v1 and C60v2. It doesn't get built however, as it isn't selected
anywhere.

To be able to use the firmware, it is now configured to be built as a module.

Fixes: #129
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-12-10 10:03:30 +01:00