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>
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>
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>
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>
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>
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>
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>
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>
Refresh patches for main repo, packages and routing.
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Previously the TP-Link Archer C7v2 was configured to use
two Switch CPU Interfaces. One for Trunk (Client + Batman), one
for WAN.
As this setup is very uncommon in our firmware at the moment and does interfere
with the automatic CPU Port setup in layer3 variant, it is converted to a single
trunk port setup just like all of the other routers with integrated managed switches.
As eth0 is now used as the switchport, this change would require to setup
a different ETHMESHMAC if mac addresses would be shared between interfaces.
The device does seems to have 4 discrete mac addresses however, so the
explicit ETHMESHMAC setting is completely removed instead.
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
To make use of MCS 8 and 9 which have been introduced with
802.11ac, htmode has to be set to VHTxx.
By checking if the radio supports it, the htmode is configured
to the appropriate HT/VHT setting.
Fixes: #130
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
The script for setting up wXsta (/etc/uci-defaults/24c-fff-wXsta) runs
before the main WiFi config script (/etc/uci-defaults/60-fff-wireless),
so the wXsta config is deleted again by
config_foreach removeWifiIface wifi-iface
This moves the latter script (and another script for WiFi config)
before the wXsta setup, so the WiFi config will be set up correctly.
Fixes: #128
Fixes: 3d9eb1db2e ("fff-hoods/fff-wireless: Reconfigure instead of
delete and create")
Reported-by: Christian Dresel <fff@chrisi01.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Some output and exit status are hidden, as they are a valid behaviour
if the device doesn't have any radios.
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
The builds for all BSPs have been merged into a single OpenWRT buildroot.
A prepare between builds cleans everything that has already been built,
including host tools. Building for multiple targets therefore takes quite
a bit longer than it has to.
This removes the prepare command between builds in the buildall command.
It now behaves exactly like multiple conscutive "selectbsp, build" commands,
which speeds up the build for multiple devices a lot.
This now means, that prepare has to be executed before buildall can be used,
just like with the 'build' command.
Signed-off-by: Fabian Bläse <fabian@blaese.de>
If no hoodfile is present or hoodfile support is not compiled
into the firmware, no upgrade path is available. This currently
is the case for layer3 variant.
A fallback to our default firmware host is added. At the moment
both variants don't have a trust anchor for TLS and the wget, that
is currently used, doesn't support TLS. Therefore it is currently
necessary to use a unencrypted http URL.
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
As we now have multiple variants, the binaries on the update server
should be seperated into different directories.
To allow the firmware to decide which variant it wants to download,
the "$VARIANT/current" part is removed from the hoodfiles. Instead
it is added inside the upgrade path function in fff-hoodutils.
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
This simplifies and shortens filenames quite significantly.
A rewrite script will be installed on the update servers
to allow updating routers with older firmwares.
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
This also introduces a variant variable in our buildscript, as
it is necessery multiple times in the build process.
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
For some reason sysupgrade seems to return exit status != 0
even on successful calls. As the binary is removed if
sysupgrade exists with a failure status, it is possible that
it got deleted while a sysupgrade has been in progress.
This removal was added to ensure that only one binary occupies
space in tmpfs (which is stored in memory) when upgrading.
If sysupgrade fails and the user starts another try, the old
binary is overwritten by moving the new one to the same location.
Therefore the removal of binaries on sysupgrade failure can be
removed completely.
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
With the current OpenWrt patches, both CPE210 v2 and v3 can be
flashed with each other's images. Introduce a separate entry
in tplink_safeloader.c to prevent crossflashing.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
The rssileds set up by OpenWrt cannot be used in our firmware.
Despite that those are bound to "wlan0" initially, we also cannot
change them to one of our interfaces, as the interface recreation
due to configurehood seems to break something in rssileds, causing
high load.
This patch now disables the rssileds entirely, which has been found
to be the only solution reliably solving the problem of high load
under all circumstances.
While at it, add all remaining devices with rssileds enabled in
openwrt-18.06. (When updating to openwrt-19.07, most of the ubnt
will have to be added.)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
This merges the wifi.* files into a single script, which improves
overview/manageability and makes merging of cases possible.
While at it, remove suppression of errors with "-q".
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
As the originally used version string did not include
the daemons name, it is changed to versions like:
babeld-1.9.1+fff2
Signed-off-by: Fabian Bläse <fabian@blaese.de>
This introduces the pending upstream fix and a patch to change
babeld version.
This applies the naming scheme as for batman-adv:
openwrt-PKG_VERSION-PKG_REVISION
e.g. openwrt-1.9.1-2
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
The build variant previously only got applied in the prepare
step. Therefore selecting a new variant for a subsequent build
without calling prepare again produced a build with a different
variant than the selected one.
As the filename and version number is evaluated in the prebuild
step, which is called on every build, the version number did use
selected variant, so the build variant did not match the variant
in the version string.
As applying the variant only causes the fff-base package to be
fully rebuilt, this step is moved into a function and also executed
in buildscripts prebuild step. It is therefore always applied when
starting a new build.
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
So far, we have meta packages and config packages for the variants
in parallel, e.g. fff-node and fff-variant-node.
Since the sole purpose of the meta packages is to define
dependencies, one can just merge them into the corresponding config
packages to reduce overhead.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
In some cases (mostly for one-port devices) IF_WAN was used
although not set, resulting in not obviously iptables error
messages like
- Bad argument `conntrack'
- Bad argument `REJECT'
Thus, check whether IF_WAN is set to something before using it.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
In OpenWrt commit 055cdab2bb22 ("uclient: add ALTERNATIVES for wget")
uclient is registered as ALTERNATIVES provider for wget. Since
the priority for busybox as provider is lowest, this overwrites
the link set for /usr/bin/wget, now pointing to uclient wget.
However, uclient wget does not support IPv6 link-local addresses,
as it's not aware of the "%" to separate address from link identifier.
To prevent wget from failing when those addresses are used, this
patch explicitly uses busybox wget.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
By running "./buildscript updatefeeds", the feeds in build dir are
recreated without touching the rest of the directory.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
This removes the target variable, as it is just an alias for
builddir now.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
So far, building the firmware happens in parallel subdirectories
of "build", one for each subtarget. However, OpenWrt itself is
capable of hosting several target builds in its directory, so
there is no need for this extra separation.
This patch thus build all targets/subtargets directly in the
"build" folder.
Since most of the time during build is spent for the toolchain,
this will also significantly boost build time if more than one
target is used.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
As odhcpd is used as router advertisement server in layer3 variant,
but configurenetwork is still necessary, the dependency to fff-uradvd has
to be removed.
This is done by first checking, if the fff-uradvd service exists, before it
is restarted.
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>