Commit Graph

1209 Commits

Author SHA1 Message Date
Paul Spooren
5a5d126954 apk: update to latest HEAD 2024-05-19
Upstream refactoring caused some mbedtls issues, now fixed again.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-05-20 18:10:42 +03:00
Paul Spooren
99636d4dd8
apk: update to latest HEAD 2024-05-18
Drop downstream mbedtls patch since it went upstream.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Link: https://github.com/openwrt/openwrt/pull/15522
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-05-18 15:05:55 +02:00
Paul Spooren
b773ca1a96 apk: disable helptext for host build
The host build would need Lua to compile which currently adds a race
condition. Instead of tracking that down just disable helptext for the
host build.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-05-17 23:21:26 +03:00
Paul Spooren
d788ab376f build: add APK package build capabilities
A new option called `USE_APK` is added which generated APK packages
(.apk) instead of OPKG packages (.ipk).

Some features like fstools `snapshot` command are not yet ported

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-05-17 23:21:26 +03:00
Paul Spooren
ad4bd9c5d8 apk: add missing PROVIDES
Add PROVIDES:=apk to the Makefile so we can default to install `apk` by
default as a dependency.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-05-17 21:56:20 +03:00
Paul Spooren
081a59e0f2 rpcd: fix package dependency for APK
Version dependencies must not contain spaces to be compatible with both
OPKG and APK.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-05-17 21:55:51 +03:00
Georgi Valkov
eb1b022043 opkg: fix stray \ warnings with grep-3.8
We simply grep for "src/". So no need for "\/".
Furthermore, since grep-3.8 this creates warnings.

As written in the grep-3.8 announcement:
  Regular expressions with stray backslashes now cause warnings, as
  their unspecified behavior can lead to unexpected results.
  For example, '\a' and 'a' are not always equivalent
  <https://bugs.gnu.org/39678>.

Fixes a warning during the first boot:
  grep: warning: stray \ before /

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
2024-05-14 00:27:12 +02:00
Rui Salvaterra
da0cd9d764 mtd: fix build with GCC 14
Also fix a couple of warnings while at it.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2024-05-12 12:49:39 +01:00
Christian Marangi
4b04304713
procd: make mDNS TXT record parsing more solid
mDNS broadcast can't accept empty TXT record and would fail
registration.

Current procd_add_mdns_service checks only if the first passed arg is
empty but don't make any verification on the other args permittins
insertion of empty values in TXT record.

Example:

	procd_add_mdns "blah" \
				"tcp" "50" \
				"1" \
				"" \
				"3"

Produce:

{ "blah_50": { "service": "_blah._tcp.local", "port": 50, "txt": [ "1", "", "3" ] } }

The middle empty TXT record should never be included as it's empty.

This can happen with scripts that make fragile parsing and include
variables even if they are empty.

Prevent this and make the TXT record more solid by checking every
provided TXT record and include only the non-empty ones.

The fixed JSON is the following:

{ "blah_50": { "service": "_blah._tcp.local", "port": 50, "txt": [ "1", "3" ] } }

Fixes: b0d9dcf84d ("procd: update to latest git HEAD")
Reported-by: Paul Donald <newtwen@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15331
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-29 23:24:58 +02:00
Paul Spooren
00b86168bd apk: add package
APK (Alpine Package Keeper) is the package manager of Alpine Linux and
has multiple advantages over OPKG. While Alpine uses APK version 2, this
commit adds version 3 with a heavily optimised database structure and
additional feature making it suitable for OpenWrt.

This commit will be followed by many more to add APK build capabilities
to the OpenWrt build system, firstly enabling side by side builds of APK
and OPKG packages, later replacing OPKG entirely.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-04-29 11:36:03 +02:00
Robert Marko
0fc87ddf44
ubox: update to Git HEAD (2024-04-26)
85f1053019ca kmodloader: fix insmod path logic

Signed-off-by: Robert Marko <robimarko@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15288
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-27 13:34:13 +02:00
Tony Ambardar
c6e6d26f4b ubox: update to Git HEAD (2024-03-02)
d413903016c4 kmodloader: support duplicate module names and aliases
1c9aaefc119a kmodloader: fix memleak adding to avl tree
4c5c45c6beac kmodloader: fix invalid write during insmod, CodeQL warnings
6a59975afc2c kmodloader: improve memory accounting and deallocation

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2024-04-23 20:58:18 +02:00
Robert Marko
1ea6ddacc2 nu801: update PKG_MIRROR_HASH to zst
When using zst instead of xz, the hash changes.
This was missed in the initial treewide updated.

Fixes: b3c1c57a35 ("treewide: update PKG_MIRROR_HASH to zst")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-04-07 11:49:53 +02:00
Paul Spooren
b3c1c57a35 treewide: update PKG_MIRROR_HASH to zst
When using zst instead of xz, the hash changes. This commit fixes the
hash for packages and tools in core.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-04-06 11:24:18 +02:00
Robert Marko
d1eb0bec39 procd: update to Git HEAD (2024-03-30)
254810d16cf1 watchdog: always close fd on watchdog stop
946552a7b598 trace: use standard POSIX header for basename()

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-04-02 18:35:55 +02:00
Robert Marko
ff064b68d4 procd: update to Git HEAD (2024-03-25)
79f8cfa58ee7 ci: add github test workflow
428f40e7984f test commit fixing warnings
63058d1f81a5 ci: enable ujail builds
49ea930a862c utils: add key-value offset support to get_cmdline_val()
ca8c30208d5e inittab: fallback when multiple "console=" is detected

Required for the recent Elecom multiple console commits.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-25 11:50:19 +01:00
Paul Spooren
e8725a932e treewide: use APK compatible version schema
Different from OPKG, APK uses a deterministic version schema which chips
the version into chunks and compares them individually. This enforces a
certain schema which was previously entirely flexible.

 - Releases are added at the very and end prefixed with an `r` like
`1.2.3-r3`.
- Hashes are prefixed with a `~` like `1.2.3~abc123`.
- Dates become semantic versions, like `2024.04.01`
- Extra tags are possible like `_git`, `_alpha` and more.

For full details see the APK test list:
https://gitlab.alpinelinux.org/alpine/apk-tools/-/blob/master/test/version.data

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-03-22 22:14:22 +01:00
Florian Eckert
0da116f25b ca-certificates: add missing license information
The package has no licence information. So let's fix it.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-03-21 21:44:53 +01:00
Paul Spooren
7ac030876c uci: fix variable declaration
Using := doesn't fly well when including other variables. In fact this
would cause the variable to be empty and break cloning of the git repo.

Fix: "c354c069b3 uci: fix Makefile formatting"

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-03-17 18:24:04 +01:00
Sergey Ponomarev
9da90971ab ubox: make logread as an alternative
The logread can be replaced with syslog-ng.
To support this it should be an alternative itself.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2024-03-08 15:38:37 +08:00
Daniel Golle
c378927ef8 procd: update to git HEAD
2f94972 hotplug-dispatch: don't filter empty env variables
 1901aba system: break infite loop resolving rootfs type

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-24 04:00:15 +00:00
Daniel Golle
ae2dced6ce
rpcd: update to latest git HEAD
8ef4c25 sys: use "Auto-Installed" field for packagelist

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-23 15:59:05 +01:00
Seo Suchan
6b904fa95b ca-certificates: update to version 20240203
Update Mozilla certificate authority bundle to version 2.64

Signed-off-by: Seo Suchan <tjtncks@gmail.com>
2024-02-18 11:49:04 +01:00
Christian Marangi
b34e6de7da
ubox: update to Git HEAD (2024-01-24)
2c5887cb4688 kmodloader: fix invalid read outside mapped region

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-24 13:08:36 +01:00
Christian Marangi
b66a340837
fstools: update to Git HEAD (2024-01-22)
2171f6261556 libfstools: force mkfs when formatting overlay
08cd7083cac4 libfstools: fit: improve fit_volume_find string handling

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-22 01:46:43 +01:00
Christian Marangi
4d2a82a73c
ubox: update to Git HEAD (2024-01-22)
b2f6da671f7c kmodloader: Fix NULL pointer dereferences error
202d7c05029a kmodloader: fix memory leak in print_modinfo
6cf7d837ee7e kmodloader: fix TOCTOU problem with scan_builtin_modules

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-22 01:28:52 +01:00
Christian Marangi
ced3fbcda1
ubox: update to Git HEAD (2024-01-15)
11cb29e15d68 kmodloader: remove unneeded uname() call
811ca6c2234a kmodloader: fix memory leak in scan_loaded_modules()
8c95fc7039cb kmodloader: support loadable module parameters in modinfo
4ffc29e4041c kmodloader: add basic support for builtin modules
ba3908351232 kmodloader: add modinfo support for builtin modules
c006dccecb6f kmodloader: cleanup duplicated mmap() code

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-19 21:45:19 +01:00
Christian Marangi
66527d28ea
fstools: update to Git HEAD (2024-01-15)
325d63d67006 mount_root: fix compilation error for wrong condition

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-15 17:31:47 +01:00
Christian Marangi
ba9c1b1314
fstools: update to Git HEAD (2024-01-15)
97bacb70138a libfstools: query drivers by priority
41e619ed1352 block: recognize /dev/fit* block devices
bc3b8cdd3de3 libfstools: add uImage.FIT fitblk driver
846302d09246 libfstools: partname: raise priority to 25
1a5695925ecf mount_root: add support for passing args to mount_root start
1858a492c300 mount_root: permit to pass mount options for rootfs mount

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-15 16:37:11 +01:00
Mohammad Sayful Islam
46a2490e8f ipq807x: add support for Linksys MX4200 V1 and V2
Linksys MX4200 is a 802.11ax Tri-band router/AP.
Specifications:
* CPU: Qualcomm IPQ8174 Quad core Cortex-A53 1.4GHz
* RAM: 512MB of DDR3
* Storage: 512Mb NAND
* Ethernet: 4x1G RJ45 ports (QCA8075)
* WLAN:
	* 2.4GHz: Qualcomm QCN5024 2x2 802.11b/g/n/ax 574 Mbps PHY rate
	* 5GHz: Qualcomm QCN5054 2x2@80MHz or 2x2@160MHz 802.11a/b/g/n/ac/ax 2402 PHY rate
	* 5GHz: Qualcomm QCN5054 4x4@80MHz or 2x2@160MHz 802.11a/b/g/n/ac/ax 2402 PHY rate
* LED-s:
	* RGB system led

* Buttons: 1x Soft reset 1x WPS
* Power: 12V DC Jack

Installation instructions:
Open Linksys Web UI - http://192.168.1.1/ca or http://10.65.1.1/ca depending on your setup.
Login with your admin password. The default password can be found on a sticker under the device.
To enter into the support mode, click on the “CA” link and the bottom of the page.
Open the “Connectivity” menu and upload the squash-factory image with the “Choose file” button.
Click start. Ignore all the prompts and warnings by click “yes” in all the popups.
The Wifi radios are turned off by default. To configure the router, you will need to connect your computer to the LAN port of the device.
Then you would need to write openwrt to the other partition for it to work
- First Check booted partition
fw_printenv -n boot_part

- Then install Openwrt to the other partition if booted in slot 1:
mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4200v(X)-squashfs-factory.bin alt_kernel

- If in slot 2:
mtd -r -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4200v(X)-squashfs-factory.bin kernel

Replace (X) with your model version either 1 or 2

Signed-off-by: Mohammad Sayful Islam <sayf.mohammad01@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2024-01-06 16:13:23 +01:00
Felix Fietkau
38eeefd060 procd: update to Git HEAD (2023-11-28)
d852f877920b service: Fix retriggering of init.d-scripts.
7e6c6efd6fbc udebug: add support for logging via udebug

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-11-30 19:19:40 +01:00
Felix Fietkau
4cb0677600 ubox: update to Git HEAD (2023-11-30)
cc34fb7b922f logd: add support for subscribing to the log object
c08709cceb55 logd: add udebug support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-11-30 13:53:14 +01:00
Felix Fietkau
889a50e266 ubus: update to Git HEAD (2023-11-28)
2b39a27d8bcc libubus: fix reconnect with auto subscribe
f84eb5998c6e libubus: fix initial subscribe with autosubscribe

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-11-28 13:57:34 +01:00
Felix Fietkau
8e7ab041ce ubox: add acl file for logd
Fixes ubus reconnect, since the process user id changes to 'logd'

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-11-28 13:57:34 +01:00
Felix Fietkau
4cd31d6c7c ubus: update to Git HEAD (2023-11-14)
b3e8c4ef07eb Add auto subscribe support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-11-20 14:10:24 +01:00
Daniel Golle
c63e3c98e8 fstools: bump to git HEAD
3a07943 block: support skipping uuid check
 56a9b4e block: consider currently mounted root device first
 9cd09d4 block: try to find the root device on both / and /rom
 c1a8d95 block: support extroot on already mounted overlay

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-09 11:15:42 +00:00
Hauke Mehrtens
d62726b1e4 urngd: update to version 2023-11-01
Fix compilation with glibc

44365eb Deactivate _FORTIFY_SOURCE in jitterentropy-base.c

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-11-01 22:10:46 +01:00
Christian Marangi
c0e30b17eb
treewide: disable QUILT refresh for unsupported packages
Some packages won't ever have something to patch as they normally
install files or are meta-packages.

For these special packages, disable QUILT refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-10-20 16:13:13 +02:00
Oskari Rauta
c354c069b3 uci: fix Makefile formatting
Fix wrong declaration for PKG_SROUCE_URL and PKG_VERSION variables and add missing colon

Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
2023-10-01 23:18:02 +03:00
Hauke Mehrtens
d2b5f4b2cd treewide: Add extra CPE identifier
This adds some Common Platform Enumerations (CPE) identifiers which I
found.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-09-25 23:06:33 +02:00
Erik Karlsson
fdce970dbb procd: create /dev/fd symlink
This is needed for ksh/bash style process substitution such as
<(command) and >(command) which was introduced in ash as of busybox
version 1.34.0 to work.

Signed-off-by: Erik Karlsson <erik.karlsson@genexis.eu>
2023-09-16 20:48:34 +02:00
Hauke Mehrtens
d1427863ba uci: update to git HEAD
3cda251 file: Fix uci -m import command
5781664 remove internal usage of redundant uci_ptr.last

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-08-10 23:09:37 +02:00
Felix Fietkau
fdadfb633f ubus: update to the latest version
f787c97b3489 libubus: add missing uloop_fd_delete call in ubus_shutdown

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-08-10 19:09:42 +02:00
Rafał Miłecki
4a57e786a1 urngd: fix archived tar hash
Due to some hiccup my local urngd-2023-07-25-7aefb47b.tar.xz ended up
being different from archived one. Repackaging it locally confirmed the
previous hash was incorrect.

Fixes: c74b5e09e6 ("urngd: update to the latest master")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-07-30 12:42:43 +02:00
Jo-Philipp Wich
4987a409a7 procd: improve status reporting for partially running services
The existing implementation incorrectly reported `running` for services
without any instances or with all instances stopped/terminated.

Improve the default implementation of `/etc/init.d/* status` to properly
report services with not running instances. In case a service exists,
but without running instance, the status call will now report
"not running" with exit code 5. In case some instances are running and
some are stopped/terminated, the call will report "running (X/Y)" where
`X` denoted the amount of running instances and `Y` the amount of total
registered ones.

Ref: https://forum.openwrt.org/t/x/159443
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-27 13:31:18 +02:00
Rafał Miłecki
c74b5e09e6 urngd: update to the latest master
7aefb47 jitterentropy-rngd: update to the v1.2.0

What's interesting about jitterentropy-rngd v1.2.0 release is that it
bumps its copy of jitterentropy-library from v2.2.0 to the v3.0.0. That
bump includes a relevant commit 3130cd9 ("replace LSFR with SHA-3 256").

When initializing entropy jent calculates time delta. Time values are
obtained using clock_gettime() + CLOCK_REALTIME. There is no guarantee
from CLOCK_REALTIME of unique values and slow devices often return
duplicated ones.

A switch from jent_lfsr_time() to jent_hash_time() resulted in many less
cases of zero delta and avoids ECOARSETIME.

Long story short: on some system this fixes:
[    6.722725] urngd: jent-rng init failed, err: 2

This is important change for BCM53573 which doesn't include hwrng and
seems to have arch_timer running at 36,8 Hz.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-07-25 10:04:34 +02:00
Hauke Mehrtens
2486841c1b rpcd: update to latest git HEAD
c07ab2f iwinfo: update byte counter to 64bit

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-07-01 12:14:07 +02:00
Hauke Mehrtens
3596380987 procd: update to latest git HEAD
122a5e3 Revert "sysupgrade: print errno on failure"
2db8365 system: add RISC-V CPU info

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-06-25 22:48:55 +02:00
Hauke Mehrtens
9d8d65322c rpcd: update to latest git HEAD
31c3907 file: strengthen exec access control

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-06-25 22:48:55 +02:00
Linhui Liu
4c5a9da869 selinux-policy: update to 1.2.5
30d503a uci jsonfilter: pipe and leak
e13cb64 rpcd leds
144781f jsonfilter, luci, ubus
1210762 rpcd and all agents get fd's leaked
ab9227c rpcd
2f99e0e luci rpcd
b43aaf3 rpcd (enable/disable services) luci peeraddr
f20f03e rpcd
7bc74f6 rpcd reads all subj state and luci-bwc leaks
9634b17 adds inotify perms to anon_inode
3d3c17c adds bare anon_inode (linux 5.15)
7104b20 dnsmasq and luci
0de2c66 luci,rpcd, ucode, wpad
14f5cf9 luci and ucode
e3ce84c rpcd, ucode and cgiio loose ends
96a2401 misc updates
9fe0490 initscript: remove redundant rules
71bd77e allow all init scripts to log to logd
f697331 sandbox: make ttydev handling more robust
a471877 simplify pty tty console access
f738984 sandbox: also remove TIOSCTI from all ttydevs

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2023-05-31 22:00:48 +02:00