include/package-pack: actually call default_postinist/prerm when using APK
Currently, when you install a package that ships uci-defaults scripts they are not getting executed during package installation.
For example, if you install a new LuCI theme it ships a uci-defaults script to add it to the UCI LuCI config so the theme is actually selectable but that does not happen until the device is rebooted so that uci-defaults script is actually executed.
It turns out that the recipe for post-install is the issue since it will include contents of postinst-pkg before the call to default_postinist. This is an issue since postinst-pkg will exit with code 0 before we ever reach the call to default_postinist.
So, lets simply make the call to default_postinist before postinst-pkg inclusion which is what OPKG based installation does.
The same issue affects pre-deinstall script but its not actually being hit since we dont seem to be actually even generating prerm-pkg scripts but lets fix this theoretical issue as well.
Fixes: #16987 Fixes: d788ab376f85 ("build: add APK package build capabilities") Link: https://github.com/openwrt/openwrt/pull/17023 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 5b6f835)
Add anchor to name search so that we don't inadvertently filter out packages containing, say, "kernel-" as part of their name.
Fixes: openwrt/packages#25372 Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com> Link: https://github.com/openwrt/openwrt/pull/17032 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 2784f78)
pwm1 value fan rotation speed cpu temperature notes ----------------------------------------------------------------- 0 maximal 31.5 Celsius too noisy 40 optimal 35.2 Celsius no noise hearable 95 minimal above 95 does not rotate 55.5 Celsius -----------------------------------------------------------------
At the moment we have following cooling levels:
cooling-levels = <255 96 0>;
for cpu-active-high, cpu-active-medium and cpu-active-low modes correspondingly. Thus only cpu-active-high and cpu-active-low are usable. I think this is wrong.
This patch fixes cpu-active-medium settings for bpi-r3 board.
PS: I know, the patch is not ideal as it can break pwm fan for some users. There are some peoples that use handmade cooling solutions, but: * discussed cooler is the only 'official' pwm cooler for bpi-r3 available on the market. * most peoples will use passive cooling available on the market or the discussed cooler. * the pwm-fan dts section was added before the official cooler appears on the market. Thus it should not be a lot of harm from this fix.
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com> Link: https://github.com/openwrt/openwrt/pull/16974 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 3467ea9)
In addition to the normal capabilities iw now also outputs HE MAC, HE PHY and EHT MAC and EHT PHY capabilities. Exclude them in the parsing.
The grep returns this with mac80211-hwsim: ``` root@OpenWrt:~# iw phy phy0 info | grep 'Capabilities:' Capabilities: 0x107e HE PHY Capabilities: (0x02bfce0000000000000000): EHT PHY Capabilities: (0x7c0000feffff7f01): HE PHY Capabilities: (0x02bfce0000000000000000): EHT PHY Capabilities: (0x7c0000feffff7f01): HE PHY Capabilities: (0x02bf000000000000000000): Capabilities: 0x107e HE PHY Capabilities: (0x1cbfce0000000000000000): EHT PHY Capabilities: (0xfc1f3ffeffff7f37): HE PHY Capabilities: (0x1cbfce0000000000000000): EHT PHY Capabilities: (0xfc1f3ffeffff7f37): HE PHY Capabilities: (0x1cbf000000000000000000): HE PHY Capabilities: (0x1cbfce0000000000000000): EHT PHY Capabilities: (0xfefffffeffffff7f): HE PHY Capabilities: (0x1cbfce0000000000000000): EHT PHY Capabilities: (0xfefffffeffffff7f): HE PHY Capabilities: (0x1cbf000000000000000000): Capabilities: 0x107e ```
With busybox 1.36.1 the ht_cap_mask variable will be set to -72057598332895361. With busybox 1.37.0 it will be set to -1. Both values are wrong, after this change it will be set to 4222 (0x107E).
x86: add all ports to the Gowin 1U default network config
Commit e52c57bb1b30375e0bcc5523db76a672a4a8b4a4 renamed all network ports to match the faceplate of the Gowin 1U Rack Mount Server and added the br-lan bridge for the eth* ports.
This commit adds the PoE port to the br-lan bridge and a br-wan bridge for the two SFP ports so that all ports are part of the default network configuration.
Signed-off-by: Til Kaiser <mail@tk154.de> Link: https://github.com/openwrt/openwrt/pull/16965 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (commit: 75af6a0)
mediatek: change Routerich AX3000 ubi size All new routers are shipped with ubi size 112MB since early September. Bootloader update required (ask vendor , see wiki)
These partitions weren't used: firmware_backup zrsave config2
New stm32 target introduces support for stm32mp1 based devices. For now it includes an initial support of the STM32MP135F-DK device. The specifications bellow only list supported features.
Netatalk v4 reintroduces AppleTalk and this module is required for layer 3 protocol support.
Module was removed in kernel 4.14 for OpenWrt 18.06 (commmit 14a0131, 22/02/2018). At the time nothing used it as Netatalk v3 did not support AppleTalk.
Not building ipddp feature/module like it was in the past, as recommended by upstream Netatalk maintainers.
Signed-off-by: Antonio Pastor <antonio.pastor@gmail.com> Link: https://github.com/openwrt/openwrt/pull/16979 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (commit: 5eb25dd)
Backup the stock firmware, settings and calibration data: This router comes with PandoraBox OpenWrt firmware, so it is possible to get all MTD partitions using scp.
Installation: - Using the bootloader web server. Hold the reset button while turning the power on. Upload the sysupgrade image on http://192.168.1.1. - Using the sysupgrade command in PandoraBox OpenWrt.
LEDs: - LAN1,LAN2,LAN3,LAN4,WAN,WLAN2G use GPIO pins of the MT7628AN SoC (GPIOs 43,42,41,40,39,44) - WLAN5G uses pin of MT7612EN. - The POWER LED is directly connected to the VCC. It can be reconnected to the GPIO 37 of the MT7628AN SoC by resoldering SMD resistor on the PCB.
Buttons: - The RESET button is connected to the GPIO 38 of the MT7628AN SoC.
MAC addresses as verified by OEM firmware: use address source 2g *:b0 factory 0x4 (label) 5g *:b1 factory 0x8004 LAN *:b2 factory 0x28 WAN *:b3 factory 0x2e
TP-Link CPE710-v2 is an outdoor wireless CPE for 5 GHz with one Ethernet port based on the AP152 reference board. Compared to the CPE710-v1, the only change observed in hardware is that the mdio address of the ethernet physical changed from 0x4 to 0x0.
Specifications: - SoC: QCA9563-AL3A MIPS 74kc @ 775MHz, AHB @ 258MHz - RAM: 128MiB DDR2 @ 650MHz - Flash: 16MiB SPI NOR Based on the GD25Q128 - Wi-Fi 5Ghz: ath10k chip (802.11ac for up to 867Mbps on 5GHz wireless data rate), based on the QCA9896 - Ethernet: one 1GbE port - 23dBi high-gain directional 2×2 MIMO parabolic antenna - Power, LAN, WLAN5G Blue LEDs
Flashing instructions: Flash factory image through stock firmware WEB UI or through TFTP To get to TFTP recovery just hold reset button while powering on for around 30-40 seconds and release. Rename factory image to recovery.bin Stock TFTP server IP:192.168.0.100 Stock device TFTP address:192.168.0.254
mediatek: split Acer/W6 dts into W6 common dtsi and device specific dts
In order to prepare OpenWrt support for other Acer W6 devices, this commit moves all device tree components that are used by all Acer W6/W6e/W6d/W6m routers from mt7986a-acer-predator-w6.dts to mt7986a-acer-w6-common.dtsi (new file) and includes this dtsi file in mt7986a-acer-predator-w6.dts.
Minor changes had to be made to the device tree in order to improve clarity and – notably – to reduce the number of dtc warnings: - replace (obviously wrong) led@<N> gpio led entities by led-<N> - remove unnecessary (default-state = "off") gpio led statements - rename entity “memory” to “memory@0” - add missing #address-cells and #address-size in /soc/mmc@11230000 - add missing #address-cells and #address-size in /soc/pcie@11280000 - introduce symbols “nvmem” and “swport0” in dtsi (referenced in dts)
The changes were checked with `diff -BEZbdtwy --suppress-common-lines ...` (comparing two dts files created using old and new fdt-1 blobs again), see https://github.com/openwrt/openwrt/pull/16861/#issuecomment-2455680020 .
This is the first of four commits into which the original commit was split to make reviews easier and more targeted.
mediatek: make use of Acer Predator Connect W6's u-boot environment
In order to prepare OpenWrt support for other Acer W6 devices and to adapt the procedure to read and set mac addresses which other devices of the same target are using (instead of needing an additional script and creating an additional structure in the file system), this commit - reads device mac addresses from u-boot environment - avoids the detour via the file system to set the mac addresses - drops redundant file /lib/preinit/05_extract_factory_data.sh
The idea and the implementation were thankfully taken from PR #16410.
This is the second of four commits into which the original commit was split to make reviews easier and more targeted.
mediatek: improve device tree for Acer Predator Connect W6
In order to prepare for OpenWrt support other Acer W6 devices and to get a step further to full hardware support for Acer Predator Connect W6, this commit - adjusts the product name ("Acer Predator Connect W6") - updates gpio LED labels to function/color scheme - show router status by using first rgb led instead of it's red color only (blue: booting/failsafe mode; red: sysupgrade; green: running – was: red) - changes switch/eth1 led configuration to reflect RX/TX activity and speed (green: full 1Gbps/2.5Gbps speed; amber: lower speed; blink: RX/TX) - shortens dummy dm-mod.create string in bootargs - enables W6's i2c interface
This is the third of four commits into which the original commit was split to make reviews easier and more targeted.
mediatek: add support for Acer Predator W6d and Acer Vero W6m
This commit adds support for two variants of the already supported router Acer Predator Connect W6: The Acer Predator Connect W6d (W6 without 6 GHz wifi) and the Acer Connect Vero W6m (W6 without 2.5G eth1 port, usb3 port, and the 6 on-board gpio RGB LEDs, and with a KTD2026 RGB LED controller instead of the KTD2061 LED controller of the W6/W6d).
The device tree for the W6m refers to the KTD202x driver suggested in PR #16860.
Patching target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh removes the code repetition in (old) lines 121 to 124 on the occasion.
This is the last of four commits into which the original commit was split to make reviews easier and more targeted.
The label-mac does not match the one assigned to the ethernet interface. Use the mac-address assigned to the wifi interface instead, as it matches the one found on the device label.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: b8b658b)
MAC: LAN MAC: label mac WAN MAC: label mac + 1 2.4G MAC: label mac 5G MAC: label mac + 1 with LA bit set
Installation ------------
1. Connect to the serial port as described in the "Hardware" section.
2. Power on the device + press reset pin. Keep pressing reset pin to enter the U-Boot shell.
3. Download the OpenWrt initramfs image. Place it on an TFTP server connected to the Cudy LAN ports. Make sure the server is reachable at 192.168.1.88. Rename the image to "cudy3000s.bin"
It seems that we have some kind of a symbol name conflict which causes CONFIG_SECCOMP to always be read as y.
Unfortunatelly, I could not figure out what is causing this, but simply renaming SECCOMP to USE_SECCOMP seems to properly work and leaves the symbol unset unless arch dependencies are satisfied.
This fixes qoriq and others that dont support seccomp from failing due to procd-seccomp package being selected to get included but it cannot be built for them: ERROR: unable to select packages: procd-seccomp (no such package): required by: base-files-1637~52b6c92479[procd-seccomp]
Fixes: 4c65359af49b ("build: fix including busybox, procd and apk/opkg in imagebuilder") Link: https://github.com/openwrt/openwrt/pull/17048 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: a48ec44)
base-files is including procd-secccomp as a dependency when USE_SECCOMP is selected, so there is no point in selecting the package directly here as well.
Link: https://github.com/openwrt/openwrt/pull/17048 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: a4bd42b)
x86: Deactivate kernel options with extra overhead
Deactivate CONFIG_CONTEXT_TRACKING_USER_FORCE: Force user context tracking: This is a testing feature which should not be activate in production environments according to the Kconfig help. It adds an extra overhead.
Deactivate CONFIG_RCU_NOCB_CPU_DEFAULT_ALL: Offload RCU callback processing from all CPUs by default: This option should only be used in aggressive HPC or real-time workloads which we do not have in OpenWrt. For normal workloads it increases the number of context switches.
In the default Arch Linux kernel both options are not activated.
Fixes: 31111680f6fc ("x86: switch config to a tickless kernel") Link: https://github.com/openwrt/openwrt/pull/17057 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (commit: ed52345)
The mt76x8 series SoCs use the MIPS generic systick timer. Sync the upstream Ralink systick driver changes and disable it for mt76x8 target to reduce the kernel size.
This commit adds OpenWrt U-Boot layout support for Routerich AX3000. The aims: 1. Get open-source U-Boot; 2. Get maximum available free space in OpenWrt.
Install ------- 1. Copy OpenWrt ubootmod-bl31-uboot.fip, ubootmod-preloader.bin, to the /tmp folder of the router using scp.
2. Make mtd partitions backups: http://192.168.1.1/cgi-bin/luci/admin/system/flash -> Save mtdblock contents
5. Copy OpenWrt ubootmod-initramfs-recovery.itb to the tftp server root with IP 192.168.1.254.
6. Reboot router: ``` reboot ``` U-Boot will automatically download from the tftp server and boot OpenWrt initramfs system.
7. Copy OpenWrt ubootmod-squashfs-sysupgrade.itb to the /tmp dir of the router using scp.
8. Run sysupgrade: ``` sysupgrade -n /tmp/squashfs-sysupgrade.itb ```
Recovery -------- 1. Place OpenWrt initramfs-recovery.itb image (with original name) on the tftp server (IP: 192.168.1.254). 2. Press "reset" button and power on the router. After ~10 sec release the button. 3. Use OpenWrt initramfs system for recovery.
BL2 and FIP recovery -------------------- Use mtk_uartboot and UART connection if BL2 or FIP in UBI is destroyed: Link: https://github.com/981213/mtk_uartboot
Return to stock: ---------------- 1. Copy partition backups (BL2.bin and FIP.bin) to the /tmp dir of the router using scp.
PSI provides a canonical way to see resource pressure increases as they develop, with pressure metrics for three major resources: memory, CPU, and IO. PSI stats are like barometers that provide fair warning of impending resource shortages, enabling users to take more proactive, granular, and nuanced steps when resources start becoming scarce.