aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* netifd: update to Git HEAD (2023-11-20), adds udebug supportFelix Fietkau2023-11-20
| | | | | | | | | 9dcc37a77cb2 add udebug support 525fa911e8ab replace DPRINTF calls with D(...) 7642eaba3838 system-linux: fix bogus debug error messages on adding bridge members f3e06e81b347 wireless: add bridge_isolate option Signed-off-by: Felix Fietkau <nbd@nbd.name>
* uboot-envtools: add settings for Synology DS213jDaniel Golle2023-11-20
| | | | | | | Add settings to be able to access the U-Boot environment on the Synology DS213j NAS. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mvebu: add support for Synology DS213jDaniel Golle2023-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Synology DS213j is a rather dated dual-bay SATA NAS based on on the Marvell Armada-370 SoC. It has long been supported in vanilla Linux, however, flash partitioning there didn't match with reality (ie. the bootloaders expectations) and nobody cared to wrap up OpenWrt support for the device. CPU: Marvell Armada-370 ARMv7 SoC @ 1200 MHz RAM: 512 MB DDR3 Flash: 8 MB (Micron Technology N25Q064) Network: 1x 1000M/100M/10M Ethernet (Marvell 88E1510) SATA: 2x 3.0Gbps USB: 2x USB 2.0 As OS options are becoming limited on that still quite useful hardware, patch the flash partitions to be able to get the most out of it when using OpenWrt. The vendor firmware loads kernel and initrd from fixed addresses in the flash, not making use of a modifyable environment stored in flash which is stored at a location right in the middle of the vendor's zImage partition (at 0x100000). Stock firmware flash layout: 0x000000 ~ 0x0c0000 : "RedBoot" (actually U-Boot) 0x0c0000 ~ 0x390000 : "zImage" 0x390000 ~ 0x7d0000 : "rd.gz" 0x7d0000 ~ 0x7e0000 : "vendor" (contains MAC address, serial no) 0x7e0000 ~ 0x7f0000 : "RedBoot Config" (unused? legacy left-over) 0x7f0000 ~ 0x800000 : "FIS directory" (unused? legacy left-over) OpenWrt flash layout: 0x000000 ~ 0x0c0000 : "u-boot" 0x0c0000 ~ 0x100000 : "gap" 0x100000 ~ 0x110000 : "u-boot-env" 0x110000 ~ 0x7d0000 : "kernel" 0x7d0000 ~ 0x7e0000 : "vendor" (contains MAC address, serial no) 0x7e0000 ~ 0x800000 : "gap2" "kernel", "gap" and "gap2" are concatenated using the mtd-concat virtual MTD driver, resulting in a partition "firmware" used by OpenWrt for kernel, rootfs and rootfs-overlay, 0x720000 (7296kiB) in total. Installation: 1. Connect to internal serial console port and Ethernet port, providing a TFTP server at a static IPv4 address, e.g. 192.168.1.254/24. 2. Interrupt bootloader using CTRL+C 3. Configure bootloader to load OpenWrt on future boot: setenv bootcmd "bootm f4110000" saveenv 4. Load and boot initramfs image via TFTP: setenv ipaddr 192.168.1.1 setenv serverip 192.168.1.254 tftpboot openwrt-mvebu-cortexa9-synology_ds213j-initramfs-kernel.bin bootm 5. Use sysupgrade to load final image. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* hostapd: add missing acl entries for udebugFelix Fietkau2023-11-20
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ubus: update to Git HEAD (2023-11-14)Felix Fietkau2023-11-20
| | | | | | b3e8c4ef07eb Add auto subscribe support Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add udebug supportFelix Fietkau2023-11-20
| | | | | | | This is not activated by default and must be explicitly enabled via ubus It supports reporting log messages and netlink packets Signed-off-by: Felix Fietkau <nbd@nbd.name>
* udebug: add new packageFelix Fietkau2023-11-20
| | | | | | | This will help with debugging by providing system wide access to per-process ring buffers with debug data. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: D-Link Dxx-1xx0 image fixesRani Hod2023-11-20
| | | | | | | | | | | | | | | | | | | | | Three fixes for D-Link DAP-1620 rev B and its twin D-Link DRA-1360: 1. `uboot-envtools` is removed from default package list. 2. Makefile variable is doubly escaped, i.e. `$$$$(DLINK_HWID)`. 3. Previously the size of `factory.bin` was always 10.5 MiB, same as D-Link firmwares. This commit makes it possible to use smaller images (with no lost space due to padding) as well as larger images. Tested successfully flashing a 6.5 MiB image and a 14.5 MiB image. Recall that factory images need to be installed via D-Link Web Recovery (at http://192.168.0.50/, server ignores pings and DHCP requests). P.S. I implemented the OEM firmware encryption algorithm, so firmware can be flashed via OEM firmware, but after successful flashing the device reboots to web recovery, so further debugging is required. Signed-off-by: Rani Hod <rani.hod@gmail.com>
* uboot-mediatek: Fix ubi command in uboot commandsCarter Wang2023-11-19
| | | | | | | Fix typo 'ubi remote ...' -> 'ubi remove ...'. Signed-off-by: Carter Wang <carter.wang@gmail.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* base-files: ipcalc.sh: Should take netmask or prefix after slashPhilip Prindeville2023-11-19
| | | | | | | | | | | | | | | | dnmasq.init now invokes ipcalc.sh as either: ipcalc.sh address/netmask ... or: ipcalc.sh address/prefix but the existing version doesn't accept the 2nd notation. We're trying to rationalize the usage of ipcalc.sh, and here we add support for the 2nd format. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* ramips: Add support for TP-Link Archer C50 v6 (CA/EU/RU)Renaud Gaspard2023-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the TP-Link Archer C50 v6 (CA/EU/RU). (The ES variant is a rebranded Archer C54 and NOT supported.) CPU: MediaTek MT7628 (580MHz) RAM: 64M DDR2 FLASH: 8M SPI WiFi: 2.4GHz 2x2 MT7628 b/g/n integrated WiFi: 5GHz 2x2 MT7613 a/n/ac ETH: 1x WAN 4x LAN LED: Power, WiFi2, WiFi5, LAN, WAN, WPS BTN: WPS/WiFi, RESET UART: Near ETH ports, 115200 8n1, TP-Link pinout Create Factory image -------------------- As all installation methods require a U-Boot to be integrated into the image (and we do not ship one with the image). We are not able to create an image in the OpenWRT build-process. Download a TP-Link image for your device variant (CA/EU or RU) from their website and a OpenWRT sysupgrade image for the device and build yourself a factory image like following: TP-Link image: tpl.bin OpenWRT sysupgrade image: owrt.bin > dd if=tpl.bin of=boot.bin bs=131584 count=1 > cat owrt.bin >> boot.bin Installing via Web-UI --------------------- Upload the boot.bin via TP-Links firmware upgrade tool in the web-interface. Installing via Recovery ----------------------- Activate Web-Recovery by beginning the upgrade Process with a Firmware-Image from TP-Link. After starting the Firmware Upgrade, wait ~3 seconds (When update status is switching to 0%), then disconnect the power supply from the device. Upgrade flag (which activates Web-Recovery) is written before the OS-image is touched and removed after write is succesfull, so this procedure should be safe. Plug the power back in. It will come up in Recovery-Mode on 192.168.0.1. When active, all LEDs but the WPS LED are off. Remeber to assign yourself a static IP-address as DHCP is not active in this mode. The boot.bin can now be uploaded and flashed using the web-recovery. Installing via TFTP ------------------- Prepare an image like following (Filenames from factory image steps apply here) > dd if=/dev/zero of=tp_recovery.bin bs=196608 count=1 > dd if=tpl.bin of=tmp.bin bs=131584 count=1 > dd if=tmp.bin of=boot.bin bs=512 skip=1 > cat boot.bin >> tp_recovery.bin > cat owrt.bin >> tp_recovery.bin Place tp_recovery.bin in root directory of TFTP server and listen on 192.168.0.66/24. Connect router LAN ports with your computer and power up the router while pressing the reset button. The router will download the image via tftp and after ~1 Minute reboot into OpenWRT. U-Boot CLI ---------- U-Boot CLI can be activated by holding down '4' on bootup. Dual U-Boot ----------- This is the first TP-Link MediaTek device to feature a split-uboot design. The first (factory-uboot) provides recovery via TFTP and HTTP, jumping straight into the second (firmware-uboot) if no recovery needs to be performed. The firmware-uboot unpacks and executed the kernel. Web-Recovery ------------ TP-Link integrated a new Web-Recovery like the one on the Archer C7v4 / TL-WR1043v5. Stock-firmware sets a flag in the "romfile" partition before beginning to write and removes it afterwards. If the router boots with this flag set, bootloader will automatically start Web-recovery and listens on 192.168.0.1. This way, the vendor-firmware or an OpenWRT factory image can be written. By doing the same while performing sysupgrade, we can take advantage of the Web-recovery in OpenWRT. It is important to note that Web-Recovery is only based on this flag. It can't detect e.g. a crashing kernel or other means. Once activated it won't boot the OS before a recovery action (either via TFTP or HTTP) is performed. This recovery-mode is indicated by an illuminated WPS-LED on boot. Co-authored-by: Julius Schwartzenberg <julius.schwartzenberg@gmail.com> Signed-off-by: Renaud Gaspard <gaspardrenaud@hotmail.com> Signed-off-by: Julius Schwartzenberg <julius.schwartzenberg@gmail.com> Tested-by: Julius Schwartzenberg <julius.schwartzenberg@gmail.com> Tested-by: Jaroslav Mikulík <byczech@gmail.com> Tested-by: Ashipa Eko <ashipa.eko@gmail.com>
* ramips: add support for D-Link COVR-X1860 A1Roland Reinl2023-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The COVR-X1860 are MT7621-based AX1800 devices (similar to DAP-X1860, but with two Ethernet ports and external power supply) that are sold in sets of two (COVR-X1862) and three (COVR-X1863). Specification: - MT7621 - MT7915 + MT7975 2x2 802.11ax (DBDC) - 256MB RAM - 128 MB flash - 3 LEDs (red, orange, white), routed to one indicator in the top of the device - 2 buttons (WPS in the back and Reset at the bottom of the device) MAC addresses: - LAN MAC (printed on the device) is stored in config2 partition as ASCII (entry factory_mac=xx:xx:xx:xx:xx:xx) - WAN MAC: LAN MAC + 3 - 2.4G MAC: LAN MAC + 1 - 5G MAC: LAN MAC + 2 The pins for the serial console are already labeled on the board (VCC, TX, RX, GND). Serial settings: 3.3V, 115200,8n1 Flashing via OEM Web Interface: - Download openwrt-ramips-mt7621-dlink_covr-x1860-a1-squashfs-factory.bin via the OEM web interface firmware update - The configuration wizard can be skipped by directly going to http://192.168.0.1/UpdateFirmware_Simple.html Flashing via Recovery Web Interface: - Set your IP address to 192.168.0.10, subnetmask 255.255.255.0 - Press the reset button while powering on the deivce - Keep the reset button pressed until the status LED blinks red - Open a Chromium based browser and goto http://192.168.0.1 - Download openwrt-ramips-mt7621-dlink_covr-x1860-a1-squashfs-recovery.bin 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 red - Open a Chromium based browser 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/openwrt/firmware-utils/blob/master/src/dlink-sge-image.c and https://raw.githubusercontent.com/openwrt/firmware-utils/master/src/dlink-sge-image.h - Compile a binary from the downloaded file, e.g. gcc dlink-sge-image.c -lcrypto -o dlink-sge-image - Run ./dlink-sge-image COVR-X1860 <OriginalFirmware> <OutputFile> -d - Example for firmware 102b01: ./dlink-sge-image COVR-X1860 COVR-X1860_RevA_Firmware_102b01.bin COVR-X1860_RevA_Firmware_102b01_Decrypted.bin -d The pull request is based on the discussion in https://forum.openwrt.org/t/add-support-for-d-link-covr-x1860 Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net> Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
* hostapd: fix undeclared variable iface_nameNazar Mokrynskyi2023-11-19
| | | Signed-off-by: Nazar Mokrynskyi <nazar@mokrynskyi.com>
* x86,armsr: interpolate GRUB_SERIAL into /etc/inittabPhilip Prindeville2023-11-19
| | | | | | | | | Some platforms have their console on other ports than ttyS0, so allow the developer to tailor this on bespoke platform images. Fixes issue #13401. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* u-boot.mk: do not force parallel buildMartin Schiller2023-11-19
| | | | | | | | Some patched u-boots may have problems with parallel build. Do not enforce parallel build here so one can set PKG_BUILD_PARALLEL:=0 in the specific u-boot Makefile also before including the u-boot.mk. Signed-off-by: Martin Schiller <ms@dev.tdt.de>
* mediatek: filogic: add JCG Q30 PRO supportChukun Pan2023-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specification: SoC: MediaTek MT7981B 2x A53 Flash: Winbond 128MB RAM: DDR3 256MB Ethernet: 4x 10/100/1000 Mbps Switch: MediaTek MT7531AE WiFi: MediaTek MT7976C Button: Reset Power: DC 12V 1A Flash instructions: 1. Connect to your PC via the Gigabit port of the router, set a static ip on the ethernet interface of your PC. (ip 192.168.1.254, gateway 192.168.1.1) 2. Attach UART, pause at u-boot menu. 3. Select "Upgrade ATF BL2", then use preloader.bin 4. Select "Upgrade ATF FIP", then use bl31-uboot.fip 5. Download the initramfs image, and type "reset", waiting for tftp recovery to complete. 6. After openwrt boots up, perform sysupgrade. Note: 1. Since NMBM is disabled, we must back up all partitions. 2. Although we can upgrade new firmware in the stock firmware, we need the special fit image signature of MediaTek and dual boot (hack kernel) to make u-boot boot it. So just abandon these hacks and flash it via the serial port. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* uboot-mediatek: add JCG Q30 PRO supportChukun Pan2023-11-19
| | | | | | | The vendor uboot will verify firmware at boot. So add a custom uboot build for this device. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* kernel: remove CONFIG_DEVTMPFS_SAFE from target configHauke Mehrtens2023-11-19
| | | | | | | CONFIG_DEVTMPFS_SAFE is now part of the generic configuration. Remove it from the target configurations. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: 6.1: Add missing config option DEVTMPFS_SAFEMarius Dinu2023-11-19
| | | | | | Fixes build error when enabling CONFIG_KERNEL_DEVTMPFS in OpenWrt menuconfig. Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
* qualcommax: add addresses to DP nodesRobert Marko2023-11-18
| | | | | | | | | | | | | | | | | DP nodes live under the soc node, and since soc is a simple bus it requires node adresses to be present. So, simply add the node addreses to avoid the following dtc warning: Warning (unit_address_vs_reg): /soc/dp1: node has a reg or ranges property, but no unit name Warning (unit_address_vs_reg): /soc/dp2: node has a reg or ranges property, but no unit name Warning (unit_address_vs_reg): /soc/dp3: node has a reg or ranges property, but no unit name Warning (unit_address_vs_reg): /soc/dp4: node has a reg or ranges property, but no unit name Warning (unit_address_vs_reg): /soc/dp5: node has a reg or ranges property, but no unit name Warning (unit_address_vs_reg): /soc/dp6: node has a reg or ranges property, but no unit name Warning (unit_address_vs_reg): /soc/dp5-syn: node has a reg or ranges property, but no unit name Warning (unit_address_vs_reg): /soc/dp6-syn: node has a reg or ranges property, but no unit name Signed-off-by: Robert Marko <robimarko@gmail.com>
* CI: issue-labeller: fix wrong CRLF line-endingChristian Marangi2023-11-16
| | | | | | | Fix wrong CRLF line-ending in issue-labeller workflow. Fixes: e3a0476d1bdc ("CI: add issue labeller action") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* dnsmasq: Invoke new ipcalc with CIDR notationPhilip Prindeville2023-11-15
| | | | | | | | | | | | | | | | | | | The new rewritten ipcalc.sh understands 3 notations: ipaddr/prefix ... ipaddr/dotted-netmask ... ipaddr dotted-netmask ... meaning that the previous 4th non-standard notation of "ipaddr prefix" will be dropped, alas that's the notation that dnsmasq currently uses. This change has us using the first notation which is the most common. This behavior came in as https://github.com/openwrt/openwrt/commit/eda27e8382f3e5253defab5419e95d4b51f72de3 a long time ago. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* qualcommax: fix line endings in ESS dt-bindingsRobert Marko2023-11-15
| | | | | | | It seems that ESS dt-bindings somehow ended up with Windows line endings, this is obviously incorrect, so lets convert it to UNIX endings. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq807x: fix typo in WAX630 for switch lan bmpChristian Marangi2023-11-15
| | | | | | | | In fixing ipq8074 WAX630 dts, there was a typo in the switch lan bmp. Fix it to fix compilarion error. Fixes: f3cd4bfb7f69 ("ipq807x: fix multiple error on ESS switch port define") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq807x: fix multiple error on ESS switch port defineChristian Marangi2023-11-15
| | | | | | | | | | | Fix multiple error on ESS switch port define. - Fix wrong switch CPU and WAN bmp define. (many times wan port are actually set in lan mask and lan port in wan mask) - Renumber phyinfo port, use port_id instead of phy_address as it doesn't make sense using that for port enumeration - Drop additional port for devices that have them not connected. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* qca-ssdk: disable building ISISCRobert Marko2023-11-15
| | | | | | | | | | | | | | ISISC is the QCA codename for their Atheros switch family including AR237, QCA8337 etc. Since we have qca8k support in OpenWrt, there is no need to have SSDK support for these switches, and boards that also have external switches can just use qca8k. Disable QCA803x PHY support as well, since all of those are supportable via at803x driver. Signed-off-by: Robert Marko <robimarko@gmail.com>
* CI: add issue labeller actionChristian Marangi2023-11-15
| | | | | | | | | | | | | | | | | | 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>
* github: add release info to BUG templateChristian Marangi2023-11-15
| | | | | | | | | | 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>
* scripts/dump-target-info.pl: add new function to DUMP devicesChristian Marangi2023-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ath79: use "fixed-layout" for Embedded Wireless devicesRafał Miłecki2023-11-15
| | | | | | | | | | | | | | | | 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>
* ipq806x: fix wrong LEDs mode for non-standard qca8k LEDsChristian Marangi2023-11-15
| | | | | | | | | | | | 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>
* netifd: update to Git HEAD (2023-11-14)Jo-Philipp Wich2023-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>
* qca-ssdk: disable PTP and swconfig by defaultRobert Marko2023-11-14
| | | | | | | | 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>
* qca-ssdk: pass SoC to buildRobert Marko2023-11-14
| | | | | | | | | | | 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>
* qualcommax: move switch tick mode setting to ESS DTSIRobert Marko2023-11-14
| | | | | | | | 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>
* qualcommax: use defines for MAC mode settingRobert Marko2023-11-14
| | | | | | | | | | 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>
* qualcommax: set default switch MAC modesRobert Marko2023-11-14
| | | | | | | | | | 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>
* qualcommax: add bindings for MAC modesRobert Marko2023-11-14
| | | | | | | | | | 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>
* Revert "prereq-build: add Python 3.12 support"Paul Spooren2023-11-13
| | | | | | | | | | | | | 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>
* mac80211: realtek: rtw88: add RTL8822CU supportChukun Pan2023-11-13
| | | | | | Add the Realtek RTL8822CU support to rtw88 package. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* mac80211: realtek: rtw88: add RTL8821CU supportChukun Pan2023-11-13
| | | | | | Add the Realtek RTL8821CU support to rtw88 package. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* mac80211: realtek: rtw88: add RTL8821CE supportChukun Pan2023-11-13
| | | | | | Add the Realtek RTL8821CE support to rtw88 package. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* mac80211: realtek: fix rtw88 driver dependenciesChukun Pan2023-11-13
| | | | | | | | | | | | | 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>
* linux-firmware: add Realtek RTW89 firmwareChukun Pan2023-11-13
| | | | | | This is the firmware required for the rtw89 driver. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* linux-firmware: add Realtek RTL8723DE/RTL8821CE firmwareChukun Pan2023-11-13
| | | | | | | 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>
* devel/gdb: Disable libzstd explicitlyHannu Nyman2023-11-13
| | | | | | | | 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>
* qca-ssdk: fix unsupported scenario with PORT1 not declared in switch bmpChristian Marangi2023-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Revert "qca-ssdk: fix unsupported scenario with PORT1 not declared in switch ↵Christian Marangi2023-11-13
| | | | | | | | | | | 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>
* treewide: fix shell errors during dump stagePetr Štetiar2023-11-13
| | | | | | | | | | | | | 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>
* scan.mk: do not silence output of dump phasePetr Štetiar2023-11-13
| | | | | | | | | | | | | | 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>