Commit Graph

8194 Commits

Author SHA1 Message Date
Rosen Penev
a7ff3f752f pcre: disable shared libraries for host builds
Getting rid of shared libraries for hostpkg avoids having to use rpath
hacks to find the library. It also fixes compilation with host glib2
binaries.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-03 00:17:53 +08:00
Rosen Penev
ff335de225 musl-fts: remove shared libraries from host
Avoids having to add rpath to the various packages using it. Also add
PIC to fix compilation as static libraries do not use PIC by default.

Fixes: 1fb099341e ("musl-fts: add host build")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-03 00:17:43 +08:00
Rosen Penev
efbd36af6d libselinux: use musl-fts for host builds
Fixes compilation under musl based distros like Alpine Linux.

Also add pcre/host as a build dependency as it's needed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-03 00:16:21 +08:00
Rosen Penev
e701acb596 musl-fts: add host build
This will be used for libselinux.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-03 00:16:12 +08:00
Rosen Penev
2f881a392d
gettext: remove package
This package was necessary when uClibc was in the tree. Now that uClibc
is gone, this can go too.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit e6f569406f)
2022-04-02 23:20:45 +08:00
AmadeusGhost
b9a3615a39 base-files: sysupgrade: fixes not found error
Fixes the following errors:
  ash: date: not found
  ash: logger: not found

Fixes: c7251e5 ("x86: upgrade from img.gz error")
2022-04-02 00:38:40 +08:00
Javier Marcet
c8e683b7de base-files: upgrade: fix indent
Use same indent as for the rest of the file.

Signed-off-by: Javier Marcet <javier@marcet.info>
[add commit description]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2022-04-02 00:33:50 +08:00
Kevin Darbyshire-Bryant
1dd0699dc0 treewide: convert sed -r to posix -E
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2022-04-02 00:32:51 +08:00
Rafał Miłecki
2cca065af0 treewide: don't hardcode "sysupgrade.tgz" file name
1) Add BACKUP_FILE and use it when copying an archive to be restored
   after sysupgrade (on the next preinit).
2) Use CONF_TAR for copying backup prepared by the /sbin/sysupgrade

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-04-02 00:29:37 +08:00
Rafał Miłecki
4818f4494c base-files: move stage2 upgrade to separated file
do_upgrade_stage2() isn't really any common code. It isn't used anywhere
except for /sbin/sysupgrade that passes it to the stage2.

Moving its code to separated file also simplifies COMMAND variable.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-04-02 00:20:35 +08:00
Rafał Miłecki
30a60b7e83 base-files: drop support for NAND upgrade in platform_pre_upgrade()
With bcm53xx switched to the new procedure there is no more need for
keeping that backward compatibility code.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-04-02 00:19:52 +08:00
Rafał Miłecki
11621d2630 base-files: drop unused jffs2_copy_config()
Its last usage was dropped back in 2013 in the commit b95bdc8ab5
("kernel/base-files: clean up old code related to refreshing mtd
partitions, it is no longer used anywhere").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-04-02 00:18:44 +08:00
David Bauer
3d3f40d6e4 base-files: sysupgrade: support additional mtd options
Add support for passing additional parameters to mtd called during
sysupgrade. It will be required to toggle the "recovery moe" flag
supported by recent tp-link boards.

Signed-off-by: David Bauer <mail@david-bauer.net>
[split code from board support patch; add commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
2022-04-02 00:15:21 +08:00
Tianling Shen
849fc5cf65
kernel/modules: inet-diag: fix loading module
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-03-29 04:48:30 +08:00
Tianling Shen
68c389e285
kernel: bump to 4.9.308, 4.14.273, 4.19.236
Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-03-28 00:33:12 +08:00
Josef Schlehofer
c158e1c01b
cypress-firmware: drop several packages
1. Drop package: cypress-firmware-4359-pcie
This binary is no longer provided and there are not many details what
happened.

2. Drop package: cypress-firmware-4359-sdio
This binary is no longer provided, but in this case, to compare it with
PCIe package mention as first, there was added
support in Linux-firmware [1], but no sign of firmware file.

4. Drop package: cypress-firmware-89459-pcie [2]
According to Infineon: "CYW89459 is an automotive Wi-Fi chip which is not
supported in the broad market community."

[1] https://patchwork.kernel.org/project/linux-wireless/patch/20191211235253.2539-6-smoch@web.de/

[2] https://community.infineon.com/t5/Wi-Fi-Bluetooth-for-Linux/the-wifi-driver-for-CYW89459-in-linux4-14-98-2-3-00/m-p/138971

Fixes: 7ca7e0b22d ("cypress-firmware: update it to version 5.4.18-2021_0812")

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit 51dee3f4f7)
2022-03-27 21:37:49 +08:00
Petr Štetiar
8c34b3bb70
imagebuilder: fix broken image generation with external targets
When using external targets there is a symlink being created for the
target under target/linux which then becomes dangling under Image
Builder. Fix it by dereferencing the possible symlink.

Tested on IB with external target, ipq40xx and mvebu.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 621f39d1f4)
2022-03-26 22:47:10 +08:00
Petr Štetiar
3b17680462 zlib: backport security fix for a reproducible crash in compressor
Tavis has just reported, that he was recently trying to track down a
reproducible crash in a compressor. Believe it or not, it really was a
bug in zlib-1.2.11 when compressing (not decompressing!) certain inputs.

Tavis has reported it upstream, but it turns out the issue has been
public since 2018, but the patch never made it into a release. As far as
he knows, nobody ever assigned it a CVE.

Suggested-by: Tavis Ormandy <taviso@gmail.com>
References: https://www.openwall.com/lists/oss-security/2022/03/24/1
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-03-25 10:35:31 +08:00
Eneas U de Queiroz
6b35894112 openssl: move engine.mk to INCLUDE_DIR
engine.mk is supposed to be included by engine packages, but it will not
be present in the SDK in the same place as in the main repository.

Move it to include/openssl-engine.mk to avoid this.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-03-25 10:35:20 +08:00
Huangbin Zhan
6a6ab02e6b ncurses: update to 6.3
release notes: https://invisible-island.net/ncurses/announce-6.3.html

Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
2022-03-25 10:33:40 +08:00
Tianling Shen
fb77c8a51a
autocore: add ethtool back for x86
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-03-22 01:26:41 +08:00
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