mkits.sh creates a root.*.pagesync file with padding, which is global, and
the generated .its files reference it. Since dtc reads this file, it must
not run at the same time as mkits.sh
Fixes generating itb images with broken rootfs.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
3da6c104f0f5 database: use APK_DB_LAYER_ROOT in more places
5437e3abada1 audit: add usr/lib/apk to the list of protected paths under --full
de9baf912245 change default db location to /usr, but detect and use /lib if exists
218fdaa1a1a2 context: close root_fd on free
d33294236cb4 database: add support for only-when-modified trigger paths
36935db0ef3b package: fix memfd_create warnings on Linux kernels < 6.7
1c3fc36051a3 blob: add and use apk_blob_trim_{start,end}
af5f9e3f93b0 pkg: fix v3 package size setting to installeddb
9428e34694c8 version: allow --check and --test to work without database
4b4add5326a8 test: fix unit test registration function to be unique
eac18cb200d4 test: add testlib.sh for user tests
20dae205b006 mkpkg: fix creation of package with hardlinks
7bdecdca6a95 pkg: only allow tags in world and some commands
76de228bcc0b commit: show tags of world constrains
9a1b1cf68420 test: use testlib for solver.sh
99fc2a2a5efc test: remove dependency on GNU tar
6927746b9a10 Revert usrmerge/LFS related changes to apk used paths
5d287a9b06e9 apk-tools-3.0.0_pre5
8d93a79fb895 mkpkg: fix hardlink on big-endian system
Link: https://github.com/openwrt/openwrt/pull/17148
Signed-off-by: Robert Marko <robimarko@gmail.com>
Recent changes to BuildBot config moved the kmods to a dedicated
directory and dropped them from the packages dir. This was needed as
both OPKG and APK gets confused if both entry are present.
To fix this, unconditionally append the kmod feed line if
CONFIG_BUILDBOT is enabled.
Fixes: #17146
Link: https://github.com/openwrt/openwrt/pull/17151
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Introduce package flag MESON_USE_STAGING_PYTHON which allows packages
to be built with the OpenWrt-built python3/host instead of relying on the
buildhost's Python distribution.
This is useful for packages using Meson which require additional Python
modules during build.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Rename jffs2reset to factoryreset. Convert all scripts to using the new command
line. Print a deprecation notice when jffs2reset is invoked.
49d36ba jffs2reset: rename to factoryreset
b135064 jffs2reset: print deprecation message
Signed-off-by: John Crispin <john@phrozen.org>
The boot LED on OpenWrt One is PWM driven and sets the pattern trigger as the
default inside its devicetree.
Signed-off-by: John Crispin <john@phrozen.org>
Add an ucode based re-implementation of the shell script based wifi code.
The new code is jsonschema driven. The code has been refactored into several
files making it easier to follow.
The new scripts are also way faster than the previous sh implementation.
The new code is currently opt-in via WIFI_SCRIPTS_UCODE and defaults to
EXPERIMENTAL.
Signed-off-by: John Crispin <john@phrozen.org>
Add an ucode based re-implementation of iwinfo. The tool behaves like the old
one with a few minor output differences. It is now possible to add -j to any
command resulting in JSON output.
The new code is currently opt-in via WIFI_SCRIPTS_UCODE and defaults to
EXPERIMENTAL.
Signed-off-by: John Crispin <john@phrozen.org>
b0b5d93 Merge pull request #234 from IdWV/fs
60e7a88 Merge pull request #232 from sebastianertz/lib-digest
1752779 digest: implement compile time option to exclude less common algorithms
c7268a1 ci: include libmd in MacOS CI builds
fcb6f70 lib: introduce digest library
1323a27 Merge pull request #246 from jow-/fix-upvalue-resolve
ed5ce8f types: resolve upvalue values in arrays and objects
a6e0641 vm: resolve upvalues before pushing them onto the stack
ef1baab ci: drop OpenWrt tests for now
63e18ea fs: eliminate the usage of global variables
b1bd7b5 types: add ucv_resource_create() helper
3408edf Merge pull request #244 from nbd168/nl80211
8af77e7 nl80211: add new attributes for multi-radio support
1423ad7 nl80211: cover extended feature and EHT rate info attributes
ee1d6d8 Merge pull request #237 from sebastianertz/math
4b18a9b Merge pull request #213 from jow-/improve-vector-macros
1f022c0 math: removed global variable for thread safety
e5fe6b1 treewide: refactor vector usage code
20307ee utils: improve vector utilities
aa18952 Merge pull request #241 from jow-/socket-local-fanout-decl
79ccd9c socket: provide local definition of `struct fanout_args`
402280d Merge pull request #239 from jow-/safe-insert-during-obj-iteration
07afe96 Merge pull request #240 from jow-/stricter-number-conversion
736d450 types: fix potential use after free on adding keys during iteration
4134e71 vallist: more thoroughly check for trailing garbage after numeric string
9cf53dd Merge pull request #226 from jow-/lexer-improvements
2b2e732 lexer: make api functions public
855854f lexer: emit comment and template statement block tokens
328a50f lexer: improve token position reporting
fa22732 Merge pull request #225 from jow-/compiler-fix-keyword-property-labels-after-spread
6e88c62 Merge pull request #224 from jow-/lib-fs-readline-leak
94d1211 compiler: properly treat property names after spread expressions
67cd123 fs: fix potential memory leak on i/o errors in .read()
Signed-off-by: John Crispin <john@phrozen.org>
Use and alternate ubus object when the config contains "driver=wired". This
commit is in preparation of the ieee8021x-wired daemon.
Signed-off-by: John Crispin <john@phrozen.org>
This allows a radius server to send AVPs for client rate control inside the
accept message. Further add the ratelimits to the sta-authorized ubus
notification.
Signed-off-by: John Crispin <john@phrozen.org>
* add a UCI option to disable all LEDs.
* add an init.d parameter to blink all LEDs
* add on/off parameters to init.d
Signed-off-by: John Crispin <john@phrozen.org>
Avoid harmless error from network script by checking presence of
now-optional wifi support script, most notably confusing users of x86
snapshots.
Fixes: #14964
Signed-off-by: Andris PE <neandris@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14986
Signed-off-by: Robert Marko <robimarko@gmail.com>
1002 and 5006 are default addresses as part of the calibration data.
Don't bother specifying them explicitly.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17082
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The KuWFi N650 is a 5GHz outdoor wireless bridge based on QCA9563.
Specs
=====
CPU: QCA9563, 775MHz
RAM: 128MiB
Flash: 16MiB
Wireless: QCA9888 (5GHz only)
Ethernet: 2x GBit (via QCA8337), 48V passive PoE
Installation
============
From OEM firmware
-----------------
The OEM firmware has telnet enabled by default. If not, it can be enabled
from the firmware web interface. You need a TFTP server on your computer
and the OpenWrt factory image should be available as "n650factory.bin".
It is assumed that your computer has the IP 192.168.1.1 and the N650
192.168.1.20 (default IP address).
1. Connect via Telnet to the device and log in with the default credentials
"admin:admin"
2. Exploit the limited interface by typing "ps & /bin/sh"
3. Press <ENTER> to start the shell
4. Enter the following commands:
$ cd /tmp
$ tftp -r n650factory.bin -g 192.168.1.1
$ cat << EOF > /tmp/openwrt.sh
#!/bin/sh
IMAGE_NAME="\$1"
if [ ! -e \${IMAGE_NAME} ]; then
echo "Image file not found: \${IMAGE_NAME}"
exit 1
fi
. /usr/sbin/common.sh
kill_remaining TERM
sleep 3
kill_remaining KILL
run_ramfs mtd write \${IMAGE_NAME} firmware
sleep 2
reboot -f
EOF
$ chmod +x /tmp/openwrt.sh
$ /tmp/openwrt.sh n650factory.bin
Once the device reboots, it should load OpenWrt.
From UART
---------
UART installation is possible since the serial header is already soldered
on. The pinout is GND - Tx - Rx - VCC from top to bottom (RJ45 ports are
at the bottom). Connect with 115200 8N1.
First, boot OpenWrt from TFTP. Enter the following commands in the U-Boot
shell, assuming your computer has the IP address 192.168.1.1 and a TFTP
server running where the initramfs image is provided as n650.bin:
setenv ipaddr 192.168.1.20
setenv serverip 192.168.1.1
tftpboot 0x84000000 n650.bin
bootm
Once booted, transfer -loader.bin and -sysupgrade.bin images to the device
at /tmp. Enter the following commands, replacing the filenames:
mtd write /tmp/loader.bin loader
sysupgrade /tmp/sysupgrade.bin
Reboot and OpenWrt should load from flash.
Back to Stock
-------------
Back to stock is only possible if you saved a partition backup before
installing OpenWrt. Assuming you have fullbackup.bin covering the whole
flash, you need to prepare the image as follows:
$ dd if=fullbackup.bin of=fwconcat0.bin bs=65536 skip=4 count=212
$ dd if=fullbackup.bin of=loader.bin bs=65536 skip=216 count=1
$ dd if=fullbackup.bin of=fwconcat1.bin bs=65536 skip=217 count=22
$ cat fwconcat0.bin fwconcat1.bin > firmware.bin
Transfer firmware.bin and loader.bin to the OpenWrt device. First, flash
loader.bin to mtd device loader, then force sysupgrade:
$ mtd write loader.bin loader
$ sysupgrade -F firmware.bin
The reason for the two-step process is the way the flash layout is designed
for OpenWrt in contrast to the OEM firmware partition.
Signed-off-by: Andreas Böhler <dev@aboehler.at>
Link: https://github.com/openwrt/openwrt/pull/17089
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add U-Boot replacement loader for the MERCUSYS MR90X. This is required
to increase available flash space in OpenWrt.
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16744
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The recently added AP15C dts file only differs by the definition of the
reset button. Unify the shared definition into a dtsi to reduce code
duplication.
Signed-off-by: Christoph Krapp <achterin@gmail.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://github.com/openwrt/openwrt/pull/16998
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This adds support for RTL8812au/RTL8821au USB adapters.
Run-tested: x86/64/rockchip
USB adapters tested: Alfa AWUS036ACS, D-Link DWA-171 A1.
Signed-off-by: Marty Jones <mj8263788@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17079
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Backport support for RTL8812AU/RTL8821AU USB adapters
Manually backported patch:
045-v6.13-wifi-rtw88-Enable-the-new-RTL8821AU-RTL8812AU-driver
Patches from 046 to 051 are pending.
Signed-off-by: Marty Jones <mj8263788@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17079
[Move BPAUTO_WANT_DEV_COREDUMP to original patch]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This adds firmware support for the RTL8812AU/RTL8821AU USB wireless adapters.
Signed-off-by: Marty Jones <mj8263788@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17079
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This reverts commit 70e41d0205.
"ethaddr" is stored into the "u-boot-env" (stock: "Config") partition
and it's quoted with double-quotations, but that format is not supported
by the current NVMEM u-boot-env driver (and mac_pton() function) and the
MAC address won't be parsed to byte array.
This causes random MAC addresses on the adapters, so revert the above
commit.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17116
Signed-off-by: Robert Marko <robimarko@gmail.com>
libapk as a library is used nowhere else and makes no sense to link it
shared. By linking static, we can take advantage of LTO and get the size
reduced further.
Some numbers locally:
Before:
168K staging_dir/target-mips_24kc_musl/root-ath79/usr/bin/apk*
252K staging_dir/target-mips_24kc_musl/root-ath79/usr/lib/libapk.so.2.99.0*
Static:
344K staging_dir/target-mips_24kc_musl/root-ath79/usr/bin/apk*
Static + LTO:
305K staging_dir/target-mips_24kc_musl/root-ath79/usr/bin/apk*
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17109
Signed-off-by: Robert Marko <robimarko@gmail.com>
Currently, in case when a package in the device package list is marked with
the "-"" prefix meaning that its supposed to be removed for that device but
it was not actually previously built it will cause the APK to error out it
and thus image generation will also fail.
So, lets do what OPKG build step does and supress the error with the "-"
prefix in make.
Fixes: #17103
Fixes: d788ab376f ("build: add APK package build capabilities")
Link: https://github.com/openwrt/openwrt/pull/17106
Signed-off-by: Robert Marko <robimarko@gmail.com>
Specification:
- MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX)
- 512MB RAM
- 128MB SPI NAND
- 2 LEDs (green, orange)
- 3 buttons (fn, reset, wps)
- 2 2.5Gbit ethernet ports based on Airoha EN8811H phy
Serial Interface:
- 3 Pins GND, RX, TX
- Settings: 115200, 8N1
Notes:
- The device supports dual boot mode
Flash instruction:
The only way to flash OpenWrt image is to use tftp recovery mode in U-Boot:
1. Configure PC with static IP 192.168.1.2/24 and tftp server.
2. Rename "openwrt-mediatek-filogic-keenetic_kn-3911-squashfs-factory.bin"
to "KN-3911_recovery.bin" and place it in tftp server directory.
3. Connect PC with ethernet port, press the reset button, power up
the device and keep button pressed until status led start blinking.
4. Device will download file from server, write it to flash and reboot.
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16830
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is required for upcoming Keenetic KN-3911 support
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16830
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is required for upcoming Keenetic KN-3911 support
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16830
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
DTS file for this device seems to be using CRLF line endings, so lets
convert them into Unix-style LF.
Fixes: faf4b3e0f7 ("mediatek: filogic: add support for Cudy WR3000S v1")
Link: https://github.com/openwrt/openwrt/pull/17096
Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit adds kmod-leds-ktd202x to the OpenWrt image for the device
"Acer Connect Vero W6m" which is equipped with one KTD2026 controlling the
device's status LED via I2C.
Signed-off-by: George Oldfort <openwrt@10099.de>
Link: https://github.com/openwrt/openwrt/pull/16860
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit adds the Linux kernel mainline driver "leds-ktd202x" for the
KinetIC KTD2026 and KTD2027 RGB/RBGW controller with I2C interface that was
introduced in kernel version 6.7, last changed in mainline on 2024-05-31.
At least the Acer Connect Vero W6m (a variant of the Acer Predator Connect
W6 without 2.5G eth1 port, usb3 port, and the 6 on-board gpio RGB LEDs) is
equipped with a KTD2026 (and a single RGB LED attached to it used by the
stock firmware as status LED), and maybe other router devices also are.
Signed-off-by: George Oldfort <openwrt@10099.de>
Link: https://github.com/openwrt/openwrt/pull/16860
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
apk package manager is default for some time, so lets remove the
EXPERIMENTAL warning from the related option.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Fixes since 4.10:
* Fixed detection of Fmt version 11 and newer.
* Fixed prefix command lookup from PATH.
Suggested-by: Jen Wolf <jenwolf@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/17105
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Set MESON_ARGS and MESON_HOST_ARGS when calling ninja for building.
This is required eg. to be able to set PYTHONPATH= not just for the
Meson (==configure) run but also for the build phase itself.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
tools/gmp was using the .tar.xz while package/libs/gmp was using the
.tar.gz archive of the GMP release. Use the .tar.gz for both of them.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
It was reported, that a small typo sneaked in, so lets fix it.
Reported-by: @dave14305
Fixes: c19c31f7aa ("base-files: add migration information for APK")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
86da5cbcdb9d system-linux: do not pull ifindex/flags from netlink messages on rtnl events
cd96f61ba63e proto-shell: fix spurious interface teardowns with host deps
a39fe3a8b150 wireless: add support for adding a list of devices for a wifi-iface
d29cf707478c iprule: add ipproto property
768027c5a764 system-linux: restore reading flags from netlink messages
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17074
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Currently downstream tools like ASU lack information about kernel
version to find out the relevant kmod build folder on downloads server.
So lets fix it by providing a new `linux_kernel` JSON array which would
for the start provide Linux kernel version, revision and vermagic
information.
"linux_kernel": {
"release": "1",
"vermagic": "b57450c07d3a786158c3601fc5cee57d",
"version": "6.6.61"
},
Fixes: openwrt/openwrt#17036Fixes: efahl/owut#9
Co-developed-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17042
Signed-off-by: Petr Štetiar <ynezz@true.cz>