Commit Graph

7973 Commits

Author SHA1 Message Date
Rosen Penev
771deecb70
quilt.mk: fix typo in the Host section
HOST_PATCH_DIR is used for host patches, not PATCH_DIR.

Fixes refreshing patches with a custom HOST_PATCH_DIR.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 9586a270a0)
2022-03-21 23:28:09 +08:00
Josef Schlehofer
944917d34e
cypress-firmware: update it to version 5.4.18-2021_0812
- Binary files were renamed to cyfmac from brcmfmac, but the files needs
  to be on the router with the previous naming

[    6.656165] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    6.665182] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.bin failed with error -2
[    6.674928] brcmfmac mmc1:0001:1: Falling back to sysfs fallback for: brcm/brcmfmac43455-sdio.bin

- Cypress were acquired by Infineon Technologies
Thus change the project URL and switch to download files from their
GitHub repository. This is much better than the previous solution, which
requires finding new threads on their community forum about new driver
updates, and it will be necessary to change the URL each time.

Unfortunately, it seems that there is not published changelog, but
according to this forum thread [1], be careful by opening the link from
solution since it contains ending bracket ), it brings fixes for various
security vulnerabilities, which were fixed in 7_45_234.

Fixes:
- FragAttacks
- Kr00k

Also add LICENSE file

Run tested on Seeedstudio router powered by Raspberry Pi 4 CM with
package cypress-firmware-43455-sdio.

Before:
root@OpenWrt:~# dmesg | grep 'Firmware: BCM4345/6'
[    6.895050] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar 23 2020 02:20:01 version 7.45.206 (r725000 CY) FWID 01-febaba43

After:
root@OpenWrt:~# dmesg | grep 'Firmware: BCM4345/6'
[    6.829805] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Apr 15 2021 03:03:20 version 7.45.234 (4ca95bb CY) FWID 01-996384e2

[1] https://community.infineon.com/t5/Wi-Fi-Bluetooth-for-Linux/Outdated-brcmfmac-firmware-for-Raspberry-Pi-4-in-OpenWrt-21-02-1/m-p/331593#M2269

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit 7ca7e0b22d)
2022-03-21 23:27:29 +08:00
Florian Eckert
cfd093809f
base-files: add wrapper for procd service list command
A service managed by procd does have a json object with usefull information.
This information could by dumped with the following command.

ubus call service list "{ 'verbose':true, 'name': '<service-name>)'". }"

This line is long and complicated to enter. This commit adds a wrapper
call to the procd service section tool to simplify the input and get the
output faster.

We could now enter the command /etc/initd/<service> info to get the info
faster.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 09c41ea679)
2022-03-21 23:25:23 +08:00
Florian Eckert
6ebc95add1
procd: move service command to procd
The service command belongs to the procd and does not belong in the
shinit. In the course of the move, the script was also checked with
shellcheck and cleaned up.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit b9017384ca)
2022-03-21 23:24:26 +08:00
Tianling Shen
30bcdfd2b9
kernel: bump to 4.9.307, 4.14.272, 4.19.235
Added new Kconfig `HARDEN_BRANCH_HISTORY`.

Manually-rebased patches:
- generic/hack-4.9/204-module_strip.patch
- generic/hack-4.9/220-gc_sections.patch
- generic/hack-4.14/220-gc_sections.patch
- generic/hack-4.19/220-gc_sections.patch
- generic/backport-4.14/306-v4.16-netfilter-remove-saveroute-indirection-in-struct-nf_.patch

Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-03-19 19:13:28 +08:00
Tianling Shen
cd1e95514e
eeautocore: ethinfo: rewritten in lua
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-03-19 13:23:28 +08:00
Tianling Shen
3adf1d9bbe
kernel/modules: inet-diag: fix build with kernel < 4.10
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-03-18 13:46:46 +08:00
Tianling Shen
02cefc8ec7
tools: drop orphan llvm-bpf dependency
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-03-18 12:04:10 +08:00
Rosen Penev
c76bce60f8 tools/ccache: update to 4.6
Full changelog: https://ccache.dev/releasenotes.html#_ccache_4_6

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-18 10:55:03 +08:00
Rosen Penev
ddd42c876e tools/fakeroot: update to 1.28
Refreshed patches.

Upstream says there's only a bugfix for GNU Hurd.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-18 10:54:51 +08:00
Rosen Penev
ecff6654d5 tools/cmake: update to 3.22.3
Seems to be mostly pthread fixes.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-18 10:54:37 +08:00
Rosen Penev
f01b6cd712 tools/mtools: update to 4.0.38
No real changelog available.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-18 10:54:26 +08:00
Rosen Penev
8af634c7b9 tools/expat: enable DTD
Fixes gdb usage, which depends on it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-18 10:51:10 +08:00
Rosen Penev
13fc2b911a tools/expat: update to 2.4.7
Mostly a bug fix to the bug fix to CVE-2022-25236

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-18 10:50:58 +08:00
Tianling Shen
8e5662d5a3
scripts/download.pl: drop cqu mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 7807fb0119)
2022-03-17 20:00:16 +08:00
Tianling Shen
43f88fbf6c
r8125: bump to 9.008.00
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit d469e513cc)
2022-03-17 15:32:03 +08:00
Martin Schiller
fd505eab88 openssl: bump to 1.1.1n
This is a bugfix release. Changelog:

  *) Fixed a bug in the BN_mod_sqrt() function that can cause it to loop
     forever for non-prime moduli. (CVE-2022-0778)

  *) Add ciphersuites based on DHE_PSK (RFC 4279) and ECDHE_PSK
     (RFC 5489) to the list of ciphersuites providing Perfect Forward
     Secrecy as required by SECLEVEL >= 3.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2022-03-17 11:02:29 +08:00
Rosen Penev
a75b0a9c1b argp-standalone: fix compilation with Alpine Linux
This package is a C89 one. Add the proper CFLAG to fix compilation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-17 11:02:19 +08:00
Lech Perczak
a77acbd16d uqmi: set CID during 'query-data-status' operation
Modems used in ZTE mobile broadband routers require to query the data
session status using the same CID as one used to establish the session,
otherwise they will report the session as "disconnected" despite
reporting correct PDH in previous step. Without this change, IPv6
connection on these modems doesn't establish properly. In IPv4 this bug
is present as well, but for some reason querying of IPv4 status works
using temporary CID, this however seems noncompliant with QMI
specifications, so fix it as well.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-03-17 11:00:33 +08:00
Tianling Shen
9938878b16
tools/llvm-bpf: drop unused package
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-03-16 22:41:59 +08:00
Tianling Shen
d44eb0095e
Revert "toolchain/musl: update to 1.2.2"
This reverts commit 93a955b8a6.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-03-16 17:36:36 +08:00
Tianling Shen
e465b69a4e
Revert "toolchain/musl: remove several GNU headers"
This reverts commit c710efe180.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-03-16 17:36:31 +08:00
Tianling Shen
ed3beac0cf
Revert "toolchain/musl: Remove extra format attribute patch"
This reverts commit c6bce01efe.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-03-16 17:36:17 +08:00
Tianling Shen
71ca95a20c
base-files: tweak banner
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit be0ac56b63)
2022-03-15 20:36:37 +08:00
Rafał Miłecki
3338a5e835
base-files: call "sync" after initial setup
OpenWrt uses a lot of (b)ash scripts for initial setup. This isn't the
best solution as they almost never consider syncing files / data. Still
this is what we have and we need to try living with it.

Without proper syncing OpenWrt can easily get into an inconsistent state
on power cut. It's because:
1. Actual (flash) inode and data writes are not synchronized
2. Data writeback can take up to 30 seconds (dirty_expire_centisecs)
3. ubifs adds extra 5 seconds (dirty_writeback_centisecs) "delay"

Some possible cases (examples) for new files:
1. Power cut during 5 seconds after write() can result in all data loss
2. Power cut happening between 5 and 35 seconds after write() can result
   in empty file (inode flushed after 5 seconds, data flush queued)

Above affects e.g. uci-defaults. After executing some migration script
it may get deleted (whited out) without generated data getting actually
written. Power cut will result in missing data and deleted file.

There are three ways of dealing with that:
1. Rewriting all user-space init to proper C with syncs
2. Trying bash hacks (like creating tmp files & moving them)
3. Adding sync and hoping for no power cut during critical section

This change introduces the last solution that is the simplest. It
reduces time during which things may go wrong from ~35 seconds to
probably less than a second. Of course it applies only to IO operations
performed before /etc/init.d/boot . It's probably the stage when the
most new files get created.

All later changes are usually done using smarter C apps (e.g. busybox or
uci) that creates tmp files and uses rename() that is expected to be
atomic.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
(cherry picked from commit 9851d4b6ce)
2022-03-15 18:51:04 +08:00
Tianling Shen
5da42ff99a
README.md: add matrix group
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit dcf2a06a06)
2022-03-15 17:09:39 +08:00
Tianling Shen
fd6bc38dd6
r8125/r8168: require PCI support
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 644bd5b27a)
2022-03-13 18:00:35 +08:00
Tianling Shen
80ee6a4538
base-files: update default banner
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 29c5695d92)
2022-03-13 16:56:50 +08:00
Tianling Shen
b091dedde6
kernel/modules: add kmod-inet-diag package
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 41d8f0e982)
2022-03-09 10:40:09 +08:00
Rosen Penev
d96722b2e0
include/meson: fix host build directory
When using a non default MESON_HOST_BUILD_DIR, HOST_BUILD_DIR is not
appropriate to use. This change matches the target configure section.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 4c42e2d9dd)
2022-03-08 11:57:49 +08:00
Tianling Shen
0e4d13205d
i40e: disable on ramips
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-03-07 19:39:31 +08:00
Florian Eckert
5e01c687e3 ipset: update to 7.15
Update to the latest upstream version. In this version there is a new
tool with which you can convert ipsets into nftables sets. Since we are
now using nftables as default firewall, this could be a useful tool for
porting ipsets to nftables sets.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-03-06 23:57:08 +08:00
Georgi Valkov
c668329a78 mkhash: fix build errors on FreeBSD 13.0
be64enc, be16dec, and be32dec are declared on FreeBSD 13.0, in
/usr/include/sys/endian.h so we should not declare them.

Fixes the following error during feeds update:
staging_dir/host/bin/mkhash: No such file or directory

gcc scripts/mkhash.c
scripts/mkhash.c:111:1: error: redefinition of 'be64enc'
  111 | be64enc(void *buf, uint64_t u)

Signed-off-by: Georgi Valkov <gvalkov@abv.bg>
2022-03-06 23:56:37 +08:00
Felix Fietkau
3641d03810 tools/fakeroot: restore macos bugfix that was dropped during the last update
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-03-06 23:54:37 +08:00
Rosen Penev
eb1d7b2e19 tools/fakeroot: update to 1.27
Remove macOS stuff. Upstream has fixed it in the same way.

Add SOL_TCP define. Taken from elsewhere in the code.

Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-06 23:54:26 +08:00
Felix Fietkau
d0e8b61831 tools/fakeroot: fix unresolved symbols on arm64 macOS
The $INODE64 symbol variants are not present, since the base system
always uses 64-bit file offsets

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-03-06 23:53:50 +08:00
Rosen Penev
15728e7ba3 tools/expat: update to 2.4.6
Switched to CMake for faster compilation and greater parallel
friendliness.

Added CMake options from the packages feed.

This release fixes various CVEs.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-05 22:38:42 +08:00
Rosen Penev
e6388d8559 tools/findutils: update to 4.9.0
Add compilation fix for Ubuntu 20.04. Provided by upstream maintainer:

https://github.com/openwrt/packages/issues/17912#issuecomment-1046726426

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-05 22:38:27 +08:00
Rosen Penev
ef1a2436f6 tools/zstd: update to 1.5.2
Switched to building with meson as it's faster and does not need a
dependency on cmake, which takes a long time to build.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-05 22:38:14 +08:00
Rosen Penev
47699e8b6a tools/ccache: add cmake dependency
This will be needed for the next commit as ccache's cmake dependency is
satisfied by zstd currenly.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-05 22:37:12 +08:00
Rosen Penev
f0b7af8fe1 tools/cmake: update to 3.22.2
Mostly random Python 3.10 fixes.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-05 22:36:58 +08:00
Rosen Penev
12f07ec2e3 tools/mtools: update to 4.0.37
No changelog is available.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-05 22:36:32 +08:00
Rosen Penev
a04966f269 tools/mklibs: update to 0.1.45
Refresh 2to3 patch. Upstream partially did this against some older
python version. This is still needed.

Refreshed other patches to be python3 safe.

Remove uClibc patches as only musl is present now.

Refresh others.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-05 22:36:19 +08:00
AmadeusGhost
155d61b65e mbedtls: refresh armv8ce_aes patches
Signed-off-by: AmadeusGhost <amadeus@immortalwrt.org>
2022-03-03 23:53:48 +08:00
Lucian Cristian
7fef22572f mbedtls: update to 2.28.0 LTS branch
<https://github.com/ARMmbed/mbedtls/releases/tag/v2.28.0>
"Mbed TLS 2.28 is a long-time support branch.
It will be supported with bug-fixes and security
fixes until end of 2024."

<https://github.com/ARMmbed/mbedtls/blob/development/BRANCHES.md>
"Currently, the only supported LTS branch is: mbedtls-2.28.
For a short time we also have the previous LTS, which has
recently ended its support period, mbedtls-2.16.
This branch will move into the archive namespace around the
time of the next release."

this will also add support for uacme ualpn support.

size changes
221586 libmbedtls12_2.28.0-1_mips_24kc.ipk
182742 libmbedtls12_2.16.12-1_mips_24kc.ipk

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
(remark about 2.16's EOS, slightly reworded)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-03-03 23:50:14 +08:00
Josef Schlehofer
43e7543842
tools/libressl: update to version 3.4.2
Release notes:
https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.4.2-relnotes.txt

```
It includes the following security fix

  * In some situations the X.509 verifier would discard an error on an
    unverified certificate chain, resulting in an authentication bypass.
    Thanks to Ilya Shipitsin and Timo Steinlein for reporting.
```

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit 495c4f4e19)
2022-03-03 10:36:55 +08:00
Hauke Mehrtens
d3e63a637e
ustream-ssl: update to Git version 2022-01-16
868fd88 ustream-openssl: wolfSSL: Add compatibility for wolfssl >= 5.0

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit e74529552c)
2022-03-01 20:53:04 +08:00
Eneas U de Queiroz
d88e607184 scripts/diffconfig.sh: ensure config/conf is built
diffconfig.sh runs ./scripts/config/conf, but it does not get built
with 'make {menu,x,n}config.  Call 'make ./scripts/config/conf' to
ensure it's been built before running it, aborting in case of failure.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>[removed Fixes: due revert]
2022-02-28 16:11:21 +08:00
Petr Štetiar
cb556fc0bb usbmode: update to version 2022-02-24
* usbmode: add config #0 and delay before actual config

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-02-28 16:11:03 +08:00
Vladislav Grigoryev
fafbcf2365 jsonfilter: update makefile url
Specify URL as PKG_SOURCE_URL in the jsonfilter Makefile.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
2022-02-28 16:10:09 +08:00