Christian Marangi [Mon, 13 Nov 2023 01:09:57 +0000 (02:09 +0100)]
CI: add issue labeller action
Add issue labeler action. This action will parse BUG issue from the
template and will make validation on the insert data.
The action will:
- Tag the issue with SNAPSHOT or release based on the provided release
- Tag the issue with the reported tag
- Tag the issue with the image kind (Official or Self Built)
- Validate the reported version exist
- Validate the reported release exist
- Validate the reported device exist
Will also tag the issue with useful tag or flag the issue as invalid.
Will also comment the issue with the invalid info provided.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Mon, 13 Nov 2023 01:01:01 +0000 (02:01 +0100)]
github: add release info to BUG template
Add release info to BUG template. Having the reported release is an
additional info to better bisect the bug and what release is affected.
This is also useful in preparation for action that will parse BUG
template and add tag and do validations.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Sun, 12 Nov 2023 18:14:46 +0000 (19:14 +0100)]
scripts/dump-target-info.pl: add new function to DUMP devices
Add new function to dump-targer-info.pl to DUMP devices provided a
matching target/subtarget.
Example:
./scripts/dump-targer-info.pl devices ipq806x/generic
will produce the sorted list of devices defined in the following format:
device_id device_name
Devices may have alternative names, the script will dump each
alternative name in the same line of device_id.
Following the pattern:
device_id "PRIMARY DEVICE NAME" "ALT0 DEVICE NAME" "ALT1 DEVICE NAME" ...
Example:
tplink_ad7200 "TP-Link AD7200 v1/v2" "TP-Link Talon AD7200 v1/v2"
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Rafał Miłecki [Fri, 10 Nov 2023 10:25:05 +0000 (11:25 +0100)]
ath79: use "fixed-layout" for Embedded Wireless devices
Those devices have Ethernet interfaces using base MAC address increased
by 0x40 in the 3rd indexed byte (00:00:00:FF:00:00). To describe that we
were using a custom (downstream) "mac-address-increment-byte" property.
The same result can be achieved by using "mac-base" with a properly
adjusted offset value (0x40 << 16). It may be not pretty but it should
work without custom property or downstream kernel patch to support it.
Cc: Ansuel Smith <ansuelsmth@gmail.com>
Cc: Catrinel Catrinescu <cc@80211.de>
Cc: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Rosen Penev <rosenp@gmail.com>
Christian Marangi [Wed, 15 Nov 2023 00:20:56 +0000 (01:20 +0100)]
ipq806x: fix wrong LEDs mode for non-standard qca8k LEDs
There was a typo in the LED definition for the mode of non-standard
qca8k LEDs. Mode for link speed was wrongly set to link-10 link-100
link-1000 while the real mode in sysfs is link_10 link_100 and
link_1000.
Fix the entry to the correct mode.
Fixes: c707cff6c94b ("ipq806x: add LEDs definition for non-standard qca8k LEDs")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Jo-Philipp Wich [Tue, 14 Nov 2023 14:35:03 +0000 (15:35 +0100)]
netifd: update to Git HEAD (2023-11-14)
8587c074f1eb interface-ip: fix IPv4 route target masking
Fixes: https://github.com/openwrt/netifd/issues/17
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Robert Marko [Tue, 14 Nov 2023 08:47:38 +0000 (09:47 +0100)]
qca-ssdk: disable PTP and swconfig by default
PTP and swconfig support in SSDK require kernel modifications we dont need
nor we want to support for now, so move the PTP and swconfig disablement
into general build options as they are not ipq807x specific.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Tue, 14 Nov 2023 08:22:40 +0000 (09:22 +0100)]
qca-ssdk: pass SoC to build
Recent SSDK versions started also parsing the "SoC" variable to identify
the SoC along with the "CHIP_TYPE".
We are not passing "SoC" currently and this leads to components we dont
need like MHT (New 2.5G quad port switch) being compiled and then unused,
so lets just pass the "SoC" as well.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Mon, 13 Nov 2023 20:54:06 +0000 (21:54 +0100)]
qualcommax: move switch tick mode setting to ESS DTSI
Every board in qualcommax is using the same BM and TM switch tick modes, so
instead of specifying them in each board lets just set them in the ESS DTSI
directly.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Sun, 12 Nov 2023 16:24:43 +0000 (17:24 +0100)]
qualcommax: use defines for MAC mode setting
Now that we have the MAC modes defined in DT bindings, lets replace all of
the raw hex values with defines.
While we are here, we can drop the disabled UNIPHY-s as that is the default
value in the ESS DTSI.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Sat, 11 Nov 2023 20:50:15 +0000 (21:50 +0100)]
qualcommax: set default switch MAC modes
Every board that has the switch enabled needs to have MAC modes defined for
all 3 UNIPHY instances.
So, instead of having to at least put the disabled MAC mode for UNIPHY-s
let disable them by default and then boards can override it.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Sat, 11 Nov 2023 20:44:59 +0000 (21:44 +0100)]
qualcommax: add bindings for MAC modes
Since every board needs to define the correct MAC modes, it makes sense
to document the allowed hex values with a humanly readable name.
So, lets document all of the allowed MAC modes from SSDK 12.4 as bindings,
so later we can replace all of the hex values in DTS-es with these.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Paul Spooren [Mon, 13 Nov 2023 22:32:12 +0000 (23:32 +0100)]
Revert "prereq-build: add Python 3.12 support"
This reverts commit
7ceb76ca3a37ba6b722df39ba0838909fa7cf7b4.
Python 3.12 removes the distutils package and is therefore not
compatible. We have to check downstream what relies on distutils before
adding actual support for Python 3.12. Sorry for the noise.
With this in-place, the macOS CI job fails and turns things red, revert
for now.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Chukun Pan [Fri, 29 Sep 2023 15:05:26 +0000 (23:05 +0800)]
mac80211: realtek: rtw88: add RTL8822CU support
Add the Realtek RTL8822CU support to rtw88 package.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Chukun Pan [Thu, 28 Sep 2023 15:09:20 +0000 (23:09 +0800)]
mac80211: realtek: rtw88: add RTL8821CU support
Add the Realtek RTL8821CU support to rtw88 package.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Chukun Pan [Wed, 27 Sep 2023 15:01:50 +0000 (23:01 +0800)]
mac80211: realtek: rtw88: add RTL8821CE support
Add the Realtek RTL8821CE support to rtw88 package.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Chukun Pan [Mon, 13 Nov 2023 14:18:06 +0000 (22:18 +0800)]
mac80211: realtek: fix rtw88 driver dependencies
The RTW88 PCI/USB driver uses the same firmware,
so add firmware dependencies.
Also CI report that:
Package kmod-rtw88-usb is missing dependencies for the following libraries:
usbcore.ko
This commit fixes it.
Fixes: 3538a19 ("mac80211: split rtw88 configuration for each supported chip")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Chukun Pan [Tue, 26 Sep 2023 15:03:28 +0000 (23:03 +0800)]
linux-firmware: add Realtek RTW89 firmware
This is the firmware required for the rtw89 driver.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Chukun Pan [Mon, 25 Sep 2023 15:40:02 +0000 (23:40 +0800)]
linux-firmware: add Realtek RTL8723DE/RTL8821CE firmware
This adds packages for the Realtek RTL8723DE/RTL8821CE
firmware to be used with the rtw88 driver.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Hannu Nyman [Sun, 12 Nov 2023 18:34:45 +0000 (20:34 +0200)]
devel/gdb: Disable libzstd explicitly
New gdb has got libzstd support, and libzstd gets detected
at buildbot build. Explicitly disable it to avoid dependency.
Fixes: f79de8ec65 ("gdb: Update to 13.2")
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Christian Marangi [Sun, 12 Nov 2023 19:25:24 +0000 (20:25 +0100)]
qca-ssdk: fix unsupported scenario with PORT1 not declared in switch bmp
Commit
947b44d ("ipq807x: fix wrong define for LAN and WAN ess mask")
started fixing wrong switch_lan_bmp that defined lan there weren't
actually present. This displayed a fragility in the malibu phy init code
in qca-ssdk.
Add patch to fix this. Also update each DTS with the new required
property if needed.
The new binding malibu_phy_start_addr is required with devices that
place the malibu first PHY referring port1 on a different PHY addres
than 0. The most common configuration is 0 but some device (for example
Qnap 301W) place the malibu PHY at an offset to address 16.
Refer to ipq8074-ess dtsi for extensive description on how to derive
this value.
Quoting the patch detailed description:
The usage of first_phy_addr is EXTREMELY FRAGILE and results
in dangerous results if the OEM (or anyone that by chance try to
implement things in a logical manner) deviates from the default values
from the "magical template".
To be in more details. With QSDK 12.4, some tweaks were done to improve
autoneg and now on every call of port status, the phydev is tried to
add. This resulted in the call and log spam of an error with ports that
are actually not present on the system with qsdk reporting phydev is
NULL. This itself is not an error and printing the error is correct.
What is actually an error from ages is setting generic bitmap reporting
presence of port that are actually not present. This is very common on
OEM where the switch_lan_bmp is always a variant of 0x1e (that on bitmap
results in PORT1 PORT2 PORT3 PORT4 present) or 0x3e (PORT1 PORT2 PORT3
PORT4 PORT5). Reality is that many device are used as AP with one LAN
port or one WAN port. (or even exotic configuration with PORT1 not
present and PORT2 PORT3 PORT4 present (Xiaomi 3600)
With this finding one can say... ok nice, then lets update the DT and
set the correct bitmap...
Again world is a bad place and reality is that this cause wonderful
regression in some case of by extreme luck the first ever connected
port working and the rest of the switch dead.
The problem has been bisected to all the device that doesn't have the
PORT1 declared in any of the bitmap.
With this prefaction in mind, on to the REAL problem.
malibu_phy_hw_init FOR SOME REASON, set a global variable first_phy_addr
to the first detected PHY addr that coincidentally is always PORT1.
PORT1 addr is 0x0. The entire code in malibu_phy use this variable to
derive the phy addrs in some function.
Declaring a bitmap where the PORT1 is missing (or worse PORT4 the only
one connected) result in first_phy_addr set to 1 or whatever phy addr is
detected first setting wrong value all over the init stage.
To fix this, introduce a new binding malibu_first_phy_addr to manually
declare the first phy that the malibu PHY driver should use and permit
to detach it from port bmp detection. The legacy detection is kept for
compatibility reason.
Fixes: #13945
Fixes: 947b44d9ae17 ("ipq807x: fix wrong define for LAN and WAN ess mask")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tested-by: Robert Marko <robimarko@gmail.com> # Qnap 301W
Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Sun, 12 Nov 2023 19:23:19 +0000 (20:23 +0100)]
Revert "qca-ssdk: fix unsupported scenario with PORT1 not declared in switch bmp"
This reverts commit
8cce00bc9dddc3fc47d63625b0f512693c27ce2f.
The confusion was real and this change cause regression on other
advanced devices that makes actual use of the first_phy_addr value.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Petr Štetiar [Thu, 15 Jun 2023 14:11:27 +0000 (16:11 +0200)]
treewide: fix shell errors during dump stage
Fixes following issues:
bash: -c: line 1: `echo
1686820180<LINUX_VERMAGIC> | /staging_dir/host/bin/mkhash md5 | cut -b1-8'
bash: -c: line 1: `echo
1686820180<LINUX_VERMAGIC> | /staging_dir/host/bin/mkhash md5 | sed -E 's/(.{8})(.{4})(.{4})(.{4})(.{10})../\1-\2-\3-\4-\500/''
bash: -c: line 1: syntax error near unexpected token `|'
bash: line 1: *1024*1024: syntax error: operand expected (error token is "*1024*1024")
bash: line 1: (64 + ): syntax error: operand expected (error token is ")")
expr: syntax error: missing argument after '+'
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Thu, 15 Jun 2023 14:11:26 +0000 (16:11 +0200)]
scan.mk: do not silence output of dump phase
Make it easier to spot currently hidden issues:
$ make defconfig V=sc
...
Collecting target info: target/linux/airohabash: -c: line 1: syntax error near unexpected token `|'
bash: -c: line 1: `echo
1686815253<LINUX_VERMAGIC> | staging_dir/host/bin/mkhash md5 | cut -b1-8'
bash: -c: line 1: syntax error near unexpected token `|'
bash: -c: line 1: `echo
1686815253<LINUX_VERMAGIC> | staging_dir/host/bin/mkhash md5 | sed -E 's/(.{8})(.{4})(.{4})(.{4})(.{10})../\1-\2-\3-\4-\500/''
...
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Shiji Yang [Thu, 9 Nov 2023 04:42:09 +0000 (12:42 +0800)]
mac80211: rt2x00: correct wrong BBP register in RxDCOC calibration
This fix can reduce the total calibration time from 6 seconds to
1 second.
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Shiji Yang [Wed, 25 Oct 2023 12:09:23 +0000 (20:09 +0800)]
mac80211: sync some rt2x00 patches with wireless-next
Some local patches have been sent to upstream and they are slightly
different from the upstream version. So it's better to replace them
to avoid conflicts with the new mac80211 backport driver. The
different parts have been merged into patch 996.
This commit also includes some additional fixes:
* Fix watchdog function.
* Improve MT7620 register initialization.
* Introduce DMA busy watchdog for rt2800.
P.S.
Sometimes rt2800 series chips may fall into a DMA busy state. The
tx queues become very slow and the client cannot connect to the AP.
Usually, We can see a lot of hostapd warnings at this point:
'hostapd: IEEE 802.11: did not acknowledge authentication response'
The DMA busy watchdog can help the driver automatically recover
from this abnormal state. By the way, setting higer 'cell_density'
and disabling 'disassoc_low_ack' can significantly reduce the
probability of the DMA busy.
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Alexis Lothoré [Sat, 4 Nov 2023 04:48:42 +0000 (21:48 -0700)]
mac80211: add support for rtw88_8822bu
Kernel 6.1 has introduced support for RTW8822BU network adapter, which
is an USB variant of the rtw8822b 802.11ac chipset family.
Build and install the corresponding module in the rtw88 package
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Alexis Lothoré [Sat, 4 Nov 2023 04:48:41 +0000 (21:48 -0700)]
mac80211: split rtw88 configuration for each supported chip
Current rtw88 build configuration builds modules for all chips supported by
rtw88 driver family. This brings the following issues:
- adding a chip with a different bus is not convenient (all chips currently
depends on PCI)
- some features requirements are not relevant for all chips in family (eg
802.11AC is enforced but RTW88-8723DE is only a 802.11b/g/n chip)
Remove those constraints/issues by adding one module build option per
supported chip, and add intermediate options to properly cascade
dependencies.
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Roland Reinl [Sun, 1 Oct 2023 09:25:40 +0000 (11:25 +0200)]
mediatek: Add support for TP-Link EAP225v5
Device specification:
- MT7629 with 16MB NOR flash W25Q128 and 128 MB DDR3 RAM.
- MT7761N and MT7762N wireless chips (currenlty no driver in OpenWrt available)
- WiFi is NOT working on this device
- Dual core but second CPU doesn't seem to work (Error message during boot: "CPU1: failed to come online")
There are two similar merge requests for similar devices with the same issues:
- https://github.com/openwrt/openwrt/pull/12286
- https://github.com/openwrt/openwrt/pull/5084
UART interface is next to the reset button, pinout:
- 1: TX (the pin with the arrow marker)
- 2: RX
- 3: GND
- 4: VCC
UART settings: 115200,8n1, 3.3V
U-Boot menu can be entered by pressing Ctrl+B during startup.
Booting initramfs:
- Set your computers IP adress to 192.168.1.110
- Run a TFTP server providing the initramfs image
- Power on the AP, press Ctrl+B to get to the U-Boot menu
- Select "1. System Load Linux to SDRAM via TFTP"
- Update kernel file name, input server IP and input device IP (if they deviate from the defaults)
- After booting, create a backup of all partitions, especially for kernel and root_fs. They are required for reverting back to stock firmware
- The sysupgrade image can be flashed now
MAC adresses:
- LAN and 2.4GHz use the same MAC (the one printed on the device)
- 5GHz WiFi MAC is LAN MAC + 1
GPIOs:
- GPIO 21 is the reset pin (low active)
- GPIO 55 is for the green LED (active high)
- GPIO 56 is for the yellow/amber LED (active high)
Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Roland Reinl [Thu, 20 Jul 2023 14:00:50 +0000 (16:00 +0200)]
mediatek: Add support for D-Link EAGLE PRO AI M32
Specification:
- MT7622BV SoC with 2.4GHz wifi
- MT7975AN + MT7915AN for 5GHz
- MT7531BE Switch
- 512MB RAM
- 128 MB flash
- 3 LEDs (red, orange, white)
- 2 buttons (WPS and Reset)
MAC addresses:
- WAN MAC is stored in partition "Odm" at offset 0x83
- LAN (as printed on the device) is WAN MAC + 1
- WLAN MAC (2.4 GHz) is WAN MAC + 2
- WLAN MAC (5GHz) is WAN MAC + 3
Disassembly: Remove 4 screws in the bottom and 2 screws in the top (after removing the blue cover on the top), then the board can be pulled out.
The pins for the serial console are already labeled on the board (VCC, TX, RX, GND). Serial settings: 3.3V, 115200,8n1
Flashing via Recovery Web Interface:
- Set your IP address to 192.168.0.10, subnetmask 255.255.255.25
- Press the reset button while powering on the deivce
- Keep the reset button pressed until the status LED blinks fast
- Open a Chromium based and goto http://192.168.0.1
- Download openwrt-mediatek-mt7622-dlink_eagle-pro-ai-m32-a1-squashfs-recovery.bin
Flashing via uBoot:
- Open the case, connect to the UART console
- Set your IP address to 10.10.10.3, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router
- Run a tftp server which provides openwrt-mediatek-mt7622-dlink_eagle-pro-ai-m32-initramfs-kernel.bin. You can rename the file to iverson_uImage (no extension), then you don't have to enter the whole file name in uboot later.
- Power on the device and select "1. System Load Linux to SDRAM via TFTP." in the boot menu
- Enter image file, tftp server IP and device IP (if they differ from the default).
- TFTP download to RAM will start. After a few seconds OpenWrt initramfs should start
- The initramfs is accessible via 192.168.1.1, change your IP address accordingly (or use multiple IP addresses on your interface)
- Create a backup of the Kernel1 partition, this file is required if a revert to stock should be done later
- Perform a sysupgrade using openwrt-mediatek-mt7622-dlink_eagle-pro-ai-m32-squashfs-sysupgrade.bin
- Reboot the device. OpenWrt should start from flash now
Revert back to stock using the Recovery Web Interface:
- Set your IP address to 192.168.0.10, subnetmask 255.255.255.25
- Press the reset button while powering on the deivce
- Keep the reset button pressed until the status LED blinks fast
- Open a Chromium based and goto http://192.168.0.1
- Flash a decrypted firmware image from D-Link. Decrypting an firmware image is described below.
Decrypting a D-Link firmware image:
- Download https://github.com/RolandoMagico/firmware-utils/blob/M32/src/m32-firmware-util.c
- Compile a binary from the downloaded file, e.g. gcc m32-firmware-util.c -lcrypto -o m32-firmware-util
- Run ./m32-firmware-util M32 --DecryptFactoryImage <OriginalFirmware> <OutputFile>
- Example for firmware 1.03.01_HOTFIX: ./m32-firmware-util M32 --DecryptFactoryImage M32-REVA_1.03.01_HOTFIX.enc.bin M32-REVA_1.03.01_HOTFIX.decrypted.bin
Revert back to stock using uBoot:
- Open the case, connect to the UART console
- Set your IP address to 10.10.10.3, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router
- Run a tftp server which provides the previously created backup of the Kernel1 partition. You can rename the file to iverson_uImage (no extension), then you don't have to enter the whole file name in uboot later.
- Power on the device and select "2. System Load Linux Kernel then write to Flash via TFTP." in the boot menu
- Enter image file, tftp server IP and device IP (if they differ from the default).
- TFTP download to FLASH will start. After a few seconds the stock firmware should start again
There is also an image openwrt-mediatek-mt7622-dlink_eagle-pro-ai-m32-a1-squashfs-tftp.bin which can directly be flashed via U-Boot and TFTP. It can be used if no backup of the Kernel1 partition is reuqired.
Flahsing via OEM web interface is currently not possible, the OEM images are encrypted and require a specific memory layout which is not compatible to the partition layout of OpenWrt.
Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Philip Prindeville [Wed, 13 Sep 2023 15:10:32 +0000 (09:10 -0600)]
base-files: Create /root w/ appropriate permissions
If /root is created with too permissive permissions, then sshd won't
trust the contents of /root/.ssh as being adequately protected.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Lech Perczak [Tue, 7 Nov 2023 00:29:57 +0000 (01:29 +0100)]
mac80211: ath9k-htc: support "chanbw" in debugfs
ath9k-htc USB-based adapters also support 5/10MHz channel bandwidth.
Move the code handling the features in debugfs to common-debug.c,
and create proper registration functions to use in debug.c and
htc_drv_debug.c, leaving only debugfs registration there.
While at that, refresh one patch that would conflict otherwise.
Tested on TP-Link Archer C7v2 (ath79) and TP-Link WN722Nv1 (AR9287)
and WN822Nv2 (AR7010+AR9287).
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Lech Perczak [Tue, 7 Nov 2023 00:02:11 +0000 (01:02 +0100)]
mac80211: ath9k-htc: support "eeprom" in debugfs
ath9k-htc USB-based adapterssupport 5/10MHz channel bandwidth, the
same as standard ath9k ones.
Move the code handling the features in debugfs to common-debug.c,
and create proper registration functions to use in debug.c and
htc_drv_debug.c, leaving only debugfs registration there.
While at that, refresh one patch that would conflict otherwise.
Tested on TP-Link Archer C7v2 (ath79) and TP-Link WN722Nv1 (AR9287)
and WN822Nv2 (AR7010+AR9287).
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Christian Marangi [Sun, 12 Nov 2023 15:15:07 +0000 (16:15 +0100)]
scripts/getver.sh: prevent asking for negative rev-parse
With the case of asking an invalid version that is too big, getver.sh
might return an invalid output in the form of HEAD~-
2260475641.
This is caused by BASE_REV - GET_REV using a negative number.
Prevent this by checking if BASE_REV - GET_REV actually return 0 or a
positive number and set REV variable accordingly. With the following
change, invalid revision number will result in unknown printed instead
of the invalid HEAD~-NUMBERS output.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Lech Perczak [Sun, 27 Oct 2019 13:31:30 +0000 (14:31 +0100)]
kernel: kmod-usb-serial-mos7720: support parallel port in MCS7715
In-kernel driver for MCS7715 USB-serial bridge has a bool option,
enabling support for parallel port on that chip - which is tied to the
same kernel module. Enable it and select kmod-ppdev, as the image size
increase is minimal and the package isn't bundled in the images by
default.
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Szabolcs Hubai [Wed, 8 Nov 2023 12:50:55 +0000 (13:50 +0100)]
ramips: mt7621: use lzma-loader for Sercomm NA502
This fixes a well known "LZMA ERROR 1" error on Sercomm NA502,
reported on the OpenWrt forum. [1]
[1]: https://forum.openwrt.org/t/176942
Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
Alan Luck [Tue, 7 Nov 2023 22:10:35 +0000 (09:10 +1100)]
ramips: add encrypted SGE factory image for D-Link devices
creates SGE encrypted factory images
to use via the D-Link web interface
rename the old factory unencrypted images to recovery
for use in the recovery console when recovery is needed
DIR-1935-A1 , DIR-853-A1 , DIR-853-A3 , DIR-867-A1 ,
DIR-878-A1 and DIR-882-A1
Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
Robert Marko [Fri, 10 Nov 2023 12:42:34 +0000 (13:42 +0100)]
mvebu: fix PXA I2C bus with recovery
Since kernel 5.11, the PXA I2C driver has been converted to generic I2C
recovery, which makes the I2C bus completely lock up if recovery pinctrl
is present in the DT and I2C recovery is enabled.
This effectively completely broke I2C on Methode uDPU and eDPU boards
as both of them rely on I2C recovery.
After a discussion upstream, it was concluded that there is no simple fix
and that the blamed upstream commit:
0b01392c18b9993a584f36ace1d61118772ad0ca ("i2c: pxa: move to generic GPIO
recovery") should be reverted.
I have sent the revert upstream, it should be merged soon so lets "fix"
OpenWrt as well.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Christian Marangi [Sun, 12 Nov 2023 13:10:23 +0000 (14:10 +0100)]
iptables: backport patch fixing bug with string module
Backport patch fixing critical bug with string module merged upstream.
Fixes: #13812
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Rosen Penev [Thu, 9 Nov 2023 18:53:02 +0000 (10:53 -0800)]
prereq-build: add Python 3.12 support
Fixes build on Fedora 39.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Hannu Nyman [Sat, 11 Nov 2023 17:03:57 +0000 (19:03 +0200)]
ath10k-ct: Restore functionality after switch to 6.4 version
Adjust our local ath10k-ct patches to the change
from the -ct 6.2 version to 6.4.
This restores e.g. the LED functionality.
Fixes: 7d3651f1b9b ("ath10k-ct: switch to 6.4")
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Christian Marangi [Sat, 11 Nov 2023 17:34:27 +0000 (18:34 +0100)]
qca-ssdk: fix unsupported scenario with PORT1 not declared in switch bmp
Commit
947b44d9ae17 ("ipq807x: fix wrong define for LAN and WAN ess mask")
started fixing wrong switch_lan_bmp that defined lan there weren't
actually present. This displayed a fragility in the malibu phy init code
in qca-ssdk.
Add patch to fix this.
Quoting the patch detailed description:
I'm very confused by this and to me it's not clear the real usage of
this logic.
From what I can see the usage of this is EXTREMELY FRAGILE and results
in dangerous results if the OEM (or anyone that by chance try to
implement things in a logical manner) deviates from the default values
from the "magical template".
To be in more details. With QSDK 12.4, some tweaks were done to improve
autoneg and now on every call of port status, the phydev is tried to
add. This resulted in the call and log spam of an error with ports that
are actually not present on the system with qsdk reporting phydev is
NULL. This itself is not an error and printing the error is correct.
What is actually an error from ages is setting generic bitmap reporting
presence of port that are actually not present. This is very common on
OEM where the switch_lan_bmp is always a variant of 0x1e (that on bitmap
results in PORT1 PORT2 PORT3 PORT4 present) or 0x3e (PORT1 PORT2 PORT3
PORT4 PORT5). Reality is that many device are used as AP with one LAN
port or one WAN port. (or even exotic configuration with PORT1 not
present and PORT2 PORT3 PORT4 present (Xiaomi 3600)
With this finding one can say... ok nice, then lets update the DT and
set the correct bitmap...
Again world is a bad place and reality is that this cause wonderful
regression in some case of by extreme luck the first ever connected
port working and the rest of the switch dead.
The problem has been bisected to all the device that doesn't have the
PORT1 declared in any of the bitmap.
With this perfection in mind, on to the REAL problem.
malibu_phy_hw_init FOR SOME REASON, set a global variable first_phy_addr
to the first detected PHY addr that coincidentally is always PORT1.
PORT1 addr is 0x0. The entire code in malibu_phy use this variable to
derive the phy addrs in some function.
Declaring a bitmap where the PORT1 is missing (or worse PORT4 the only
one connected) result in first_phy_addr set to 1 or whatever phy addr is
detected first setting wrong value all over the init stage.
To fix this, just drop this variable and hardcode everything to assume
the first phy adrr is ALWAYS 0 and remove calculation and use define for
special case.
With the following change normal switch traffic is restored and ports
function is recovered.
Fixes: #13945
Fixes: 947b44d9ae17 ("ipq807x: fix wrong define for LAN and WAN ess mask")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Sat, 11 Nov 2023 22:38:30 +0000 (23:38 +0100)]
netifd: update to Git HEAD (2023-11-11)
c739dee0a37b system-linux: refresh MAC address on DSA port conduit change
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Petr Štetiar [Fri, 10 Nov 2023 21:42:34 +0000 (21:42 +0000)]
debugcc: add licensing information
Information about package license is important, so lets add it.
Fixes: 79ee0d2ceead ("debugcc: add new package to debug IPQ based SoC clocks")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Christian Marangi [Fri, 10 Nov 2023 20:14:29 +0000 (21:14 +0100)]
debugcc: add new package to debug IPQ based SoC clocks
Add new package to debug IPQ clocks using debug regs and hardware
oscillator.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Robert Marko [Wed, 8 Nov 2023 22:09:44 +0000 (23:09 +0100)]
dtc: add option for a static build
I find myself manually compiling dtc as a staticly linked binary rather
often while porting a new device to OpenWrt as dtc is rarely included in
various vendor modifications of OpenWrt.
So, since dtc offers a convenient meson option to build it as staticaly
linked binary, lets make it a compile time option.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Christian Marangi [Fri, 10 Nov 2023 17:38:34 +0000 (18:38 +0100)]
ipq807x: fix wrong define for LAN and WAN ess mask
switch_lan_bmp and switch_wan_bmp have wrong values and now cause
problems with the new version of the qca-ssdk.
Fix the wrong entry and drop the redundant switch_cpu_bmp.
Also introduce some convenient define to better understand values in
this map.
Fixes: eea264feadcf ("kernel: qca-ssdk: update to 12.4")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tested-by: Robert Marko <robimarko@gmail.com> # Dynalink AX3600 and Qnap 301W
Reviewed by: Robert Marko <robimarko@gmail.com>
Nick Hainke [Fri, 10 Nov 2023 08:01:56 +0000 (09:01 +0100)]
wolfssl: update to 5.6.4
Releae Notes:
https://github.com/wolfSSL/wolfssl/releases/tag/v5.6.4-stable
Remove upstreamed patch:
- 001-fix-detection-of-cut-tool-in-configure.ac.patch
Signed-off-by: Nick Hainke <vincent@systemli.org>
John Audia [Wed, 8 Nov 2023 19:38:58 +0000 (14:38 -0500)]
kernel: bump 6.1 to 6.1.62
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.62
All patches automatically rebased.
Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne
Signed-off-by: John Audia <therealgraysky@proton.me>
John Audia [Wed, 8 Nov 2023 20:50:55 +0000 (15:50 -0500)]
kernel: bump 5.15 to 5.15.138
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.138
Removed upstreamed:
generic/backport-5.15/819-v6.6-0018-nvmem-imx-correct-nregs-for-i.MX6SLL.patch[1]
generic/backport-5.15/819-v6.6-0019-nvmem-imx-correct-nregs-for-i.MX6UL.patch[2]
generic/backport-5.15/819-v6.6-0020-nvmem-imx-correct-nregs-for-i.MX6ULL.patch[3]
All other patches automatically rebased.
1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.138&id=
6e22bf6f00d593b0a7e0b2f418fde89317424671
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.138&id=
6efd498009b987a92f57f3bdae476f0503364fb7
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.138&id=
6e22bf6f00d593b0a7e0b2f418fde89317424671
Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3
Signed-off-by: John Audia <therealgraysky@proton.me>
Felix Fietkau [Fri, 10 Nov 2023 14:37:32 +0000 (15:37 +0100)]
netifd: update to the latest version
eee02ccca8c8 device: add support to configure eee
bb28f6a291d9 wireless: fix sign comparison warning
35facc8306f5 wireless: fix premature removal of hotplug devices due to down state
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Christian Marangi [Fri, 10 Nov 2023 12:20:31 +0000 (13:20 +0100)]
ipq-wifi: update to Git HEAD (2023-11-10)
0c2e810e71ed qcn9074: fix prpl Foundation Haze BDF for old mac80211 version
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Thu, 9 Nov 2023 14:29:39 +0000 (15:29 +0100)]
ipq806x: setup DSA port conduit in board.d
Now that netifd and uci-defaults.sh supports a way to setup DSA port
conduit without using iproute2 tool, set DSA port conduit directly in
board.d, that will fill board.d and will instruct netifd to setup the
port.
Drop special init.d qca8k_set_port script and ip-tiny from target dep as
they are not required anymore.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Thu, 9 Nov 2023 14:18:39 +0000 (15:18 +0100)]
base-files: add additional uci-defaults function for GRO and conduit
Add additional uci-defaults function for configuring GRO settings and
conduit for network devices.
Tweaking the GRO values might increase performance on some low spec
device that lack some offload feature on gmac.
Tweaking conduit interface is specific to DSA based devices and is
useful for multi-CPU scenario where one CPU is dedicated to one single
port.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Thu, 9 Nov 2023 14:11:50 +0000 (15:11 +0100)]
base-files: generalize ucidef_set_network_device
Generalize ucidef_set_network_device functions to use a more generic
_ucidef_set_network_device_common that takes as args the option and the
value to apply instead of hardcoding.
This is to reduce duplicated code in preparation for addition of
additional option for board.d usage.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Thu, 9 Nov 2023 14:10:03 +0000 (15:10 +0100)]
netifd: update to Git HEAD (2023-11-09)
841b05fbb91e system-linux: fix compilation error if IFLA_DSA_MASTER is not supported
5c9ecc1ff74f system-linux: make system_if_get_master_ifindex static
2dc7f450f3a2 system-linux: add option to configure DSA conduit device
838f815db5ef system-linux: add support for configurable GRO option
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Hannu Nyman [Tue, 7 Nov 2023 18:55:58 +0000 (20:55 +0200)]
gdb: Update to 13.2
Update the devel/gdb package to version 13.2
* Remove the upstreamed patch 001-Add-support-for-readline-8.2.patch
* Adjust 130-gdb-ctrl-c.patch to upstream changes
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Hannu Nyman [Tue, 7 Nov 2023 18:54:51 +0000 (20:54 +0200)]
toolchain/gdb: update to 13.2
Update the toolchain gdb to version 13.2.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Rafał Miłecki [Tue, 7 Nov 2023 22:25:52 +0000 (23:25 +0100)]
kernel: provide better control & help for SLUB configuration
Allow selecting KERNEL_SLUB_DEBUG and KERNEL_SLUB_DEBUG_ON manually and
provide detailed help for both.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Tue, 7 Nov 2023 12:54:14 +0000 (13:54 +0100)]
treewide: disable CONFIG_SLUB_DEBUG in target configs
From the symbol help message:
> SLUB has extensive debug support features. Disabling these can result
> in significant savings in code size.
There seems to be no need to enable those debugging features for
standard use.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Isaev Ruslan [Thu, 2 Nov 2023 03:08:53 +0000 (06:08 +0300)]
ipq807x: add support for Yuncore AX880
SPECIFICATION:
- Chipset: IPQ8072A +QCN5054+QCN5024+QCA8081*2
- Flash NOR-8MB AND NAND-128MB
- RAM 1Gb DDR
- IEEE 802.11: 802.11ax/ac/b/g/n
- 4*4 2.4G Wi-Fi standard 802.11b/g/n/ax
- 4*4 5.8G Wi-Fi Standard 802.11 a/n/ac/ax
- 2x 1 Gbps Ethernet (QCA8081) with 802.3at PoE input support
- 1x Reset
- 1x Bluetooth(optional)
- 1x DC Port 12V 3A
- 4x Antenna IPEX Connector, 3dBi omni antennas
- Data Rate: 3657Mbps ( 2.4G: 1182Mbps (11ax 4x4); 5.8G: 2475Mbps (11ax 4x4))
- RF Power: 2.4g ≤ 20dBm; 5.8g ≤ 19dBm
- LED light: Sys; 5.8G wifi; 2.4G wifi; WAN; LAN
- Max Power Consumption: ≤ 22W
- Size: 198mm * 198mm * 41.02mm
BACKUP YOUR STOCK FIRMWARE:
```
export device=ax880
mkdir -p /tmp/fw_dump_$device
cd /tmp/fw_dump_$device
dmesg > dmesg_$device.log
dtc -I fs /sys/firmware/devicetree/base > $device.dts
cat /proc/device-tree/model > model
cat /proc/mtd > proc_mtd
while read p; do
mtd_dev=$(echo $p | cut -d: -f1)
echo $mtd_dev
dd if=/dev/$mtd_dev of=$mtd_dev
done < proc_mtd
md5sum * > md5sum.log
tar -cvzf ../$device.tar.gz .
export sum=$(md5sum /tmp/$device.tar.gz | cut -d' ' -f1)
mv ../$device.tar.gz /tmp/${device}_${sum}.tar.gz
echo fw backup saved to: /tmp/${device}_${sum}.tar.gz
```
Upload your backup via tftp to the safe place.
INSTALLATION:
1. stock firmware web ui
Rename factory.bin fw image file to factory.ubin. Flash this image
like ordinary stock fw upgrade.
2. stock firmware telnet method
Enter telnet cli (login: root, password: 476t*_f0%g09y) and upload
factory.bin fw image and rename it to factory.ubin
`cd /tmp && wget <your_web_server_ip>/factory.ubin`
`sysupgrade factory.ubin
3. initramfs method
Put openwrt-ipq807x-generic-yuncore_ax880-initramfs-uImage.itb to your
TFTP server and rename it to ax880.initram
Enable serial console and enter to the u-boot cli.
Exec these commands:
`tftpboot <your_tftp_server_ip>:ax880.initram`
`dhcp`
When downloading is finished:
`bootm`
After booting the device, you need to upload to the device factory.ubi fw image.
```
cd /tmp && wget <your_web_server_ip>/factory.ubi`
export rootfs=$(cat /proc/mtd | grep rootfs | cut -d: -f1)
export rootfs_1=$(cat /proc/mtd | grep rootfs_1 | cut -d: -f1)
ubiformat /dev/${rootfs} -y -f factory.ubi
ubiformat /dev/${rootfs_1} -y -f factory.ubi
reboot
```
4. u-boot factory.ubi image method
Put openwrt-ipq807x-generic-yuncore_ax880-squashfs-factory.ubi to your
TFTP server and rename it to ax880.ubi
Enter u-boot cli and exec these commands:
`tftpboot <your_tftp_server_ip>:ax880.ubi`
`dhcp`
After downloading is finished:
`flash rootfs`
`flash rootfs_1`
`reset`
5. u-boot factory.bin method
Put openwrt-ipq807x-generic-yuncore_ax880-squashfs-factory.bin to your
TFTP server and rename it to ax880.bin
Enter u-boot cli and exec these commands:
`tftpboot <your_tftp_server_ip>:ax880.bin`
`dhcp`
After downloading is finished:
`imgaddr=$fileaddr && nand device 0`
Erase rootfs memory:
`nand erase 0x00000000 0x03400000`
Write rootfs:
`nand write $fileaddr 0x00000000 $filesize`
Erase rootfs_1 memory:
`nand erase 0x3c00000 0x3400000`
Write rootfs_1
`nand write $fileaddr 0x3c00000 $filesize`
`reset`
STOCK FIRMWARE RECOVERY:
Boot initramfs image.
Upload your rootfs mtd partition to the device using scp or download
it from the device using wget.
Enter device ssh cli and exec:
```
cd /tmp && wget <your_web_server_ip>/mtd21`
export rootfs=$(cat /proc/mtd | grep rootfs | cut -d: -f1)
export rootfs_1=$(cat /proc/mtd | grep rootfs_1 | cut -d: -f1)
ubiformat /dev/${rootfs} -y -f /tmp/mtd21
ubiformat /dev/${rootfs_1} -y -f /tmp/mtd21
reboot
```
Signed-off-by: Isaev Ruslan <legale.legale@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
Christian Marangi [Thu, 9 Nov 2023 15:07:55 +0000 (16:07 +0100)]
hostapd: refresh patches
Refresh patches for hostapd using make package/hostapd/refresh.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Wed, 8 Nov 2023 15:48:57 +0000 (16:48 +0100)]
hostapd: permit 40MHz in 802.1s only also for 2.4GHz g/n with noscan
Currently for 802.1s only, for wifi 2.4GHz in g/n mode, 40MHz is never
permitted.
This is probably due to the complexity of setting periodic check for the
intolerant bit. When noscan option is set, we ignore the presence of the
intoleran bit in near AP, so we can enable 40MHz and ignore any complex
logic for checking.
Fixes: #13112
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Wed, 8 Nov 2023 15:48:05 +0000 (16:48 +0100)]
hostapd: permit also channel 7 for 2.5GHz to be set to HT40PLUS
Also channel 7 for 2.4GHz can be set to HT40PLUS. Permit this and add it
to the list of the channels.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Wed, 8 Nov 2023 15:46:12 +0000 (16:46 +0100)]
hostapd: fix broke noscan option for mesh
noscan option for mesh was broken and actually never applied.
This is caused by a typo where ssid->noscan value is check instead of
conf->noscan resulting in the logic swapped and broken.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi [Wed, 8 Nov 2023 15:44:38 +0000 (16:44 +0100)]
mac80211: fix not set noscan option for wpa_supplicant
noscan option was changed to hostapd_noscan but the entry in
wpa_supplicant was never updated resulting in the noscan option actually
never set.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Robert Marko [Tue, 7 Nov 2023 13:47:15 +0000 (14:47 +0100)]
kernel: qca-ssdk: update to 12.4
Update SSDK version to 12.4, this fixes weird SFP port link up/downs
while there is no SFP module plugged in.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Tue, 7 Nov 2023 13:48:41 +0000 (14:48 +0100)]
qualcommax: backport missing SMEM ID-s for SSDK
SSDK has switched to using the upstream SMEM helper to get the SoC ID and
then look it up in the QCA SMEM ID header, so we need these in order for
SSDK to compile as they are currently undefined.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Nick Hainke [Sat, 4 Nov 2023 08:57:48 +0000 (09:57 +0100)]
tools/mkimage: update to 2023.10
Update to latest version.
Remove "100-increase-tmpfile-name-length-limit.patch" because project
is now using limits.h with PATH_MAX [0].
Automatically refreshed:
- 030-allow-to-use-different-magic.patch
[0] - https://github.com/u-boot/u-boot/commit/
99d430f344bfdb0641022fd3efa26c29c957df02
Signed-off-by: Nick Hainke <vincent@systemli.org>
Jo-Philipp Wich [Thu, 9 Nov 2023 11:40:22 +0000 (12:40 +0100)]
ucode: update to Git HEAD (2023-11-07)
0352a33 uloop: support new interval and signal APIs
1468cc4 syntax: don't treat `as` and `from` as reserved keywords
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Daniel Golle [Thu, 9 Nov 2023 11:14:59 +0000 (11:14 +0000)]
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>
Daniel Golle [Fri, 27 Oct 2023 23:27:12 +0000 (00:27 +0100)]
arm-trusted-firmware-mediatek: update to release 2023-10-13
Drop local patches now upstream.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Robert Marko [Wed, 8 Nov 2023 12:24:37 +0000 (13:24 +0100)]
gemini: usb-fotg210: remove uneeded dependency on @USB_SUPPORT
$(call AddDepends/usb) will add the dependency on @USB_SUPPORT so there
is no need to duplicate it.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Wed, 8 Nov 2023 12:23:09 +0000 (13:23 +0100)]
gemini: usb-fotg210: add missing module name to AutoLoad
AutoLoad expects the module name to be present after the load index.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Wed, 8 Nov 2023 12:08:55 +0000 (13:08 +0100)]
gemini: dont select USB driver as module via config
The FOTG210 USB driver is currently being selected as a module directly via
the target kernel config which should not be done and via kmod as well.
So, lets drop the driver selection in the target kernel module as kmod is
sufficient.
Fixes: 585360f0c0ec ("gemini: refresh kernel config")
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Wed, 8 Nov 2023 12:31:12 +0000 (13:31 +0100)]
gemini: usb-fotg210: enable OTG support
The usb-fotg210 does not currently select CONFIG_USB_FOTG210_UDC which
enable OTG support, but it was previously selected directly in the target
kernel config so lets enable it to keep the functionality identical.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Wed, 8 Nov 2023 12:19:37 +0000 (13:19 +0100)]
gemini: usb-fotg210: fix FOTG210_HCD setting
CONFIG_USB_FOTG210_HCD is a boolean symbol, so it must be set to "y"
instead of the default which is to set it as "m".
Otherwise you will get prompted to set the symbol during kernel building.
Fixes: 585360f0c0ec ("gemini: refresh kernel config")
Signed-off-by: Robert Marko <robimarko@gmail.com>
Filip Milivojevic [Fri, 3 Nov 2023 09:10:14 +0000 (10:10 +0100)]
ramips: Cudy WR1300v2 fix mt7613 calibration data length
Since MT7613 is handled by MT7615 driver, and other devices using MT7615
have reg = <0x8000 0x4da8>; this needs updating or eeprom data fails to load.
Signed-off-by: Filip Milivojevic <zekica@gmail.com>
Felix Fietkau [Wed, 8 Nov 2023 10:20:41 +0000 (11:20 +0100)]
hostapd: use rtnl to set up interfaces
In wpa_supplicant, set up wlan interfaces before adding them
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Wed, 8 Nov 2023 09:45:55 +0000 (10:45 +0100)]
wifi: fix applying mesh parameters when wpa_supplicant is in use
Apply them directly using nl80211 after setting up the interface.
Use the same method in wdev.uc as well
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Robert Marko [Tue, 7 Nov 2023 14:14:15 +0000 (15:14 +0100)]
qualcommax: refresh patches
It seems that patches were not refreshed during last kernel bump, so lets
refresh them.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Tue, 7 Nov 2023 13:38:21 +0000 (14:38 +0100)]
qualcommax: fixup patch numbering
It seems that I forgot one zero in the patch numbering while marking these
as backports, so lets fix it.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Hauke Mehrtens [Mon, 6 Nov 2023 23:33:38 +0000 (00:33 +0100)]
px5g-wolfssl: Fix permission of private key
Store the private key with read and write permission for the user only
and not with read permissions for everyone. This converts the
write_file() function from fopen() to open() because open allows to
specify the permission mask of the newly created file. It also adds and
fixes some existing error handling.
OpenSSL does this in the same way already.
With this change it looks like this:
root@OpenWrt:/# ls -al /etc/uhttpd.*
-rw-r--r-- 1 root root 749 Nov 6 23:14 /etc/uhttpd.crt
-rw------- 1 root root 121 Nov 6 23:14 /etc/uhttpd.key
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Sun, 5 Nov 2023 22:05:24 +0000 (23:05 +0100)]
px5g-mbedtls: Fix permission of private key
Store the private key with read and write permission for the user only
and not with read permissions for everyone. This converts the
write_file() function from fopen() to open() because open allows to
specify the permission mask of the newly created file. It also adds and
fixes some existing error handling.
OpenSSL does this in the same way already.
With this change it looks like this:
root@OpenWrt:/# ls -al /etc/uhttpd.crt /etc/uhttpd.key
-rw-r--r-- 1 root root 519 Nov 6 22:58 /etc/uhttpd.crt
-rw------- 1 root root 121 Nov 6 22:58 /etc/uhttpd.key
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Rafał Miłecki [Tue, 7 Nov 2023 12:38:23 +0000 (13:38 +0100)]
rockchip: refresh kernel config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Tue, 7 Nov 2023 12:38:23 +0000 (13:38 +0100)]
gemini: refresh kernel config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Tue, 7 Nov 2023 12:38:23 +0000 (13:38 +0100)]
sifiveu: refresh kernel config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Tue, 7 Nov 2023 12:38:23 +0000 (13:38 +0100)]
qoriq: refresh kernel config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Felix Fietkau [Tue, 7 Nov 2023 12:36:39 +0000 (13:36 +0100)]
netifd: update to the latest version
383753dd65ae device/bridge: support passing extra vlans in the device_set_state call
b6e75eafc1af device: send notifications for device events via ubus
cab415c7aefd bridge: add auth-required bridge members with auth_status=0 if vlan is enabled
827a02f0343c bridge: add support for configuring vlans for auth=1,auth_status=false
40ed7363caf2 device: fix build error on 32 bit systems
516ab774cc16 system-linux: fix race condition on bringing up wireless devices
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Hauke Mehrtens [Mon, 6 Nov 2023 00:30:31 +0000 (01:30 +0100)]
bpf-headers: Fix download URL with kernel 6.1
This fixes the download of the kernel 5.15 for the bpf-headers when
kernel 6.1 is build for the target.
Even if kernel 6.1 was selected for the target we still use kernel 5.15
for the bpf-headers. The download script tried to download the 5.15
kernel from the 6.x directory on kernel,org and this failed. Define
PKG_SOURCE_URL based on PKG_PATCHVER and not KERNEL_BASE like done in
kernel.mk.
Without this change it tries to download the kernel from this URL:
ttps://cdn.kernel.org/pub/linux/kernel/v6.x/linux-5.15.129.tar.xz
Fixes: #13190
Fixes: #13671
Fixes: #13814
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Sun, 5 Nov 2023 22:05:24 +0000 (23:05 +0100)]
mbedtls: Activate secp521r1 curve by default
Activate the secp521r1 ecliptic curve by default. This curve is allowed
by the CA/Browser forum, see
https://cabforum.org/wp-content/uploads/CA-Browser-Forum-BR-v2.0.1-redlined.pdf#page=110
This increases the size of libmbedtls12_2.28.5-1_aarch64_generic.ipk by
about 400 bytes:
Without:
252,696 libmbedtls12_2.28.5-1_aarch64_generic.ipk
With:
253,088 libmbedtls12_2.28.5-2_aarch64_generic.ipk
Fixes: #13774
Acked-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Rafał Miłecki [Mon, 6 Nov 2023 12:25:34 +0000 (13:25 +0100)]
bcm53xx: refresh kernel config for 6.1
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Petr Štetiar [Mon, 6 Nov 2023 08:52:24 +0000 (08:52 +0000)]
image: fix image generation within ImageBuilder
Changes introduced in commit
d604a07225c5 ("build: add CycloneDX SBOM
JSON support") broke ImageBuilder:
Cannot open '/openwrt-imagebuilder-ath79-generic.Linux-x86_64/tmp/.packageinfo': No such file or directory
So lets fix it by wrapping the BOM generation behind condition of IB
feature check.
Fixes: #13881
Fixes: d604a07225c5 ("build: add CycloneDX SBOM JSON support")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
David Bauer [Fri, 3 Nov 2023 21:05:04 +0000 (22:05 +0100)]
mediatek: add label-mac for GL.iNet GL-MT3000
The MAC-address of gmac0 matches the one printed on the bottom label.
Signed-off-by: David Bauer <mail@david-bauer.net>
Łukasz M [Tue, 31 Oct 2023 15:15:06 +0000 (16:15 +0100)]
mediatek: mt7981: improve fan behaviour
This doubles the number of cooling-levels.
In addition the fan is turned on with a low speed at lower temperatures
and with a higher speed at higher temperatures.
This also attempts to reduce the likelihood of constant start-stop actions.
The change only affects the GL.iNet MT3000 and has been tested with it.
Signed-off-by: Łukasz M <lukasz1992m@gmail.com>
Lech Perczak [Sat, 22 Jul 2023 16:44:20 +0000 (18:44 +0200)]
ath79: support Fortinet FAP-220-B
Fortinet FAP-220-B is a dual-radio, dual-band 802.11n enterprise managed
access point with PoE input and single gigabit Ethernet interface.
Hardware highlights:
Power: 802.3af PoE input on Ethernet port, +12V input on 5.5/2.1mm DC jack.
SoC: Atheros AR7161 (MIPS 24kc at 680MHz)
RAM: 64MB DDR400
Flash: 16MB SPI-NOR
Wi-Fi 1: Atheros AR9220 2T2R 802.11abgn (dual-band)
Wi-Fi 2: Atheros AR9223 2T2R 802.11bgn (single-band)
Ethernet: Atheros AR8021 single gigabit Phy (RGMII)
Console: External RS232 port using Cisco 8P8C connector (9600-8-N-1)
USB: Single USB 2.0 host port
LEDs: Power (single colour, green), Wi-Fi 1, Wi-Fi 2, Ethernet, Mode, Status
(dual-colour, green and yellow)
Buttons: reset button hidden in bottom grill,
in the top row, 2nd column from the right.
Label MAC address: eth0
FCC ID: TVE-220102
Serial port pinout:
3 - TxD
4 - GND
6 - RxD
Installation: The same methods apply as for already supported FAP-221-B.
For both methods, a backup of flash partitions is recommended, as stock firmware
is not freely available on the internet.
(a) Using factory image:
1. Connect console cable to the console port
2. Connect Ethernet interface to your PC
3. Start preferred terminal at 9600-8-N-1
4. Have a TFTP server running on the PC.
5. Put the "factory" image in TFTP root
6. Power on the device
7. Break boot sequence by pressing "Ctrl+C"
8. Press "G". The console will ask you for device IP, server IP, and filename.
Enter them appropriately.
The defaults are:
Server IP: 192.168.1.1 # Update accordingly
Device IP: 192.168.1.2 # Update accordingly
Image file: image.out # Use for example: openwrt-ath79-generic-fortinet_fap-220-b-squashfs-factory.bin
9. The device will load the firmware over TFTP, and verify it. When
verification passes, press "D" to continue installation. The device
will reboot on completion.
(b) Using initramfs + sysupgrade
1. Connect console cable to the console port
2. Connect Ethernet interface to your PC
3. Start preferred terminal at 9600-8-N-1
4. Have a TFTP server running on the PC.
5. Put the "initramfs" image in TFTP root
6. Power on the device.
7. Break boot sequence by pressing "Ctrl+C"
8. Enter hidden U-boot shell by pressing "K". The password is literal "1".
9. Load the initramfs over TFTP:
> setenv serverip 192.168.1.1 # Your PC IP
> setenv ipaddr 192.168.1.22 # Device IP, both have to share a subnet.
> tftpboot
81000000 openwrt-ath79-generic-fortinet_fap-220-b-initramfs-kernel.bin
> bootm
81000000
10. (Optional) Copy over contents of at least "fwconcat0", "loader", and "fwconcat1"
partitions, to allow restoring factory firmware in future:
# cat /dev/mtd1 > /tmp/mtd1_fwconcat0.bin
# cat /dev/mtd2 > /tmp/mtd2_loader.bin
# cat /dev/mtd3 > /tmp/mtd3_fwconcat1.bin
and then SCP them over to safety at your PC.
11. When the device boots, copy over the sysupgrade image, and execute
normal upgrade:
# sysupgrade openwrt-ath79-generic-fortinet_fap-220-b-squashfs-sysupgrade.bin
Return to stock firmware:
1. Boot initramfs image as per initial installation up to point 9
2. Copy over the previously backed up contents over network
3. Write the backed up contents back:
# mtd write /tmp/mtd1_fwconcat0.bin fwconcat0
# mtd write /tmp/mtd2_loader.bin loader
# mtd write /tmp/mtd3_fwconcat1.bin fwconcat1
4. Erase the reserved partition:
# mtd erase reserved
5. Reboot the device
Quirks and known issues:
- The power LED blinking pattern is disrupted during boot, probably due
to very slow serial console, which prints a lot during boot compared
to stock FW.
- "mac-address-ascii" device tree binding cannot yet be used for address
stored in U-boot partition, because it expects the colons as delimiters,
which this address lacks. Addresses found in ART partition are used
instead.
- Due to using kmod-owl-loader, the device will lack wireless interfaces
while in initramfs, unless you compile it in.
- The device heats up A LOT on the bottom, even when idle. It even
contains a warning sticker there.
- Stock firmware uses a fully read-write filesystem for its rootfs.
- Stock firmware loads a lot of USB-serial converter drivers for use
with built-in host, probably meant for hosting modem devices.
- U-boot build of the device is stripped of all branding, despite that
evidence of it (obviously) being U-boot can be found in the binary.
- The user can break into hidden U-boot shell using key "K" after
breaking boot sequence. The password is "1" (without quotes).
- Telnet is available by default, with login "admin", without password.
The same is true for serial console, both drop straight to the Busybox
shell.
- The web interface drops to the login page again, after successfull
login.
- Whole image authentication boils down to comparing a device ID against
one stored in U-boot.
- And this device is apparently made by a security company.
Big thanks for Michael Pratt for providing support for FAP-221-B, which
shares the entirety of image configuration with this device, this saved
me a ton of work.
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Lech Perczak [Wed, 26 Jul 2023 01:01:02 +0000 (03:01 +0200)]
ath79: image: extract common part for Fortinet FAP series
In preparation for FAP-220-B support, extract the common part of image
recipe for FAP-221-B.
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Lech Perczak [Wed, 26 Jul 2023 00:55:05 +0000 (02:55 +0200)]
ath79: dts: fortinet_loader: extract common part
In preparation for FAP-220-B support, rename ar934x_fortinet_loader.dtsi
to arxxxx_fortinet_loader.dtsi, to avoid confusion, as FAP-220-B shares
flash layout with FAP-221-B exactly despite different SoC.
While at that, add a label to U-boot partition to allow for nvmem MAC
binding in future.
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Ilya Katsnelson [Sun, 29 Oct 2023 22:39:31 +0000 (01:39 +0300)]
build: replace `true` with a custom noop script
`true` might be a shell built-in, or simply not accessible in the hardcoded locations.
Replace it with a custom script that does nothing.
Signed-off-by: Ilya Katsnelson <me@0upti.me>
Mikhail Zhilkin [Sun, 29 Oct 2023 14:51:32 +0000 (14:51 +0000)]
treewide: fix MERCUSYS brand spelling
This commit fixes MERCUSYS brand spelling. The proper name is capitalized.
Link: https://www.mercusys.com/
Link: https://github.com/torvalds/linux/blob/master/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c#L7779
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>