Commit Graph

1409 Commits

Author SHA1 Message Date
Fabian Bläse 7c0a24a80c layer3-config: Add DSA migration script for migrated devices
Because of to the switch from swconfig to DSA, the switchport names
have to be migrated for a few devices. Due to past migrations, we
already have developed a migration script for that.

Duplicate and adjust the script for the newly migrated devices. While at
it, rename the old script to reflect the configuration version bump.

Fixes: #301

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-02-16 22:54:44 +01:00
Fabian Bläse ecc590cbaa mpc85xx: retain old compat_version for sysupgrade compatibility
OpenWrt images contain a compat_version, which is used to block upgrades
to newer versions with incompatible configuration, if the configuration
cannot be migrated.

As we maintain our own configuration and all OpenWrt configuration files
are dropped on an upgrade, this upgrade block is not required.

To simplify the upgrade process, retain the old compat_version for the
next sysupgrade release. The compat_version will then be bumped
automatically by the `05_compat-version` board.d script.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-02-16 22:54:44 +01:00
Fabian Bläse fc1c0c39ae fff-network: adjust network configuration of TP-Link TL-WDR4900 for DSA
the TL-WDR4900 was migrated to a DSA driver with OpenWrt 23.05. Adjust
our network configuration accordingly.

Fixes: #302

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-02-16 22:54:44 +01:00
Fabian Bläse dfb892d4ac fff-network: add missing cpuport case for the FritzBox 4040
When adjusting our configuration for the DSA migration of the FritzBox
4040, the cpuport was forgotten. The cpuport has to be removed for DSA
devices.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-02-16 22:54:44 +01:00
Fabian Bläse 1677a35624 fff-layer3-config: bump config_version
With OpenWrt 23.05 a few more devices have been migrated to DSA. Bump
the config_version of layer3-config to reflect the necessary migration.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-02-16 22:54:44 +01:00
Fabian Bläse d20b081498 profile: include full hostname in shell prompt
All of our devices are routers. Because they all serve the same purpose,
it is quite common that the first part of the hostname is the same for
multiple devices, and the location of the device is only included in
subsequent parts of the hostname.

Include the full hostname in the shell prompt, so it is easier to
determine the devices location.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-02-16 22:53:51 +01:00
Felix 0280e0d3de README: add missing build prerequisites
The packages rsync and python3-distutils are required for a successful
build, but missing in the prerequisites of the README. Add them.

Reviewed-by: Fabian Bläse <fabian@blaese.de>
2024-01-25 17:48:41 +01:00
Johannes Kimmel 5a6a0a39d7 buildscript: add color to the root warning
Use color output when the `tput` command is available.
`tput` handles terminal-dependant capabilities, so the script should
remain portable.

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2024-01-25 17:48:41 +01:00
Johannes Kimmel de15c71c53 buildscript: print warning instead of failing build
Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2024-01-25 17:48:38 +01:00
Fabian Bläse 06c8718761 Revert "Disable unnecessary busybox features"
This reverts commit 3e27bff731.

Removing these busybox features breaks wireless configuration in various
confusing ways. Revert this change until further analysis.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-25 17:45:42 +01:00
Fabian Bläse f376cc916d OpenWrt: bump to v23.05.2
Bump core, packages and routing.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-25 17:45:42 +01:00
Fabian Bläse 774eeade04 Add support for Mikrotik RB5009
Device support is based on the patch set linked in the OpenWrt Wiki. [1][2]

The aux-loader blob is not included, as it is only required for initial
installation.

Two additional kernel patches for mvpp2 are added to allow receive
hashing to work properly in the DSA setup of the device.

[1] https://openwrt.org/toh/mikrotik/rb5009ug_s_in#installation
[2] https://paste.myconan.net/482114

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-19 11:43:03 +01:00
Fabian Bläse abd172a309 bsp: work around lm-sensors build error
Building htop with lm-sensors support currently breaks x86_64 image
building. Disable lm-sensors support for all platforms for now, because
we are currently not including lm-sensors anyway.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-19 01:03:18 +01:00
Fabian Bläse cc5a1d267b layer3: add htop and sysstat commands
The sysstat tools and htop can be valueable tools when debugging
performance issues.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-18 21:44:49 +01:00
Fabian Bläse 718b8e2afe layer3: add vmstat command
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-18 21:44:48 +01:00
Fabian Bläse efbed2f9c1 busybox: quality of life improvements
- enable persistent history, save it to tmpfs (ram)
- increase history size to 1024
- enable reverse-i search
- enable watch command
- enable top SMP command

Signed-off-by: Fabian Bläse <fabian@blaese.de>

fff-extra: feature_top_smp (apply for all targets or move to dependency!)
2024-01-18 21:44:28 +01:00
Fabian Bläse c66a5fd1d3 Disable unnecessary libcurl features
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-18 21:34:04 +01:00
Fabian Bläse 3e27bff731 Disable unnecessary busybox features
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-18 21:34:04 +01:00
Fabian Bläse 202104c9f2 Remove uclient-fetch
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-18 21:34:04 +01:00
Fabian Bläse 168b9e1215 ath79: use bigger squashfs block size
A bigger squashfs block size improves compression ratio. The improved
compression ratio is necessary for the Archer C60 devices (v1 + v2)
because they include large wifi drivers.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-18 21:34:04 +01:00
Fabian Bläse 373c2f7fef Disable unused bird protocols
On a typical Freifunk router, only a small subset of bird protocols
is in use. Disable unused bird protocols to save disk space.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-18 21:34:04 +01:00
Fabian Bläse 5d08552e7a layer3: move bmon to fff-extra
Bmon takes up a lot of disk space, but is not essential for operation.
Move it to fff-extra.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-18 21:34:04 +01:00
Fabian Bläse f05c352867 Create fff-extra package for devices with large flash
Devices with large flash can hold more packages and tools to improve
user experience. Create an additional package which can be used to
select packages only on targets with large flash (currently >= 16 MiB).

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-18 21:34:04 +01:00
Fabian Bläse f7cd560d90 layer3: switch from tcpdump to tcpdump-mini
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-18 21:34:04 +01:00
Fabian Bläse fe466ffa90 layer3: remove fff-babeld
Babeld has been replaced with bird by default for quite some time now.
Remove babeld and all configurations scripts (fff-babeld) to reduce
image size.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-18 21:34:04 +01:00
Fabian Bläse 469fa9cbf7 x86_64: use multi-profile for target
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-18 21:34:04 +01:00
Fabian Bläse 9beee4a9ec Apply upstream device rename of ubnt,unifi-ap
The Unifi AP has been renamed upstream. Accomodate this change by
adjusting strings and paths.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2024-01-18 21:33:58 +01:00
Robert Langhammer 52ffd403c7 node-fff-hoods: Make keyserverurl configurable
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2024-01-18 21:33:33 +01:00
Johannes Kimmel 3f88f46715 buildscript: switch to blobless clone
Instead of fetching the complete git repositories, only download
reachable commits and trees. Anything missing will be automatically
fetched on-demand.

The blobless prepare step is about 10% faster and uses 300M less
diskspace.

Additionally the following repository options are disabled:

gc.auto:
    The checkouts are short lived, garbage collection are likely never
    useful

advice.detachedHead:
    Disable the repeating warning message that the repositories are in a
    detached state for cleaner logs.

Reviewed-by: Fabian Bläse <fabian@blaese.de>
2023-12-26 21:42:31 +01:00
Johannes Kimmel 53ac7cc6b5 layer3: add option to enable stateful firewall on client network
Add the following option to the client config section in
`/etc/config/gateway` to enable a basic stateful firewall:

```
config client
    option stateful_firewall '1'
```

The firewall will forward icmp mesages and allow any outbound client
traffic and related inbound traffic.

Acked-by: Fabian Bläse <fabian@blaese.de>
2023-12-26 18:53:36 +01:00
Fabian Bläse 61b1bebbd2 ipq40xx: retain old compat_version for sysupgrade compatibility
OpenWrt images contain a compat_version, which is used to block upgrades
to newer versions with incompatible configuration, if the configuration
cannot be migrated.

As we maintain our own configuration and all OpenWrt configuration files
are dropped on an upgrade, this upgrade block is not required.

To simplify the upgrade process, retain the old compat_version for the
next sysupgrade release. The compat_version will then be bumped
automatically by the `05_compat-version` board.d script.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2023-12-26 18:51:44 +01:00
Fabian Bläse 1a5c91b2ef OpenWrt: bump to v23.05
Bump core, packages and routing.

Remove upstreamed build patches.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2023-12-26 18:51:41 +01:00
Fabian Bläse 157fa4eac5 fff-firewall: Switch from ip/ebtables to nftables
Include nftables and appropriate modules. Translate ip- and ebtables
rules to their nftables counterparts. Remove ip/ebtables and modules.

This change intentionally tries to keep structural changes at a minimum
to keep the rule translation comprehensible.

kmod-nft-bridge is not required for fff-node, because it was merged into
a single kernel module since Linux 4.17:
[1] 02c7b25e5f
[2] fbaf48387e

Fixes: #252

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Co-authored-by: Johannes Kimmel <fff@bareminimum.eu>
2023-12-26 18:51:35 +01:00
Fabian Bläse 469f49f795 bsp: move octeon to subtarget structure
OpenWrt 22.03 introduced a generic subtarget for the octeon platform and
moved all targets without a subtarget into it. Adjust our BSP and config
to accomodate this change.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2023-03-30 12:33:22 +02:00
Fabian Bläse 7e80252c28 fff-wireless: add layer3 option for channel bandwidth
It might be desired by the user to change the channel width of the
wireless radios. Implement a layer3 option to make channel width
configurable by the user.

Fixes: #276

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2023-03-21 20:37:01 +01:00
Fabian Bläse 444cee2819 fff-babel-bird2: prevent error message on revert
When reverting configured settings, it is not an error if no temporary
directory for bird babel peers has been created.

Use rm -rf to prevent an error message and early exit of
configure-layer3 scripts.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2023-03-13 22:48:25 +01:00
Wolfgang Hüttenhofer 20e38395a2 README.md: Add description of ./buildscript clean command
Signed-off-by: Wolfgang Hüttenhofer <wolfgang.huettenhofer@thw-erlangen.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2023-03-13 22:46:11 +01:00
Wolfgang Hüttenhofer 91ea1bdb99 Add support for TP-Link Archer C7 v4
Tested-by: Wolfgang Hüttenhofer <wolfgang.huettenhofer@thw-erlangen.de>
Signed-off-by: Wolfgang Hüttenhofer <wolfgang.huettenhofer@thw-erlangen.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2023-02-25 22:04:11 +01:00
Fabian Bläse 97942eb075 README.md: Rewrite contribution section for Pull-Request development
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2023-02-25 22:04:11 +01:00
Fabian Bläse c12a9ba263 Use wpad-basic instead of wpad-basic-wolfssl
The flash of some devices is too small to accomodate the additional
wolfssl library, which is included by default on OpenWrt 22.03.

In the future, the currently included mbedtls library should be replaced
with wolfssl, so WPA3, OWE and 802.11s encryption can be used.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2023-02-20 23:32:13 +01:00
Fabian Bläse 072452567f OpenWrt: bump to v22.03
Bump core, packages and routing.

Remove upstreamed build patches.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2023-02-20 23:32:13 +01:00
Fabian Bläse fcc8119906 bsp/x86-64: Include vmxnet3 driver
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2022-12-01 20:53:56 +01:00
Fabian Bläse d9d2612f3c build_patches: Add patch to fix wdr4900 wifi interface configuration
A Linux patch which changed the kernel behavior of pci device naming
was backported to Linux 5.4, and is therefore included in OpenWrt
21.02.5.

However, the OpenWrt scripts generating the default uci configuration
were not updated to accomodate this change. Therefore, wifi interface
configuration does have various side effects on the wdr4900. Most of the
time, more than two wifi radio/interface configurations are generated,
which results in wifi not working properly (because our own
configuration layer relies on the default configuration done by
OpenWrt).

Backport a patch from OpenWrt 22.03 / master, which works around this
problem but has not been applied to the 21.02 branch.

Based on: 7f4b4c29f3 (OpenWrt)

Ref: https://github.com/openwrt/openwrt/issues/11002
Ref: https://github.com/openwrt/openwrt/pull/11005
Ref: https://github.com/openwrt/openwrt/issues/10530
Ref: https://github.com/openwrt/openwrt/pull/10554
Fixes: #267

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2022-12-01 20:53:53 +01:00
Fabian Bläse 0e62ca5307 fff-dhcp: Do not generate dns records for local hostname
By default OpenWRT generates A and AAAA records for the routers
hostname. This might interferes with upstream records and breaks when
DNSSEC is utilized.

Therefore, disable this features.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2022-11-26 16:47:24 +01:00
Fabian Bläse d34438d8b1 build_patches: Add support for EON EN25QX128A
Add support for a new SPI flash to the Linux kernel. It is required for
recent versions of the Xiaomi Mi 4A Gigabit, which utilizes this SPI
flash.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2022-11-26 16:47:14 +01:00
Robert Langhammer 306ed093f7 tools/dep-tree
The tool dep-tree is broken since commit "Simplify firmware variant selection"

Use the new package names for the roots of the tree to fix it.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2022-11-26 16:43:40 +01:00
Fabian Bläse 2085c5e4af fff-babel: Use bird2 implementation by default
The bird2 babel implementation has proven to be the more reliable option
over babeld, especially on low-end hardware. It has been working
flawlessly on many test installations.

Use bird2 instead of babeld, if no implementation is specified via uci.

While at it, use the automatically incrementing $(COMMITCOUNT) for
PKG_RELEASE.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2022-11-26 16:43:15 +01:00
Fabian Bläse e695b2a87a OpenWrt: bump to v21.02.5
Bump core, packages and routing.

Refresh patches.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Johannes Kimmel <fff@bareminimum.eu>

[fff@bareminimum.eu: Tested on EdgeRouter X]
Tested-by: Johannes Kimmel <fff@bareminimum.eu>
2022-10-19 17:07:49 +02:00
Fabian Bläse 0d06be1749 OpenWrt: bump to v21.02.3
Bump core, packages and routing.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2022-08-14 12:35:23 +02:00
Fabian Bläse bdfdbba76a fff-layer3-config: return error values in functions instead of terminating
Many functions of configure-layer3 terminate the program after
successful execution, as they were originally only intended for
execution of configure-layer3 commands.

However, some functions are used both for command exection, but also as
helper functions. For example, revert_changes() is used as a helper
function in test_changes(). Terminating the program at the end of the
function therefore ends the exection of test_changes() prematurely. As a
result, the test mode of configure-layer3 never reloads services after
a successful configuration revert.

Replace exit commands with appropriate function return values, which can
then be evaluated by the caller where appropriate.

While at it, add a missing return to the parameter validation in
execute_subshell().

Fixes: #256

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-07-22 12:48:52 +02:00