Build the driver for the in-SoC AHCI SATA host as module, just like for the other subtargets. No board requires booting off SATA, so we don't need to have it built-in. All boards with SATA support already select kmod-ata-ahci-mtk which provides the module.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 95ac3f8)
Similar to 'append-image' this new command appends an existing binary. 'append-image-stage' also makes a copy of that binary and keeps it in $(STAGING_DIR_IMAGE). When called from within the ImageBuilder, this copy is used instead of expecting the binary to be present. This is useful for artifacts which include the initramfs/recovery image which is usually not included in the ImageBuilder.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: de4b29d)
mediatek: bpi-r64: fix sdcard.img.gz in ImageBuilder
Generating the sdcard.img.gz file requires the initramfs/recovery image to be present. Use the newly introduced 'append-image-stage' build command to fix the ImageBuilder for the BPi-R64.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 210916c)
image: use portable filename in 'append-image-stage'
The 'append-image-stage' command doesn't work when setting the EXTRA_IMAGE_NAME option of the ImageBuilder as in that case DEVICE_IMG_PREFIX is modified and no longer matches the value it had in buildroot. Choose a filename independent of DEVICE_IMG_PREFIX for images staged using 'append-image-stage' to fix that.
Rename feature variable clang-bpf-global-var following upstream changes. This restores the HAVE_CLANG feature override and should avoid rare build errors where a recent host clang and BTF-enabled host kernel are present.
Fixes: 23be333401f0 ("bpftools: update to 5.10.10") Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (commit: cf20f1b)
9df230a Zero checksum handling (#25) 7688102 skip generating a UDP4 csum if the UDP6 csum is 0 and zero_csum_pass is set 4a9e4b1 zero csum: avoid calling the checksum adjustment function if udp csum is zero 2de14c5 add a module argument to skip checksum adjust for UDP if checksum is zero
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> (commit: c61ab68)
dnsmasq: add ignore hosts dir to dnsmasq init script
When running multiple instances of dnsmasq, for example one being for the lan and another for a guest network, it might not be desirable to have the same dns names configured in both networks
Signed-off-by: João Henriques <joaoh88@gmail.com> (commit: e8a5670)
Commit f724a583dcf7 updated the nand-rb4xx driver to the 5.10 testing kernel, but forgot to add the new kernel config symbol it introduces to the 5.10 config.
arm-trusted-firmware-mediatek: fix boot hang on unifi-6-lr
The Ubiquiti Networks UniFi 6 LR access point comes with a total of 512 MB RAM provided by 2x 8-bit DDR3 SDRAM. This combination lead to problems with the DDR calibration on boot resulting in occasional hang on boot. Use updated calibration binary provided by MediaTek to make boot on that device more reliable. The binary has also been tested on the BananaPi BPi-R64 board and that also works just fine with the new binary.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: ebed523)
Note: Serial UART is probably available on the board, but it has not been tested.
Flashing: Boot via TFTP the initramfs image. Then, upload a sysupgrade image via SSH and flash it normally. More info at the "Common procedures for MikroTik products" page https://openwrt.org/toh/mikrotik/common.
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> (commit: d1f1e52)
Fixes logic that leads to this error when booting mt7621 and other devices that use the mediatek ethernet driver: [ 23.144378] mtk_soc_eth 1e100000.ethernet: PPE table busy
Since support for SFP on the MikroTik RouterBOARD 922UAGS-5HPacD was added by 4387fe00cb, the MAC addresses for eth0 (Ethernet) and eth1 (SFP) were swapped. This patch fixes the 02_network script to assign MAC addresses correctly, so they match the label and the vendor's OS.
Tested on a RouterBOARD 922UAGS-5HPacD board.
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> (commit: 14a95b3)
Added new backport* generic/backport-5.4/050-gro-fix-napi_gro_frags-Fast-GRO-breakage-due-to-IP-a.patch
All others updated automatically.
The new backport was included based on this[1] upstream commit that will be mainlined soon. This change is needed because Eric Dumazet's check for NET_IP_ALIGN (landed in 5.4.114) causes huge slowdowns on drivers which use napi_gro_frags().
Fixes logic that leads to this error when booting mt7621 and other devices that use the mediatek ethernet driver: [ 23.144378] mtk_soc_eth 1e100000.ethernet: PPE table busy
The rest are mostly moved from pending-5.10 to backport-5.10 with a couple of cleanups and improvements from upstream.
kernel: Activate FORTIFY_SOURCE for MIPS kernel 5.4
CONFIG_FORTIFY_SOURCE=y is already set in the generic kernel configuration, but it is not working for MIPS on kernel 5.4, support for MIPS was only added with kernel 5.5, other architectures like aarch64 support FORTIFY_SOURCE already since some time.
This patch adds support for FORTIFY_SOURCE to MIPS with kernel 5.4, kernel 5.10 already supports this and needs no changes.
This backports one patch from kernel 5.5 and one fix from 5.8 to make fortify source also work on our kernel 5.4.
The changes are not compatible with the 306-mips_mem_functions_performance.patch patch which was also removed with kernel 5.10, probably because of the same problems. I think it is not needed anyway as the compiler should automatically optimize the calls to memset(), memcpy() and memmove() even when not explicitly telling the compiler to use the build in variant.
This increases the size of an uncompressed kernel by less than 1 KB.
The CLK125 output pin at the ethernet PHY is connected via capacitor to GND and nowhere else. Disable it. Also tune the LED masks.
The MPP56 and MPP60 pins at the SoC are conected to the μPD720202 USB3.0 chip: - MPP56: wired to PCIe CLKREQ# (out) - MPP60: wired to PCIe RESET# (in) Configure the pcie pinmux for these pins.
Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com> (commit: 26a5aea)
QLCNIC_HWMON was activated when hwmon was set, but the dependency was missing. This broke the build bot builds. Fix this by explicitly activating HWMON support and adding a dependency.
This came up in an upstream commit: " b1dd9bf688b0 "net: phy: broadcom: Fix RGMII delays for BCM50160 and BCM50610M"
The PHY driver entry for BCM50160 and BCM50610M calls bcm54xx_config_init() but does not call bcm54xx_config_clock_delay() in order to configuration appropriate clock delays on the PHY, fix that."
So the "rgmii" phy-mode has always been wrong, but went unnoticed since the broadcom phy driver didn't push the delay settings to the chip.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (commit: df07baf)
Add the SPI_MASTER_GPIO_SS flag for the spi-ath79 driver. Otherwise, the custom chipselect function is never called. This breaks hardware, where the three dedicated chipselect lines are used instead of generic GPIO pins.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: a1d405f)
All chipsets from AR7100 up to QCA9563 have three dedicated chipselect lines for the integrated SPI controller. Remove the number of chipselects from the platform data, as there is no need to manually set this to a different value.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: bd54e73)
3f5080aedd nptl: Do not build nptl/tst-pthread-gdb-attach as PIE 36783141cf nptl: Check for compatible GDB in nptl/tst-pthread-gdb-attach ea299b62e8 nptl_db: Support different libpthread/ld.so load orders (bug 27744) 162df872f0 x86: tst-cpu-features-supports.c: Update AMX check
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> (commit: 2fc2088)
In order to allow easily updating the bootloader on eMMC also provide artifacts for that. Support for updating bootloader via TFTP will be added to the loader CLI menu in a follow-up commit.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 01a9d22)
This backports a fix for the low priority CVE-2021-28831: decompress_gunzip.c in BusyBox through 1.32.1 mishandles the error bit on the huft_build result pointer, with a resultant invalid free or segmentation fault, via malformed gzip data.
ltq-dsl-base: Make package nonshared to fix image builder
This package depends on the lantiq target and is only build for that target. A normal package would be build by the SDK builder probably under a different target and then this package will not be selected. Mark it as nonshared to build it when the lantiq target gets build.
Fixes issue with merged DNS requests in 2.83/2.84 not being retried on the firsts failed request causing lookup failures.
Also fixes the following security problem in dnsmasq: * CVE-2021-3448: If specifiying the source address or interface to be used when contacting upstream name servers such as: server=8.8.8.8@1.2.3.4, server=8.8.8.8@1.2.3.4#66 and server=8.8.8.8@eth0 then all would use the same socket bound to the explicitly configured port. Now only server=8.8.8.8@1.2.3.4#66 will use the explicitly configured port and the others random source ports.
Remove upstreamed patches and update remaining patch.
Signed-off-by: Alan Swanson <reiver@improbability.net> [refreshed old runtime support patch] Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> (commit: 3980daf)
base-files: upgrade: take down loop and LVM before upgrade
Users of devices with large block storage may choose to have an LVM partition on the same device which is used for booting OpenWrt. The presents a problem during sysupgrade as the root device is then still busy and changing partitions will not work as desired, leading to data corruption in case the newly flashed image is larger than the currently installed one. Having loop devices setup causes similar havoc. Make sure all volume groups are offline and all loop devices have been released before sysupgrade.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: a2b9ec0)
tplink-safeloader: fix product_name of TP-Link AD7200
The stock firmware does not accept firmware with "Talon" in the name.
Tested on firmware version 1.0.10 Build 20160902 rel. 57400 which came preinstalled, as well as latest firmware version 2.0.1 Build 20170103 rel.71053 flashed from AD7200v1-up-ver2-0-1-P1[20170103-rel71053]_2017-01-04_10.08.28.bin.
Fixes: 1a775a4fd033 ("ipq806x: add support for TP-Link Talon AD7200") Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> [added details about vendor firmware] Signed-off-by: Petr Štetiar <ynezz@true.cz> (commit: dfef88b)
On a Ubiquiti UniFi AC HD (ubnt,unifi-ac-hd, UAP-AC-HD, UAP301), a forced speed on gmac1 is set in the QSGMII PCS_ALL_CH_CTL register, presumably by the bootloader (4.3.28), preventing the interface from being usable. The QSDK NSS GMAC driver takes care to clear the forced speed in nss_gmac_qsgmii_dev_init (https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-gmac/tree/ipq806x/nss_gmac_init.c?h=nss at d5bb14925861).
gmac1 is connected to the port on the device labeled SECONDARY, and is currently eth0 but will be switched to eth1 by a subsequent patch. By clearing the QSGMII PCS forced speed during dwmac initialization when SGMII is in use, this port becomes usable.
This patch is upstreamable, and will be sent upstream after successful testing in OpenWrt.
Signed-off-by: Mark Mentovai <mark@moxienet.com> Build-tested: ipq806x/ubnt,unifi-ac-hd Run-tested: ipq806x/ubnt,unifi-ac-hd (commit: fa73183)
Unlike many ipq806x devices, Ubiquiti UniFi AC HD (UAP-AC-HD, UAP301) has no switch on board. Its two Ethernet ports are connected to Atheros AR8033 PHYs. It is not appropriate to use fixed-link in this configuration. Instead, configure the correct PHYs in the device tree configuration to allow the at803x driver to load.
Signed-off-by: Mark Mentovai <mark@moxienet.com> Build-tested: ipq806x/ubnt,unifi-ac-hd Run-tested: ipq806x/ubnt,unifi-ac-hd (commit: 4f74966)
The Ubiquiti UniFi AC HD (UAP-AC-HD, UAP301) has two Ethernet ports, labeled MAIN and SECONDARY, connected to gmac2 and gmac1, respectively. The standard probe order results in gmac1/SECONDARY being eth0 and gmac2/MAIN being eth1. This does not match the stock firmware, is contrary to user expectation, causes the wrong (high) MAC address to be used in a bridged configuration (the default for this device), and makes the gmac2/MAIN port unusable in the preinit environment (such as for failsafe). Until a recent patch, gmac1/SECONDARY (eth0) was not even usable.
This reorders the ports so that gmac2/MAIN is eth0, and the now-working gmac1/SECONDARY is eth1. eth0 has the low MAC address and eth1 has the high; when bridged, the bridge takes on the correct low MAC address. This matches the stock firmware. The MAIN port is usable for failsafe during preinit.
This device does not have a switch on board, so there's no possibility to remap ports via switch configuration. "ip link set $interface name" is used instead, during preinit before networking is configured.
Signed-off-by: Mark Mentovai <mark@moxienet.com> Build-tested: ipq806x/ubnt,unifi-ac-hd Run-tested: ipq806x/ubnt,unifi-ac-hd (commit: 565814a)
This was introduced to gmac2 and gmac3 in 57ea767a53c1 without fanfare. There's no indication of why it was added to those devices, but not to gmac0 or gmac1. It was probably an unintentional omission. It should be present on all four gmac devices.
This property is considered by drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c stmmac_probe_config_dt.
Signed-off-by: Mark Mentovai <mark@moxienet.com> Build-tested: ipq806x/ubnt,unifi-ac-hd Run-tested: ipq806x/ubnt,unifi-ac-hd (commit: 75ca641)
realtek: Add support for Netgear S350 series switches GS308T and GS310TP
The Netgear GS308T v1 is an 8 port gigabit switch. The GS310TP v1 is an 8 port POE+ gigabit switch with 2 SFP Ports (currently untested).
The GS308T v1 and GS310TP v1 are quite similar to the Netgear GS1xx devices already supported. Theses two devices use the same Netgear firmware and are very similar to there corresponding GS1xx devices. For this reason they share a large portion of the device tree with the GS108T and GS110TP with exception of the uimage magic and model and compatible values.
All of the above feature a dual firmware layout, referred to as Image0 and Image1 in the Netgear firmware.
In order to manipulate the PoE+ on the GS310TP v1 , one needs the rtl83xx-poe package
Specifications (GS308T) ----------------------
* RTL8380M SoC, 1 MIPS 4KEc core @ 500MHz * 128MB DDR3-1600 DRAM (Winbond W631GG8MB-12) * 32MB 3v NOR SPI Flash (Winbond W25Q256JVFQ) * RTL8231 GPIO extender to control the LEDs and the reset button * 8 x 10/100/1000BASE-T ports, internal PHY (RTL8218B) * UART (115200 8N1) via unpopulated standard 0.1" pin header marked J1 * Power is supplied via a 12V 1A barrel connector
Specifications (GS310TP) ----------------------
* RTL8380M SoC, 1 MIPS 4KEc core @ 500MHz * Nuvoton M0516LDN for controlling PoE * 128MB DDR3-1600 DRAM (Winbond W631GG8MB-12) * 32MB 3v NOR SPI Flash (Winbond W25Q256JVFQ) * RTL8231 GPIO extender to control the LEDs and the reset button * 8 x 10/100/1000BASE-T PoE+ ports, 2 x Gigabit SFP ports, internal PHY (RTL8218B) * UART (115200 8N1) via unpopulated standard 0.1" pin header marked J1 * Power is supplied via a 54V 1.25A barrel connector
Both devices have UART pinout -----------
J1 | [o]ooo ^ ||`------ GND | |`------- RX [TX out of the serial adapter] | `-------- TX [RX into the serial adapter] `---------- Vcc (3V3) [the square pin]
The through holes are filled with PB-free solder which melts at 375C. They can also be drilled using a 0.9mm bit.
Installation ------------ Instructions are identical to those for the similar Negear devices and apply both to the GS308T v1 and GS310TP v1 as well. ------------------- Boot initramfs image from U-Boot --------------------------------
1. Press the Escape key at the `Hit Esc key to stop autoboot` prompt 2. Init network with `rtk network on` command 3. Load image with `tftpboot 0x8f000000 openwrt-realtek-generic-netgear_gs308t-v1-initramfs-kernel.bin` command 4. Boot the image with `bootm` command
The switch defaults to IP 192.168.1.1 and tries to fetch the image via TFTP from 192.168.1.111.
Updating the installed firmware -------------------------------
The OpenWRT ramdisk image can be flashed directly from the Netgear UI. The Image0 slot should be used in order to enable sysupgrade.
As with similar switches, changing the active boot partition can be accomplished in U-Boot as follows:
1. Press the Escape key at the `Hit Esc key to stop autoboot` prompt 2. Run `setsys bootpartition {0|1}` to select the boot partition 3. Run `savesys` followed by `boota` to proceed with the boot process
INABA Abaniact AML2-17GP is a 17 port gigabit switch, based on RTL8382.
Specification:
- SoC : Realtek RTL8382 - RAM : DDR3 128 MiB (SK hynix H5TQ1G63EFR) - Flash : SPI-NOR 32 MiB (Macronix MX25L25635FZ2I-10G) - Ethernet : 10/100/1000 Mbps x17 - port 1-8 : RTL8218B (SoC) - port 8-16 : RTL8218D - port wan : RTL8214FC - LEDs/Keys : 1x, 1x - UART : pin header on PCB (Molex 530470410 compatible) - J14: 3.3V, GND, RX, TX from rear side - 115200n8 - Power : 100-240 VAC, 50/60 Hz, 0.21 A - Plug : IEC 60320-C13
Flash instruction using initramfs image:
1. Boot AML2-17GP normally 2. Set the IP address of computer to the range of 192.168.1.0/24, other than 192.168.1.248 and connect computer to "WAN/CONSOLE" port of AML2-17GP 3. Access to "http://192.168.1.248" and open firmware setting page
-- UI Language: 日本語 -- "メンテナンス" -> "デュアルイメージ"
-- UI Language: ENGLISH -- "Maintenance" -> "Dual Image"
4. Check "イメージ情報 (en: "Images Information")" and set the first image to active by choosing "アクティブイメージ" (en: "Active Image") in the partition "0" 5. open firmware upgrade page
7. Press "アップグレード" (en: "Upgrade") button and perform upgrade 8. Wait ~150 seconds to complete flashing 9. After the flashing, the following message is showed and press "OK" button to reboot
-- UI Language: 日本語 -- "成功!! 今すぐリブートしますか?"
-- UI Language: ENGLISH -- "Success!! Do you want to reboot now?"
10. After the rebooting, reconnect the cable to other port (1-16) and open the SSH connection, download the sysupgrade image to the device and perform sysupgrade with it 11. Wait ~120 seconds to complete sysupgrade
Note:
- The uploaded image via WebUI will only be written with the length embedded in the uImage header. If the sysupgrade image is specified, only the kernel is flashed and lacks the rootfs, this causes a kernel panic while booting and bootloops. To avoid this issue, initramfs image is required for flashing on WebUI of stock firmware.
- This device has 1x LED named as "POWER", but it's not connected to the GPIO of SoC and cannot be controlled.
- port 17 is named as "WAN/CONSOLE". This port is for the upstream connection and console access (telnet/WebUI) on stock firmware.
Back to stock firmware:
1. Set "bootpartition" variable in u-boot-env2 partition to "1" by fw_setsys
Various report and data show that the freq 384000 is too low and cause some extra latency to the entire system. OEM qsdk code also set the min frequency for this target to 800 mhz. Also some user notice some instability with this idle frequency, solved by setting the min frequency to 600mhz. Fix all these kind of problem by introducing a boot init.d script that set the min frequency to 600mhz and set the ondemand governor to be more aggressive. The script set these value only if the ondemand governor is detected. 384 mhz freq is still available and user can decide to restore the old behavior by disabling this script.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> (commit: 861b82d)
- Add new tsens node - Add new cpufreq required nodes - Drop arm cpuidle compatible - Fix duplicate node set upstream - Add voltage tolerance value for cpu opp
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> (commit: 1e25423)
Enables CRC calculation offloading on RTL8380/8390/9300.
Tested on Zyxel XGS1210-10 (RTL9302)/GS1900-48 (RTL8390)/GS1900-10HP (RTL8382) On the Zyxel GS1900-10HP, an increase of 5% in iperf3 send throughput and 11% in receive throughput is seen.
Adds a hash-bucket size attribute for the different SoCs, in order to accomodate the buckets with 8 entries of the L2-forwarding tables on RTL93XX in contrast to only 4 on RTL83XX.
This adds support for the MMD access registers the RTL-SoCs use to access clause 45 PHYs via mdio. This new interface is used to add EEE-support for the RTL8226
This adds SoC specific VLAN configuration routines, which alsoe sets up the portmask table entries that are referred to in the vlan profiles registers for unknown multicast flooding.
realtek: Setup all VLANs with default configurations
This sets up all VLANs with a default configuration on reset: - forward based on VLAN-ID and not the FID/MSTI - forward based on the inner VLAN-ID (not outer)
Adds support for Layer 2 multicast by implementing the DSA port_mdb_* callbacks. The Kernel bridge listens to IGMP/MLD messages trapped to the CPU-port, and calls the Multicast Forwarding Database updates. The updates manage the L2 forwarding entries and the multicast port-maps.
uboot-mediatek: unifi-6-lr: fix erase of production parition
mtd erase needs to be aligned with erase blocks. Use padded image size for erasing the production volume. As the environment grew above the current size of 0x1000 bytes by introducing the new padding function, increase the env size to 0x4000. While at it, clean up reset button function to work to more reliable on that board.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: af3a1ad)
imagebuilder: unset BINARY_FOLDER and DOWNLOAD_FOLDER in final archive
Using these config-options to customize the folders used at build-time makes these folder settings appear in generated archive. This causes the imagebuilder to be not portable, as it's going to use the build-time folders on the new systems. Errors look like:
The build-time settings of these folders are passed into the archives via .config file. The expected behavior is that after unpacking the imagebuilder acts like these settings have their defaults, using intree folders. So unset the build-time settings.
Signed-off-by: Sven Roederer <devel-sven@geroedel.de> (commit: 6967903)
sdk: unset BINARY_FOLDER and DOWNLOAD_FOLDER in final archives
Using these config-options to customize the folders used at build-time makes these folder settings appear in generated archive. This causes the SDK to be not portable, as it's going to use the build-time folders on the new systems. The errors vary from passing the build, disk out-of-space to permission denied.
The build-time settings of these folders are passed into the archive via Config.build. The expected behavior is that the SDK acts after unpacking like these settings have their defaults, using intree folders. So just filter these folders out when running convert-config.pl to create Config.build.
This addresses the same issue that's fixed in the previous commit for the imagebuilder.
Signed-off-by: Sven Roederer <devel-sven@geroedel.de> (commit: 1e4b191)
ipq40xx: fix hard_config partition size on MikroTik hAP-ac2
The routerbootparts driver dynamically discovers the location of MikroTik partitions, but it cannot determine their size (except by extending them up to the start of the next discovered partition).
The hard_config partition has a default size of 0x1000 in the driver, while it actually takes 0x2000 on the hAP-ac2. Set the correct size in the hAP-ac2 DTS.
On most devices, this isn't a problem as the actual data fits in 0x1000 bytes. However, some devices have larger data that doesn't fit in 0x1000 bytes. In any case, all devices seen so far have enough space for a 0x2000 hard_config partition before the start of the dtb_config partition. With the current 0x1000 size:
During the boot of the system, modem could not start automatically its network registration. netifd: wan (9235): + echo 'Waiting for network registration' netifd: wan (9235): Waiting for network registration netifd: wan (9235): + local 'registration_timeout=0' netifd: wan (9235): + uqmi -s -d /dev/cdc-wdm1 --get-serving-system netifd: wan (9235): + grep '"searching"' netifd: wan (9235): + uqmi -s -d /dev/cdc-wdm1 --get-serving-system netifd: wan (9235): + registration='{"registration":"not_registered","plmn_mcc":208,"plmn_mnc":20,"plmn_description":"","roaming":true}' netifd: wan (9235): + '[' -n ] netifd: wan (9235): + echo 'Starting network wan'
As the while loop checks only "searching" pattern, uqmi.sh script quits searching loop and continues whereas the modem is not registered
Other issue, after X seconds modem stops searching. netifd: wan (9213): + uqmi -s -d /dev/cdc-wdm0 --get-serving-system netifd: wan (9213): + grep '"searching"' netifd: wan (9213): + '[' -e /dev/cdc-wdm0 ] netifd: wan (9213): + '[' 3 -lt 0 -o 0 '=' 0 ] netifd: wan (9213): + let registration_timeout++ netifd: wan (9213): + sleep 1 netifd: wan (9213): + uqmi -s -d /dev/cdc-wdm0 --get-serving-system netifd: wan (9213): + grep '"searching"' netifd: wan (9213): + uqmi -s -d /dev/cdc-wdm0 --get-serving-system netifd: wan (9213): + registration='{"registration":"not_registered"}' netifd: wan (9213): + '[' -n ] netifd: wan (9213): + echo 'Starting network wan' netifd: wan (9213): Starting network wan
If registration_timeout is not expired, registration can be restarted
Signed-off-by: Thomas Richard <thomas.richard@kontron.com> Tested-by: Florian Eckert <fe@dev.tdt.de> (commit: 2eda042)
Extend checks on build prerequisites for building OpenWRT core
OpenWRT requires a number of Perl modules to be installed. It wasn't checking on all of them. This patch adds checks for Perl FindBin, File::Copy, File::Compare and Thread::Queue modules.
Failing to install these, will have the build break at some point. By adding these to the prereq-build.mk script, they are checked on forehand.
Tested on a Fedora 33 and 34 (beta) that was freshly installed. Fedora appears to break up Perl modules into small packages that need to be installed for the build to succeed.
Signed-off-by: Bas Mevissen <abuse@basmevissen.nl> (commit: f68c947)
ipq806x: dwmac: fix GMACs connected via SGMII fixed-link
fa731838c524 cleared the forced speed in the QSGMII PCS_ALL_CH_CTL register during probe, but this is only correct for GMACs that are not configured with fixed-link. This prevented GMACs configured with both phy-mode = "sgmii" and fixed-link from working properly, as discussed at https://github.com/openwrt/openwrt/pull/3954#issuecomment-834625090 and the comments that follow. Notably, this prevented all communication between gmac2 and the switch on the Netgear R7800.
The correct behavior is to set the QSGMII PCS_ALL_CH_CTL register by considering the gmac's fixed-link child, setting the speed as directed by fixed-link if present, and otherwise clearing it as was done previously.
Fixes: fa731838c524 ("ipq806x: dwmac: clear forced speed during probe") Signed-off-by: Mark Mentovai <mark@moxienet.com> Tested-by: Hannu Nyman <hannu.nyman@iki.fi> Run-tested: ipq806x/ubnt,unifi-ac-hd, ipq806x/netgear,r7800 Cc: Petr Štetiar <ynezz@true.cz> Cc: Ansuel Smith <ansuelsmth@gmail.com> Tested-by: Ansuel Smith <ansuelsmth@gmail.com> (commit: d62825d)
The out-of-tree qcom-smem patches traditionally displayed mtd partition names in upper case, starting with the new mainline qcom-smem support in kernel v5.10, it switches to normalizing the partition names to lower case.
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> (commit: 2db9dde)
The out-of-tree qcom-smem patches traditionally displayed mtd partition names in upper case, starting with the new mainline qcom-smem support in kernel v5.10, it switches to normalizing the partition names to lower case.
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> (commit: f70e11c)
The out-of-tree qcom-smem patches traditionally displayed mtd partition names in upper case, starting with the new mainline qcom-smem support in kernel v5.10, it switches to normalizing the partition names to lower case.
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> (commit: 435dc2e)
uboot-mediaktek: add support for PSTORE and check it on boot
Add support for pstore/ramoops now that DRAM content is preserved over reboot on MT7622. On each boot, check pstore and boot to recovery image in case there are records stored in it.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: cc20175)
d53be2a2e981 migrated 0069-arm-boot-add-dts-files.patch from patches-5.4 to patches-5.10, but a subsequent patch in that set, 1e25423be8ac, erroneously removed several devices:
ipq8062/nec,wg2600hp3 from 3bb16185737c ipq8064/asrock,g10 from 98b86296e67d ipq8064/ubnt,unifi-ac-hd from 4e46beb31342
Signed-off-by: Mark Mentovai <mark@moxienet.com> Run-tested: ipq806x/ubnt,unifi-ac-hd Cc: Ansuel Smith <ansuelsmth@gmail.com> (commit: a1afeb9)
Kernel 5.10 support for ipq806x was added at the same time that these patches were developed for kernel 5.4. This carries the patches forward to kernel 5.10.
fa731838c524 ipq806x: dwmac: clear forced speed during probe 75ca641f1b84 ipq806x: Add "snps,dwmac" to all gmac compatible= d62825dd77b3 ipq806x: dwmac: set forced speed when using fixed-link
Signed-off-by: Mark Mentovai <mark@moxienet.com> Run-tested: ipq806x/ubnt,unifi-ac-hd Cc: Ansuel Smith <ansuelsmth@gmail.com> (commit: 62850e7)
treewide: consolidate named GPIO patch into hack-5.10
ath79, lantiq, ipq40xx, ramips all use the OpenWrt-specific gpio-export functionality. Consolidate the patch that adds it under hack-5.10 since this logic is obviously not target-specific. For those who want to disable it, unsetting CONFIG_GPIO_SYSFS symbol will disable this code.
firmware-utils: zytrx: Add util for ZyXEL specific header
The ZyXEL NR7101 prepend an additional header to U-Boot images. This header use the TRX magic 0x30524448 (HDR0), but is incompatible with TRX images.
This code is reverse-engineered based on matching 32 bit numbers found in the header with lengths and different checksum calculations of the vendor images found on the device. The result was matched against the validation output produced by the bootloader to name the associated header fields.
================================================= Check image validation: Image1 Header Magic Number --> OK Image2 Header Magic Number --> OK Image1 Header Checksum --> OK Image2 Header Checksum --> OK Image1 Data Checksum --> OK Image2 Data Checksum --> OK Image1 Stable Flag --> Stable Image1 Try Counter --> 0 Image1: OK Image2: OK
The coverage and algorithm for the kernelChksum field is unknown. This field is not validated by the bootloader or the OEM firmware upgrade tool. It is therefore set to a static value for now.
The swVersion fields contain free form string values. The OEM firmware use ZyXEL structured version numbers as shown above. The strings are not interpreted or validated on boot, so they can be repurposed for anything we want the bootloader to display to the user. But the OEM web GUI fails to flash images with freeform strings.
The purpose of the other strings in the header is not known. The values appear to be static. We assume they are fixed for now, until we have other examples. One of these strings is the platform name, which is taken as an input parameter for support other members of the device family.
The ZyXEL NR7101 is an 802.3at PoE powered 5G outdoor (IP68) CPE with integrated directional 5G/LTE antennas.
Specifications:
- SoC: MediaTek MT7621AT - RAM: 256 MB - Flash: 128 MB MB NAND (MX30LF1G18AC) - WiFi: MediaTek MT7603E - Switch: 1 LAN port (Gigabiti) - 5G/LTE: Quectel RG502Q-EA connected by USB3 to SoC - SIM: 2 micro-SIM slots under transparent cover - Buttons: Reset, WLAN under same cover - LEDs: Multicolour green/red/yellow under same cover (visible) - Power: 802.3at PoE via LAN port
The device is built as an outdoor ethernet to 5G/LTE bridge or router. The Wifi interface is intended for installation and/or temporary management purposes only.
Remove the SIM/button/LED cover, the WLAN button and 12 screws holding the back plate and antenna cover together. The GPS antenna is fixed to the cover, so be careful with the cable. Remove 4 screws fixing the antenna board to the main board, again being careful with the cables.
A bluetooth TTL adapter is recommended for permanent console access, to keep the router water and dustproof. The 3.3V pin is able to power such an adapter.
MAC addresses:
OpenWrt OEM Address Found as lan eth2 08:26:97:*:*:BC Factory 0xe000 (hex), label wlan0 ra0 08:26:97:*:*:BD Factory 0x4 (hex) wwan0 usb0 random
WARNING!!
ISP managed firmware might at any time update itself to a version where all known workarounds have been disabled. Never boot an ISP managed firmware with a SIM in any of the slots if you intend to use the router with OpenWrt. The bootloader lock can only be disabled with root access to running firmware. The flash chip is physically inaccessible without soldering.
Installation from OEM web GUI:
- Log in as "supervisor" on https://172.17.1.1/ - Upload OpenWrt initramfs-recovery.bin image on the Maintenance -> Firmware page - Wait for OpenWrt to boot and ssh to root@192.168.1.1 - (optional) Copy OpenWrt to the recovery partition. See below - Sysupgrade to the OpenWrt sysupgrade image and reboot
Installation from OEM ssh:
- Log in as "root" on 172.17.1.1 port 22022 - scp OpenWrt initramfs-recovery.bin image to 172.17.1.1:/tmp - Prepare bootloader config by running: nvram setro uboot DebugFlag 0x1 nvram setro uboot CheckBypass 0 nvram commit - Run "mtd_write -w write initramfs-recovery.bin Kernel" and reboot - Wait for OpenWrt to boot and ssh to root@192.168.1.1 - (optional) Copy OpenWrt to the recovery partition. See below - Sysupgrade to the OpenWrt sysupgrade image and reboot
Copying OpenWrt to the recovery partition:
- Verify that you are running a working OpenWrt recovery image from flash - ssh to root@192.168.1.1 and run: fw_setenv CheckBypass 0 mtd -r erase Kernel2 - Wait while the bootloader mirrors Image1 to Image2
NOTE: This should only be done after successfully booting the OpenWrt recovery image from the primary partition during installation. Do not do this after having sysupgraded OpenWrt! Reinstalling the recovery image on normal upgrades is not required or recommended.
Installation from Z-Loader:
- Halt boot by pressing Escape on console - Set up a tftp server to serve the OpenWrt initramfs-recovery.bin image at 10.10.10.3 - Type "ATNR 1,initramfs-recovery.bin" at the "ZLB>" prompt - Wait for OpenWrt to boot and ssh to root@192.168.1.1 - Sysupgrade to the OpenWrt sysupgrade image
NOTE: ATNR will write the recovery image to both primary and recovery partitions in one go.
Booting from RAM:
- Halt boot by pressing Escape on console - Type "ATGU" at the "ZLB>" prompt to enter the U-Boot menu - Press "4" to select "4: Entr boot command line interface." - Set up a tftp server to serve the OpenWrt initramfs-recovery.bin image at 10.10.10.3 - Load it using "tftpboot 0x88000000 initramfs-recovery.bin" - Boot with "bootm 0x8800017C" to skip the 380 (0x17C) bytes ZyXEL header
This method can also be used to RAM boot OEM firmware. The warning regarding OEM applies! Never boot an unknown OEM firmware, or any OEM firmware with a SIM in any slot.
NOTE: U-Boot configuration is incomplete (on some devices?). You may have to configure a working mac address before running tftp using "setenv eth0addr <mac>"
Unlocking the bootloader:
If you are unebale to halt boot, then the bootloader is locked.
The OEM firmware locks the bootloader on every boot by setting DebugFlag to 0. Setting it to 1 is therefore only temporary when OEM firmware is installed.
- Run "nvram setro uboot DebugFlag 0x1; nvram commit" in OEM firmware - Run "fw_setenv DebugFlag 0x1" in OpenWrt
NOTE: OpenWrt does this automatically on first boot if necessary
NOTE2: Setting the flag to 0x1 avoids the reset to 0 in known OEM versions, but this might change.
WARNING: Writing anything to flash while the bootloader is locked is considered extremely risky. Errors might cause a permanent brick!
Enabling management access from LAN:
Temporary workaround to allow installing OpenWrt if OEM firmware has disabled LAN management:
- Connect to console - Log in as "root" - Run "iptables -I INPUT -i br0 -j ACCEPT"
Notes on the OEM/bootloader dual partition scheme
The dual partition scheme on this device uses Image2 as a recovery image only. The device will always boot from Image1, but the bootloader might copy Image2 to Image1 under specific conditions. This scheme prevents repurposing of the space occupied by Image2 in any useful way.
Validation of primary and recovery images is controlled by the variables CheckBypass, Image1Stable, and Image1Try.
The bootloader sets CheckBypass to 0 and reboots if Image1 fails validation.
If CheckBypass is 0 and Image1 is invalid then Image2 is copied to Image1.
If CheckBypass is 0 and Image2 is invalid, then Image1 is copied to Image2.
If CheckBypass is 1 then all tests are skipped and Image1 is booted unconditionally. CheckBypass is set to 1 after each successful validation of Image1.
Image1Try is incremented if Image1Stable is 0, and Image2 is copied to Image1 if Image1Try is 3 or larger. But the bootloader only tests Image1Try if CheckBypass is 0, which is impossible unless the booted image sets it to 0 before failing.
The system is therefore not resilient against runtime errors like failure to mount the rootfs, unless the kernel image sets CheckBypass to 0 before failing. This is not yet implemented in OpenWrt.
Setting Image1Stable to 1 prevents the bootloader from updating Image1Try on every boot, saving unnecessary writes to the environment partition.
Keeping an OpenWrt initramfs recovery as Image2 is recommended primarily to avoid unwanted OEM firmware boots on failure. Ref the warning above. It enables console-less recovery in case of some failures to boot from Image1.
186af01047b2 mt76: mt7921: introduce MCU_EVENT_LP_INFO event parsing 93b5c28c97d5 mt76: mt7921: add rcu section in mt7921_mcu_tx_rate_report a8e89c5a1d1f mt76: testmode: add support to send larger packet a0cc9a9e3877 mt76: mt7915: rework mt7915_tm_set_tx_len() c8b96630324e mt76: mt7915: fix rate setting of tx descriptor in testmode 22fd2958c42a mt76: mt7615: fix memleak when mt7615_unregister_device() 7401e0db3143 mt76: mt7915: fix memleak when mt7915_unregister_device() c3656268b3f6 mt76: mt7915: only free skbs after mt7915_dma_reset() when reset happens 0ce955b04ba8 mt76: mt7615: only free skbs after mt7615_dma_reset() when reset happens b03d1e62acf7 mt76: mt7615: use ieee80211_free_txskb() in mt7615_tx_token_put() 5ac02e22fb03 mt76: flush tx status queue on DMA reset c71f609b398a mt76: sync with upstream changes 23ecadd4af77 mt76: mt7615: fix hardware error recovery for mt7663 57a899ee3c3c mt76: mt7615: fix entering driver-own state on mt7663 42a2dddb706b mt76: mt7615: load ROM patch before checking patch semaphore status cf0e406af84a mt76: mt7915: add support for applying pre-calibration data 459940ccbc58 mt76: mt7921: move hw configuration in mt7921_register_device 0a094b11f3c0 mt76: improve mcu error logging bf536832e37d mt76: mt7921: run mt7921_mcu_fw_log_2_host holding mt76 mutex 7616f4f78163 mt76: mt7921: add wifisys reset support in debugfs e620bd881ef5 mt76: mt7921: abort uncompleted scan by wifi reset e8dacf59ab1c mt76: mt7915: rework the flow of txpower setting c8c78e577236 mt76: mt7915: directly read per-rate tx power from registers 1622bf4f8705 mt76: mt7921: add mt7921_dma_cleanup in mt7921_unregister_device ef96fafad8a9 mt76: Convert to DEFINE_SHOW_ATTRIBUTE 90e4bfea2948 mt76: mt7921: do not use 0 as NULL pointer 0a139d7f5966 mt76: connac: move mcu_update_arp_filter in mt76_connac module de26c73ce3c2 mt76: mt7921: remove leftover function declaration 1c0b6cb4f942 mt76: mt7921: fix a race between mt7921_mcu_drv_pmctrl and mt7921_mcu_fw_pmctrl 2923e3e2b8e4 mt76: mt7663: fix a race between mt7615_mcu_drv_pmctrl and mt7615_mcu_fw_pmctrl 74d0fdaa7a99 mt76: connac: introduce wake counter for fw_pmctrl synchronization 28c87e09a5ea mt76: mt7921: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx path 36f664edc7db mt76: mt7663: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx path 51b3d1a9a2b7 mt76: dma: add the capability to define a custom rx napi poll routine 4f1339c9fb72 mt76: mt7921: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx/rx napi 1bc5e67a60be mt76: mt7663: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx/rx napi 325f7b451c03 mt76: connac: unschedule ps_work in mt76_connac_pm_wake 12115052a02f mt76: connac: check wake refcount in mcu_fw_pmctrl e5d28e3cef66 mt76: connac: remove MT76_STATE_PM in mac_tx_free 475112a3cdcc mt76: mt7921: get rid of useless MT76_STATE_PM in mt7921_mac_work 112998f32d85 mt76: connac: alaways wake the device before scanning 4334f3e2fc43 mt76: mt7615: rely on pm refcounting in mt7615_led_set_config 0562380659ad mt76: connac: do not run mt76_txq_schedule_all directly acfa78df5708 mt76: connac: use waitqueue for runtime-pm ca74a4cd0722 mt76: remove MT76_STATE_PM in tx path 0c2d3e74852e mt76: mt7921: add awake and doze time accounting 45e0eefffe9f mt76: mt7921: enable sw interrupts fd2ff641166f mt76: mt7615: Fix a dereference of pointer sta before it is null checked 7e2521468767 mt76: mt7921: move mt7921_dma_reset in dma.c c9dd6b1fa171 mt76: mt7921: introduce mt7921_wpdma_reset utility routine 2ac7c7e9c568 mt76: mt7921: introduce mt7921_dma_{enable,disable} utilities 662a89f2b9d1 mt76: mt7921: introduce mt7921_wpdma_reinit_cond utility routine 614efe9e9180 mt76: connac: introduce mt76_connac_mcu_set_deep_sleep utility 0dbb16ef39d8 mt76: mt7921: enable deep sleep when the device suspends 3c19f569cc70 mt76: mt7921: fix possible invalid register access ade1f5aad4c6 mt76: move token_lock, token and token_count in mt76_dev 8d5c456be1ff mt76: move token utilities in mt76 common module fb04d9df5e52 mt76: mt7915: do not read rf value from efuse in flash mode 2126b2176336 mt76: mt7921: get rid of mcu_reset function pointer d325b7eff1b1 mt76: mt7921: improve doze opportunity 2ae25c7e547e mt76: mt7663: add awake and doze time accounting 349bbb9d6f13 mt76: connac: unschedule mac_work before going to sleep 98a235004dea mt76: mt7921: mt7921_stop should put device in fw_own state 63d80b9ab251 mt76: mt7921: introduce mt7921_mcu_sta_add routine 3c5bf837fdbd mt76: mt7615: fix a precision vs width bug in printk ded14da5eacc mt76: mt7915: fix a precision vs width bug in printk aaf0d254f9ea mt76: mt7921: fix a precision vs width bug in printk 757af5c67d32 mt76: move mt76_token_init in mt76_alloc_device ed41ed73a495 mt76: mt7921: reinit wpdma during drv_own if necessary 92fb81e085c6 mt76: mt7921: fix possible AOOB issue in mt7921_mcu_tx_rate_report 53d915a23bc9 mt76: connac: do not schedule wake_work if the runtime-pm is disabled 23fe1bdcf15a mt76: connac: do not schedule mac_work if the device is not running e5b19336c58e mt76: mt7615: do not set MT76_STATE_PM at bootstrap 0fc2136a61dd mt76_connac_mcu: move mt76_connac_mcu_update_arp_filter outside of CONFIG_PM e693f3e23e06 mt76: mt7915: add MSI support 5231e7300fa4 mt7915: disable ASPM 554b50dabf54 mt76: connac: fix uninitialized HT A-MPDU setting field in STA_REC_PHY 43b9c0a838bb mt76: mt7921: fix max aggregation subframes setting 5a387a0a3004 mt76: mt7921: enable rx hw de-amsdu c8cbcb87be07 mt76: connac: add missing configuration in mt76_connac_mcu_wtbl_hdr_trans_tlv 55921e57b380 mt76: mt7921: enable rx header traslation offload 01441f67d8b2 mt76: mt7921: enable rx csum offload c9ab76dd93a0 mt76: mt7915: move mt7915_queue_rx_skb to mac.c caedb4c4ee41 mt76: mt7615: fix fixed-rate tx status reporting c6ae95d43e6d mt76: improve tx status codepath 27d468d094e6 mt76: mt7915: rework tx rate reporting 3b4ca5b09e2c mt76: mt7615: avoid use of ieee80211_tx_info_clear_status e1f07d7f1cb9 mt76: mt7603: avoid use of ieee80211_tx_info_clear_status 18513ba5fbc2 mt76: mt7915: add support for tx status reporting 35f189cf81b2 mt76: mt7915: fix uninitialized variable in MSI error handling 9e928ac1ea9b mt76: dma: use ieee80211_tx_status_ext to free packets when tx fails 628eee9c386c mt76: fill queue entry wcid for all skbs with a station a9bc4d94b7a1 mt76: intialize tx queue entry wcid to 0xffff by default 998ca8af7d17 mt76: mt7915: fix tssi indication field of DBDC NICs 7dd24b3cfacf mt76: mt7915: fix a signedness bug in mt7915_mcu_apply_tx_dpd() 535025d65d8d mt76: mt7915: cleanup mt7915_mcu_sta_rate_ctrl_tlv() ff8bbe22dd87 mt76: mt7915: add .set_bitrate_mask() callback
Signed-off-by: Felix Fietkau <nbd@nbd.name> (commit: 06f5e80)
The allows userspace LEDs to be created and controlled. This can be useful for testing triggers and can also be used to implement virtual LEDs.
Signed-off-by: Keith T. Garner <kgarner@kgarner.com> [squash fixup commit and improve option wording] Signed-off-by: Paul Spooren <mail@aparcar.org> (commit: 6a37286)
build: fix opkg install step for large package selection
When the list of packages to be installed in a built image exceeds a certain number, then 'opkg install' executed for target '$(curdir)/install' in package/Makefile fails with: /usr/bin/env: Argument list too long.
On Linux, the length of a command-line parameter is limited by MAX_ARG_STRLEN to max 128 kB.
To solve the problem, store the package list being passed to 'opkg install' in a temporary file and use the shell command substitution to pass the content of the file to 'opkg install'. This guarantees that the length of the command-line parameters passed to the bash shell is short.
The following bash script demonstrates the problem: ---------------------------------------------------------------------------- count=${1:-1000}
Test run: ---------------------------------------------------------------------------- $ ./test.sh 916 130989 $ ./test.sh 917 ./test.sh: line 14: /bin/env: Argument list too long 131132 ----------------------------------------------------------------------------
Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net> [reword commit subject] Signed-off-by: Paul Spooren <mail@aparcar.org> (commit: 1854aee)
build: kernel2minor: work around path length limit
When building for MikroTik devices the kernel2minor tool will sometimes fail with:
Can't get lstat from kernel file!: No such file or directory.
This is because kernel2minor expects paths no longer than 250 chars. To work around this the include/image-commands.mk has been modified to copy the kernel to a temporary file (/tmp/tmp.XXXXXXXXXX) before calling kernel2minor.
Signed-off-by: François Chavant <francois@chavant.info> (commit: 5a96081)
Several security issues in the 802.11 implementations were found by Mathy Vanhoef (New York University Abu Dhabi), who has published all the details at
https://papers.mathyvanhoef.com/usenix2021.pdf
Specifically, the following CVEs were assigned:
* CVE-2020-24586 - Fragmentation cache not cleared on reconnection * CVE-2020-24587 - Reassembling fragments encrypted under different keys * CVE-2020-24588 - Accepting non-SPP A-MSDU frames, which leads to payload being parsed as an L2 frame under an A-MSDU bit toggling attack * CVE-2020-26139 - Forwarding EAPOL from unauthenticated sender * CVE-2020-26140 - Accepting plaintext data frames in protected networks * CVE-2020-26141 - Not verifying TKIP MIC of fragmented frames * CVE-2020-26142 - Processing fragmented frames as full frames * CVE-2020-26143 - Accepting fragmented plaintext frames in protected networks * CVE-2020-26144 - Always accepting unencrypted A-MSDU frames that start with RFC1042 header with EAPOL ethertype * CVE-2020-26145 - Accepting plaintext broadcast fragments as full frames * CVE-2020-26146 - Reassembling encrypted fragments with non-consecutive packet numbers * CVE-2020-26147 - Reassembling mixed encrypted/plaintext fragments
In general, the scope of these attacks is that they may allow an attacker to * inject L2 frames that they can more or less control (depending on the vulnerability and attack method) into an otherwise protected network; * exfiltrate (some) network data under certain conditions, this is specific to the fragmentation issues.
A subset of these issues is known to apply to the Linux IEEE 802.11 implementation (mac80211). Where it is affected, the attached patches fix the issues, even if not all of them reference the exact CVE IDs.
In addition, driver and/or firmware updates may be necessary, as well as potentially more fixes to mac80211, depending on how drivers are using it.
Specifically, for Intel devices, firmware needs to be updated to the most recently released versions (which was done without any reference to the security issues) to address some of the vulnerabilities.
To have a single set of patches, I'm also including patches for the ath10k and ath11k drivers here.
We currently don't have information about how other drivers are, if at all, affected.
Signed-off-by: Felix Fietkau <nbd@nbd.name> (commit: 025bd93)
c7dd54a22e30 mt76: connac: skip wtbl reset on sta disconnect 3511fd430356 mt76: validate rx A-MSDU subframes aedc3145de6e mt76: fix possible NULL pointer dereference in mt76_tx 5c2baab92cd0 mt76: mt7615: fix NULL pointer dereference in tx_prepare_skb() af21659ee834 mt76: mt76x0: use dev_debug instead of dev_err for hw_rf_ctrl e423c16f16f7 mt76: mt7615: free irq if mt7615_mmio_probe fails f2d0da8da9b7 mt76: mt7663: enable hw rx header translation d2713a5d9de9 mt76: mt7921: fix mt7921_wfsys_reset sequence ce5f32d84f33 mt76: mt7921: Don't alter Rx path classifier 8ab8c7747197 mt76: connac: fw_own rely on all packet memory all being free a747b0bb4956 mt76: mt7921: enable deep sleep at runtime 2e6e999509b1 mt76: mt7921: add deep sleep control to runtime-pm knob 30bcb2338ce2 mt76: connac: fix WoW with disconnetion and bitmap pattern 56518f4a126e mt76: mt7921: consider the invalid value for to_rssi e969ab10a034 mt76: mt7921: add back connection monitor support
Signed-off-by: Felix Fietkau <nbd@nbd.name> (commit: b5fb676)
Before this commit, it was assumed that mkhash is in the PATH. While this was fine for the normal build workflow, this led to some issues if
make TOPDIR="$(pwd)" -C "$pkgdir" compile
was called manually. In most of the cases, I just saw warnings like this:
make: Entering directory '/home/.../package/gluon-status-page' bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found [...]
While these were only warnings and the package still compiled sucessfully, I also observed that some package even fail to build because of this.
After applying this commit, the variable $(MKHASH) is introduced. This variable points to $(STAGING_DIR_HOST)/bin/mkhash, which is always the correct path.
PREFER_IPV4_ADDRESS is broken on IPv6-only hosts, as it causes busybox utilities (ping, traceroute, ntpd) to forcibly use the A record instead of the AAAA record when resolving a DNS name. This obviously fails when there is no IPv4 connectivity. Since IPv6-only hosts or routers will only become more common over time, disable PREFER_IPV4_ADDRESS to support this use-case.
As a side-effect, disabling PREFER_IPV4_ADDRESS changes the default resolution behaviour of busybox utilities on dual-stack hosts. Busybox utilities now simply use the order given by getaddrinfo(), so they will now prefer IPv6 addresses when resolving a name with both A and AAAA records if there is IPv6 connectivity. This is in line with RFC 6724.
PREFER_IPV4_ADDRESS was likely intended to work around naive implementations of getaddrinfo() that could return AAAA records first, even on an IPv4-only host. But both musl (since 1.1.3) and glibc correctly implement RFC 6724 for getaddrinfo() and check connectivity to determine the correct order in which to return records. On IPv4-only hosts, getaddrinfo() will return A records first, so there is no need for the PREFER_IPV4_ADDRESS hack.
See also: https://bugs.busybox.net/show_bug.cgi?id=12381
6a6011d uclient-http: set eof mark when content-length is 0 19571e4 tests: fix help usage test for uclient built with sanitizer c5fc04b tests: fix help usage test
c44b40b overlay: fix syncronizing typo b5397a1 fstools: block: fix segfault on mount with no target bd7cc8d block: use dynamically allocated target string 6d8450e blockd: use allocated strings instead of fixed buffers d47909e libblkid-tiny: fix buffer overflow 67d2297 block: match device path instead of assuming /dev/%s 2aeba88 block: allow autofs and umount commands also on MTD/UBI
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: f8c98ee)
When building GRUB with binutils 2.35.2 or later, an error occurs due to a section .note.gnu.property that is placed at an offset such that objcopy needs to pad the img file with zeros. This in turn causes the following error: "error: Decompressor is too big.".
The fix accepted by upstream patches a python script that isn't executed at all when building GRUB with OpenWrt buildroot. There's another patch that patches the files generated by that python script directly, but by including it we would deviate further from upstream. Instead of doing that, simply bump to the latest release candidate.
As one of the fixes for the CVEs causes grub to crash on some x86 hardware using legacy BIOS when compiled with -O2, filter -O2 and -O3 out of TARGET_CFLAGS.
Fixes the following CVEs: - CVE-2020-14372 - CVE-2020-25632 - CVE-2020-25647 - CVE-2020-27749 - CVE-2020-27779 - CVE-2021-3418 - CVE-2021-20225 - CVE-2021-20233
ramips: fix SUPPORTED_DEVICES for ALFA Network devices
Vendor firmware expects model name without manufacturer name inside 'supported_devices' part of metadata. This allows direct upgrade to OpenWrt from vendor's GUI.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com> (commit: cf3f1f8)
Remove vn call in favour of v call. This commit serves as preparation for removing the v function call.
Signed-off-by: Florian Eckert <fe@dev.tdt.de> [alter slightly to prevent double space after colon] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: e0c6506)
octeon: create shared DTSI for Ubiquiti E300 platform
EdgeRouter 4 and upcoming EdgeRouter 6P and 12 have similar setup, so create a shared DTSI to prevent duplicate code.
Signed-off-by: Dan Brown <danbrown@gmail.com> [reorder/squash commits, add description, move ethernet@0 to DTS] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 8e7c9f5)
octeon: add new target and support for Ubiquiti EdgeRouter 6P
Ubiquiti EdgeRouter 6P is 6 port router with similar specifications as the EdgeRouter 4, support for which was added in commit dd651e54cc5eadba480a56a7d2c18471e560f491
There are five 10/100/1000 Mbps RJ/Copper ports and one 1000 Mbps SFP port.
SoC: Octeon Cavium 7130 (Cavium 3) at 1000MHz Memory: 1GiB DDR3 Flash: 2x2M chips with uboots (chainloaded) + 512K eeprom LEDs: 1x for power status (white/blue, controllable) and 6x for ethernet and SFP ports (no control over them) Buttons: 1x Reset Serial: 1x RJ45 port on front panel. 115200 baud, 8N1 USB: 1x USB3.0 on front panel MII: 1x QSGMII from SoC PHY: 1x Vitesse VSC8504 of which 4 ports are used (phys 4-7) 1x Vitesse VSC8514 of which 2 ports are used (phys 8-9)
Network port mapping - eth0 on device maps to lan0 and phy5 - eth1 on device maps to lan1 and phy6 - eth2 on device maps to lan2 and phy7 - eth3 on device maps to lan3 and phy8 - eth4 on device maps to lan4 and phy9 - eth5 (SFP) on device maps to lan5 and phy4
What is not working: - There is no port status available before it goes up - SFP have no additional status and presented as no different from eth - Power-over-ethernet (passive) support has not been tested
How to flash the firmware: - copy openwrt-octeon-ubnt_edgerouter-6p-initramfs-kernel.bin and openwrt-octeon-ubnt_edgerouter-6p-squashfs-sysupgrade.tar to USB flash drive that is formatted to vfat/fat32 - connect USB flash drive to EdgeRouter 6P front USB port - connect serial cable using front RJ45 port (115200 baud, 8N1) - connect power to cable to EdgeRouter 6P - connect terminal to the console to see uboot boot process - interrupt boot by pressing button(s) on your keyboard to log in to the uboot - detect usb connected flash drives by typing to the console: usb start - after drive is detected load initramfs+kernel to the memory by typing: fatload usb 0:1 0x20000000 openwrt-octeon-ubnt_edgerouter-6p-initramfs-kernel.bin - after initramfs+kernel is loaded to the memory load it by typing: bootoctlinux 0 numcores=4 endbootargs mem=0 - boot process should finish and you will be greeted with console after pressing enter - create directory to mount usb flash drive to by typing: mkdir /tmp/sda - mount flash drive to that directory by typing: mount /dev/sda1 /tmp/sda - flash firmware to router internal storage by typing: sysupgrade /tmp/sda/openwrt-octeon-ubnt_edgerouter-6p-squashfs-sysupgrade.tar - device will reboot and after it gets up you will have edgerouter 6p running openwrt
Signed-off-by: Dan Brown <danbrown@gmail.com> [reorder/squash patches, move ethernet@0 to DTS, share image setup] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 6ee3680)
COMFAST CF-E375AC is a ceiling mount AP with PoE support, based on Qualcomm/Atheros QCA9563 + QCA9886 + QCA8337.
Short specification:
2x 10/100/1000 Mbps Ethernet, with PoE support 128MB of RAM (DDR2) 16 MB of FLASH 3T3R 2.4 GHz, 802.11b/g/n 2T2R 5 GHz, 802.11ac/n/a, wave 2 built-in 5x 3 dBi antennas output power (max): 500 mW (27 dBm) 1x RGB LED, 1x button built-in watchdog chipset
Flash instruction: 1) Original firmware is based on OpenWrt. Use sysupgrade image directly in vendor GUI.
2) TFTP 2.1) Set a tftp server on your machine with a fixed IP address of 192.168.1.10. A place the sysupgrade as firmware_auto.bin. 2.2) boot the device with an ethernet connection on fixed ip route 2.3) wait a few seconds and try to login via ssh
3) TFTP trough Bootloader 3.1) open the device case and get a uart connection working 3.2) stop the autoboot process and test connection with serverip 3.3) name the sysupgrade image firmware.bin and run firmware_upg
MAC addresses: Though the OEM firmware has four adresses in the usual locations, it appears that the assigned addresses are just incremented in a different way:
ZiKing CPE46B is a POE outdoor 2.4ghz device with an integrated directional antenna. It is low cost and mostly available via Aliexpress, references can be found at: - https://forum.openwrt.org/t/anddear-ziking-cpe46b-ar9331-ap121/60383 - https://git.lsd.cat/g/openwrt-cpe46b
Specifications:
- Atheros AR9330 - 32MB of RAM - 8MB of flash (SPI NOR) - 1 * 2.4ghz integrated antenna - 2 * 10/100/1000 ethernet ports (1 POE) - 3 * Green LEDs controlled by the SoC - 3 * Green LEDs controlled via GPIO - 1 * Reset Button controlled via GPIO - 1 * 4 pin serial header on the PCB - Outdoor packaging
Flashing instruction:
You can use sysupgrade image directly in vendor firmware which is based on OpenWrt/LEDE. In case of issues with the vendor GUI, the vendor Telnet console is vulnerable to command injection and can be used to gain a shell directly on the OEM OpenWrt distribution.
Signed-off-by: Giulio Lorenzo <salveenee@mortemale.org> [fix whitespaces, drop redundant uart status and serial0, drop num-chipselects, drop 0x1002 MAC address for wmac] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: b108ed0)
02dd2f2df7cb fix unannotated fall-through warnings 3052f2f67686 extdev: remove unused function 2a97fd006c3b device: add support for configuring devices with external auth handler 87e469be0c08 wireless: fix memory corruption bug when using vlans/station entries in the config 7277764bf817 bridge: rename "ifname" attribute to "ports"
Signed-off-by: Felix Fietkau <nbd@nbd.name> (commit: 829b5c2)
use AUTORELEASE since BusyBox is often updaten and PKG_RELEASE is not consistently bumped. Also use SPDX license headers to be machine readable and bump the copyright year to 2021.
Signed-off-by: Paul Spooren <mail@aparcar.org> (commit: 25fdb42)
base-files: generate "device" UCI type section for bridge
This switches from the old way of defining bridges in an "interface" UCI section type (that should be used for layer 3 only). From now a defualt board switch will have its own "device" UCI section type. It's a new & preferred way of defining L2 devices.
On login busybox shows a timestamp per default contianing the build date. Since the build date isn't reproducible per default this behaviour was disabled by default via 34df4d40 "busybox: disable timestamp in version".
This commit modifies busybox so that the printed timestamp reproducible using SOURCE_DATE_EPOCH and therefore shouldn't be disabled anymore.
The nslookup_lede/openwrt applet was introduced in de5b8e5. It was introduced because:
Add a new LEDE nslookup applet which is compatible with musl libc and providing more features like ability to specify query type.
In contrast to busybox' builtin nslookup applet, this variant does not rely on libc resolver internals but uses explicit send logic and the libresolv primitives to parse received DNS responses.
In busybox this applet is added in 0dd3be8. In particular, this commit introduces the variable NSLOOKUP_BIG. We set the default to true and so nothing changes.
Signed-off-by: Nick Hainke <vincent@systemli.org> (commit: b36b8b6)
/etc/syslog.conf is used by sysklogd, and /etc/crontabs is used by crond, both features of busybox. Given this, ownership for these files should be bound to busybox, especially if one day there's a way to do an in-place opkg update of busybox.
There's also the busybox provided syslogd which uses this file if CONFIG_BUSYBOX_FEATURE_SYSLOGD_CFG is set.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> (commit: b810d64)
base-files: generate bridge device sections with br- name prefix
Missing br- prefix could result in name conflict between DSA port interface and bridge interface. Some devices with just one LAN port use "lan" interface name for DSA port. Trying to create bridge with the same "lan" name was failing.
Reported-by: David Bauer <mail@david-bauer.net> Fixes: 43fc720657c6 ("base-files: generate "device" UCI type section for bridge") Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (commit: 0e45966)
- drop unused 'UBOOT' variable from 'Device/apalis' recipe - fix 'KERNEL_SUFFIX' for 'Device/cubox-i' (should be '-zImage') - drop redundant 'DEVICE_{VENDOR,MODEL}' from 'Device/ventana-large' - other, minor fixes
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com> (commit: 7e7cef6)
uboot-envtools: support uci-default config also per subtargets
The current version of 'uboot-envtools' package generates dedicated uci-default file only per target. This change makes it possible to use subtarget-specific files, with name pattern: 'target_subtarget' (example: 'ath79_nand'). The subtarget-specific files will take precedence over target-specific one.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com> (commit: 6f3a05e)
"I have build a fresh master branch recently, Since your last change [1] on grub2, I have now a new dependency on liblzma for the install package grub2-editenv.
This is a hotfix but I dont´t think this is the final solution, because lzma is provided by the package xz. And This is maintained in the package feed [not the core]"
Dirk stated & offered his patch to disable liblzma and thus resolve the 'out of core dependency' problem:
"LZMA is used in mkimage.c disabling it prints Without liblzma (no support for XZ-compressed mips images) (explicitly disabled) (see configure.ac)
liblzma is autodetected so this issue was present but hidden somehow
[unsure: grep/image generation does not use grub with that option] OpenWrt does not use that feature currently
[!] some scripts and examples use --compression=xz or -C xz and those will break
grub has an internal xzlib for different "lzma" functionality (ext. LIBLZMA from XZ (GRUB_COMPRESSION_XZ) vs. GRUB_COMPRESSION_LZMA)"
Hopefully fixes e74d81ece2e2932a4f370d8e6d180061a6a2c229 and doesn't break anything else.
Signed-off-by: Dirk Neukirchen <plntyk.lede@plntyk.name> [include Florian's description of how problem 1st encountered] [bump package release] Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> (commit: 622f8ef)
Since commit 6467de5a8840 ("Randomize z ordinates in scalar mult when timing resistant") wolfssl requires a RNG for an EC key when the hardened built option is selected.
wc_ecc_set_rng is only available when built hardened, so there is no safe way to install the RNG to the key regardless whether or not wolfssl is compiled hardened.
Always export wc_ecc_set_rng so tools such as hostapd can install RNG regardless of the built settings for wolfssl.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: ef9b103)
Since upstream commit 6467de5a8840 ("Randomize z ordinates in scalar mult when timing resistant") WolfSSL requires a RNG for the EC key when built hardened which is the default.
Set the RNG for the EC key to fix connections for OWE clients.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: ddcb970)
Removed/code was included upstream and therefore redundant: ramips/patches-5.4/999-fix-pci-init-mt7620.patch
All other patches automatically rebased.
* update_kernel.sh did not flag this yet it was included in 5.4.119[1], as a result of the rebase, I removed my testing lines since I did not go back to test built or to run test 5.4.119 with the removed patch present.
With some talk with the ARM maintainer, it was notice that enlarging the limit to the current value is VERY wrong and clash with other memory. A better solution would be to reduce the IO space from 1MB to 64K as probably it's a long lasting typo and even x86 arch doesn't have a IO space that big.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> (commit: e5d50f6)
Prevent build error on Alpine Linux host: libfakeroot.c error: conflicting types for 'id_t' Error relocating openwrt/staging_dir/host/lib/libfakeroot.so: SEND_GET_XATTR: symbol not found
Signed-off-by: Ruslan Isaev <legale.legale@gmail.com> (commit: 7a70f78)
Support for wolfSSL has been upstreamed to the master OpenVPN branch in f6dca235ae560597a0763f0c98fcc9130b80ccf4, so we can use wolfSSL directly in OpenVPN. So no more needed differnt SSL engine for OpenVPN in systems based on wolfSSL library Compiled && tested on ramips/mt7620, ramips/mt7621
Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com> (commit: b1baa01)
CONFIG_CRYPTO_PCOMP and CONFIG_CRYPTO_PCOMP2 have been removed in upstream commit[1]. This symbol doesn't exist since kernel 4.6 and this package is empty.
kexec-tools: add patch to fix issue with appended DTB and zImage on ARM
This patch fixes a recently found problem when a zImage passed to kexec-tools contains an appended DTB. In that case kexec boot fails because the decompressor wrongly tries to use the non-existing appended DTB instaed of the one passed in the register r2.
prereq-build: g++ formatting and consistency fixes
Remove \n that mangles output, and fix inconsistent version name check.
Example before:
Build dependency: Please install the GNU C++ Compiler (g++) 6 or later Build dependency: \nPlease reinstall the GNU C++ Compiler (4.8 or later) - it appears to be broken Build dependency: Please install ncurses. (Missing libncurses.so or ncurses.h)
Signed-off-by: Karl Palsson <karlp@tweak.net.au> (commit: 81d0ddc)
This adjusts the Makefile to use the new option to turn off the doc builds. It will not cause any problems except a warning about unused options if combined with a ccache source missing the upstream patch.
Since a config setting is required to re-enable the doc build this is equivalent to unconditionally disabling the docs if the config setting is not created.
Signed-off-by: David Adair <djabhead@aol.com> (commit: 2d15468)
treewide: Mark packages nonshared if they depend on @TARGET_
This marks all packages which depend on a target with @TARGET nonshared. If they are not marked nonshared they would be build by the SDK build and if this happens with a different SDK, then the SDK from the target the package depends on, the package would not be added to the index.
This should fix the image builder for some of these packages.
This should fix the image builder at least for bcm27xx/bcm2710 and bcm4908/generic.
base-files: fix configuration generation of network if "bridge" exists
After the commit 43fc720657c6e3b30c6ed89d7227ee6e646c158b ("base-files: generate "device UCI type section for bridge"), the wrong network configuration is generated for the devices that already have the bridge device section for VLAN, such as the devices in realtek target.
As a result, the bridge device by additional "device" section is specified to the "ports" option in the "bridge-vlan" section and netifd shuts down the switch and the ethernet when the network service started.
Fixes: 43fc720657 ("base-files: generate "device" UCI type section for bridge") Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> [rmilecki: use $ports for generate_bridge_vlan argument] Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (commit: 8cc4e87)
This fixes a regression introduced with commit 5ed1e5140a80558ab47fd70410ae3242bed5becf ("build: build kernel image before building modules/packages").
Before this commit the make target would always include "modules", resulting in a MODPOST and a complete Module.symvers file. Since this commit a MODPOST of the kernel modules is not guaranteed for kernels < 5.10. This results in some broken SDKs in which external packages that depend on exported symbols from kernel modules fail to compile.
Adding "modules" back to the calls to the CompileImage defines fixes the regression. For kernels > 5.10 this is not needed, but it doesn't cause any harm either.
Tested with kernels 5.4.x and 5.10.x.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net> (commit: 54070a1)
1) Use SPDX license headers to be machine readable. 2) Update copyright to 2021. 3) Use $(PROJECT_GIT) instead of manually specifying the git url. 4) Use $(AUTORELEASE) to automatically set the correct PKG_RELEASE.
Signed-off-by: Nick Hainke <vincent@systemli.org> (commit: 6687a24)
8fab0c9 iw: fix ftm_request missing arguments segfault e816fbc iw: fix mgmt dump missing arguments segfault 5d9d1b8 iw: Fix timestamp output on 32-bit architectures 4b25ae3 iw: fix pointer arithmetic in __print_he_capa c3df363 iw: add option to print human readable event time cd64525 iw: print ctrl port tx status event 0ba98b9 iw: use correct type in policy check for mesh 9e38dee iw: scan: fixup HE caps whitespace 17e8564 iw: scan: parse HE capabilities 5735e58 iw: util: factor out HE capability parser 6d8d507 iw: scan: add extension tag parsing b4e1ec4 man: update wikipage URL, reformat SEE ALSO section c56036a iw: enable 80MHz support for 6GHz band 11s mesh fa72728 iw: handle positive error codes gracefully 7ba9093 iw: scan: add flag for scanning colocated ap 5ec60ed iw: Add 'coloc' and 'flush' options to sched_scan f8ade75 iw: update wikipage URL b6f2dac iw: Add support for specifying the 160MHz bandwidth when setting the channel/frequency
Signed-off-by: Andre Heider <a.heider@gmail.com> (commit: b5420dd)
This fixes Gateworks Ventana 'DEVICE_NAME' variable which value wasn't adjusted during migration to common 'vendor_model' image naming scheme (fixes: FS#3825).
Furthermore, drop unused 'Build/boot-scr' recipe, get rid of redundant 'BOOT_SCRIPT' variable (use already provided 'DEVICE_NAME' instead) and drop custom 'DEVICE_NAME' variable from SolidRun CuBox-i image recipe (use default one instead).
Fixes: cbc8bcfbaa ("imx6: image: use vendor_model scheme") Signed-off-by: Piotr Dymacz <pepe2k@gmail.com> (commit: 8dba71d)
Device Configuration & Serial Port Pins --------------------------------------- ETH Ports: LAN4 LAN3 LAN2 LAN1 WAN _______________________ | | Serial Pins: | VCC GND TXD RXD | |_____________________|
LEDs: Power Wifi2G Wifi5G LAN WAN
Build Output ------------ The build will generate following set of files [1] openwrt-ramips-mt7621-tplink_archer-a6-v3-initramfs-kernel.bin [2] openwrt-ramips-mt7621-tplink_archer-a6-v3-squashfs-factory.bin [3] openwrt-ramips-mt7621-tplink_archer-a6-v3-squashfs-sysupgrade.bin
How to Use - Flashing from TP-Link Web Interface ------------------------------------------------ * Go to "Advanced/System Tools/Firmware Update". * Click "Browse" and upload the OpenWrt factory image: factory.bin[2] * Click the "Upgrade" button, and select "Yes" when prompted.
TFTP Booting ------------ Setup a TFTP boot server with address 192.168.0.5. While starting U-boot press '4' key to stop autoboot. Copy the initramfs-kernel.bin[1] to TFTP server folder, rename as test.bin From u-boot command prompt run tftpboot followed by bootm.
Recovery -------- Archer A6 V3 has recovery page activated if SPI booting from flash fails. Recovery page can be activated from serial console only. Press 'x' while u-boot is starting Note: TFTP boot can be activated only from u-boot serial console. Device recovery address: 192.168.0.1
ramips: add support for TP-Link Archer C6U v1 (EU)
This patch adds support for TP-Link Archer C6U v1 (EU). The device is also known in some market as Archer C6 v3. This patch supports only Archer C6U v1 (EU).
Install the OpenWrt factory image for C6U is from the TP-Link web interface.
1) Go to "Advanced/System Tools/Firmware Update". 2) Click "Browse" and upload the OpenWrt factory image: openwrt-ramips-mt7621-tplink_archer-c6u-v1-squashfs-factory.bin. 3) Click the "Upgrade" button, and select "Yes" when prompted.
Recovery to stock firmware: --------------------------
The C6U bootloader has a failsafe mode that provides a web interface (running at 192.168.0.1) for reverting back to the stock TP-Link firmware. The failsafe interface is triggered from the serial console or on failed kernel boot. Unfortunately, there's no key combination that enables the failsafe mode. This gives us two options for recovery:
1) Recover using the serial console (J1 header). The recovery interface can be selected by hitting 'x' when prompted on boot.
2) Trigger the bootloader failsafe mode. A more dangerous option is force the bootloader into recovery mode by erasing the OpenWrt partition from the OpenWrt's shell - e.g "mtd erase firmware". Please be careful, since erasing the wrong partition can brick your device.
MAC addresses: -------------
OEM firmware configuration: D8:07:B6:xx:xx:83 : 5G D8:07:B6:xx:xx:84 : LAN (label) D8:07:B6:xx:xx:84 : 2.4G D8:07:B6:xx:xx:85 : WAN
Signed-off-by: Georgi Vlaev <georgi.vlaev@konsulko.com> (commit: a46ad59)
There are two known options: 1) The Luci-based UI. 2) Press and hold the reset button during power up. The router will request 'recovery.bin' from a TFTP server at 192.168.1.88.
Both options require a signed firmware binary. The openwrt image supplied by cudy is signed and can be used to install unsigned images.
R4 & R5 need to be shorted (0-100Ω) for the UART to work.
Signed-off-by: Leon M. George <leon@georgemail.eu> [remove non-required switch-port node - remove trgmii phy-mode] Signed-off-by: David Bauer <mail@david-bauer.net> (commit: 3501db9)
Channel 100 is a valid channel to choose for 80MHz operation. However, it's assigned to 5500 MHz, not 5550MHz. In fact, there is no channel assigned to this frequency.
Fix this obbvious typo to allow ACS to select channel 100 for 80 MHz operation again.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: 553cc47)
This commit adds support for the Wavlink WL-WN578A2 dual-band wall-plug wireless router. This device is also sold under the name SilverCrest SWV 733 A2.
1. Move code above interface generation It results in more logical order. Device gets its config section above interface section. 2. Drop the loop We have separated code handling bridges now so $device should be guaranteed to contain a single device name. 3. Drop section name It's not required by netifd or LuCI & it's not needed by this script as $device contains a single device name now.
This update only adds one commit: b102f19bcc53 tests: Opportunistic Wireless Encryption - SA Query
The main reason for the bump is to have a newer PKG_SOURCE_DATE, so we can reset PKG_RELEASE to 1 (this has not been done for the most recent bump), and replace it with AUTORELEASE.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 54cc175)
This script hasn't seen an update in multiple years, update it to the latest version provided upstream. Both `config.guess` and `config.sub` are copied from upstream[1] and not modified.
The full changelog is available within the upstream repository[1].
[1]: https://git.savannah.gnu.org/git/config.git
Signed-off-by: Paul Spooren <mail@aparcar.org> (commit: ec4852f)
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> [also add for 5.10, remove from layerscape target config] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 37b5f7c)
bddc1db76d0f mt76: mt7915: drop the use of repeater entries for station interfaces 3c90f35dddac mt76: mt7915: add thermal sensor device support afab0e8202ff mt76: mt7915: add thermal cooling device support 41cf02184699 mt76: mt7615: add thermal sensor device support 2ac6b8762565 mt76: connac: update BA win size in Rx direction ddb301127291 mt76: mt7921: fix reset under the deep sleep is enabled e4cbefd1d69a mt76: mt7921: avoid unnecessary consecutive WiFi resets 393eea2034d7 mt76: mt7921: fix invalid register access in wake_work a15d46407ffa mt76: mt7921: fix OMAC idx usage e4d267d8e900 mt76: mt7921: enable runtime pm by default 50fd8ce2412a mt76: connac: add bss color support for sta mode e29058c3c860 mt76: mt7921: return proper error value in mt7921_mac_init c89c8c347b1e mt76: mt7921: do not schedule hw reset if the device is not running 9f7bb428e587 mt76: mt7921: reset wfsys during hw probe 22ea365913b5 mt76: mt7915: add .offset_tsf callback ad91f8e8e494 mt76: mt7615: add .offset_tsf callback 6f871f35e3c1 mt76: mt7915: use mt7915_mcu_get_txpower_sku() to get per-rate txpower 597b68b7daa3 mt76: mt7615: remove useless if condition in mt7615_add_interface() 3945264468eb mt76: testmode: fix memory leak in mt76_testmode_alloc_skb bdcc57a11606 mt76: testmode: remove unnecessary function calls in mt76_testmode_free_skb a9763452601d mt76: testmode: remove undefined behaviour in mt76_testmode_alloc_skb 4aef2a2be464 mt76: mt7615: fix potential overflow on large shift d9dd7635b055 mt76: mt7915: use mt7915_mcu_get_mib_info() to get survey data d740e921758a mt76: mt7921: introduce mac tx done handling 259ddfc7cb73 mt76: mt7921: update statistic in active mode only 757b93f4b179 mt76: mt7921: remove leftover 80+80 HE capability 1fcff599b2e1 mt76: allow hw driver code to overwrite wiphy interface_modes c55c22e39b7d mt7915: update firmware to 2020110522 10548aef1f45 mt76: mt7915: improve error recovery reliability ed6b0c79820c mt76: mt7921: set MT76_RESET during mac reset 321443258bea mt76: move mt76_rates in mt76 module d1652e8af9e1 Revert "mt76: connac: do not schedule wake_work if the runtime-pm is disabled" 4f4cab39ed9f mt76: mt7915: read all eeprom fields from fw in efuse mode 71450535f164 mt76: mt7921: enable hw offloading for wep keys 833d577e430c mt76: mt7921: remove mt7921_get_wtbl_info routine 67b7a22d2b99 mt76: mt7921: enable random mac address during sched_scan cf1ff7bf4f1b mt76: mt7915: setup drr group for peers ef2f7aa8745f mt76: mt7615: update radar parameters b9f09f530223 mt76: mt7915: fix MT_EE_CAL_GROUP_SIZE
Signed-off-by: Felix Fietkau <nbd@nbd.name> (commit: b474142)
Modifying PHY capabilities in the probe function broke with upstream commit 92ed2eb7f4b7 ("net: phy: probe the PHY before determining the supported features").
AR8316 switches only support 10/100 Mbit/s link modes because of this change.
Provide a get_features method for the PHY driver, so Gigabit link mode will be advertised to link partners again.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: 766e0f5)
ar8xxx_soft_reset is effectively a NOP function. In the PHY state machine, the availability and result of a soft_reset function makes no difference for the code flow.
Thus, we can safely remove this method.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: c5a8b85)
hostapd: fix radius problem due to invalid attributes
The offending commit caused the configuration file to contain: radius_auth_req_attr= radius_acct_req_attr= which cause hostapd to add an ATTR of type 0 into the messages.
61a71e5e49c3 bridge: dynamically create vlans for hotplug members cb6ee9608e10 bridge: fix dynamic delete of hotplug vlans 7f199050f395 wireless: pass the real network ifname to the setup script 50381d0a2998 bridge: allow adding/removing VLANs to configured member ports via hotplug
Signed-off-by: Felix Fietkau <nbd@nbd.name> (commit: 55ded1c)
The ath patch number is already large and adding other patch for ath11k will add more confusion with the patch numbering. Since the support of ath11k based device is imminent, prepare the mac80211 ath patch dir and split it in the dedicated ath5k, ath9k, ath10k and ath11k (empty for now).
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> (commit: 3394af6)
* Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 3T3R 2.4 GHz Wi-Fi (11n) * 3T3R 5 GHz Wi-Fi (11ac) * multi-color LED (controlled via red/green/blue GPIOs) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x ethernet - eth0 + Label: Ethernet 1 + AR8035 ethernet PHY (RGMII) + 10/100/1000 Mbps Ethernet + 802.3af POE + used as WAN interface - eth1 + Label: Ethernet 2 + AR8031 ethernet PHY (SGMII) + 10/100/1000 Mbps Ethernet + used as LAN interface * 1x USB * internal antennas
Flashing instructions: ======================
Various methods can be used to install the actual image on the flash. Two easy ones are:
ap51-flash ----------
The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up.
initramfs from TFTP -------------------
The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21):
* Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2T2R 2.4 GHz Wi-Fi (11n) * 2T2R 5 GHz Wi-Fi (11ac) * multi-color LED (controlled via red/green/blue GPIOs) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x ethernet - eth0 + Label: Ethernet 1 + AR8035 ethernet PHY (RGMII) + 10/100/1000 Mbps Ethernet + 802.3af POE + used as WAN interface - eth1 + Label: Ethernet 2 + AR8035 ethernet PHY (SGMII) + 10/100/1000 Mbps Ethernet + used as LAN interface * 1x USB * internal antennas
Flashing instructions: ======================
Various methods can be used to install the actual image on the flash. Two easy ones are:
ap51-flash ----------
The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up.
initramfs from TFTP -------------------
The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21):
ath79: add support for Qualcomm AP143 reference boards
Specifications:
SoC: QCA9533 DRAM: 32Mb DDR1 Flash: 8/16Mb SPI-NOR LAN: 4x 10/100Mbps via AR8229 switch (integrated into SoC) on GMII WAN: 1x 10/100Mbps via MII WLAN: QCA9530 USB: 1x 2.0 UART: standard QCA UART header JTAG: yes Button: 1x WPS, 1x reset LEDs: 8x LEDs
A version with 4Mb flash is also available, but due to lack of enough space it's not supported.
As the original flash layout does not provide enough space for the kernel (1472k), the firmware uses OKLI and concat flash to overcome the limitation without changing the boot address of the bootloaders.
Installation:
1. Original bootloader
Connect the board to ethernet Set up a server with an IP address of 192.168.1.10 Make the openwrt-ath79-generic-qca_ap143-8m-squashfs-factory.bin available via TFTP
Connect the board to ethernet Set up a server with an IP address of 192.168.1.10 Make the openwrt-ath79-generic-qca_ap143-8m-squashfs-factory.bin available via TFTP, as "firmware.bin"
run fw_upg
Reboot the board.
For the 16M version of the board, please use openwrt-ath79-generic-qca_ap143-16m-squashfs-factory.bin
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> [use fwconcatX names, drop redundant uart status, fix IMAGE_SIZE, set up IMAGE/factory.bin without metadata] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 1eb4812)
hostapd: configure inter-AP communication interface for 802.11r
In setups using VLAN bridge filtering, hostapd may need to communicate using a VLAN interface on top of the bridge, instead of using the bridge directly
Signed-off-by: Felix Fietkau <nbd@nbd.name> (commit: 305c1b8)
This adds support for the Netgear WAC510 Insight Managed Smart Cloud Wireless Access Point, an indoor dual-band, dual-radio 802.11ac business-class wireless AP with integrated omnidirectional antennae and two 10/100/1000 Mbps Ethernet ports.
For more information see: <https://www.netgear.com/business/wifi/access-points/wac510>
Specifications: SoC: Qualcomm IPQ4018 (DAKOTA) ARM Quad-Core RAM: 256 MiB Flash1: 2 MiB Winbond W25Q16JV SPI-NOR Flash2: 128 MiB Winbond W25N01GVZEIG SPI-NAND Ethernet: Built-in IPQ4018 (SoC, QCA8072 PHY), 2x 1000/100/10 port, WAN port active IEEE 802.3af/at PoE in Wireless1: Built-in IPQ4018 (SoC) 802.11b/g/n 2x2:2, 3 dBi antennae Wireless2: Built-in IPQ4018 (SoC) 802.11a/n/ac 2x2:2, 4 dBi antennae Input: (Optional) Barrel 12 V 2.5 A Power, Reset button SW1 LEDs: Power, Insight, WAN PoE, LAN, 2.4G WLAN, 5G WLAN Serial: Header J2 1 - 3.3 Volt (Do NOT connect!) 2 - TX 3 - RX 4 - Ground WARNING: The serial port needs a TTL/RS-232 3.3 volt level converter! The Serial settings are 115200-8-N-1.
Installation via Stock Web Interface: BTW: The default factory console/web interface login user/password are admin/password.
In the web interface navigating to Management - Maintenance - Upgrade - 'Firmware Upgrade' will show you what is currently installed e.g.: Manage Firmware Current Firmware Version: V5.0.10.2 Backup Firmware Version: V1.2.5.11 Under 'Upgrade Options' choose Local (alternatively SFTP would be available) then click/select 'Browse File' on the right side, choose openwrt-ipq40xx-generic-netgear_wac510-squashfs-nand-factory.tar and hit the Upgrade button below. After a minute or two your browser should indicate completion printing 'Firmware update complete.' and 'Rebooting AP...'.
Note that OpenWrt will use the WAN PoE port as actual WAN port defaulting to DHCP client but NOT allowing LuCI access, use LAN port defaulting to 192.168.1.1/24 to access LuCI.
Installation via TFTP Requiring Serial U-Boot Access: Connect to the device's serial port and hit any key to stop autoboot. Upload and boot the initramfs based OpenWrt image as follows: (IPQ40xx) # setenv serverip 192.168.1.1 (IPQ40xx) # setenv ipaddr 192.168.1.2 (IPQ40xx) # tftpboot openwrt-ipq40xx-generic-netgear_wac510-initramfs-fit-uImage.itb (IPQ40xx) # bootm
Note: This only runs OpenWrt from RAM and has not installed anything to flash as of yet. One may permanently install OpenWrt as follows:
Check the MTD device number of the active partition: root@OpenWrt:/# dmesg | grep 'set to be root filesystem' [ 1.010084] mtd: device 9 (rootfs) set to be root filesystem Upload the factory image ending with .ubi to /tmp (e.g. using scp or tftp). Then flash the image as follows (substituting the 9 in mtd9 below with whatever number reported above): root@OpenWrt:/# ubiformat /dev/mtd9 -f /tmp/openwrt-ipq40xx-generic-netgear_wac510-squashfs-nand-factory.ubi And reboot.
Dual Image Configuration: The default U-Boot boot command bootipq uses the U-Boot environment variables primary/secondary to decide which image to boot. E.g. primary=0, secondary=3800000 uses rootfs while primary=3800000, secondary=0 uses rootfs_1. Switching their values changes the active partition. E.g. from within U-Boot: (IPQ40xx) # setenv primary 0 (IPQ40xx) # setenv secondary 3800000 (IPQ40xx) # saveenv Or from a OpenWrt userspace serial/SSH console: fw_setenv primary 0 fw_setenv secondary 3800000 Note that if you install two copies of OpenWrt then each will have its independent configuration not like when switching partitions on the stock firmware. BTW: The kernel log shows which boot partition is active: [ 2.439050] ubi0: attached mtd9 (name "rootfs", size 56 MiB) vs. [ 2.978785] ubi0: attached mtd10 (name "rootfs_1", size 56 MiB) Note: After 3 failed boot attempts it automatically switches partition.
Signed-off-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com> [squashed netgear-tar commit into main and rename netgear-tar for now, until it is made generic.] Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (commit: b126d9c)
This submission relied heavily on the work of Linksys EA7300 v1/ v2.
Specifications:
* SoC: MediaTek MT7621A (880 MHz 2c/4t) * RAM: 128M DDR3-1600 * Flash: 128M NAND * Eth: MediaTek MT7621A (10/100/1000 Mbps x5) * Radio: MT7603E/MT7613BE (2.4 GHz & 5 GHz) * Antennae: 2 internal fixed in the casing and 2 on the PCB * LEDs: Blue (x4 Ethernet) Blue+Orange (x2 Power + WPS and Internet) * Buttons: Reset (x1) WPS (x1)
Installation:
Flash factory image through GUI.
This device has 2 partitions for the firmware called firmware and alt_firmware. To successfully flash and boot the device, the device should have been running from alt_firmware partition. To get the device booted through alt_firmware partition, download the OEM firmware from Linksys website and upgrade the firmware from web GUI. Once this is done, flash the OpenWrt Factory firmware from web GUI.
Reverting to factory firmware:
1. Boot to 'alt_firmware'(where stock firmware resides) by doing one of the following: Press the "wps" button as soon as power LED turns on when booting. (OR) Hard-reset the router consecutively three times to force it to boot from 'alt_firmware'. 2. To remove any traces of OpenWRT from your router simply flash the OEM image at this point.
[fix hanging indents and wrap to 74 characters per line, add kmod-mt7663-firmware-sta package for 5GHz STA mode to work, remove sysupgrade.bin and concatenate IMAGES instead in mt7621.mk, set default-state "on" for power LED] Signed-off-by: Sannihith Kinnera <digislayer@protonmail.com>
[move check-size before append-metadata, remove trailing whitespace] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 251c995)
ramips: add support for Amped Wireless ALLY router and extender
Amped Wireless ALLY is a whole-home WiFi kit, with a router (model ALLY-R1900K) and an Extender (model ALLY-00X19K). Both are devices are 11ac and based on MediaTek MT7621AT and MT7615N chips. The units are nearly identical, except the Extender lacks a USB port and has a single Ethernet port.
Note regarding dual system partitions -------------------------------------
The vendor firmware and boot loader use a dual partition scheme. The boot partition is decided by the bootImage U-boot environment variable: 0 for the 1st partition, 1 for the 2nd.
OpenWrt does not support this scheme and will always use the first OS partition. It will set bootImage to 0 during installation, making sure the first partition is selected by the boot loader.
Also, because we can't be sure which partition is active to begin with, a 2-step flash process is used. We first flash an initramfs image, then follow with a regular sysupgrade.
Installation:
Router (ALLY-R1900K) 1) Install the flashable initramfs image via the OEM web-interface. (Alternatively, you can use the TFTP recovery method below.) You can use WiFi or Ethernet. The direct URL is: http://192.168.3.1/07_06_00_firmware.html a. No login is needed, and you'll be in their setup wizard. b. You might get a warning about not being connected to the Internet. c. Towards the bottom of the page will be a section entitled "Or Manually Upgrade Firmware from a File:" where you can manually choose and upload a firmware file. d: Click "Choose File", select the OpenWRT "initramfs" image and click "Upload." 2) The Router will flash the OpenWrt initramfs image and reboot. After booting, LuCI will be available on 192.168.1.1. 3) Log into LuCI as root; there is no password. 4) Optional (but recommended) is to backup the OEM firmware before continuing; see process below. 5) Complete the Installation by flashing a full OpenWRT image. Note: you may use the sysupgrade command line tool in lieu of the UI if you prefer. a. Choose System -> Backup/Flash Firmware. b. Click "Flash Image..." under "Flash new firmware image" c. Click "Browse..." and then select the sysupgrade file. d. Click Upload to upload the sysupgrade file. e. Important: uncheck "Keep settings and retain the current configuration" for this initial installation. f. Click "Continue" to flash the firmware. g. The device will reboot and OpenWRT is installed.
Extender (ALLY-00X19K) 1) This device requires a TFTP recovery procedure to do an initial load of OpenWRT. Start by configuring a computer as a TFTP client: a. Install a TFTP client (server not necessary) b. Configure an Ethernet interface to 192.168.1.x/24; don't use .1 or .6 c. Connect the Ethernet to the sole Ethernet port on the X19K. 2) Put the ALLY Extender in TFTP recovery mode. a. Do this by pressing and holding the reset button on the bottom while connecting the power. b. As soon as the LED lights up green (roughly 2-3 seconds), release the button. 3) Start the TFTP transfer of the Initramfs image from your setup machine. For example, from Linux: tftp -v -m binary 192.168.1.6 69 -c put initramfs.bin 4) The Extender will flash the OpenWrt initramfs image and reboot. After booting, LuCI will be available on 192.168.1.1. 5) Log into LuCI as root; there is no password. 6) Optional (but recommended) is to backup the OEM firmware before continuing; see process below. 7) Complete the Installation by flashing a full OpenWRT image. Note: you may use the sysupgrade command line tool in lieu of the UI if you prefer. a. Choose System -> Backup/Flash Firmware. b. Click "Flash Image..." under "Flash new firmware image" c. Click "Browse..." and then select the sysupgrade file. d. Click Upload to upload the sysupgrade file. e. Important: uncheck "Keep settings and retain the current configuration" for this initial installation. f. Click "Continue" to flash the firmware. g. The device will reboot and OpenWRT is installed.
Backup the OEM Firmware: -----------------------
There isn't any downloadable firmware for the ALLY devices on the Amped Wireless web site. Reverting back to the OEM firmware is not possible unless we have a backup of the original OEM firmware.
The OEM firmware may be stored on either /dev/mtd3 ("firmware") or /dev/mtd6 ("oem"). We can't be sure which was overwritten with the initramfs image, so backup both partitions to be safe.
1) Once logged into LuCI, navigate to System -> Backup/Flash Firmware. 2) Under "Save mtdblock contents," first select "firmware" and click "Save mtdblock" to download the image. 3) Repeat the process, but select "oem" from the pull-down menu.
Revert to the OEM Firmware: -------------------------- * U-boot TFTP: Follow the TFTP recovery steps for the Extender, and use the backup image.
* OpenWrt "Flash Firmware" interface: Upload the backup image and select "Force update" before continuing.
Signed-off-by: Jonathan Sturges <jsturges@redhat.com> (commit: 6d23e47)
This device is very similar to the EA7300 v1/v2 and EA7500 v2.
Installation:
Upload the generated factory image through the factory web interface.
(following part taken from EA7300 v2 commit message:)
This might fail due to the A/B nature of this device. When flashing, OEM firmware writes over the non-booted partition. If booted from 'A', flashing over 'B' won't work. To get around this, you should flash the OEM image over itself. This will then boot the router from 'B' and allow you to flash OpenWRT without problems.
Reverting to factory firmware:
Hard-reset the router three times to force it to boot from 'B.' This is where the stock firmware resides. To remove any traces of OpenWRT from your router simply flash the OEM image at this point.
With thanks to Leon Poon (@LeonPoon) for the initial bringup.
Signed-off-by: Tee Hao Wei <angelsl@in04.sg> [add missing entry in 10_fix_wifi_mac] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: b232680)
This adds support for the Askey RT4230W REV6 (Branded by Spectrum/Charter as RAC2V1K)
At this time, there's no way to reinstall the stock firmware so don't install this on a router that's being rented.
Specifications:
Qualcomm IPQ8065 1 GB of RAM (DDR3) 512 MB Flash (NAND) 2x Wave 2 WiFi cards (QCA9984) 5x 10/100/1000 Mbps Ethernet (Switch: QCA8337) 1x LED (Controlled by a microcontroller that switches it between red and blue with different patterns) 1x USB 3.0 Type-A 12V DC Power Input UART header on PCB - pinout from top to bottom is RX, TX, GND, 5V Port settings are 115200n8
More information: https://forum.openwrt.org/t/askey-rac2v1k-support/15830 https://deviwiki.com/wiki/Askey_RAC2V1K
To check what revision your router is, restore one of these config backups through the stock firmware to get ssh access then run "cat /proc/device-tree/model". https://forum.openwrt.org/t/askey-rac2v1k-support/15830/17 The revision number on the board doesn't seem to be very consistent so that's why this is needed. You can also run printenv in the uboot console and if machid is set to 177d, that means your router is rev6.
Note: Don't install this if the router is being rented from an ISP. The defined partition layout is different from the OEM one and even if you changed the layout to match, backing up and restoring the OEM firmware breaks /overlay so nothing will save and the router will likely enter a bootloop.
How to install:
Method 1: Install without opening the case using SSH and tftp
You'll need: RAC2V1K-SSH.zip: https://github.com/lmore377/openwrt-rt4230w/blob/master/RAC2V1K-SSH.zip initramfs and sysupgrade images
Connect to one of the router's LAN ports
Download the RAC2V1K-SSH.zip file and restore the config file that corresponds to your router's firmware (If you're firmware is newer than what's in the zip file, just restore the 1.1.16 file)
After a reboot, you should be able to ssh into the router with username: "4230w" and password: "linuxbox" or "admin". Run the following commannds fw_setenv ipaddr 10.42.0.10 #IP of router, can be anything as long as it's in the same subnet as the server fw_setenv serverip 10.42.0.1# #IP of tftp server that's set up in next steps fw_setenv bootdelay 8 fw_setenv bootcmd "tftpboot initramfs.bin; bootm; bootipq"
Don't reboot the router yet.
Install and set up a tftp server on your computer
Set a static ip on the ethernet interface of your computer (use this for serverip in the above commands)
Rename the initramfs image to initramfs.bin, and host it with the tftp server
Reboot the router. If you set up everything right, the router led should switch over to a slow blue glow which means openwrt is booted. If for some reason the file doesn't get loaded into ram properly, it should still boot to the OEM firmware. After openwrt boots, ssh into it and run these commands: fw_setenv bootcmd "setenv mtdids nand0=nand0 && setenv mtdparts mtdparts=nand0:0x1A000000@0x2400000(firmware) && ubi part firmware && ubi read 0x44000000 kernel 0x6e0000 && bootm" fw_setenv bootdelay 2
After openwrt boots up, figure out a way to get the sysupgrade file onto it (scp, custom build with usb kernel module included, wget, etc.) then flash it with sysupgrade. After it finishes flashing, it should reboot, the light should start flashing blue, then when the light starts "breathing" blue that means openwrt is booted.
Method 2: Install with serial access (Do this if something fails and you can't boot after using method 1)
You'll need: initramfs and sysupgrade images Serial access: https://openwrt.org/inbox/toh/askey/askey_rt4230w_rev6#opening_the_case
Install and set up a tftp server
Set a static ip on the ethernet interface of your computer
Download the initramfs image, rename it to initramfs.bin, and host it with the tftp server
Connect the wan port of the router to your computer
Interrupt U-Boot and run these commands: setenv serverip 10.42.0.1 (You can use whatever ip you set for the computer) setenv ipaddr 10.42.0.10 (Can be any ip as long as it's in the same subnet) setenv bootcmd "setenv mtdids nand0=nand0 && set mtdparts mtdparts=nand0:0x1A000000@0x2400000(firmware) && ubi part firmware && ubi read 0x44000000 kernel 0x6e0000 && bootm"
saveenv tftpboot initramfs.bin bootm
After openwrt boots up, figure out a way to get the sysupgrade file onto it (scp, custom build with usb kernel module included, wget, etc.) then flash it with sysupgrade. After it finishes flashing, it should reboot, the light should start flashing blue, then when the light starts "breathing" blue that means openwrt is booted.
Signed-off-by: Lauro Moreno <lmore377@gmail.com> [add entry in 5.10 patch, fix whitespace issues] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: da8428d)
ath79: use dynamic partitioning for TP-Link CPE series
CPExxx and WBSxxx boards with AR9344 SOC use the OKLI lzma kernel loader with the offset of 3 blocks of length 4k (0x3000) in order to have a fake "kernel" that cannot grow larger than how it is defined in the now static OEM partition table.
Before recent changes to the mtdsplit driver, the uImage parser for OKLI only supported images that started exactly on an eraseblock boundary.
The mtdsplit parser for uImage now supports identifying images with any magic number value and at any offset from the eraseblock boundary using DTS properties to define those values.
So, it is no longer necessary to use fixed sizes for kernel and rootfs
Tested-by: Andrew Cameron <apcameron@softhome.net> [CPE510 v2] Tested-by: Bernhard Geier <freifunk@geierb.de> [WBS210 v2] Tested-by: Petrov <d7c48mWsPKx67w2@gmail.com> [CPE210 v1] Signed-off-by: Michael Pratt <mcpratt@pm.me> (commit: 7b9a0c2)
bcm63xx: drop USB LEDs for Technicolor TG582N / ADB P.DG A4001N
Remove the USB status red and green LEDs for - ADB P.DG A4001N A-000-1A1-AX - Technicolor TG582N - Technicolor TG582N Telecom Italia
After having mounted an SMD socket for the flash memory for JTAG reverse engineering, and so be able to easly swap between OpenWrt and the stock FW, it turned out that the stock FW does not light up the red and green USB LEDs exactly as I remembered.
Descriptions: Previous supported device YOUKU yk1 is actually Youku YK-L1. Though they look really different, the only hardware difference between the two models is flash size, YK-L1 has 32 MiB flash but YK-L1c has 16MiB. It seems that YK-L1c can compatible with YK-L1's firmware but it's better to split it to different models.
It is easy to identify the models by looking at the label on the bottom of the device. The label has the model number "YK-L1" or "YK-L1c". Due to different flash sizes, YK-L1c that using previous YK-L1's firmware needs to apply "force update" to install compatible firmware, so please backup config file before system upgrade.
Signed-off-by: Shiji Yang <yangshiji66@qq.com> [use more specific name for DTSI] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 4a9f389)
treewide: remove "+" sign for increment with macaddr_add
Many people appear to use an unneeded "+" prefix for the increment when calculating a MAC address with macaddr_add. Since this is not required and used inconsistently [*], just remove it.
[*] As a funny side-fact, copy-pasting has led to almost all hotplug.d files using the "+", while nearly all of the 02_network files are not using it.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 6f648ed)
To use the Python support in gdb some extra python files are needed, install them too. While at it also install other shared files which we did not install before.
If gdb is built without Python support the python folder does not exists.
When support for Luma WRTQ-329ACN was added, the instructions for flashing this device include using tools from uboot-envtools package. Unfortunately the OpenWrt buildroot system omits packages from DEVICE_PACKAGES when CONFIG_TARGET_MULTI_PROFILE, CONFIG_TARGET_PER_DEVICE_ROOTFS, CONFIG_TARGET_ALL_PROFILES are set. In result the official images are without tools mentioned in the instruction. The workoround for the fashing would be installing uboot-envtools when booted with initramfs image, but not always the access to internet is available. The other method would be to issue the necesary command in U-Boot environment but some serial terminals default configuration don't work well with pasting lines longer than 80 chars. Therefore add uboot-envtools to default packages, which adds really small flash footprint to rootfs, where increased size usually is not an issue.
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com> (commit: 1984a6b)
This patch has been added with initial support for ESPRESSObin board and mistakenly it affects all boards with this SoC. Drop this patch since the aliases are now in upstream dts for ESPRESSObin. If any boards are relying on this, please add the respective alias to that board dts.
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com> (commit: db01442)
eth0 -> single NIC (i211at) eth1 -> single NIC (i211at) -> 4-port unmanaged switch (BCM53125U)
Notes UART is exposed on J4 connector, pinout starting from pin marked 1: 1. GND, 2. NC?, 3. NC?, 4. RX, 5. TX, 6. NC? baud: 115200, parity: none, flow control: none The board is setup by coreboot with UEFI. To enter setup screen hold ESC key on boot. The 5-LED multicolor matrix is attached on first I2C device named "Synopsys DesignWare I2C adapter" at address 0x60. Controlling values are stored in /opt/roqos/etc/rcLED.conf of original firmware. Remember to backup the original firmware, there are no downloadable copies.
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com> (commit: 09448d8)
linux-firmware: update to version 20210315 and trim down broadcom FW
In there linux-firmware repository located in kernel, there were removed old broadcom firmware [1] as they seem to be likely vulnerable to KrØØk vulnerability (CVE-2019-15126), because Cypress released new versions and superseded by it.
In OpenWrt, there is Makefile for cypress-firmware, which already provides the same named packages like it was in linux-firmware. For example, cypress-firmware-43455-sdio provides brcmfmac-firmware-43455-sdio [2].
Changelog between 2020118 and 20210315: 3568f96 (tag: 20210315) linux-firmware: Update firmware file for Intel Bluetooth AX210 9e96e50 linux-firmware: Update firmware file for Intel Bluetooth AX200 c8d0db5 linux-firmware: Update firmware file for Intel Bluetooth AX201 5e2a387 Merge tag 'iwlwifi-fw-2021-03-05-v3' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware into main b0d3e31 rtw88: 8822c: Update normal firmware to v9.9.6 5a2fd63 iwlwifi: add new FWs from core59-66 release 4f54906 iwlwifi: update 9000-family firmwares 11b7607 iwlwifi: update 7265D firmware e425f76 Merge branch 'add-silabs-wf200' of github.com:jerome-pouiller/linux-firmware into main 5ecd13f Mellanox: Add new mlxsw_spectrum firmware xx.2008.2406 58fb90a linux-firmware: add frimware for mediatek bluetooth chip (MT7921) e576a1b rtw89: 8852a: add firmware v0.9.12.2 048a7cb WHENCE: add missing symlink for BananaPi M3 aa6c6e7 Add symlink for BananaPi M2 to brcmfmac43430-sdio config 58825f7 brcm: Fix Raspberry Pi 4B NVRAM file 520f71b silabs: add new firmware for WF200 f7915a0 amdgpu: add initial firmware for green sardine 80cb579 rtw88: RTL8822C: Update normal firmware to v9.9.5 b79d239 (tag: 20210208) Merge branch 'DG1-guc-huc-ADLS-dmc' of git://anongit.freedesktop.org/drm/drm-firmware into main 66970e1 Merge branch 'qcom-rb5' of https://github.com/lumag/linux-firmware into main cf6fc2b Mellanox: Add new mlxsw_spectrum firmware xx.2008.2304 391fd50 linux-firmware: add firmware for MT7921 c5e3240 rtw88: RTL8821C: Update firmware to v24.8 d33d2d8 linux-firmware: Update firmware file for Intel Bluetooth AX210 3027ae4 linux-firmware: Update firmware file for Intel Bluetooth AX200 13979c3 linux-firmware: Update firmware file for Intel Bluetooth AX201 348d8a9 i915: Add DMC v2.01 for ADL-S f33f1f7 i915: Add HuC v7.7.1 for DG1 6a422f5 i915: Add GuC v49.0.1 for DG1 df822a8 qcom: Add venus firmware files for VPU-1.0 11a1db1 qcom: Add SM8250 Compute DSP firmware e55248b qcom: Add SM8250 Audio DSP firmware da74cc6 qcom: add firmware files for Adreno a650 0578970 brcm: Link RPi4's WiFi firmware with DMI machine name. d528862 brcm: Add NVRAM for Vamrs 96boards Rock960 870b805 brcm: Update Raspberry Pi 3B+/4B NVRAM for downstream changes a28a590 cypress: Fix link direction 060ad8b cypress: Link the new cypress firmware to the old brcm files 0f0aefd brcm: remove old brcm firmwares that have newer cypress variants f580dc2 rtl_bt: Update RTL8822C BT(UART I/F) FW to 0x059A_25CB 7df2220 rtl_bt: Update RTL8822C BT(USB I/F) FW to 0x099a_7253 e79405d rtl_bt: Add firmware and config files for RTL8852A BT USB chip ef3813d rtl_bt: Update RTL8821C BT(USB I/F) FW to 0x829a_7644 646f159 (tag: 20201218) make AP6212 in bananpi m2 plus/zero work 28185ec linux-firmware: Update firmware file for Intel Bluetooth AX210 23da869 linux-firmware: Update firmware file for Intel Bluetooth AX200 2099248 linux-firmware: Update firmware file for Intel Bluetooth AX201 94de5e2 linux-firmware: Update firmware file for Intel Bluetooth 9560 27a3689 linux-firmware: Update firmware file for Intel Bluetooth 9260 5c3c4af Merge branch 'lt9611uxc' of https://github.com/lumag/linux-firmware into main aaed4a8 Merge branch 'v1.1.6' of https://github.com/irui-wang/linux_fw_vpu_v1.1.6 into main d8c9865 Merge branch 'master' of https://github.com/sampnimm/linux-firmware-BT into main 63ab3db linux-firmware: add firmware for Lontium LT9611UXC DSI to HDMI bridge 0fe0fe0 mediatek: update MT8173 VPU firmware to v1.1.6 1a08ec9 QCA : Updated firmware files for WCN3991 7455a36 Merge branch 'guc_v49' of git://anongit.freedesktop.org/drm/drm-firmware into main 7eb7fda linux-firmware: Update firmware file for Intel Bluetooth AX210 5cbf459 linux-firmware: Update firmware file for Intel Bluetooth AX210 c487f7d i915: Add GuC firmware v49.0.1 for all platforms d9ffb07 i915: Remove duplicate KBL DMC entry b362fd4 Mellanox: Add new mlxsw_spectrum firmware xx.2008.2018 bc9cd0b linux-firmware: Update AMD SEV firmware 54c797a amdgpu: add sienna cichlid firmware for 20.45 1340e9c amdgpu: update vega20 firmware for 20.45 b260c9c amdgpu: update vega12 firmware for 20.45 d683bd5 amdgpu: update vega10 firmware for 20.45 7c81cc2 amdgpu: update renoir firmware for 20.45 3619e57 amdgpu: update navi14 firmware for 20.45 68ce0fb amdgpu: update navi12 firmware for 20.45 e889b80 amdgpu: update navi10 firmware for 20.45 f4edc15 amdgpu: update raven2 firmware for 20.45 e71210f amdgpu: update raven firmware for 20.45
The brcmf_driver_work workqueue was removed in brcmfmac with kernel 5.10.42, the asynchronous call was covered to a synchronous call. There is no need to wait any more. This part was removed manually from this patch: brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch
ath79: add support for Devolo dLAN pro 1200+ WiFi ac
This patch adds support for the Devolo dLAN pro 1200+ WiFi ac. This device is a plc wifi AC2400 router/extender with 2 Ethernet ports, has a QCA7500 PLC and uses the HomePlug AV2 standard.
Other than the PLC the hardware is identical to the Devolo Magic 2 WIFI. Therefore it uses the same dts, which was moved to a dtsi to be included by both boards.
This is a board that was previously included in the ar71xx tree.
MACs Details verified with the stock firmware: Radio1: 2.4 GHz &wmac *:4c Art location: 0x1002 Radio0: 5.0 GHz &pcie *:4d Art location: 0x5006 Ethernet ðernet *:4e = 2.4 GHz + 2 PLC uplink --- *:4f = 2.4 GHz + 3 Label MAC address is from PLC uplink
The Powerline (PLC) interface of the dLAN pro 1200+ WiFi ac requires 3rd party firmware which is not available from standard OpenWrt package feeds. There is a package feed on github which you must add to OpenWrt buildroot so you can build a firmware image which supports the plc interface.
See: https://github.com/0xFelix/dlan-openwrt (forked from Devolo and added compatibility for OpenWrt 21.02)
Flash instruction (TFTP): 1. Set PC to fixed ip address 192.168.0.100 2. Download the sysupgrade image and rename it to uploadfile 3. Start a tftp server with the image file in its root directory 4. Turn off the router 5. Press and hold Reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Allow 1-2 minutes for the first boot.
Signed-off-by: Felix Matouschek <felix@matouschek.org> [add "plus" to compatible and device name] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 624b85e)
SoC: MediaTek MT7620a @ 580MHz RAM: 64M FLASH: 8MB WiFi: SoC-integrated: MediaTek MT7620a bgn WiFi: MediaTek MT7612EN nac GbE: 2x (RTL8211F) BTN: - WPS - Reset - Router/Repeater/AP (3-way slide-switch) LED: - WPS (blue) - 3-segment Wifi signal representation (blue) - WiFi (blue) - WAN (blue) - LAN (blue) - Power (blue) UART: UART is present as Pads with through-holes on the PCB. They are located next to the reset button and are labelled Vcc/TX/RX/GND as appropriate. Use 3.3V, 57600-8N1.
Installation ------------
Using the webcmd interface --------------------------
Warning: Do not update to the latest Wavlink firmware (version 20201201) as this removes the webcmd console and you will need to use the serial port instead.
You will need to have built uboot/sqauashfs image for this device, and you will need to provide an HTTP service where the image can be downloaded from that is accessible by the device. You cannot use the device manufacturers firmware upgrade interface as it rejects the OpenWrt image.
1. Log into the device's admin portal. This is necessary to authenticate you as a user in order to be able to access the webcmd interface. 2. Navigate to http://<device-ip>/webcmd.shtml - you can access the console directly through this page, or you may wish to launch the installed `telnetd` and use telnet instead. * Using telnet is recommended since it provides a more convenient shell interface that the web form. * Launch telnetd from the form with the command `telnetd`. * Check the port that telnetd is running on using `netstat -antp|grep telnetd`, it is likely to be 2323. * Connect to the target using `telnet`. The username should be `admin2860`, and the password is your admin password. 3. On the target use `curl` to download the image. e.g. `curl -L -O http://<some-other-lan-ip>/openwrt-ramips-mt7620-\ wavlink_wl-wn579x3-squashfs-sysupgrade.bin`. Check the hash using `md5sum`. 4. Use the mtd_write command to flash the image. * The flash partition should be mtd4, but check /sys/class/mtd/mtd4/name first. The partition should be called 'Kernel'. * To flash use the following command: `mtd_write -r -e /dev/mtd<n> write <image-file> /dev/mtd<n>` Where mtd<n> is the Kernel partition, and <image-file> is the OpenWrt image previously downloaded. * The command above will erase, flash and then reboot the device. Once it reboots it will be running OpenWrt.
Connect via ssh to the device at 192.168.1.1 on the LAN port. The WAN port will be configured via DHCP.
Using the serial port ---------------------
The device uses uboot like many other MT7260a based boards. To use this interface, you will need to connect to the serial interface, and provide a TFTP server. At boot follow the bootloader menu and select option 2 to erase/flash the image. Provide the address and filename details for the tftp server. The bootloader will do the rest.
Once the image is flashed, the board will boot into OpenWrt. The console is available over the serial port.
Signed-off-by: Ben Gainey <ba.gainey@googlemail.com> (commit: a509b80)
The SERCOMM NA502 is a smart home gateway manufactured by SERCOMM and sold under different brands (among others, A1 Telekom Austria SmartHome Gateway). It has multi-protocol radio support in addition to LAN and WiFi.
LAN MAC is read from the config partition, WiFi 2.4GHz is LAN+2 and matches the OEM firmware. WiFi 5GHz with LAN+1 is an educated guess since the OEM firmware does not enable 5GHz WiFi.
Installation ------------ Attach serial console, then boot the initramfs image via TFTP. Once inside OpenWrt, run sysupgrade -n with the sysupgrade file.
Attention: The device has a dual-firmware design. We overwrite kernel2, since kernel1 contains an automatic recovery image.
If you get NAND ECC errors and are stuck with bad eraseblocks, try to erase the mtd partition first with
mtd unlock ubi mtd erase ubi
This should only be needed once.
Signed-off-by: Andreas Böhler <dev@aboehler.at> [use kiB for IMAGE_SIZE] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: a3d8c12)
Flash instruction using factory image (stock: < v1.3.2):
1. Boot WF1200CR normally with "Router" mode 2. Access to "http://192.168.10.1/" and open firmware update page ("ファームウェア更新") 3. Select the OpenWrt factory image and click update ("更新") button to perform firmware update 4. Wait ~150 seconds to complete flashing
Alternate flash instruction using initramfs image (stock: >= v1.3.2):
1. Prepare the TFTP server with the IP address 192.168.1.10 and place the OpenWrt initramfs image to the TFTP directory with the name "0101A8C0.img" 2. Connect serial console to WF1200CR 3. Boot WF1200CR and interrupt with any key after the message "Hit any key to stop autoboot: 2", the U-Boot starts telnetd after the message "starting telnetd server from server 192.168.1.1" 4. login the telnet (address: 192.168.1.1) 5. Perform the following commands to modify "bootcmd" variable temporary and check the value (to ignore the limitation of available commands, "tp; " command at the first is required as dummy, and the output of "printenv" is printed on the serial console)
tp; set bootcmd 'set autostart yes; tftpboot' tp; printenv
6. Save the modified variable with the following command and reset device
tp; saveenv tp; reset
7. The U-Boot downloads initramfs image from TFTP server and boots it 8. On initramfs image, download the sysupgrade image to the device and perform the following commands to erase stock firmware and sysupgrade
mtd erase firmware sysupgrade <sysupgrade image>
9. After the rebooting by completion of sysupgrade, start U-Boot telnetd and login with the same way above (3, 4) 10. Perform the following commands to reset "bootcmd" variable to the default and reset the device
tp; run seattle tp; reset
(the contents of "seattle": setenv bootcmd 'bootm 0x9f070040' && saveenv) 11. Wait booting-up the device
Known issues:
- the following 6x LEDs are connected to the gpio controller on QCA9888 chip and the implementation of control via the controller is missing in ath10k/ath10k-ct
ath79: fix eth0 PLL registers on WD My Net Wi-Fi Range Extender
This replaces the register bits for RGMII delay on the MAC side in favor of having the RGMII delay on the PHY side by setting the phy-mode property to rgmii-id (RGMII internal delay), which is supported by the at803x driver. Speed 1000 is fixed as a result, so now all ethernet speeds function.
Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net> Reviewed-by: Michael Pratt <mcpratt@pm.me> (commit: f36990e)
7685cf4 (HEAD, tag: 20210511) nvidia: Update Tegra194 XUSB firmware to v60.09 cf32752 nvidia: Update Tegra186 XUSB firmware to v55.18 cb8ca82 nvidia: Update Tegra210 XUSB firmware to v50.26 f99d6a1 linux-firmware: update firmware for mhdp8546 ecdfcf8 Merge branch 'adlp_dmc_firmware' of git://anongit.freedesktop.org/drm/drm-firmware into main 547b202 Merge https://github.com/suraj714/linux-firmware-venus into main 3d32f21 i915: Add ADL-P DMC Support 3f23f51 amdgpu: add new polaris 12 MC firmware a2565bb firmware: nvidia: Add VIC firmware for Tegra194 17ec2a5 qcom: add gpu firmwares for sc7280 b653cf4 Merge https://github.com/pkshih/linux-firmware into main 2a96c08 brcm: Add a link to enable khadas VIM2's WiFi ffc64a2 rtw89: 8852a: update fw to v0.13.8.0 3e3497c rtl_bt: Update RTL8852A BT USB firmware to 0xD9A8_7893 c7b11ed qcom: Add venus firmware files for VPU-2.0 2f4f0f8 rtw89: 8852a: update fw to v0.13.8.0 fa0efef linux-firmware: Update firmware file for Intel Bluetooth AX210 9be3daa linux-firmware: Update firmware file for Intel Bluetooth 9560 687d64a linux-firmware: Update firmware file for Intel Bluetooth 9260 a7f1249 linux-firmware: Update firmware file for Intel Bluetooth AX200 47650a0 linux-firmware: Update firmware file for Intel Bluetooth AX201 195ecf1 linux-firmware: Intel BT 7265: Fix Security Issues 4116d72 linux-firmware: Update firmware file for Intel Bluetooth 8265 ca83c73 qcom: update venus firmware files for v5.4 1334578 Merge branch 'mrvl-prestera' of https://github.com/PLVision/linux-firmware into main 16052e4 mrvl: prestera: Add Marvell Prestera Switchdev firmware 3.0 version bdf929d rtw88: 8822c: Update normal firmware to v9.9.9 0b558e8 brcm: add missing symlink for Pi Zero W NVRAM file cfa004c amdgpu: update arcturus firmware from 21.10 d5567c5 amdgpu: update navy flounder firmware from 21.10 ef5ea5d amdgpu: update sienna cichlid firmware from 21.10 f35700f amdgpu: update vega20 firmware from 21.10 1be98f1 amdgpu: update picasso firmware from 21.10 fee0497 amdgpu: update navi14 firmware from 21.10 15003b0 amdgpu: update green sardine firmware from 21.10 64555fb amdgpu: update vega12 firmware from 21.10 eb07276 amdgpu: update navi12 firmware from 21.10 e36c82a amdgpu: update vega10 firmware from 21.10 4a5eaa2 amdgpu: update renoir firmware from 21.10 65eb326 amdgpu: update navi10 firmware from 21.10 8bdca03 amdgpu: update raven2 firmware from 21.10 c9e44ca amdgpu: update raven firmware from 21.10 bc3e610 rtl_nic: add new firmware for RTL8153 and RTL8156 series 8528618 Merge branch 'for-upstream' of git://git.chelsio.net/pub/git/linux-firmware into main 940b7f4 cxgb4: Update firmware to revision 1.25.4.0 f66adc3 Merge branch 'main' of gitolite.kernel.org:/pub/scm/linux/kernel/git/maks/linux-firmware into main f350e91 Merge https://github.com/rjliao-qca/qca-btfw into main 9bc1bcc Merge https://github.com/Netronome/linux-firmware into main 2f30708 Mellanox: Add new mlxsw_spectrum firmware xx.2008.2438 393f272 brcm: Link CM4's WiFi firmware with DMI machine name. 73144e0 linux-firmware: Update firmware file for Intel Bluetooth AX201 8ab7aba amdgpu: update navi14 smc firmware 4fe6e53 amdgpu: update navi10 SMC firmware c296849 QCA: Update Bluetooth firmware for QCA6174 d6a18e9 WHENCE: link to similar config file for rtl8821a support 6c419ae nfp: update Agilio SmartNIC flower firmware to rev AOTC-2.14.A.6 af1ca28 amdgpu: add arcturus firmware 0dd245d Merge branch 'sm8250-new-fw' of https://github.com/lumag/linux-firmware into main 55cab07 rtl_bt: Add rtl8723bs_config-OBDA0623.bin symlink 2548d06 brcm: Add nvram for the Chuwi Hi8 (CWI509) tablet e45c137 brcm: Add nvram for the Predia Basic tablet d8fa0cf qcom: sm8250: update remoteproc firmware 84af0e0 qcom: update a650 firmware files 3f026a2 rtl_bt: Update RTL8822C BT(UART I/F) FW to 0x59A_76A3 c82cb46 amdgpu: update sienna cichlid firmware for 20.50 24fe696 amdgpu: update vega20 firmware for 20.50 e05d197 amdgpu: update picasso firmware for 20.50 76d07cd amdgpu: update navi14 firmware for 20.50 b2fc037 amdgpu: update vega12 firmware for 20.50 25451a4 amdgpu: update navi12 firmware for 20.50 b938597 amdgpu: update vega10 firmware for 20.50 2542ba7 amdgpu: update renoir firmware for 20.50 b55d063 amdgpu: update navi10 firmware for 20.50 1a62f28 amdgpu: update raven2 firmware for 20.50 4df488f amdgpu: update raven firmware for 20.50 a29bdb2 amdgpu: add initial support for navy flounder 3568f96 (tag: 20210315) linux-firmware: Update firmware file for Intel Bluetooth AX210 9e96e50 linux-firmware: Update firmware file for Intel Bluetooth AX200 c8d0db5 linux-firmware: Update firmware file for Intel Bluetooth AX201 5e2a387 Merge tag 'iwlwifi-fw-2021-03-05-v3' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware into main b0d3e31 rtw88: 8822c: Update normal firmware to v9.9.6 5a2fd63 iwlwifi: add new FWs from core59-66 release 4f54906 iwlwifi: update 9000-family firmwares 11b7607 iwlwifi: update 7265D firmware e425f76 Merge branch 'add-silabs-wf200' of github.com:jerome-pouiller/linux-firmware into main 5ecd13f Mellanox: Add new mlxsw_spectrum firmware xx.2008.2406 58fb90a linux-firmware: add frimware for mediatek bluetooth chip (MT7921) e576a1b rtw89: 8852a: add firmware v0.9.12.2 048a7cb WHENCE: add missing symlink for BananaPi M3 aa6c6e7 Add symlink for BananaPi M2 to brcmfmac43430-sdio config 58825f7 brcm: Fix Raspberry Pi 4B NVRAM file 520f71b silabs: add new firmware for WF200 f7915a0 amdgpu: add initial firmware for green sardine 80cb579 rtw88: RTL8822C: Update normal firmware to v9.9.5 b79d239 (tag: 20210208) Merge branch 'DG1-guc-huc-ADLS-dmc' of git://anongit.freedesktop.org/drm/drm-firmware into main 66970e1 Merge branch 'qcom-rb5' of https://github.com/lumag/linux-firmware into main cf6fc2b Mellanox: Add new mlxsw_spectrum firmware xx.2008.2304 391fd50 linux-firmware: add firmware for MT7921 c5e3240 rtw88: RTL8821C: Update firmware to v24.8 d33d2d8 linux-firmware: Update firmware file for Intel Bluetooth AX210 3027ae4 linux-firmware: Update firmware file for Intel Bluetooth AX200 13979c3 linux-firmware: Update firmware file for Intel Bluetooth AX201 348d8a9 i915: Add DMC v2.01 for ADL-S f33f1f7 i915: Add HuC v7.7.1 for DG1 6a422f5 i915: Add GuC v49.0.1 for DG1 df822a8 qcom: Add venus firmware files for VPU-1.0 11a1db1 qcom: Add SM8250 Compute DSP firmware e55248b qcom: Add SM8250 Audio DSP firmware da74cc6 qcom: add firmware files for Adreno a650 0578970 brcm: Link RPi4's WiFi firmware with DMI machine name. d528862 brcm: Add NVRAM for Vamrs 96boards Rock960 870b805 brcm: Update Raspberry Pi 3B+/4B NVRAM for downstream changes a28a590 cypress: Fix link direction 060ad8b cypress: Link the new cypress firmware to the old brcm files 0f0aefd brcm: remove old brcm firmwares that have newer cypress variants f580dc2 rtl_bt: Update RTL8822C BT(UART I/F) FW to 0x059A_25CB 7df2220 rtl_bt: Update RTL8822C BT(USB I/F) FW to 0x099a_7253 e79405d rtl_bt: Add firmware and config files for RTL8852A BT USB chip ef3813d rtl_bt: Update RTL8821C BT(USB I/F) FW to 0x829a_7644 646f159 (tag: 20201218) make AP6212 in bananpi m2 plus/zero work 28185ec linux-firmware: Update firmware file for Intel Bluetooth AX210 23da869 linux-firmware: Update firmware file for Intel Bluetooth AX200 2099248 linux-firmware: Update firmware file for Intel Bluetooth AX201 94de5e2 linux-firmware: Update firmware file for Intel Bluetooth 9560 27a3689 linux-firmware: Update firmware file for Intel Bluetooth 9260 5c3c4af Merge branch 'lt9611uxc' of https://github.com/lumag/linux-firmware into main aaed4a8 Merge branch 'v1.1.6' of https://github.com/irui-wang/linux_fw_vpu_v1.1.6 into main d8c9865 Merge branch 'master' of https://github.com/sampnimm/linux-firmware-BT into main 63ab3db linux-firmware: add firmware for Lontium LT9611UXC DSI to HDMI bridge 0fe0fe0 mediatek: update MT8173 VPU firmware to v1.1.6 1a08ec9 QCA : Updated firmware files for WCN3991 7455a36 Merge branch 'guc_v49' of git://anongit.freedesktop.org/drm/drm-firmware into main 7eb7fda linux-firmware: Update firmware file for Intel Bluetooth AX210 5cbf459 linux-firmware: Update firmware file for Intel Bluetooth AX210 c487f7d i915: Add GuC firmware v49.0.1 for all platforms d9ffb07 i915: Remove duplicate KBL DMC entry b362fd4 Mellanox: Add new mlxsw_spectrum firmware xx.2008.2018 bc9cd0b linux-firmware: Update AMD SEV firmware 54c797a amdgpu: add sienna cichlid firmware for 20.45 1340e9c amdgpu: update vega20 firmware for 20.45 b260c9c amdgpu: update vega12 firmware for 20.45 d683bd5 amdgpu: update vega10 firmware for 20.45 7c81cc2 amdgpu: update renoir firmware for 20.45 3619e57 amdgpu: update navi14 firmware for 20.45 68ce0fb amdgpu: update navi12 firmware for 20.45 e889b80 amdgpu: update navi10 firmware for 20.45 f4edc15 amdgpu: update raven2 firmware for 20.45 e71210f amdgpu: update raven firmware for 20.45
Signed-off-by: Tomas Lara <tl849670@gmail.com> [rebased; removed brcmfmac changes due to removed firmware] Signed-off-by: David Bauer <mail@david-bauer.net> (commit: 4413537)
The patch for adding the config_aneg function for the Atheros AR8031/AR8033 PHY was formatted in a way it moved to different PHY models while refreshing patches on kernel updates.
Move the diff directly below the PHY name so this won't happen in the future.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: 902d7e4)
scripts/feeds: generate index after all feeds are updated
This separates index update from feed update. The result is that all requested feeds are first updated and only then indexed.
The reason for this change is to prevent errors being reported and potentially invalid index being generated thanks to cross feeds dependency. The feeds script pulls in default all feeds as they come and on install prefers packages from first feeds (unless special feed is requested). Thus order of feeds in some way specifies preferences. This is handy for downstream distributions as they can simply override any package from upstream feeds by placing their feed before them. This removes need to patch or fork upstream feeds. The problem is that such feed most likely depends in some way also on subsequent feeds. The most likely feeds are 'packages' or 'luci'. The example would be Python package that needs 'python.mk' from 'packages' feed. Ordering custom feed after dependent feeds is sometimes just not possible because of preference requirement described before. The solution is to just first pull all feeds and generate indexes only after that. In the end this ensures that index is generated correctly at first try without any error.
In terms of code this removes 'perform_update' argument from 'update_feed' as with index update removal the update is the only action performed in that subroutine. Thus this moves condition to 'update' subroutine.
Signed-off-by: Karel Kočí <karel.koci@nic.cz> (commit: 1aa80ce)
ramips: fix Ethernet random MAC address for HILINK HLK-7628N
Set the ethernet address from flash.
MAC addresses as verified by OEM firmware:
use interface source 2g wlan0 factory 0x04 (label) LAN eth0.1 factory 0x28 (label+1) WAN eth0.2 factory 0x2e (label+2)
Fixes: 671c9d16e382 ("ramips: add support for HILINK HLK-7628N")
Signed-off-by: Liu Yu <f78fk@live.com> [drop old MAC address setup from 02_network, cut out state_default changes, face-lift commit message, add Fixes:] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: ae9c5cd)
ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
The default trigger for the amber lights on lan1 and lan3 were mistakenly swapped after the device's migration to DSA. This caused activity on one port to trigger the amber light on the other port. Swapping their default trigger in the DTS file fixes that.
Signed-off-by: Adam Elyas <adamelyas@outlook.com> [minor commit title adjustment, wrap commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: edaf432)
aa0e3c4bbe12 iwinfo: nl80211: add support for printing the device path for a phy dd6d6d2dec35 iwinfo: nl80211: use new path lookup function for nl80211_phy_idx_from_uci_path 268bb26d2e2a iwinfo: nl80211: support looking up phy by path=.. and macaddr=... c0414642fead iwinfo: nl80211: fix typo
Signed-off-by: Felix Fietkau <nbd@nbd.name> (commit: 6e8475b)
Similar to how this is done in the diag.sh found in the base-files package, we should blink our status LED (if we have one) during the upgrade process. This follows the same blink pattern as seen at ./package/base-files/files/etc/diag.sh#L36
Signed-off-by: Chris Blake <chrisrblake93@gmail.com> (commit: 82bec33)
build: add ninja build tool and make it available for cmake
ninja is faster at building cmake packages than make, and according to reports also more reliable at handling parallel builds This commit includes a patch that adds GNU make jobserver support, in order to allow more precise control over the number of parallel tasks
Enable parallel build by default for packages using ninja
Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Rosen Penev <rosenp@gmail.com> (commit: 97258f5)
base-files: upgrade: use procd to kill managed daemons
These processes are managed by procd and set to start again when killed via the procd instance parameter "respawn" being set during init.
Example: procd_set_param respawn 3600 1 0
When they are killed manually during sysupgrade, they are started again in 5 seconds or less, depending on how the "respawn" parameter is set.
Use procd through ubus to disable the instances that respawn them, however, allow dnsmasq, netifd, and logd to restart for remote logging.
Properly closing all these processes increases free memory by about 3 MB, which should help low memory devices upgrade without crashing.
For very low memory devices (set to 32 MB for now) also kill dnsmasq, netifd, and logd for an additional 3 MB of free memory.
Also, bump sleep values to allow at least 10 seconds for network interfaces and daemons to come up after they are killed and restarted before caches are dropped.
Signed-off-by: Michael Pratt <mcpratt@pm.me> (commit: b118aba)
The patch adds support for the TP-Link Archer C6 v3 (FCC ID TE7A6V3) The patch adds identification changes to the existing TP-Link Archer A6, by Vinay Patil <post2vinay@gmail.com>, which has identical hardware.
Device Configuration & Serial Port Pins --------------------------------------- ETH Ports: LAN4 LAN3 LAN2 LAN1 WAN _______________________ | | Serial Pins: | VCC GND TXD RXD | |_____________________|
LEDs: Power Wifi2G Wifi5G LAN WAN
Build Output ------------ The build will generate following set of files [1] openwrt-ramips-mt7621-tplink_archer-c6-v3-initramfs-kernel.bin [2] openwrt-ramips-mt7621-tplink_archer-c6-v3-squashfs-factory.bin [3] openwrt-ramips-mt7621-tplink_archer-c6-v3-squashfs-sysupgrade.bin
How to Use - Flashing from TP-Link Web Interface ------------------------------------------------ * Go to "Advanced/System Tools/Firmware Update". * Click "Browse" and upload the OpenWrt factory image: factory.bin[2] * Click the "Upgrade" button, and select "Yes" when prompted.
TFTP Booting ------------ Setup a TFTP boot server with address 192.168.0.5. While starting U-boot press '4' key to stop autoboot. Copy the initramfs-kernel.bin[1] to TFTP server folder, rename as test.bin From u-boot command prompt run tftpboot followed by bootm.
Recovery -------- Archer A6 V3 has recovery page activated if SPI booting from flash fails. Recovery page can be activated by powercycling the router four times before the boot process is complete. Note: TFTP boot can be activated only from u-boot serial console. Device recovery address: 192.168.0.1
This moves CONFIG_REGULATOR to the target config instead of the subtarget config.
For kernel 5.10, CONFIG_AT803X_PHY depends on CONFIG_REGULATOR. As we do not have a size constraint, move this symbol to the target configuration for kernel 5.4 as well as 5.10.
Reported-by: Russell Senior <russell@personaltelco.net> Signed-off-by: David Bauer <mail@david-bauer.net> (commit: 52ee96c)
Specifications: - QCA9533 SoC, 8 MB nor flash, 64 MB DDR2 RAM - 2x2 9dBi antenna, wifi 2.4Ghz 300Mbps - 4x Ethernet LAN 10/100, 1x Ethernet WAN 10/100 - 1x WAN, LAN, Wifi, PWR, WPS, RE Leds - Reset, Wifi on/off, WPS, RE buttons - Serial UART at J4 onboard: 3.3v GND RX TX, 1152008N1
Label MAC addresses based on vendor firmware: LAN *:ea label WAN *:eb label +1 2.4 GHz *:ea label The label MAC address in found in u-boot 0x1fc00
Installation: Upload openwrt-ath79-generic-tplink_tl-wr841hp-v3-squashfs-factory.bin from stock firmware webgui. Maybe we need rename to shorten file name due to stock webgui error.
Revert back to stock firmware instructions: - set your PC to static IP address 192.168.0.66 netmask 255.255.255.0 - download stock firmware from Tp-link website - put it in the root directory of tftp server software - rename it to wr841hpv3_tp_recovery.bin - power on while pressing Reset button until any Led is lighting up - wait for the router to reboot. done
Forum support topic: https://forum.openwrt.org/t/support-for-tp-link-tl-wr841hp-v3-router
Signed-off-by: Andy Lee <congquynh284@yahoo.com> [rebase and squash] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: c5235f6)
Mark uci, ubus, libubox, lua, libnl-tiny and libjson-c as nonshared packages. This helps to keep coherent dependencies if these ABI versioned packages are later updated.
Before this commit it is possible to get missing dependencies in target-specific nonshared packages (like iwinfo) that depend on these shared ABI versioned packages. If these are later updated and rebuilt, only the new ABI version will be available for download, while the target-specific packages in releases continue to depend on the old ABI version.
After this commit the packages are built along the other nonshared packages by the phase1 images buildbot and will be available at the target/ download directories instead of packages/base dir. That will help to keep a coherent set available.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> (commit: 72cc449)
Set the PKG_SOURCE_URL using a lazy set to allow evaluating $(PROJECT_GIT) later. Without this change PKG_SOURCE_URL is evaluated immediately, before PROJECT_GIT is defined and the download over git is not working.
Fixes: 6687a2483a09 ("opkg: use $(PROJECT_GIT), $(AUTORELEASE) and SPDX") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (commit: 65b0fe2)
build: prepend ABI suffixes with a dash if package name ends with digit
Ensure that ABI suffixes are separated with a dash from the package name if the name happens to end with a digit. This implementation detail got lost during the recent refactoring of the ABI_VERSION handling in buildroot.
Ref: https://github.com/openwrt/packages/pull/14237#issuecomment-860473585 Fixes: c921650382 ("build: drop ABI version from metadata") Signed-off-by: Jo-Philipp Wich <jo@mein.io> (commit: f6a03bf)
base-files: set MAC for bridge ports (devices) instead of bridge itself
This restores the original config_generate behaviour. With MAC set for bridged devices the bridge automatically gets its MAC adjusted (it picks the lowest MAC of bridged devices).
This fixes confusing interfaces setup (bridge ports not having custom MAC assigned).
Fixes: 8d8eb9d13fc6 ("base-files: set MAC for bridge ports (devices) instead of bridge itself") Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (commit: 9460196)
build: ensure that dash isn't prepended twice to abi version suffix
The ABIV_$(pkgname) variable already is formatted so return it as-is from the GetABISuffix macro and only filter through FormatABISuffix if we read the raw ABI version value from a version stamp file.
This ensures that binary intra-package dependencies on ABI versioned libraries are properly formatted.
Ref: https://github.com/openwrt/packages/issues/15871 Fixes: f6a03bff5b ("build: prepend ABI suffixes with a dash if package name ends with digit") Signed-off-by: Jo-Philipp Wich <jo@mein.io> (commit: fbb9b1f)
Don't bail out from init script in case the GPS device is missing. Some modems take time to come up, and some people may use things like 'kplex' to feed ugpsd. Hence it is better to always start ugpsd unconditionally and let procd's respawn take care of retrying.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 3d026d2)
Keep other profiles.json content if the data belongs to the current build version.
Also useful for the ImageBuilder, which builds for a single model each time. Without this commit the profiles.json would only contain the latest build profile information.
Signed-off-by: Moritz Warning <moritzwarning@web.de> [improve commit message] Signed-off-by: Paul Spooren <mail@aparcar.org> (commit: a463b96)
We need to skip sampling if the next sample time is after jiffies, not before. This patch fixes an issue where in some cases only very little sampling (or none at all) is performed, leading to really bad data rates
Signed-off-by: Felix Fietkau <nbd@nbd.name> (commit: db9784b)
mac80211: remove patches stripping down crypto support
Use of WPA3 and things like FILS is getting much more common, and platforms that can't affort the extra kilobytes for this code are fading away. Let's not hold back modern authentication methods any longer
Signed-off-by: Felix Fietkau <nbd@nbd.name> (commit: 53b6783)
The option was added in 5.9 and for some reason, it is causing performance issues at least on an APU2 board with the igb device. Switch CONFIG_PCIE_BUS_DEFAULT to fix the performance issues and match the older kernel's behavior
Signed-off-by: Felix Fietkau <nbd@nbd.name> (commit: 940c196)
The code interprets these config values as Mebibytes rather than Megabytes so modify the description accordingly.
Signed-off-by: Paul Fertser <fercerpav@gmail.com> [fix commit title prefix] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 04589cb)
firmware-utils: tplink-safeloader: support Archer A6 v3 CA
The Canadian edition of the TP-Link Archer A6 v3 uses a different header, but otherwise it's identical to the already supported EU/US editions.
Signed-off-by: Stijn Segers <foss@volatilesystems.org> Tested-by: Brian Lee <dev@leebrian.me> Reviewed-by: Philip Prindeville <philipp@redfish-solutions.com> (commit: b6245fb)
* Remove micro-DTSI mt7621_dlink_dir-882-x1.dtsi to ease reading config without too much inheritance * Use "separate" partitioning DTSIs so we can use the partitioning without a complete match on the other settings (i.e. without the former parent DTSI) * Rename files to express the new organization
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 2001c0c)
grub2: make grub2-bios-setup as a separate package
The grub2 and grub2-efi packages should only contain boot-related code. grub-bios-setup is the same as grub-editenv, they are both grub2 tools and should be placed in a separate package.
Signed-off-by: 李国 <uxgood.org@gmail.com> [use AUTORELEASE and update to SPDX] Signed-off-by: Paul Spooren <mail@aparcar.org> (commit: 5876d6a)
grub2: make grub2 tools built in a separate variant
grub2 boot-related code and tools-related code may require different compilation parameters. We split them into different variants for compilation, so that we can accurately pass the required parameters and avoid causing problems.
grub2: pass compilation parameters more accurately
In order for the grub2 boot-related code to compile normally, we have made many adjustments to the compilation parameters. These adjustments are not necessary for tools-related code. We apply these parameter adjustments only to the boot-related code.
uhttpd: make organization (O=) of the cert configurable via uci
Make the organization (O=) of the cert configurable via uci. If not configured, use a combination of "OpenWrt" and an unique id like it was done before.
Signed-off-by: Martin Schiller <ms@dev.tdt.de> (commit: 2c6c150)
This is a follow up of 1a9b896d ("treewide: nuke DRIVER_11W_SUPPORT"). LuCI commit ab010406 ("luci-mod-network: skip check for 802.11w feature") skips check of the 11w feature [1]. Now advertising it in hostapd is superfluous so stop doing it.
[1]: https://github.com/openwrt/luci/pull/4689
Signed-off-by: Dobroslaw Kijowski <dobo90@gmail.com> [remove outdated PKG_RELEASE bump and update to SPDX] Signed-off-by: Paul Spooren <mail@aparcar.org> (commit: bb2ac5a)
bzip2 adds about 8kb of size. For tiny builds it's often disabled. It's not directly used by stock OpenWrt programs. Kernel images compressed with bzip2 are also not fully supported.
base-files: upgrade: use zcat command provided by busybox
Calling `switch_to_ramfs()` will not copy the gzip executable (/bin/gzip) to ramfs, but `/bin/zcat` will call `/bin/gzip` when package gzip is installed, instead of the busybox-supplied zcat. This will cause `zcat` to fail to find `gzip`, then cause the sysupgrade to fail. Adding the `busybox` prefix here will solve the problem.
Signed-off-by: Chuck Fan <fanck0605@qq.com> (commit: d374e2c)
The logging output should not only be displayed in the calling shell session but also in the syslog. A sysupgrade and a configuration import, export can thus be traced in the syslog.
Hardware: * SoC: Atheros AR9342, * RAM: DDR 64MB, * SPI NOR: 64KB, * NAND: 128MB, * Ethernet: x1 10/100/1000 port with passive POE in, * Wi-Fi: 802.11 b/g/n, * PCIe, * USB: 2.0 EHCI controller, connected to mPCIe slot and a Type-A port -- both can be used for LTE modem, but only one can be used at any time. * LEDs: 5 general purpose LEDs (led1..led5), power LED, user LED, Ethernet phy LED, * Button, * Beeper.
Not working: * Button: it shares gpio line 15 with NAND ALE and NAND IO7, and current drivers doesn't easily support this configuration, * Beeper: it is connected to bit 5 of a serial shift register (tested with sysfs led trigger timer). But kmod-gpio-beeper doesn't work -- we left this as is for now.
Flashing: * Use the RouterBOARD Reset button to enable TFTP netboot, boot kernel and initramfs and then perform sysupgrade. * From ar71xx OpenWrt firmware run: $ sysupgrade -F /tmp/<sysupgrade.bin> For more info see: https://openwrt.org/toh/mikrotik/common.
ath79: ar934x: fix mounting issues if subpage is not supported
Currently, the option to disable subpage writing is only set when a HW ECC engine is used.
Some boards lack a HW ECC engine and use software for that. In this case, this NAND option does not get set when the NAND chip does not support it, resulting in mounting errors.
Move the setting of this option to a generic init location so it gets set for all types where required.
While at it, also OR the option instead of just setting it so we don't overwrite potential flags being set somewhere else.
The file is a info file just like config.buildinfo, feeds.buildinfo and version.buildinfo. It bundles these and more information in a machine readable way.
This commit enables the creation of profiles.json by default and not only for buildbots. By doing so it follow the behaviour of the ImageBuilder which always creates the file, lastly this increases the files visibility for downstream projects.
Signed-off-by: Paul Spooren <mail@aparcar.org> (commit: 181054b)
Without loading the igb at boot, the recovery wouldn't have network available. All network drivers should be loaded before etc/board.d/02_network is called. Note that other network drivers already have this set, such as tg3.
This adds conflicts between variants of libustream pacakge. They provide the same file and thus it should not be possible to install them side by side.
Signed-off-by: Karel Kočí <karel.koci@nic.cz> (commit: 219e17a)
The country3 option in hostapd.conf allows the third octet of the country string to be set. It can be used e.g. to indicate indoor or outdoor use (see hostapd.conf for further details). Make this option configurable but optional in OpenWrt.
Signed-off-by: Timo Sigurdsson <public_timo.s@silentcreek.de> (commit: 9f09c19)
hostapd: fix handling of the channel utilization options
Commit 0a7657c ("hostapd: add channel utilization as config option") added the two new uci options bss_load_update_period and chan_util_avg_period. However, the corresponding "config_add_int" calls for these options weren't added, so attempting to actually use these options and change their values is bound to fail - they always stay at their defaults. Add the missing code to actually make these options work.
Fixes: 0a7657c ("hostapd: add channel utilization as config option") Signed-off-by: Timo Sigurdsson <public_timo.s@silentcreek.de> (commit: 85ce590)
base-files: fix enabled for services with only STOP
There are services that have only STOP value set. They are executed only on shutdown and it is common to use them for system cleanup. There is one such service shipped directly with base-files, it is 'umount'. Those work the same way as those with START but enabled does not report them as enabled although it should have as they can be enabled and disabled as any other service.
This also changes check from check for executable to check for symbolic link. The implementation depends on those being links to service file and it is much cleaner and direct to check for them being links.
Signed-off-by: Karel Kočí <karel.koci@nic.cz> (commit: cc7316d)
In the aftermath of the KRACK attacks, hostapd gained an AP-side workaround against WNM-Sleep Mode GTK/IGTK reinstallation attacks. WNM Sleep Mode is not enabled by default on OpenWrt, but it is configurable through the option wnm_sleep_mode. Thus, make the AP-side workaround configurable as well by exposing the option wnm_sleep_mode_no_keys. If you use the option wpa_disable_eapol_key_retries and have wnm_sleep_mode enabled, you might consider using this workaround.
Signed-off-by: Timo Sigurdsson <public_timo.s@silentcreek.de> (commit: bf98faa)
realtek: Fix buffer length calculation on RTL8380 with CRC offload
Fixes the buffer and packet length calculations for Ethernet TX on the RTL8380 SoC when CRC calculation offload is enabled. CRC-offload is always done by the SoC, but additional CRC calculation was previously done also by the kernel. It also fixes detection of the DSA tag for packets on RTL8390 SoCs for ports > 28.
These are the latest patches that just landed upstream for 5.13, will be backported by Greg into 5.10 (because of stable@), and are now in the 5.4 backport branch of wireguard: https://git.zx2c4.com/wireguard-linux/log/?h=backport-5.4.y
Cc: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Tested-by: Stijn Segers <foss@volatilesystems.org> (commit: 2a3b2f5)
The RTL8380-RTL9300 switches only forward packets when VLAN ID 1 is configured. Do not use the standard failsafe configuration for DSA accessing the default port directly, but configure a switch on the lan1 interface instead.
This will add the VLAN ID 1 configuration to the switch: $ bridge vlan show port vlan-id lan1 1 PVID Egress Untagged switch 1 PVID Egress Untagged
Let the DTS property be boolean instead of string where EPHY mode is the default.
Fix how the properties are written for all DTS that use them, and add missing nodes where applicable, and remove useless nodes, and minor DTS formatting.
Signed-off-by: Michael Pratt <mcpratt@pm.me> (commit: 953bfe2)
These nodes are used for configuring a GMAC interface and for defining external PHYs to be accessed with MDIO.
None of this is possible on MT7620N, only MT7620A, so remove them from all MT7620N DTS.
When the mdio-bus node is missing, the driver returns -NODEV which causes the internal switch to not initialize. Replace that return so that everything works without the DTS node.
Also, an extra kernel message to indicate for all error conditions that mdio-bus is disabled.
Fixes: d482356322c9 ("ramips: mt7620n: add mdio node and disable port4 by default") Fixes: aa5014dd1a58 ("ramips: mt7620n: enable port 4 as EPHY by default") Signed-off-by: Michael Pratt <mcpratt@pm.me> (commit: a2acdf9)
ramips: mt7620: fix ethernet driver GMAC port init
A workaround was added to the switch driver to set SOC port 4 as an RGMII GMAC interface based on the DTS property mediatek,port4-gmac. (previously mediatek,port4)
However, the ethernet driver already does this, but is being blocked by a return statement whenever the phy-handle and fixed-link properties are both missing from nodes that define the port properties.
Revert the workaround, so that both the switch driver and ethernet driver are not doing the same thing and move the phy-handle related lines down so nothing is ending the function prematurely.
While at it, clean up kernel messages and delete useless return statements.
Fixes: f6d81e2fa1f1 ("mt7620: gsw: make IntPHY and ExtPHY share mdio addr 4 possible") Signed-off-by: Michael Pratt <mcpratt@pm.me> (commit: afd60d6)
ramips: mt7620: allow both internal and external PHYs
When the new variable ephy_base was introduced, it was not applied to the if block for mdio_mode.
The first line in the mdio_mode if block sets the EPHY base address to 12 in the SOC by writing a register, but the corresponding variable in the driver was still set to the default of 0.
This causes subsequent lines that write registers with the function _mt7620_mii_write to write to PHY addresses 0 through 4 while internal PHYs have been moved to addresses 12 through 16.
All of these lines are intended only for PHYs on the SOC internal switch, however, they are being written to external ethernet switches if they exist at those PHY addresses 0 through 4. This causes some ethernet ports to be broken on boards with AR8327 or QCA8337 switch.
Other suggested fixes move those lines to the else block of mdio_mode, but removing the else block completely also fixes it.
Therefore, move the lines to the mt7620_hw_init function main block, and have only one instance of the function mtk_switch_w32 for writing the register with the EPHY base address.
In theory, this also allows for boards that have both external switches and internal PHYs that lead to ethernet ports to be supported.
Fixes: 391df3782914 ("ramips: mt7620: add EPHY base mdio address changing possibility") Signed-off-by: Michael Pratt <mcpratt@pm.me> (commit: de5394a)
ramips: mt7620: use DTS to set PHY base address for external PHYs
Set the PHY base address to 12 for mt7530 and 8 for others, which is based on the default setting for some devices from printing the register with the following command after it is written to by uboot during the boot cycle.
`md 0x10117014 1`
PHY_BASE option only uses 5 bits of the register, bits 16 to 20, so use 8-bit integer type.
Set the option using the DTS property mediatek,ephy-base and create the gsw node if missing.
Also, added a kernel message to display the EPHY base address.
Note: If anything is written to a PHY address that is greater than 1 hex char (greater than 0xf) then there is adverse effects with Atheros switches.
Signed-off-by: Michael Pratt <mcpratt@pm.me> (commit: 0976b6c)
ramips: mt7620: move mt7620_mdio_mode() to ethernet driver
The function mt7620_mdio_mode is only called once and both the function and mdio_mode block have been named incorrectly, leading to confusion and useless commits.
These lines in the mdio_mode block of mt7620_hw_init are only intended for boards with an external mt7530 switch. (see commit 194ca6127ee18cd3a95da4d03f02e43b5428c0bb)
Therefore, move lines from mdio_mode to the place in soc_mt7620.c where the type of mt7530 switch is identified, and move lines from mt7620_mdio_mode to a main function.
mt7620_mdio_mode was called from mt7620_gsw_init where the priv struct is available, so the lines must stay in mt7620_gsw_init function.
In order to keep things as simple as possible, keep the DTS property related function calls together, by moving them from mt7620_gsw_probe to init.
Remove the now useless DTS properties and extra phy nodes.
Fixes: 5a6229a93df8 ("ramips: remove superfluous & confusing DT binding") Fixes: b85fe43ec8c4 ("ramips: mt7620: add force use of mdio-mode") Signed-off-by: Michael Pratt <mcpratt@pm.me> (commit: 6972e49)
ramips: mt7620: add ephy-disable option to switch driver
Add back the register write to disable internal PHYs as a separate option in the code that can be set using a DTS property.
Set the option to true by default when an external mt7530 switch is identified.
This makes the driver more in sync with original SDK code while keeping the lines separated into different options to accommodate any board with any PHY layout.
Signed-off-by: Michael Pratt <mcpratt@pm.me> (commit: cc6fd6f)
ramips: mt7620: disable SOC VLANs for external switches
These boards have AR8327 or QCA8337 external ethernet switch. The SOC also has it's own internal switch where VLAN is now enabled by default.
Changes to preinit caused all switches to have VLANs enabled by default even if they are not configured with a topology in uci_defaults (see commit f017f617aecbd47debd4d3a734dc0e471342db96)
When both internal and external switches have VLANs, and the external switch has both LAN and WAN, the TX traffic from the SOC cannot flow to the tagged port on the external switch because the VLAN IDs are not matching.
So disable the internal switch VLANs by default on these boards.
Also, add a topology for the internal switch, so that on LuCI there is not an "unknown topology" warning.
In theory, it may be possible to have LAN ports on both switches through internal and external PHYs, but there are no known boards that have this.
Signed-off-by: Michael Pratt <mcpratt@pm.me> (commit: 2adeada)
ramips: fix software reboot failure on HILINK HLK-7628N
In the new kernel version 5.X,reboot will fail.
When SOC is reset, flash has not exited the 4-byte address mode, which causes the operation mode mismatch of flash during boot.Add broken-flash-reset to make flash exit 4-byte address mode before SOC reset
The system init script currently sets /tmp/localinfo when zoneinfo is populated. However, zoneinfo has spaces in it whereas the actual files have _ instead of spaces. This made the if condition never return true.
Example failure when removing the if condition:
/tmp/localtime -> /usr/share/zoneinfo/America/Los Angeles
This file does not exist. America/Los_Angeles does.
hostapd: add default_disabled option to the supplicant
With the default configuration we generate, the supplicant starts scanning and tries to connect to any open network when the interface is enabled.
In some cases it can be desirable to prevent the supplicant from scanning by itself. For example, if on the same radio an AP is configured and an unconfigured STA is added (to be configured with WPS), the AP might not be able to beacon until the STA stops scanning.
In such a case, the STA configuration can still be required to set specific settings (e.g. multi_ap_backhaul_sta) so it can't be set to "disabled" in uci (because that would prevent the supplicant from being run at all). The alternative is to add the "disabled" parameter to the default network block in the supplicant configuration.
This patch adds a "default_disabled" setting in UCI which, when set, adds the "disabled" parameter to the supplicant default network block.
Instead of assuming /sbin contains the correct BusyBox symlinks, directly invoke the busybox executable. The required utilities are guaranteed to be present, since the zram-swap package selects them. Additionally, don't assume busybox resides in /bin, rely on PATH to find it.
While at it, update the copyright year, use SPDX and switch to AUTORELEASE.
ramips: ethernet: ralink: add fe_reset_fe() to reset fe via reset controller
The dts defines the reset fe for all architectures. However the soc code used direct register access of the reset controller. Replace the custom soc reset with a generic fe_reset_fe().
Signed-off-by: Alexander Couzens <lynxis@fe80.eu> (commit: 3fa01db)
ramips: ethernet: ralink: rewrite esw_rt3050 to support link states
Ensure the esw is initialized before the ethernet device is sending packets. Further implement carrier detection similar to mt7620. If any port has a link, the ethernet device will detect a carrier.
Signed-off-by: Alexander Couzens <lynxis@fe80.eu> (commit: 8569bc5)
Need this version to add config option for connmark DNS filtering.
Summary of upstream CHANGELOG: * Handle DHCPREBIND requests in the DHCPv6 server code. * Fix bug which caused dnsmasq to lose track of processes forked. * Major rewrite of the DNS server and domain handling code. * Revise resource handling for number of concurrent DNS queries. * Improve efficiency of DNSSEC. * Connection track mark based DNS query filtering.
lantiq: xrx200: switch the subtarget to the mainline DSA driver
Enable the XRX200 PMAC, GSWIP DSA tag and GSIP DSA drivers in the 5.4 kernel config. Update the existing vr9_*.dts{,i} to use the new Ethernet and switch drivers. Drop the swconfig package from the xrx200 target because swconfig doesn't manage DSA based switches.
The new /etc/config/network format for the DSA driver is not compatible with the old (swconfig) based one. Show a message during sysupgrade notifying users about this change and asking them to start with a fresh config (or forcefully update and then migrate the config manually).
Failsafe mode can now automatically bring up the first lan interface based on board.json including DSA based setups. Drop 05_set_preinit_iface_lantiq from the xRX200 sub-target as this is not needed anymore. For now we are keeping it for the ase, xway and xway_legacy until there's some confirmation that it can be dropped from there as well.
While here, some boards also receive minor fixups: - Use LAN1 as LAN1 (according to a photo this port can also be configured as WAN) on the Buffalo WBMR-300HPD. This makes it easier to read the port mapping because otherwise we would have LAN{2,3,4} and WAN (which was the case for the non-DSA version previously). - vr9_avm_fritz3390.dts: move the "gpio" comment from port 0 and 1 to their corresponding PHYs - vr9_tplink_vr200.dtsi: move the "gpio" comment from port 0 to PHY 0 - vr9_tplink_tdw89x0.dtsi: move the "gpio" comment from port 0 to PHY 0
Acked-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl> Tested-by: Notupus <notpp46@googlemail.com> # TD-W9980/DM200/FRITZ 7430 Tested-by: Martin Schiller <ms@dev.tdt.de> # tested on TDT VR2020 Tested-by: Martin Schiller <ms@dev.tdt.de> # tested on TP-Link TD-W8980B Tested-by: Martin Schiller <ms@dev.tdt.de> # tested on ZyXEL P-2812HNU-F1 Tested-by: Daniel Kestrel <kestrel1974@t-online.de> # tested on Fritzbox 7490 Tested-by: Daniel Kestrel <kestrel1974@t-online.de> # tested on Fritzbox 3490 Tested-by: @jospezial <jospezial@gmx.de> # tested on VGV7510KW22 (o2 Box 6431) Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> (commit: b1df48c)
AR8031/AR8033 have different status registers for copper and fiber operation. However, the extended status register is the same for both operation modes.
As a result of that, ESTATUS_1000_XFULL is set to 1 even when operating in copper TP mode.
Remove this mode from the supported link modes, as this driver currently only supports copper operation.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: 1f5afba)
It was reported AR8033 did not work in fiber operation mode on the ER-X.
While the earlier attempt of fixing this mitigated the issue of 1000 Base-X link mode not being supported, it also switched to the copper page, breaking fiber operation altogether.
Extend the hack adding fiber operation so it does not switch to the copper page. Also remove the part where the supported link mode bit for 1000 Base-X is removed, as this is required for fiber operation.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: 54ed38d)
glibc: update to latest 2.33 HEAD (BZ #27646, bug 27896, BZ #15271)
58b90461ae elf: Use _dl_catch_error from base namespace in dl-libc.c [BZ #27646] 8c06748c51 Fix use of __pthread_attr_copy in mq_notify (bug 27896) 4b6be914bd Use __pthread_attr_copy in mq_notify (bug 27896) f4cba6ca1e dlfcn: Failures after dlmopen should not terminate process [BZ #15271]
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> (commit: f033d5a)
The router itself is just a board with Power / USB / RJ-45 connectors and DC/DC converters. The SoC and WiFi components are on a daughterboard which connect using two M.2 connectors.
The compute module has the model number "T-CB1800K-DM2 V02" printed on it. The main baord has "T-MB5EU V01" printed on it. This information might be useful, as it's highly likely either of these two will be reused in similar designs.
The router itself is sold as Tenbay T-MB5EU directly from the OEM as well as "KuWFI AX1800 Smart WiFi 6 Eouter" on Amazon.de for ~50€ in a slightly different case.
Installation ------------
A Tool for creating a factory image for the Vendor Web Interface can be found here: https://github.com/blocktrron/t-mb5eu-v01-factory-creator/
As the OEM Firmware is just a modified LEDE 17.01, you can also access failsafe mode via UART while the OS boots, by connecting to UART and pressing "f" when prompted. The Router is reachable at 192.168.1.1 via root without password.
Transfer the OpenWrt sysupgrade image via scp and apply with sysupgrade using the -n and -F flags.
Alternatively, the board can be flashed by attaching to the UART console, interrupting the boot process by keeping "0" pressed while attaching power.
Serve the OpenWrt initramfs using a TFTP server with address 192.168.1.66. Rename the initramfs to ax1800.bin.
Attach your TFTP server to one of the LAN ports. Execute the following commands.
sysntpd server becomes unavailable if the index of the bound interface changes. So let's add an interface trigger to reload sysntpd.
This patch also adds the ability for the sysntpd script to handle uci interface name from configuration.
Fixes: 4da60500ebd2 ("busybox: sysntpd: option to bind server to iface") Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com> Reviewed-by: Philip Prindeville <philipp@redfish-solutions.com> (commit: 88114f6)
* With kernel 5.4.128, ran: make kernel_menuconfig CONFIG_TARGET=generic * Manually added back CONFIG_LEDS_TRIGGER_DISK=y so as not to revert f93fcf8923aa ("ipq806x: enable disk-activity LED trigger")
Signed-off-by: John Audia <graysky@archlinux.us> [minor commit title/message adjustments] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: f727005)
If drv_mac80211_setup is called twice with the same wifi configuration, then the second call returns early with error HOSTAPD_START_FAILED. (wifi works nevertheless, despite the fact that setup is incomplete. But "ubus call network.wireless status" erroneously reports that radio0 is down.)
This commit sets no_reload = 0 during the second call of drv_mac80211_setup.
It is perhaps worth providing a way to reproduce the situation where drv_mac80211_setup is called twice.
When /sbin/wifi is used to turn on wifi, uci set wireless.@wifi-iface[0].disabled=0 uci set wireless.@wifi-device[0].disabled=0 uci commit wifi
/sbin/wifi makes the following ubus calls, ubus call network reload ubus call network.wireless down ubus call network.wireless up
The first and third ubus calls both call drv_mac80211_setup, while the second ubus call triggers wireless_device_setup_cancel. So the call sequence becomes,
base-files: wifi: swap the order of some ubus calls
"/sbin/wifi up" makes three ubus calls: 1. ubus call network reload 2. ubus call network.wireless down 3. ubus call network.wireless up
The first and third ubus calls call drv_mac80211_setup, while the second ubus call triggers wireless_device_setup_cancel, so the call sequence becomes,
This commit swaps the order of the first two ubus calls, 1. ubus call network.wireless down 2. ubus call network reload 3. ubus call network.wireless up
Consequently drv_mac80211_setup is only called once, and two related bugs (#FS3784 and #FS3902) are no longer triggered by /sbin/wifi.
branches affected: trunk, 21.02
Signed-off-by: Bob Cantor <coxede6557@w3boats.com> (commit: b82cc80)
dnsmasq: distinct Ubus names for multiple instances
Currently, when using multiple dnsmasq instances they are all assigned to the same Ubus instance name. This does not work, as only a single instance can register with Ubus at a time. In the log, this leads to `Cannot add object to UBus: Invalid argument` error messages. Furthermore, upstream 3c93e8eb41952a9c91699386132d6fe83050e9be changes behaviour so that instead of the log, dnsmasq exits at start instead.
With this patch, all dnsmasq instances are assigned unique names so that they can register with Ubus concurrently. One of the enabled instances is always assigned the previous default name "dnsmasq" to avoid breaking backwards compatibility with other software relying on that default. Previously, a random instance got assigned that name (while the others produced error logs). Now, the first unnamed dnsmasq config section is assigned the default name. If there are no unnamed dnsmasq sections the first encountered named dnsmasq config section is assigned instead.
A similar issue exists for Dbus and was similarly addressed.
Signed-off-by: Etan Kissling <etan.kissling@gmail.com> [tweaked commit message] dnsmasq was not crashing it is exiting Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> (commit: ba5bd8e)
Hardware-Revision ----------------- There are two board revisions of the RUT230, a v0 and v1.
A HW version is silkscreened on the top of the PCBs front side as well as shown in the Teltonika UI. However, this looks to be a different identifier, as the GPl dump shows this silkscreened / UI shown version are internally treated identically.
Th following mapping has been obtained from the latest GPl dump.
HW Ver 01 - 04 --> v0 HW Ver > 05 --> v1
My board was a HW Ver 09 and is treated as a v1.
Installation ------------ While attaching power, hold down the reset button and release it after the signal LEDs flashed 3 times.
Attach your Computer with the devices LAN port and assign yourself the IPv4 address 192.168.1.10/24. Open a web browser, navigate to 192.168.1.1. Upload the OpenWrt factory image.
The device will install OpenWrt and automatically reboots afterwards.
You can use the smae procedure with the stock firmware to return back to the vendor firmware.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: 6cf1dfd)
ipq806x: fix missing changes in 5.4 for new cpufreq implementation
The new cpufreq dedicated driver changed the node structure on how the cache should be defined in the dts. The 5.4 dtsi addition patch has not been updated to follow the new implementation. Fix this to restore correct cache scaling and restore any performance regression.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> (commit: aeee1bd)
ipq806x: fix missing 1.4ghz cache freq for ipq8065 SoC
With the new implementation of the dedicated cpufreq driver, the 1.4 Ghz was only dropped and not added to the ipq8065 SoC. Fix this to improve performance.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> (commit: 014aac7)
2 small fix for the dedicated cpufreq driver: - Fix index wrongly used as the current cpu - Exit early if a bad freq is detected. In the current state the freq is applied anyway even with invalid state.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> (commit: 5e52f96)
When the ltq_deu_vr9 kernel module is loaded, hostapd does not start any more. It fails with this error message: daemon.err hostapd: nl80211: kernel reports: key addition failed daemon.err hostapd: Interface initialization failed
OpenWrt uses the standard Linux crypto API in the wifi drivers now and this probably makes the system offload more crypto operations to special hardware like the Lantiq DEU. There is probably a bug in the DEU and these operations fail and then hostapd does not start the interface.
Do not include the Lantiq DEU by default any more.
ath79: mikrotik: fix beeper phantom noise on RB912
Analysis done by Denis Kalashnikov:
It seems that some ROS versions on some routerboard models have this bug: after silence boot (no output to uart, no beeps) beeper clicks when wireless traffic is.
1) Hello, I have RB951G-2HnD and I noticed strange thing when I loaded the device with some wireless traffic it produced strange sound - like hissing, fizzing etc.
2) Same problem still on 6.33, with silent boot enabled I hear buzzing noise on wireless load.
3) The sound is fixed in v5.19, it was a bug that caused beeper to make clicks.
It also got fixed in RouterOS:
* What's new in 5.19 (2012-Jul-16 10:51): fix ticking sound on RB411UAHL;
* What's new in 6.38.3 (2017-Feb-07 09:52): rb3011 - fixed noise from buzzer after silent boot;
I've checked with an oscilloscope that: * When on the ssr beeper pin is 0, on the beeper itself is 1 (~5V), and when on the ssr beeper pin is 1, on the beeper is 0 The beeper doesn't consume power, so 1 should be a default/idle value for the ssr beeper pin). * When there is wireless traffic (ping packets) in the background and the beeper clicks, I see pulses on the beeper itself, but no pulses on the ssr beeper pin (Q5 pin of 74hc595). When I manually toggle the ssr beeper pin I see pulses on both. So, it is likely that the phantom beeper clicks are caused by the EMI.
The ar71xx GPIO driver only uses 0x24 registers, all following GPIO registers are using to control pinmux functions, which are not handles by the GPIO driver but the generic Linux pinctrl driver.
For some SoC conflicting address ranges were defined for these (AR7240 & AR9330).
Resolve these cases and align the address space of the GPIO controller between all SoCs, as the used address space of the driver is identical for all these.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: 0494278)
This script was expecting only add/remove events which has not been the case since Kernel 4.12 (which added bind/unbind). Bind events were getting treated as remove events which would cause hotplugged 3g modems to not work.
More info: https://lkml.org/lkml/2018/12/23/128 https://github.com/systemd/systemd/issues/8221
Signed-off-by: Arjun AK <arjunak234@gmail.com> (commit: 89ef883)
This partially reverts changes done in commit 72cc44958ef4 ("treewide: mark selected packages nonshared") as it removes the nonshared flag, but keeps the PKG_RELEASE as the PKG_RELEASE bump while adding nonshared flag was incorrect.
Unmark uci, ubus, libubox, lua, libnl-tiny and libjson-c as nonshared packages as this fix attempt didn't worked out. Currently the imagebuilder is broken again:
openwrt-imagebuilder-21.02.0-rc3-ipq40xx-generic.Linux-x86_64$ make image PROFILE=avm_fritzbox-7530 PACKAGES=luci-ssl-openssl ... Collected errors: * pkg_hash_check_unresolved: cannot find dependency libiwinfo20210430 for luci-mod-status * pkg_hash_fetch_best_installation_candidate: Packages for luci-mod-status found, but incompatible with the architectures configured * pkg_hash_check_unresolved: cannot find dependency libiwinfo20210430 for rpcd-mod-iwinfo * pkg_hash_fetch_best_installation_candidate: Packages for rpcd-mod-iwinfo found, but incompatible with the architectures configured * satisfy_dependencies_for: Cannot satisfy the following dependencies for luci-ssl-openssl: * libiwinfo20210430 * opkg_install_cmd: Cannot install package luci-ssl-openssl.
Everything because iwinfo's ABI was changed two times since rc3 release:
Since iwinfo is marked as nonshared, it wasn't built by phase2 builders, but luci-mod-status was already updated 2 times since rc3 and was thus rebuilt by phase2 builders:
d1d452ed2fb3 luci-mod-status: don't set '-' hostname when creating static lease 95b3633055c1 luci-mod-status: switch to html table for wlan channel analysis
So now luci-mod-status depends on libiwinfo20210430 but only libiwinfo20210106 can be downloaded. This is first part of the fix, in the upcoming commit Jo is going to remove nonshared flag from iwinfo package as well.
References: https://lists.infradead.org/pipermail/openwrt-devel/2021-July/035736.html References: https://lists.infradead.org/pipermail/openwrt-devel/2021-July/035741.html Acked-by: Jo-Philipp Wich <jo@mein.io> Reported-by: Nick Hainke <vincent@systemli.org> Signed-off-by: Petr Štetiar <ynezz@true.cz> (commit: 8307da3)
iwinfo: build with nl80211 backend only and make shared
Drop support for building the obsolete broadcom-wl backend and always forcibly enable the nl82011 support. This allows us to make the package shared again since no target specific compilation is happening anymore.
This will solve various repository coherency issues related to unavailable libiwinfo versions in the long run.
This patch adds support for the Ubiquiti PowerBeam M (XW), e.g. PBE-M5-400, a 802.11n wireless with a feed+dish form factor. This device was previously supported by the ar71xx loco-m-xw firmware.
Flashing via stock GUI: - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first (see https://openwrt.org/toh/ubiquiti/powerbeam installation instructions) - Upload the factory image via AirOS web GUI.
Flashing via TFTP: - Use a pointy tool (e.g., unbent paperclip) to keep the reset button pressed. - Power on the device (keep reset button pressed). - Keep pressing until LEDs flash alternatively LED1+LED3 => LED2+LED4 => LED1+LED3, etc. - Release reset button. - The device starts a TFTP server at 192.168.1.20. - Set a static IP on the computer (e.g., 192.168.1.21/24). - Upload via tftp the factory image: $ tftp 192.168.1.20 tftp> bin tftp> trace tftp> put openwrt-ath79-generic-xxxxx-ubnt_powerbeam-m-xw-squashfs-factory.bin
WARNING: so far, no non-destructive method has been discovered for opening the enclosure to reach the serial console. Internal photos are available here: https://fcc.io/SWX-NBM5HP
Signed-off-by: Russell Senior <russell@personaltelco.net> (commit: 12eb5b2)
Label MAC addresses based on vendor firmware: LAN *:ee label WAN *:ef label +1 WLAN *:ee label
The label MAC address found in "config" partition at 0x8
Flash instruction: Upload the generated factory firmware on web interface.
Signed-off-by: Diogenes Rengo <rengocbx250@gmail.com> [remove various whitespace issues, squash commits, use short 0x0] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: cce2e8d)
MAC addresses map (like in OEM firmware) art@0x0 88:C3:97:*:57 wan/label art@0x1002 88:C3:97:*:2D lan/wlan2g art@0x5006 88:C3:97:*:2C wlan5g
Obtain SSH Access 1. Download and flash the firmware version 1.3.8 (China). 2. Login to the router web interface and get the value of `stok=` from the URL 3. Open a new tab and go to the following URL (replace <STOK> with the stok value gained above; line breaks are only for easier handling, please put together all four lines into a single URL without any spaces): http://192.168.31.1/cgi-bin/luci/;stok=<STOK>/api/misystem/set_config_iotdev ?bssid=any&user_id=any&ssid=-h%0Anvram%20set%20ssh_en%3D1%0Anvram%20commit %0Ased%20-i%20%27s%2Fchannel%3D.%2A%2Fchannel%3D%5C%5C%22debug%5C%5C%22%2F g%27%20%2Fetc%2Finit.d%2Fdropbear%0A%2Fetc%2Finit.d%2Fdropbear%20start%0A 4. Wait 30-60 seconds (this is the time required to generate keys for the SSH server on the router).
Create Full Backup 1. Obtain SSH Access. 2. Create backup of all flash (on router): dd if=/dev/mtd0 of=/tmp/ALL.backup 3. Copy backup to PC (on PC): scp root@192.168.31.1:/tmp/ALL.backup ./ Tip: backup of the original firmware, taken three times, increases the chances of recovery :)
Calculate The Password * Locally using shell (replace "12345/E0QM98765" with your router's serial number): On Linux printf "%s6d2df50a-250f-4a30-a5e6-d44fb0960aa0" "12345/E0QM98765" | \ md5sum - | head -c8 && echo On macOS printf "%s6d2df50a-250f-4a30-a5e6-d44fb0960aa0" "12345/E0QM98765" | \ md5 | head -c8 * Locally using python script (replace "12345/E0QM98765" with your router's serial number): wget https://raw.githubusercontent.com/eisaev/ax3600-files/master/scripts/calc_passwd.py python3.7 -c 'from calc_passwd import calc_passwd; print(calc_passwd("12345/E0QM98765"))' * Online https://www.oxygen7.cn/miwifi/
Debricking (lite) If you have a healthy bootloader, you can use recovery via TFTP using programs like TinyPXE on Windows or dnsmasq on Linux. To switch the router to TFTP recovery mode, hold down the reset button, connect the power supply, and release the button after about 10 seconds. The router must be connected directly to the PC via the LAN port.
Debricking You will need a full dump of your flash, a CH341 programmer, and a clip for in-circuit programming.
Install OpenWRT 1. Obtain SSH Access. 2. Create script (on router): echo '#!/bin/sh' > /tmp/flash_fw.sh echo >> /tmp/flash_fw.sh echo '. /bin/boardupgrade.sh' >> /tmp/flash_fw.sh echo >> /tmp/flash_fw.sh echo 'board_prepare_upgrade' >> /tmp/flash_fw.sh echo 'mtd erase rootfs_data' >> /tmp/flash_fw.sh echo 'mtd write /tmp/openwrt.bin firmware' >> /tmp/flash_fw.sh echo 'sleep 3' >> /tmp/flash_fw.sh echo 'reboot' >> /tmp/flash_fw.sh echo >> /tmp/flash_fw.sh chmod +x /tmp/flash_fw.sh 3. Copy `openwrt-ath79-generic-xiaomi_aiot-ac2350-squashfs-sysupgrade.bin` to the router (on PC): scp openwrt-ath79-generic-xiaomi_aiot-ac2350-squashfs-sysupgrade.bin \ root@192.168.31.1:/tmp/openwrt.bin 4. Flash OpenWRT (on router): /bin/ash /tmp/flash_fw.sh & 5. SSH connection will be interrupted - this is normal. 6. Wait for the indicator to turn blue.
Fix bash syntax error introduced in commit cce2e8db564b ("ath79: add support for TP-Link TL-WR941HP v1") which resulted in broken default network configuration.
In target/linux/ath79/generic/base-files/etc/board.d/02_network line 402: tplink,tl-wr842n-v2)\ ^-- SC1073: Couldn't parse this case item. Fix to allow more checks.
References: https://gitlab.com/ynezz/openwrt-device-runtime-testing/-/jobs/1398837698/artifacts/file/cram-result-archer-c7-v5-initramfs.txt Fixes: cce2e8db564b ("ath79: add support for TP-Link TL-WR941HP v1") Signed-off-by: Petr Štetiar <ynezz@true.cz> (commit: bb2a9af)
The minew g1-c is a smart home gateway / BLE gateway. A Nordic nRF52832 is available via USB UART (cp210x) to support BLE. The LED ring is a ring of 24x ws2812b connect to a generic GPIO (unsupported). There is a small LED which is only visible when the device is open which will be used as LED until the ws2812b is supported. The board has also a micro sdcard/tfcard slot (untested). The Nordic nRF52832 exposes SWD over a 5pin header (GND, VCC, SWD, SWC, RST). The vendor uses an older OpenWrt version, sysupgrade can be used via serial or ssh.
CPU: MT7628AN / 580MHz RAM: DDR2 128 MiB RAM Flash: SPI NOR 16 MiB W25Q128 Ethernet: 1x 100 mbit (Port 0) (PoE in) USB: USB hub, 2x external, 1x internal to USB UART Power: via micro usb or PoE 802.11af UART: 3.3V, 115200 8n1
Signed-off-by: Alexander Couzens <lynxis@fe80.eu> (commit: 8d497b6)
dnsmasq: use local option for local domain parameter
'--local' is a synonym for '--server' so let's use '--local' in the resultant config file for uci's 'local' instead of uci's local parameter being turned into '--server'. Slightly less confusion all round.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> (commit: e4cfefa)
Imports a function from iw to convert frequencies to channel numbers.
Co-authored-by: David Bauer <mail@david-bauer.net> Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de> [fix potential out of bounds read] Signed-off-by: David Bauer <mail@david-bauer.net> (commit: 398df62)
The M25P80 used on the Siemens WS-AP3610 supports clock speeds up to 54 MHz. Thus, we can safely increase the maximum SPI frequency the flash chip is controlled at to 50 MHz, increasing transfer speed.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: 8a3f190)
SoC: MT7621AT RAM: 128MB Flash: 16MB SPI WiFi: MT7615DN (2.4GHz+5Ghz) with DBDC (This mode allows this single chip act as an 2x2 11n radio and an 2x2 11ac radio at the same time) LAN: 5x1000M LEDs Power Blue+Orange,Wan Blue+Orange,WPS Blue,"2.4G"Blue, "5G" Blue USB Blue Buttons Reset,WPS, Wifi
Since increment is inconsistent and there is no obvious pattern in swapping bytes, and the 2.4g address has local bit set anyway, it seems safer to use the LAN address with flipped byte here in order to prevent collisions between OpenWrt devices and OEM devices for this interface. This way we at least use an address as base that is definitely owned by the device at hand.
Flashing instruction:
The Dlink "Emergency Room"
Connect your client computer to LAN1 of the device Set your client IP address manually to 192.168.0.101 / 255.255.255.0. Then, power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the internet LED stops flashing Call the recovery page or tftp for the device at http://192.168.0.1 Use the provided emergency web GUI to upload and flash a new firmware to the device.
Signed-off-by: Stas Fiduchi <fiduchi@protonmail.com> [commit title/message improvements, use correct label MAC address, calculate MAC addresses based on 0x4, minor DTS style fixes, add uart2 to state_default, remove factory image, add 2.4g MAC address, use partition DTSI, add macaddr comment in DTS] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: b8168f4)
Also remove obsolete "mx25l25635f" hack and rename the matching device-tree flash node.
Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com> [mention node rename as well. chip is very very likely always the "f" revision for all NBG6617] Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (commit: 88f39b7)
iwinfo: update to latest Git HEAD and move device info into -data package
a0a0e02 iwinfo: rename hardware.txt to devices.txt
Also split common devices.txt (former hardware.txt) into a common libiwinfo-data package to allow different libiwinfo versions to coexist without file clashes.
This device is very similar to the EA7300 v1/v2, EA7500 v2, and EA8100 v1.
Installation:
Upload the generated factory image through the factory web interface.
(following part taken from EA7300 v2 commit message:)
This might fail due to the A/B nature of this device. When flashing, OEM firmware writes over the non-booted partition. If booted from 'A', flashing over 'B' won't work. To get around this, you should flash the OEM image over itself. This will then boot the router from 'B' and allow you to flash OpenWRT without problems.
Reverting to factory firmware:
Hard-reset the router three times to force it to boot from 'B.' This is where the stock firmware resides. To remove any traces of OpenWRT from your router simply flash the OEM image at this point.
With thanks to Tom Wizetek (@wizetek) for testing.
Signed-off-by: Tee Hao Wei <angelsl@in04.sg> (commit: 0c72143)
Since increment is inconsistent and there is no obvious pattern in swapping bytes, and the 2.4g address has local bit set anyway, it seems safer to use the LAN address with flipped byte here in order to prevent collisions between OpenWrt devices and OEM devices for this interface. This way we at least use an address as base that is definitely owned by the device at hand.
Flashing instruction:
The Dlink "Emergency Room" cannot be accessed through the reset button on this device. You can either use console or use the encrypted factory image availble in the openwrt forum.
Once the encrypted image is flashed throuh the stock Dlink web interface, the sysupgrade images can be used.
Header pins needs to be soldered near the WPS and Wifi buttons.
The layout for the pins is (VCC,RX,TX,GND). No need to connect the VCC.
the settings are:
Bps/Par/Bits : 57600 8N1 Hardware Flow Control : No Software Flow Control : No
Connect your client computer to LAN1 of the device Set your client IP address manually to 192.168.0.101 / 255.255.255.0. Call the recovery page or tftp for the device at http://192.168.0.1 Use the provided emergency web GUI to upload and flash a new firmware to the device
At the time of adding support the wireless config needs to be set up by editing the wireless config file:
* Setting the country code is mandatory, otherwise the router loses connectivity at the next reboot. This is mandatory and can be done from luci. After setting the country code the router boots correctly. A reset with the reset button will fix the issue and the user has to reconfigure.
* This is minor since the 5g interface does not come up online although it is not set as disabled. 2 options here:
1- Either run the "wifi" command. Can be added from LUCI in system - startup - local startup and just add wifi above "exit 0".
2- Or add the serialize option in the wireless config file as shown below. This one would work and bring both interfaces automatically at every boot:
Old behavior: If the Reset button is held down during power-on do factory reset and try booting recovery from TFTP forever. If valid recovery is received via TFTP, write it to flash and boot.
New behavior: If the Reset button is held down during power-on do factory reset, then try TFTP *once*, then try booting on-flash recovery, then keep trying via TFTP forever until a valid image is received. Only if there is no bootable recovery stored on flash, store the downloaded recovery. Then boot it.
* Set loadaddr to 0x48000000 in order to allow booting images larger than ~47MB (reported by Oskari Lemmelä). Setting loadaddr to 0x48000000 gives us 384MB on devices with 512MB RAM, which should be more than enough as a maximum size for uImage.FIT to be loaded.
* Widely unify device-specific default environment in preparation to auto-generate it from parameters.
f12b073c0cc3 wireless: add some comments to functions b0d090688302 bridge: fix setting pvid for updated vlans ff3764ce28e0 device: move hotplug handling logic from system-linux.c to device.c 16bff892f415 ubus: add a dummy mode ubus call to simulate hotplug events 7f30b02013f2 examples: make dummy wireless vif names shorter 013a1171e9b0 device: do not treat devices with non-digit characters after . as vlan devices f037b082923a wireless: handle WDS per-sta devices db0fa24e1c17 bridge: fix enabling hotplug-added VLANs on the bridge port 4e92ea74273f bridge: bring up pre-existing vlans on hotplug as well 1f283c654aeb bridge: fix hotplug vlan overwrite on big-endian systems
Signed-off-by: Felix Fietkau <nbd@nbd.name> (commit: 1236cbe)
4d4dcfb blockd: detect mountpoint of /dev/mapper/* 2f42515 block: resolve /dev/mapper/* name for /dev/dm-0 when hotplugging 39558a1 blockd: also send ubus notification on mount hotplug
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 6721c20)
0ee73b2 uxc: implement support for rootfs overlay in containers b0a8ea1 jail: do not hack /etc/resolv.conf on container rootfs 92aba53 jail: increase max additional env records to 64 15997e6 jail: allow rootfs to be a symbolic link 0114c6f jail: open() extroot folder before mounting ed96eda uxc: check for required blockd mounts
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: b1b16bd)
When the AVM FRITZ!Repeater 1200 was introduced on Kernel 4.19, the at803x PHY driver incorrectly set up the delays, not disabling delays set by the bootloader.
The PHY was always operating with RX as well as TX delays enabled, but with kernel 5.4 and later, the required TX delay is disabled, breaking ethernet operation.
Correct the PHY mode, so the driver enables both delays.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: f9d1828)
NR_CPUS limits the number of CPUs supported to 8. This makes total sense on hardware-restircted platforms, but not on x86_64, where CPUs with more than 8 cores can be easily acquired and with less physical limitaions.
see also: https://forum.openwrt.org/t/x86-64-8-cpu-limitation-on-vanilla-release/100946
Signed-off-by: Edgar Su <sjs333@outlook.com> (commit: df554e6)
The mkits.sh script help message states hash algorithm can be specified using the -H command-line option, but it does not work currently due to a bug in the script.
This patch fixes this problem by changing the option from -S to -H and specify getopts parameter after it
Signed-off-by: Yonghyu Ban <yonghyu@empo.im> (commit: 7270d76)
treewide: convert mtd-mac-address-increment* to generic implementation
Rework patch 681-NET-add-mtd-mac-address-support to implement only the function to read the mac-address from mtd. Generalize mtd-mac-address-increment function so it can be applied to any source of of_get_mac_address. Rename any mtd-mac-address-increment to mac-address-increment. Rename any mtd-mac-address-increment-byte to mac-address-increment-byte.
This should make simplify the conversion of target to nvmem implementation.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> (commit: d284e6e)
x86: include kmod-fs-vfat by default in generic images
As x86/64 and x86/generic may be using UEFI, mounting the FAT-32 /boot is necessary in order not to loose configuration files accross sysupgrades. Include kmod-fs-vfat by default to make sure /boot can always be mounted.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: aaf1028)
Update Kernel config and set Linux 5.10 for mediatek/mt7623. (patches have already been updated to 5.10 when mt7622 was bumped) Tested on Bananapi BPi-R2.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: bce7777)
* use built-in default environment instead of file in bootfs * get rid of bootfs alltogether and use uImage.FIT * auto-detect boot device like original script did * add support for factory button
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: ec3bd5e)
All mediatek boards having fw_env accessible through uboot-envtools belong to be mt7622 subtarget. Move the file, as subtarget-specific files are supported for a while now.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: a71fa5e)
uboot-envtools: add configuration for Bananapi BPi-R2
Add fw_env configuration for the BPi-R2 which is a mediatek/mt7623 devboard which can be booted from SD Card or eMMC. Auto detect the boot device and add environment accordingly.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 6b2000b)
* introduce recovery (=initramfs) vs. production dual boot scheme * make use of uImage.FIT (instead of FAT partition) * generate images using build steps (instead of external scripts) * simplify sysupgrade and config restore (thanks to uImage.FIT) * make sure mmc devices are ordered persistently (set DT aliases)
This commit breaks sysupgrade from existing installations, you will have to re-install using the sdcard.img.gz image.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 86a61e7)
mediatek: mt7623: add back needed build steps for U7623 board
When reworking the BPi-R2 the mtk-mmc-img build step was removed despite it was still needed to build the image for the UniElec U7623 board. Add it back for now until U7623 gets its facelift.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: c5b3c13)
MAC address retrieval was switched to more generic upstream (5.13) NVMEM based solution in commit 32adbfc789f6 ("bmips: convert mtd-mac-address to nvmem implementation"), but NVMEM subsystem wasn't enabled in the kernel, so fix it now.
References: https://github.com/openwrt/openwrt/pull/4041#issuecomment-883322801 Fixes: 32adbfc789f6 ("bmips: convert mtd-mac-address to nvmem implementation") Signed-off-by: Petr Štetiar <ynezz@true.cz> (commit: f33fbfa)
MAC address retrieval was switched to more generic upstream (5.13) NVMEM based solution in commit 06bb4a5018cd ("ramips: convert mtd-mac-address to nvmem implementation") , but NVMEM subsystem wasn't enabled in the kernel, so fix it now.
References: https://github.com/openwrt/openwrt/pull/4041#issuecomment-883322801 Fixes: 06bb4a5018cd ("ramips: convert mtd-mac-address to nvmem implementation") Signed-off-by: David Bauer <mail@david-bauer.net> Signed-off-by: Petr Štetiar <ynezz@true.cz> [commit message] (commit: 373c08b)
The image generation code for the U7623 board expects ext4 filesystem to be selected in menuconfig and CONFIG_TARGET_ROOTFS_PARTSIZE to be defined. Now that ext4 isn't enabled any more, the variable was missing and broke the build. Set the default (104) instead of using the config variable to fix that.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 5096f05)
generic: add mac-address property for NVMEM mac addresses
Traversing the device-tree by referencing a network device to determine a devices labe-mac does not work with the generic nvmem implementation, as the userspace expects the MAC-address to be available as a device-tree property.
The legacy mtd-mac-address implementation did create such a node. Do the same when using the nvmem implementation to allow reading the MAC address.
Fixes commit d284e6ef0f06 ("treewide: convert mtd-mac-address-increment* to generic implementation")
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: b309248)
When the kmod-qlcnic package is built on targets that have CONFIG_PCI_IOV enabled, the CONFIG_QLCNIC_SRIOV symbol is exposed. Enable this symbol in the kmod package to fix its build.
generic: fix mediatek and dsa not detecting mac-addr from nvmem
Nvmem require the device node to be registered with the of_platform. Register the device node so that nvmem can correctly find the dev and correctly load the mac-addr stored in the nvmem cell declared in the dts.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> (commit: 6bc6a41)
59f7c11 blockd: create mountpoint parent folder if needed 9cc96af Revert "block: resolve /dev/mapper/* name for /dev/dm-0 when hotplugging" 06334ac Revert "blockd: detect mountpoint of /dev/mapper/*" 9ab3551 block: use /dev/dm-* instead of /dev/mapper/* 5114595 block: allow remove hotplug event to arrive at blockd
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 5bc898b)
85f01c44a950 bridge: check bridge port vlan membership on link-up events 17e453bd68b4 wireless: add back regular virtual interfaces on hotplug-add events as well
Signed-off-by: Felix Fietkau <nbd@nbd.name> (commit: 2801fe6)
Latest binutils (2.37) exposed a long-standing bug. The kernel linking stage would break at the SORTTAB step, due to the exception table having been previously purged from vmlinux, as its section wasn't marked as unconditionally kept. Fix thusly.
Additionally, the "#define ARM_MMU_DISCARD(x) KEEP(x)" change is bogus. It would only apply to !CONFIG_MMU devices (which we don't support in OpenWrt), and it would even break the build if referenced. Drop it.
While at it, rename the patch in order to make it obvious that it's arm-specific.
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> [Add same changes for kernel 5.4 too] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (commit: 023a136)
kernel: backport workaround for Realtek RTL8672 and RTL9601C chips
Adds support for GPON SFP modules based on the Realtek RTL8672 and RTL9601C chips, including but not limited to: * V-SOL V2801F * C-Data FD511GX-RM0 * OPTON GP801R * BAUDCOM BD-1234-SFM * CPGOS03-0490 v2.0 * Ubiquiti U-Fiber Instant * EXOT EGS1
Signed-off-by: Vladimir Markovets <abam_a@yahoo.com> (commit: f032601)
kernel/generic: add a missing symbol to the 5.10 kconfig
Add CONFIG_HAVE_ARM_ARCH_TIMER (disabled). A make kernel_oldconfig on cortexa9 will otherwise prompt for its selection. The 5.4 configuration already contains the same symbol.
linux-firmware: add 2G and 5G precal binaries for QCA99X0
Some devices (such as Extreme Networks WS-AP3959i-ROW) do not contain precal binaries in ART, and the precal in the cards eeprom causes firmware load errors.
These firmware files were previously in linux-firmware, so these are adding them back and renaming to be cleaner.
On reset, the PVID of all ports is set to 1; if this is reset to 0, the special cases for VLAN 1 are no longer required.
port_vlan_add is called with vid=0 when the DSA port interfaces are enabled with no VLAN; previously the VLAN was not configured in this case, relying on VLAN 1 being present, but with the PVID set to 0, configuring VLAN 0 as normal works as expected.
Signed-off-by: Thomas Nixon <tom@tomn.co.uk> (commit: ad712c7)
mvebu: limit mvneta tx queue workaround to 32 bit SoC
This patch has been carried since introduction throughout every kernel major bump and no one has tested if the later kernels improved the situation. The Armada 3720 SoC can only process GbE interrupts on Core 0 and this is already limited in all stable kernels, so ditch this workaround for 64 bit SoCs.
uboot-envtools: mvebu: update uci defaults for Turris Omnia
From version 2021.09 U-Boot will fixup Turris Omnia's DTB before booting, separating U-Boot's environment into separate MTD partition "u-boot-env" [1].
Check if "u-boot-env" MTD partition exists and set the uci defaults accordingly.
arm-trusted-firmware-mvebu: update a3700-tools to current master
2efdb10 wtmi: Fix calculation of UART divider 4247e39 fix: twin die ddr porting guide 8ad7992 sys_init: Add missing newlines in debug mode 4ddea19 avs: Validate VDD value from OTP c444aeb avs: Fix description for avs value 0x2e 1915b78 tim: Optimize code generated by gettimver.sh and print newline 21f566d tim: Print mv_ddr version and configuration on UART 840b70b tim: Use variable $DDRFILE where possible c10e6ae tim: Fix waiting for UART TX ready 7bf95cf wtmi: Wait 3ms for the TX on UART to be empty prior resetting TX FIFO 63e8433 wtmi: Add "dirty" suffix to git commit and rebuild sys_init.bin binary when VERSION changes e949b58 wtmi: During setup clock phase print CPU and DDR speed 10376b5 wtmi: Flush output on UART after the '\n' character 509c647 Makefile: Check that specified DDR_TOPOLOGY option is valid
Signed-off-by: Andre Heider <a.heider@gmail.com> (commit: 6618e33)
arm-trusted-firmware-mvebu: update mv-ddr-marvell to current master
02e23db fix compilation errors popped up by GCC-10 7c35173 Merge pull request #29 from pali/sync-a38x-uboot bb734f5 mv_ddr: a38x: Use SOC_REGS_PHY_BASE for INTER_REGS_BASE ee1ea84 mv_ddr: a38x: Fix ddr3 compilation 70f3e2e mv_ddr: Fix comment typo dd960b4 mv_ddr: ddr3: Allow boards to specify CK_DELAY parameter a87f4f7 mv_ddr: ddr3: only use active chip-selects when tuning ODT 3defcec mv_ddr: a38x: Add support for setting timing in hws_topology_map
Signed-off-by: Andre Heider <a.heider@gmail.com> (commit: c552bbe)
arm-trusted-firmware-mvebu: switch to CZ.NIC's Secure Firmware
CZ.NIC as part of Turris project released free and open source WTMI application firmware wtmi_app.bin for all Armada 3720 devices.
This firmware includes additional features like access to Hardware Random Number Generator of Armada 3720 SoC which original Marvell's fuse.bin image does not have.
Add a patch which allows to pass the commit id, so the firmware is able to identify itself, see a04bffeb. Add a patch to disable linking with gold, since the ARM toolchain doesn't ship gold. Cherry-pick the 3 post-release fixes.
Signed-off-by: Andre Heider <a.heider@gmail.com> (commit: 896d49d)
Specifications: * QCA9531, 16 MiB flash (Winbond W25Q128JVSQ), 128 MiB RAM * 802.11n 2T2R (external antennas) * QCA9887, 802.11ac 1T1R (connected with diplexer to one of the antennas) * 3x 10/100 LAN, 1x 10/100 WAN * UART header with pinout printed on PCB
Installation: * The device comes with a bootloader installed only * The bootloader offers DHCP and is reachable at http://10.123.123.1 * Accept the agreement and flash sysupgrade.bin * Use Firefox if flashing does not work
TFTP recovery with static IP: * Rename sysupgrade.bin to jt-or750i_firmware.bin * Offer it via TFTP server at 192.168.0.66 * Keep the reset button pressed for 4 seconds after connecting power
TFTP recovery with dynamic IP: * Rename sysupgrade.bin to jt-or750i_firmware.bin * Offer it via TFTP server with a DHCP server running at the same address * Keep the reset button pressed for 6 seconds after connecting power
Co-authored-by: Sebastian Schaper <openwrt@sebastianschaper.net> Signed-off-by: Vincent Wiemann <vincent.wiemann@ironai.com> (commit: 55b4b36)
Revert "generic: add mac-address property for NVMEM mac addresses"
This reverts commit b30924873062be47250e6b872347461c8221688d.
This commit could create a property without allocated memory, breaking subsequent reads over a nodes property. Also, the mac-address-increment was not applied when reading from nvmem.
Revert this commit for now, which breaks the label-mac-address logic. Possibly, traversing the device-tree from the netdev side is easier anyways.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: bd521f2)
generic: write back netdev MAC-address to device-tree
The label-mac logic relies on the mac-address property of a netdev devices of-node. However, the mac address can also be stored as a different property or read from e.g. an mtd device.
Create this node when reading a mac-address from OF if it does not already exist and copy the mac-address used for the device to this property. This way, the MAC address can be accessed using procfs.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: cd39aba)
It still requires fixing PCIe support: [ 6.644699] pcie_iproc_bcma bcma0:7: host bridge /axi@18000000/pcie@12000 ranges: [ 6.652217] pcie_iproc_bcma bcma0:7: No bus range found for /axi@18000000/pcie@12000, using [bus 00-ff] [ 6.661833] OF: /axi@18000000/pcie@12000: Missing device_type [ 6.667622] pcie_iproc_bcma: probe of bcma0:7 failed with error -12 [ 6.673985] pcie_iproc_bcma bcma0:8: host bridge /axi@18000000/pcie@13000 ranges: [ 6.681514] pcie_iproc_bcma bcma0:8: No bus range found for /axi@18000000/pcie@13000, using [bus 00-ff] [ 6.691137] pcie_iproc_bcma: probe of bcma0:8 failed with error -12 [ 6.697522] pcie_iproc_bcma bcma0:9: host bridge /axi@18000000/pcie@14000 ranges: [ 6.705048] pcie_iproc_bcma bcma0:9: No bus range found for /axi@18000000/pcie@14000, using [bus 00-ff] [ 6.714669] pcie_iproc_bcma: probe of bcma0:9 failed with error -12
The 1st generation MediaTek PCIe host bridge cannot handle Message Signaled Interrupts (MSIs). The core PCI code is not aware that MSI is not available. This results in warnings of the form:
* split into multiple lines to improve readability * use EXTRA_MOUNT for addnhosts instead of blindly adding /tmp/hosts * remove no longer needed mount for /sbin/hotplug-call * add dhcp-script.sh dependencies (jshn, ubus)
Fixes: 3a94c2ca5c ("dnsmasq: add /tmp/hosts/ to jail_mount") Fixes: aed95c4cb8 ("dnsmasq: switch to ubus-based hotplug call") Reported-by: Stijn Tintel <stijn@linux-ipv6.be> Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 59c6322)
* remove superflus mounts of /dev/null and /dev/urandom * reset EXTRA_MOUNTS at the beginning of the script * add mount according to ignore_hosts_dir * don't add mount for file which is inside a directory already in the EXTRA_MOUNTS list
If the busybox applet losetup was selected, `command -v` selects that during sysupgrade. As this applet is in another path and doesn't cover the '-D' option which is used to make sure user-defined loop devices are no longer active during sysupgrade. Detect losetup at the path of the full utility to avoid error messages in case of the busybox applet being selected.
Reported-by: fda77 <fda77@users.noreply.github.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: af76e26)
images: squashfs: xattrs should not depend on buld host
Enable xattr for the generated squashfs only if needed for SELinux. This eliminates warnings during boot on target when building (non-SELinux) OpenWrt on SELinux-enabled hosts like Fedora.
Reported-by: fda77 <fda77@users.noreply.github.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 4baf47b)
base-files: upgrade: try umount lvm and loop devices
Try umount on device mapper and loop devices still mounted, so the subsequent call to disactivate all physical volumes and delete all loop devices is more likely to succeed.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: e67865c)
Fix build on glibc targets and address a bunch of compiler warnings.
93fc089 jail: cgroups-bpf: don't use sys/reg.h when building with glibc 548d057 jail: don't ignore return value of seteuid() 220b716 jail: ignore return value when creating default /dev symlinks 78d5baa hotplug-dispatch: don't ignore asprintf() return value 736aee5 uxc: always handle asprintf() return value 2b20456 hotplug-dispatch: replace wrongly used assert() bfc86a2 jail: cgroups: replace wrongly used assert() 516bdf2 jail: don't ignore return value of write()
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: edb6bc1)
treewide: backport support for nvmem on non platform devices
In the current state, nvmem cells are only detected on platform device. To quickly fix the problem, we register the affected problematic driver with the of_platform but that is more an hack than a real solution. Backport from net-next the required patch so that nvmem can work also with non-platform devices and rework our current patch. Drop the mediatek and dsa workaround and rework the ath10k patches. Rework every driver that use the of_get_mac_address api.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> (commit: 91a52f2)
Netlink support is required for using the virtual cable tester functionality.
Remove the pretty print build option and instead create a second package variant ethtool-full. This allows users to install the full ethtool featureset using opkg.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: d858366)
generic: add missing Kconfig symbol ARM_SCMI_PROTOCOL
Add the missing ARM_SCMI_PROTOCOL symbol. Apparently it was exposed for 5.10.53 with a kernel dependency change. Missing symbol observed with mediatek/7622 E8450/RT3200 router.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> (commit: 13d6d27)
The GL-X300B is a industrial 4G LTE router based on the Qualcomm QCA9531 SoC.
Specifications: - Qualcomm QCA9531 @ 650 MHz - 128 MB of RAM - 16 MB of SPI NOR FLASH - 2x 10/100 Mbps Ethernet - 2.4GHz 802.11b/g/n - 1x USB 2.0 (vbus driven by GPIO) - 4x LED, driven by GPIO - 1x button (reset) - 1x mini pci-e slot (vcc driven by GPIO) - RS-485 Serial Port (untested)
Flash instructions:
This firmware can be flashed using either sysupgrade from the GL.iNet firmware or the recovery console as follows:
- Press and hold the reset button - Connect power to the router, wait five seconds - Manually configure 192.168.1.2/24 on your computer, connect to 192.168.1.1 - Upload the firmware image using the web interface
RS-485 serial port is untested and may depend on the following commit in the GL.iNet repo:
procd: update to git HEAD and add new script helpers
e10de28 jail: cgroups-bpf: fix compile with musl 1.2 f5d9b14 hotplug-dispatch: fix rare memory leaks in error paths
Add new init script helpers: procd_add_start_mount_trigger procd_add_reload_mount_trigger procd_get_mountpoints
Both trigger helpers expect a list of paths which are checked against the mount targets configured in /etc/config/fstab and a trigger for all mountpoints covered by the list of paths is setup.
procd_get_mountpoints is useful to find out if and which mountpoints are covered by a list of paths.
realtek: fix syntax error introduced by previous commit
A superflus ')' character has slipped into commit 91a52f22a1. Remove it to fix build.
Fixes: 91a52f22a1 ("treewide: backport support for nvmem on non platform devices") Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: e3096c3)
The xfrm_interface module will not be built if IPv6 is not enabled in the kernel. Add this dependency in the kmod package to avoid people wondering why it doesn't build when they disabled IPv6.
kirkwood: import patch to fix build and refresh patches
kirkwood build broke due to missing include needed for ETH_ALEN. Add patch (sent upstream as well) to address that. Refresh patches for 5.4 and 5.10.
Fixes: 91a52f22a1 ("treewide: backport support for nvmem on non platform devices") Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: a0b827b)
Add a generic sdcard upgrade method instead of duplicating code in yet another target, and add a feature flag to only install this upgrade method in targets that set this flag. Copied from mvebu.
procd: change procd_add_start_mount_trigger to do restart
Change procd_add_start_mount_trigger to procd_add_restart_mount_trigger and make it call 'restart' instead of 'start'. This is more useful as it allows to handle both cases, intial start of a services as well as restarting services. Calling 'restart' on a service which has not yet been started has the same result as calling 'start'.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 80be893)
Revert "mvebu: 5.4 fix DVFS caused random boot crashes"
Based on the discussion on the mailing list [1], the patch which was reverted, it reverts only one patch without the subsequent ones.
This leads to the SoC scaling issue not using a CPU parent clock, but it uses DDR clock. This is done for all variants, and it's wrong because commits (hacks) that were using the DDR clock are no longer in the mainline kernel.
If someone has stability issues on 1.2 GHz, it should not affect all routers (1 GHz, 800 MHz) and it should be rather consulted with guys, who are trying to improve the situation in the kernel and not making the situation worse.
There are two solutions in cases of instability: a) disable cpufreq b) underclock it up to 1 GHz
This reverts commit 080a0b74e39d159eecf69c468debec42f28bf4d8.
mvebu: armada-37xx: add patch to forbid cpufreq for 1.2 GHz
This patch is backported from linux-arm-kernel [1] to improve situation, when it was reported that 1.2 GHz variant is unstable with DFS. It waits to be accepted upstream, however, it waits for Marvell people to respond.
fritz-tools: fix returning wrong values due to strncmp usage
When having two keys that start with the same characters and the second key just has one character more nand_tffs_read and tffs_read return the wrong value for the longer key. This is due to the usage of strncmp in combination with the length of the shorter key which is usually first in the list before the longer key and when strncmp matches, the search is stopped. The problem only occurs when the length of the two keys is different, not if just the last character is different. The fix is to use strcmp and as such it will only return the value if the key (name) and the key to look for (namefilter) have the same value and length. A sample case returning wrong values is when keys macwlan and macwlan2 are defined and querying macwlan2 returns the value for macwlan.
Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de> (commit: 12564c5)
This enables building of rpcapd and adds it as a package.
It is a daemon that allows remote packet capturing from another machine. E.g. Wireshark can talk to it using the Remote Capture Protocol (RPCAP). https://www.tcpdump.org/manpages/rpcapd.8.html
Compile and run tested: OpenWrt SNAPSHOT r17190-2801fe6132 on x86/64
Signed-off-by: Stephan Schmidtmer <hurz@gmx.org> (commit: 891c867)
When using htmode 'HE20' with a radio mode that uses wpa-supplicant (like mesh or sta), it will default to 40 MHz bw if disable_ht40 is not set. This commit fixes this behaviour.
Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.net> (commit: af83e3c)
Revert "mvebu: 5.10 fix DVFS caused random boot crashes"
Based on the discussion on the mailing list [1], the patch which was reverted, it reverts only one patch without the subsequent ones.
This leads to the SoC scaling issue not using a CPU parent clock, but it uses DDR clock. This is done for all variants, and it's wrong because commits (hacks) that were using the DDR clock are no longer in the mainline kernel.
If someone has stability issues on 1.2 GHz, it should not affect all routers (1 GHz, 800 MHz) and it should be rather consulted with guys, who are trying to improve the situation in the kernel and not making the situation worse.
There are two solutions in cases of instability: a) disable cpufreq b) underclock it up to 1 GHz
This reverts commit 080a0b74e39d159eecf69c468debec42f28bf4d8.
mvebu: armada-37xx: add patch to forbid cpufreq for 1.2 GHz
This patch is backported from linux-arm-kernel [1] to improve situation, when it was reported that 1.2 GHz variant is unstable with DFS. It waits to be accepted upstream, however, it waits for Marvell people to respond.
kernel: Apply change to of_get_mac_address() to ks8851 too
The code from ks8851.c was moved to ks8851_common.c, so it was not backported. This broke the compile of the omap target which uses this driver.
Fixes commit 91a52f22a13d ("treewide: backport support for nvmem on non platform devices") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (commit: 4e57f83)
layerscape: Fix multiple bugs in of_get_mac_address() changes
The change which backported the of_get_mac_address() change broke some patches in the layerscape target so the patches did not apply any more.
This commit makes them apply again and also fixes some other problems related to this change.
Fixes commit 91a52f22a13d ("treewide: backport support for nvmem on non platform devices") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (commit: e06544b)
The EXT4 driver also takes care of EXT2 and EXT3 file systems. Activating the EXT2 driver kernel config options unlocked some other ext2 driver related options which OpenWrt did not take care of.
generic: fix kernel panic on existing mac-address node
Calling free for the OF property can result in a kernel panic, as the buffer in question might be referenced elsewhere. Also, it is not removed from the tree.
Always allocate a new property and updating the tree with it fixes both issues.
Fixes commit 91a52f22a13d ("treewide: backport support for nvmem on non platform devices")
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: 29a3967)
Delete tunnel on 6in4 interface teardown. Should solve problem related to tunnel stuck on restart loop with "Unknown Command" on tunnel restart due to wan connection drop. Fixes: FS#3690
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> (commit: 0530c49)
040fecc system: fix issues reported by Coverity 48f481b service: make sure string read is null terminated 16dbc2a uxc: fix a bunch of issues discovered by Coverity ff9002f uxc: fix help output 104b49d uxc: support config in uvol
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 09fccdb)
procd: add missing dependency and fix empty mount triggers
procd.sh: Instead of triggering on every mount.add event, there should be no mount trigger at all in case none of the directories passed to procd_add_*_mount_trigger() are located on a mountpoint configured in /etc/config/fstab.
uxc: add missing dependency on rpcd.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 5c13177)
While an image layout based on MBR and 'bootfs' partition may be easy to understand for users who are very used to the IBM PC and always have the option to access the SD card outside of the device (and hence don't really depend on other recovery methods or dual-boot), in my opinion it's a dead end for many desirable features on embedded systems, especially when managed remotely (and hence without an easy option to access the SD card using another device in case things go wrong, for example).
Let me explain:
* using a MSDOS/VFAT filesystem to store kernel(s) is problematic, as a single corruption of the bootfs can render the system into a state that it no longer boots at all. This makes dual-boot useless, or at least very tedious to setup with then 2 independent boot partitions to avoid the single point of failure on a "hot" block (the FAT index of the boot partition, written every time a file is changed in bootfs). And well: most targets even store the bootloader environment in a file in that very same FAT filesystem, hence it cannot be used to script a reliable dual-boot method (as loading the environment itself will already fail if the filesystem is corrupted).
* loading the kernel uImage from bootfs and using rootfs inside an additional partition means the bootloader can only validate the kernel -- if rootfs is broken or corrupted, this can lead to a reboot loop, which is often a quite costly thing to happen in terms of hardware lifetime.
* imitating MBR-boot behavior with a FAT-formatted bootfs partition (like IBM PC in the 80s and 90s) is just one of many choices on embedded targets. There are much better options with modern U-Boot (which is what we use and build from source for all targets booting off SD cards), see examples in mediatek/mt7622 and mediatek/mt7623.
Hence rename the 'sdcard' feature to 'legacy-sdcard', and prefix functions with 'legacy_sdcard_' instead of 'sdcard_'.
Tested-by: Stijn Tintel <stijn@linux-ipv6.be> Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 98bccda)
The mt76x8 subtarget is the only one in ramips that stores the mediatek,mtd-eeprom property directly in the "root" mt7628an.dtsi.
This is not optimal for a few different reasons:
* If you don't really know it or are used to other (sub)targets, the property will be set somewhat magically. * The property is set based on &factory partition before (if at all) this partition is defined. * There are several devices that have different offset or even different partitions to read from, which will then be overwritten in the DTS files. Thus, definitions are scattered between root DTSI and individual files.
Based on these circumstances, the "root" definition is removed and the property is added to the device-based DTS(I) files where needed and applicable. This should be easier to grasp for unexperienced developers and will move the property closer to the partition definitions.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: ad6b077)
Installing headers and static libraries to the target system seems to be not required for most use cases, so let's factor them out into a dedicated -dev package.
This cuts down to disk usage to around 50% of the original package to ~ 2MB - not that disk space is an issue normally, but when using inside an initramfs only project, it counts.
Signed-off-by: Michael Heimpold <mhei@heimpold.de> (commit: 9a79fe2)
ramips: convert most mtd-mac-address cases in DTSI to nvmem
Convert most of the cases from mtd-mac-address to nvmem where MAC addresses are set in the DTSI, but the partitions are only located in the device DTS. This posed some problems earlier, since in these cases we are using partitions before they are defined, and the nvmem system did not seem to like that.
There have been a few different resolution approaches, based on the different tradeoffs of deduplication vs. maintainability:
1. In many cases, the partition tables were identical except for the firmware partition size, and the firmware partition was the last in the table. In these cases, the partition table has been moved to the DTSI, and only the firmware partition's "reg" property has been kept in the DTS files. So, the updated nvmem definition could stay in the DTSI files as well.
2. For all other cases, splitting up the partition table would have introduced additional complexity. Thus, the nodes to be converted to nvmem have been moved to the DTS files where the partitioning was defined.
3. For Netgear EX2700 and WN3000RP v3, the remaining DTSI file was completely dissolved, as it was quite small and the name was not really nice either.
4. The D-Link DIR-853 A3 was converted to nvmem as well, though it is just a plain DTS file not taken care of in the first wave.
In addition, some minor rearrangements have been made for tidyness.
Not covered (yet) by this patch are:
* Various unielec devices * The D-Link DIR-8xx family
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: ba3d92c)
ath79: convert remaining mtd-mac-address cases to nvmem
Since the nvmem-based approach for retrieving MAC addresses appears to depend on the addresses being set up after the partitions, it is no longer possible to keep the MAC address setup in shared DTSI files while the partitions itself are set up in DTS files for the individual devices.
In ath79 the firmware partition is typically located somewhere "in the middle" of the partition table. Thus, it's not trivial to share the partitions containing MAC address information in a common DTSI (like we did in some cases on ramips).
In this commit, MAC address setup is thus moved to the relevant partitions, and in most cases needs to be duplicated. While the duplication is not really nice, it eventually provides a cleaner and more tidy setup, making the DTS(I) file fragmentation a bit more logical. This should also help with adding new devices, as information is distributed across less locations.
For consistency, this commit also moves the mtd-cal-data property "down" together with the MAC address setup, so it's not based on a partition before the latter is defined either. (This is only done for those files touched due to nvmem conversion.)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: e826b64)
592ac0f add a note 4bacd14 sslcertfile: list /etc/ssl 7bdefa4 example: indicate that skip is an option d1e9a85 wifi: sys pipe usage eb903e1 README: add note about policycoreutils-setfiles weak dependency 762e011 ttyd: signull all subjects fbfc079 acme: add basic support for acme_cleanup.sh and acme_setup.sh 9ac7592 acme: transition to sys.subj on generic initscript execution f3dd1ba acme: missing rules related to sys.subj trans on file.initscriptfile ae273fa odhcp6c/netifd: support drop-in directories 5fa9b41 subj: do not encourage misconfiguration 44722b6 blockd, logd, odhcpc6, ubiutil, mtdstordev a775d93 21.02 related a473691 rcboot runs rcuhttpd which creates /tmp/etc for /tmp/etc/uhttpd 290e9fb rcuhttpd: related to rcboot and uci-defaults 3fc0d8b rcuhttpd: lists /etc/uci-defaults 1f5ef48 removes ubvol.lock policy and adds move mtd/ubi partitions
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: cc0112d)
Due to use of a script when migrating from mtd-mac-address, a few of the definitions are redundant in DTSI and DTS files. Remove those and consolidate the definitions in parent DTSI files in a few cases.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 41aa765)
The ext3 driver was already removed, the kernel config options are only there for backwards compatibility. The eth4 driver takes care of ext3 file systems.
layerscape: Do not activate ext2 and ext3 driver options
The ext3 driver was already removed, the kernel config options are only there for backwards compatibility. The eth4 driver takes care of ext3 file systems. The ext4 driver also handled ext2 file systems.
Do not deactivate the kernel configuration symbol CONFIG_STAGING in the target configurations any more. This prevented the build of the exfat.ko for example.
The userspace application now uses the model=full option to match the configuration of the kernel module. The source no longer contains SOAP support, which was the primary reason to build only typical instead of full before.
This makes several CLI commands, which were already supported in the kernel module, available in the userspace application. For example, this includes bbsg which allows to get information about VDSL2 bands.
Some previously applied build options were redundant. Disabling ADSL MIB support is unnecessary, as it only applies to Danube. ADSL LED support is no longer included in the source. ReTx counters are already included with model type full.
This increases the size of the userspace application by approximately 15 kB (uncompressed). The kernel module does not change at all.
According to https://docs.onion.io/omega2-docs/mac-address.html, 0x28 is the correct location to read the address on Onion Omega 2(+) devices.
This fixes a regression introduced by commit 77e850fe76e3 ("ramips: tidy up MAC address setup for Linkit Smart and Omega2"), which was a cleanup that intended to preserve existing behavior. In my testing with v19.07.7, however, the MAC address determined from the device tree takes precedence over the one set by 02_network, so the aforementioned commit actually changed the behavior.
Signed-off-by: Michael Siegenthaler <msiegen@google.com> [Adapt patch to nvmem usage] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (commit: 4b4fa2f)
Debian and Ubuntu ship a python3-minimal package which does not include the distutils module. This is not supported by upstream and can be considered a broken python distribution.
In practice, many scripts depend on said module, and this is a reoccuring pain point for building various OpenWrt packages.
Require and check for said module, enough time has been wasted on this.
A list of just the most recent issues: https://github.com/openwrt/packages/pull/16304 https://github.com/openwrt/packages/pull/16027 https://github.com/openwrt/packages/pull/15443 https://github.com/openwrt/packages/pull/14394 https://github.com/openwrt/packages/pull/12909 https://github.com/openwrt/packages/issues/12443 https://github.com/openwrt/packages/pull/11035 https://github.com/openwrt/packages/issues/10993
Signed-off-by: Andre Heider <a.heider@gmail.com> (commit: 60af8d7)
Backport support for dual-role USB 2.0 as that's what is actually built-into MT7623. Improve HDMI console by enabling VT and setting up tty1..tty6. Re-add accidentally removed CONFIG_ARM_ARCH_TIMER.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 4f1c5b0)
The current patch produces the following error when CONFIG_DMABUF_HEAPS is enabled: drivers/built-in.a: member drivers/dma-buf/heaps in archive is not an object
Fixes: b10d6044599d ("kernel: add linux 5.10 support")
ramips: add label MAC address for Onion Omega 2(+)
Thanks to a hint from Michael Siegenthaler in 4b4fa2f9fed7 ("ramips: fix ethernet MAC address on Omega2"), the label MAC address of the Onion Omega 2(+) can be set based on its documentation [1].
Rearrange all voltage triplets for "opp_table0" to match the specifications. "opp-microvolt" and "opp-microvolt-<name>" triplets are in order of <target min max>, and NOT <min target max>.
Previously, the CPU would *always* spend its time at the "minimum" voltage, ignoring the actual intended target. This is a regression from previous behavior.
On an NBG6817 with a Qualcomm CPU of PVS bin #2... (see &opp_table0 -> opp-1725000000 -> opp-microvolt-speed0-pvs2-v0)
To check voltages and frequencies at run time, use... /bin/cat /sys/kernel/debug/regulator/regulator_summary && /bin/cat /sys/kernel/debug/clk/clk_summary | grep "hfpll"
See https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/devicetree/bindings/opp/opp.txt?h=v5.4.142#n91
In OpenWrt, /var is symlinked to /tmp by default. This is done to reduce the amount of writes to the flash chip, which often have not the greatest durability. As a result, things like DHCP or UPnP lease files, are not persistent across reboots.
Since OpenWrt can run on devices with more durable storage, it makes sense to have an option for a persistent /var. Add an option to make /var persistent. When enabled, /var will no longer be symlinked to /tmp, but /var/run will be symlink to /tmp/run, as it should contains only files that should not be kept during reboot. The option is off by default, to maintain the current behaviour.
ath79: rename Ubiquiti PowerBeam M (XW) to PowerBeam M5 (XW)
The commit [1] added support for Ubiquiti PowerBeam M (XW), tested on the PBE-M5-400. But, it turns out the PBE-M2-400 has a different ethernet configuration, so make the support specific to the m5 version in anticipation of adding specific support for the m2 in a separate commit.
[1] 12eb5b2384a6 ("ath79: add support for Ubiquiti PowerBeam M (XW)")
Signed-off-by: Russell Senior <russell@personaltelco.net> [fix model name in DTS, format commit reference in commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 96db7d2)
This patch adds support for the Ubiquiti PowerBeam M2 (XW), e.g. PBE-M2-400, a 802.11n wireless with a feed+dish form factor. This device was previously supported by the ar71xx loco-m-xw firmware.
Flashing via stock GUI: - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first (see https://openwrt.org/toh/ubiquiti/powerbeam installation instructions) - Upload the factory image via AirOS web GUI.
Flashing via TFTP: - Use a pointy tool (e.g., unbent paperclip) to keep the reset button pressed. - Power on the device (keep reset button pressed). - Keep pressing until LEDs flash alternatively LED1+LED3 => LED2+LED4 => LED1+LED3, etc. - Release reset button. - The device starts a TFTP server at 192.168.1.20. - Set a static IP on the computer (e.g., 192.168.1.21/24). - Upload via tftp the factory image: $ tftp 192.168.1.20 tftp> bin tftp> trace tftp> put openwrt-ath79-generic-ubnt_powerbeam-m2-xw-squashfs-factory.bin
WARNING: so far, no non-destructive method has been discovered for opening the enclosure to reach the serial console. Internal photos are available here: https://fcc.io/SWX-NBM2HP
Signed-off-by: Russell Senior <russell@personaltelco.net> (commit: 61b49cd)
ath79: add support for Atheros DB120 reference board
Atheros DB120 reference board.
Specifications:
SoC: QCA9344 DRAM: 128Mb DDR2 Flash: 8Mb SPI-NOR, 128Mb NAND flash Switch: 5x 10/100Mbps via AR8229 switch (integrated into SoC), 5x 10/100/1000Mbps via QCA8237 via RGMII WLAN: AR9300 (SoC, 2.4G+5G) + AR9340 (PCIe, 5G-only) USB: 1x 2.0 UART: standard QCA UART header JTAG: yes Button: 1x reset LEDs: a lot Slots: 2x mPCIe + 1x mini-PCI, but using them requires additional undocumented changes. Misc: The board allows to boot off NAND, and there is I2S audio support as well - also requiring additional undocumented changes.
Installation:
1. Original bootloader
Connect the board to ethernet Set up a server with an IP address of 192.168.1.10 Make the openwrt-ath79-generic-atheros_db120-squashfs-factory.bin available via TFTP
Connect the board to ethernet Set up a server with an IP address of 192.168.1.10 Make the openwrt-ath79-generic-atheros_db120-squashfs-factory.bin available via TFTP, as "firmware.bin"
run fw_upg
Reboot the board.
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> [explicit factory recipe in generic.mk, sorting in 10-ath9k-eeprom, convert to nvmem, use fwconcat* names in DTS, remove unneeded DT labels, remove redundant uart node] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 98eb95d)
The option was initially named TARGET_ROOTFS_LN_VAR_TMP, and the check was correct. When renaming the option to something more suitable, the check was changed to check for n, but when an option is not set, it's not n but empty. This results in the check always evaluating to false. Fix the check by checking for y with ifneq.
Fixes: 57807f50ded6 ("base-files: add option to make /var persistent")
Add a config option for json_script instead of unconditionally including all json files in /etc/uhttpd in every uhttpd instance. This makes it possible to configure a single instance with an unconditional redirect, which currently renders all other uhttpd instances unusable.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Acked-by: Felix Fietkau <nbd@nbd.name> (commit: 6393ea1)
94170ae24bc9 device: extend device settings flags to 64 bit 1eb0fafaa986 device: add support for configuring device link speed/duplex ed84473b7af9 bridge: memset bst->config by default to avoid stale config values 6519cf31e4b0 bridge: add support for an external STP daemon 454e9c33c906 bridge: tune default stp parameters
Signed-off-by: Felix Fietkau <nbd@nbd.name> (commit: 1796812)
8a8306d uxc.c: fix coverity resource leak warning 7f2398e jail: devices: create parent folder when creating devices 0603c8d jail: return to hook callback instead of just calling it 3edb7eb jail: check return value when opening console af048a3 jail: use portable sizeof(void *) 6010bd3 utils: make sure read() string is 0 terminated f6daca3 uxc: free string returned by blobmsg_format_json_indent() 51f1cd2 trace: free string returned by blobmsg_format_json_indent() d716cb5 trace: handle open() return value and make sure string is terminated b824a89 jail: preload: avoid NULL-dereference in case things go wrong 167dc24 jail: protect against strcat buffer overflows
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: 76f46f4)
ramips: add new flash layout support to Phicomm K2
Descriptions: Phicomm K2 (PSG1218) got a new "permanent_config" partition after update firmware to v22.5. This partition located in front of the firmware partition, same as The Phicomm K2P and K2G. Due to this change the new bootloader can't load previous firmware any more. This commit is aimed at add support for Phicomm K2 which official firmware version is 22.5.x or newer. For which runs old firmware version, just update OpenWrt that has a prefix of "k2-v22.4". For uniform naming, this commit also changed the model name PSG1218 to a more recognizable name K2, refer to Phicomm K2G, K2P K2T.
OpenWrt selection table: official firmware version OpenWrt v22.4.x.x or older phicomm_k2-v22.4 v22.5.x.x or newer phicomm_k2-v22.5
Installation: Same as Phicomm K2G, K2P, PSG1208. a. TFTP + U-Boot b. Open telnet by some web page vulnerability (Search Baidu by key words "K2 telnet"), and then we can upload firmware image to /tmp and write it to firmware partition with mtd instruction.
Signed-off-by: Shiji Yang <yangshiji66@qq.com> [rebase, add/harmonize version in model variables, fix version typo in commit message, wrap commit message properly] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 80e70be)
use address source 2g *:d8 factory 0x0004 (label) 5g *:d9 factory 0x8004 LAN *:d7 factory $label -1 WAN *:da factory $label +2
Installation (TFTP + U-Boot): * Connect device with a TTL cable and open a serial session by PuTTY. * Press "2" when booting to select "Load system code then write to Flash via TFTP". * Configure the IP of local host server. * Upload firmware by tftpd64, it will boot when write instruction is executed.
Signed-off-by: Shiji Yang <yangshiji66@qq.com> [fix DTS line endings, fix label MAC address, adjust status LED names, convert mtd-mac-address-increment to mac-address-increment] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 0914328)
Installation: * Web UI Update 1. Open http://192.168.10.1/upgrade.html in the browser. 2. Rename firmware to a short name like firmware.bin and then upload it. 3. Fill in the password column with the following content: password | mtd -x mIp2osnRG3qZGdIlQPh1 -r write /tmp/firmware.bin firmware * TFTP + U-Boot 1. Connect device with a TTL cable. 2. Press "2" when booting to select "Load system code then write to Flash via TFTP". 3. Upload firmware by tftpd64, it will boot when write instruction is executed.
Signed-off-by: Shiji Yang <yangshiji66@qq.com> (commit: a73a826)
The cpximg loader can be started either by holding the reset button during power up. Once it's running, a TFTP-server under 192.168.1.1 will accept the image appropriate for the board revision that is etched on the board.
For example, if the board is labelled '6A07':
tftp -v -m binary 192.168.1.1 -c put openwrt-ath79-generic-compex_wpj558-16m-squashfs-cpximg-6a07.bin
Signed-off-by: Romain Mahoux <romain@mahoux.fr> [convert to nvmem, remove redundant lan_mac in 02_network] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: e2d0808)
This patch adds support for D-Link DAP-1325-A1 (Range Extender Wi-Fi N300)
Specifications: - SoC: 580Mhz MT7628NN - RAM: 64MB, DDR2 SDRAM - Storage: 8MB, SPI (W25Q64JVSSIQ) - Ethernet: 1x 10/100 LAN port - WIFI: 2.4 GHz 802.11bgn - LED: Status (2x to provide 3 colors), Wi-Fi Signal Strength (4x) - Buttons: Reset, WPS - UART: Serial console (57600, 8n1) Row of 4 holes near LAN port, starting from square hole: 3.3V, TX,RX,GND - FCC ID: fccid.io/KA2AP1325A1/
Installation:
Failsafe UI Firmware can be uploaded with Failsafe UI web page: - turn device off - press and hold reset button - turn device on - keep holding reset until red wifi strength led turns on (ab. 10sec) - connect to device through LAN port PC must be configured with static ip (192.168.0.x) - connect to 192.168.0.50 - select image to be flashed and upload. Device will reboot after successful update
Serial port/TFTP server - Connect through serial connectors on PCB (e.g. with teraterm) - Set up a TFTP server, and connect through LAN with static IP - Put image file in the root of the server - Boot the device and select '2' at U-Boot startup - Set device IP, server IP and image file name - Start upload and flash
Signed-off-by: Giovanni Cascione <ing.cascione@gmail.com> [fix whitespaces in DTS, convert to nvmem, add mtd-eeprom] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: d57ba86)
ramips: lock u-boot partition and unlock u-boot-env for miwifi-mini
Generally u-boot should keep read-only to avoid mis-overwriting and bricking the device, but u-boot-env could be safely modified with u-boot setenv tool.
Signed-off-by: David Yang <mmyangfl@gmail.com> (commit: 5ed1101)
Signed-off-by: David Yang <mmyangfl@gmail.com> [remove execute bit on 01_leds, add status for gpio2] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 38cb500)
This integrates with netifd in order to provide STP/RSTP protocol support in user space. It defaults to using RSTP for bridges with stp enabled. This daemon has no config files, it uses the configuration passed from netifd via ubus
Signed-off-by: Felix Fietkau <nbd@nbd.name> (commit: 3ebbf79)
The Onion Omega is a hardware development platform with built-in WiFi.
https://onioniot.github.io/wiki/
Specifications: - QCA9331 @ 400 MHz (MIPS 24Kc Big-Endian Processor) - 64MB of DDR2 RAM running at 400 MHz - 16MB of on-board flash storage - Support for USB 2.0 - Support for Ethernet at 100 Mbps - 802.11b/g/n WiFi at 150 Mbps - 18 digital GPIOs - A single Serial UART - Support for SPI - Support for I2S
Flash instructions: The device is running OpenWrt upon release using the ar71xx target. Both a sysupgrade and uploading the factory image using u-boots web-UI do work fine.
Depending on the ssh client, it might be necessary to enable outdated KeyExchange methods e.g. in the clients ssh-config:
gpio-button-hotplug: convert to gpio descriptor (gpiod_) API
OpenWrt's special gpio-button-hotplug driver is still using exclusively the legacy GPIO Subsystem gpio_ API.
While it still does work fine for most devices, upstream linux is starting to convert platform support like that of the APU2/3/4 to the new GPIOD LOOKUP tables that are not supported by it.
Hence, this patch replaces the gpio_ calls present in gpio-button-hotplug with gpiod_ equivalent wherever it's possible. This allows the driver to use the gpiod lookup tables and still have a fallback for legacy platform data code that just sets button->gpio set to the real button/switch GPIO.
As a bonus: the active_low logic is now being handled by the linux's gpio subsystem too. Another issue that was address is the of_handle leak in the dt parser error path.
This was old code from the AR71XXs target days that doesn't get compiled and used anymore.
Bringing up AR92xx and earlier chips from their OWL-Emulator state is currently done by the upstream ath9k-pci-owl-loader module. (see the kmod-owl-loader package).
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (commit: a1bd810)
mediatek: add a new spi-nand driver for kernel 5.10
This patch adds a new spi-nand driver which implements the SNFI of mt7622 and mt7629.
Unlike the existing snfi driver which makes use of the spi-mem framework and the spi-nand framework with modified ecc support, this driver is implemented directly on the mtd framework with other components untouched, and provides better performance, and behaves exactly the same as the nand framework.
mediatek: mtk-snand: check request size against chip info
mtd->size will be overrided by BMT which makes all mtd requests made by bmt fail in request size checking. this commit changes the driver to check against actual chip size in chip info as a workaround.
there's no driver level remapping of oob data in the new spi-nand driver and bmt oob signature starts at 0x0 of the dumped oob data. change the default value to 0 for the new spi-nand driver.
These options doesn't show up unless some kernel packages are selected, so they are not covered by kernel_menuconfig. Manually add them so that a build with all kmods can pass without user interaction.
kernel: properly handle paging errors in fit partition parser
The uImage.FIT partition uses page mapping without properly handling paging errors. This can lead to Kernel Oops in case of read errors while trying to parse uImage.FIT partitions.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: cf40141)
The disable_dgaf config fiels is only available in case Hostapd is compiled with Hotspot 2.0 support, however Proxy-ARP does not depend on Hotspot 2.0.
Only add the code related to this config field when Hotspot 2.0 is enabled to fix compilation with the aformentioned preconditions.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: 7073e88)
The GigaDevices GD25Q64B found on the TL-MR3020 v3 supports the fast read instruction. Add the required DT property in order to enable usage of this property.
Signed-off-by: David Bauer <mail@david-bauer.net> (commit: 9c96589)
Based on the existing documentation [1][2], I dare anyone to demonstrate that we need to fine-tune these RCU parameters. The (performance) breakage potential for doing so is immense, so let's just please put down this loaded footgun.
Disable CONFIG_RCU_EXPERT and its dependent symbols. Additionally, remove the CONFIG_RCU_EXPERT symbol from the target kconfigs which contain it.
ipq806x: add missing enclosing partitions block for TP-Link C2600
The partitions that have compatible property set are skipped by mtd if they are not contained inside a partitions node and this breaks fetching MAC address from "default-mac" partition.
Fix this by defining all the partitions inside partitions node with compatible = "fixed-partitions" as nvmem requires the standard partitions scheme to work correctly.
ramips: w2914ns-v2: consolidate leds nodes into dtsi
w2914ns-v2, 11acnas, and freezio use almost same board and thus share a common dtsi file. Now that LED labels do not contain "devicename" since commit c846dd91f0a6 ("ramips: remove model name from LED labels"), let's move the leds nodes to dtsi and remove them from dts.
Note that freezio has only one USB 3.0 port and adding &ehci_port2 trigger does not incur any visible changes.
Signed-off-by: Sungbo Eo <mans0n@gorani.run> (commit: f08b76b)
I2C_BCM_IPROC selects I2C_SLAVE which in turn makes two new symbols available: I2C_SLAVE_EEPROM and I2C_SLAVE_TESTUNIT. That was causing:
I2C support (I2C) [M/n/y/?] m Enable compatibility bits for old user-space (I2C_COMPAT) [N/y/?] n I2C device interface (I2C_CHARDEV) [M/n/?] m I2C bus multiplexing support (I2C_MUX) [N/m/?] n Autoselect pertinent helper modules (I2C_HELPER_AUTO) [N/y/?] n SMBus-specific protocols (I2C_SMBUS) [N/m/?] n I2C/SMBus Test Stub (I2C_STUB) [N/m/?] n I2C slave support (I2C_SLAVE) [Y/?] y I2C eeprom slave driver (I2C_SLAVE_EEPROM) [N/m/?] n I2C eeprom testunit driver (I2C_SLAVE_TESTUNIT) [N/m/?] (NEW)
Ideally I2C_SLAVE should probably be packaged as kmod-i2c-slabe. For now just modify kmod-i2c-bcm-iproc to fix kernel compilation.
mkmerakifw-old was created for the z1 which uses the AR9344 SoC with be32 addressing. The MX64/MX65 devices use the same header style, however these boards use a BCM NSP SoC with le32 addressing.
Since we may be booting initramfs images with this header, which may be of any size, within reason, board->imagelen is set to 0. The kernel image shoule be limited in the image Makefile.
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com> Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (commit: 6f39649)
The previous procd update broke mounting overlayfs in an attempt to fix an off-by-one error. Revert that broken fix and apply fix from Nick Hainke <vincent@systemli.org> instead to bring things back to life.
20adf53 Revert "initd: fix off-by-one error in mkdev.c" 773e8da initd: fix off-by-one error in mkdev.c
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (commit: bf94c2d)
Change the CONFLICTS definition from the alternative package (ethtool-full) to the main one.
The CONFLICTS line creates a dependency to the conflicting package.
Right now, the dependency would be created in the PACKAGE_ethtool-full symbol:
config PACKAGE_ethtool-full depends on m || (PACKAGE_ethtool != y)
When the main package is selected by airmon-ng, it selects PACKAGE_ethtool, *depending* on the value of PACKAGE_ethtool-full:
config PACKAGE_airmon-ng select PACKAGE_ethtool if PACKAGE_ethtool-full<PACKAGE_airmon-ng
In the first block, the value of PACKAGE_ethtool-full depends on the value of PACKAGE_ethtool. In the second block, the opposite is true: the value of PACKAGE_ethtool depends on the value of PACKAGE_ethtool-full. This is a recursive dependency.
Fix it by changing the package where the dependency is created, so that only the value of PACKAGE_ethtool will depend on PACKAGE_ethtool-full.
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com> (commit: 4d0883c)
929c862 vm: fix toplevel function call protocol 8f34d70 fs: fix chown() and rename() error return values 03ca445 tests: disable fuzz tests for now 3b1be3d types: mark further GC roots d49af4e types: fix comparison of differently signed integers c79ff39 types: handle conversion errors when dealing with negative error indexes 3315b1f types: allow negative array indexes d5b25f9 treewide: harmonize function naming cc4ce8d module: remove unused defines f5d7526 examples: add libucode usage examples 559eff2 types, vm: adjust GC api e5e7e62 treewide: move header files into dedicated directory ff6168a build: install header files 7e6ce0f main: introduce new flag `-x` to allow disabling specific functions b1817b3 vm: fix invalid memory access on GC'ing uninitialized VM context 498fe87 main: refactor option parsing and VM setup ff52440 treewide: consolidate typedef naming 1d60418 vm: add API to control trace mode 48f33ad vm: make root exception handler configurable 0f69f09 vm: fix invalid memory access on toplevel function calls 6bcc318 vm: fix handling exceptions in top-level function calls 4ae0568 lib, vm: reimplement exit() as exception type 2f77657 vm: extend API to allow returning result value from VM execution 111645a vm: remove module preloading logic 38ff6de main: preload modules ourselves d5bc223 vm: add uc_vm_invoke() helper ef0baf1 vm: cosmetic fix for outputting exceptions without source context b11a2fa vm: move global scope allocation into uc_vm_init() 900b2a3 vm: add getter and setter for vm globals scope 0179576 lib: rename uc_add_proto_functions() to uc_add_functions() 98b9c84 lib: expose stdlib function array 1adfba0 treewide: eliminate dead code and unused functions 3974e71 treewide: replace a number of unnecessary type casts bf85226 treewide: move ressource type registry into vm instance e2b3d2e build: split into libucode and ucode cli dad8f3a types: properly deal with circular data in GC mark phase 62dbd64 lexer: rename UT_ prefixed constants to UC_ bc8e465 types: fix wrong assert() on tearing down object trees 853b9f1 vm: fix potential invalid memory access in uc_vm_get_error_context() 6f05cdd lib: fix refcount imbalance in uc_require_path() 96f140b lib, vm: ensure that require() compiles modules only once df5db5f compiler: don't segfault on invalid declaration expressions a97c7a1 lexer: transition into EOF state on unrecognized character 2a838d1 compiler: improve mapping of binary operator tokens to instructions 9872f65 vm: add support for I_LE and I_GE instructions 4e410c3 treewide: let uc_cmp() use instruction instead of token numbers ce6081d lexer, vm: reorder token and instruction numbers 234a4f6 lib: implement b64enc() and b64dec() functions 856a0c0 lib: only consider context of calling function for callbacks 86fb130 lib: implement min() and max() functions 3e893e6 lib: pass-through "this" context to library function callbacks 42de7ab lib: implement `sourcepath()` function 05c80a7 lib: fix negative uc_index() return value on 32bit systems 9874562 lexer: implement raw code mode 3b665c8 lexer: drop value union from keyword table 44354cf lexer, compiler: separate TK_BOOL token into TK_TRUE and TK_FALSE tokens 5879bdf syntax: drop Infinity and NaN keywords d4edadc lib: rename uc_lib_init() to uc_load_stdlib() d81bad7 main, lib: move allocation of globals object into lib function c4f4b38 main: simplify REQUIRE_SEARCH_PATH initialization 54ca3aa types: fix uninitialized memory on setting non-contiguous array indexes cbc0d78 build: let require search patch default to CMAKE_INSTALL_PREFIX 5714705 syntax: introduce `const` support ed32c42 compiler, lexer: add NO_LEGACY define to disable legacy syntax features ff6811f syntax: implement `delete` as proper operator 5803d86 lib: implement wildcard() function dfb7379 fs: implement chmod(), chown(), rename() and glob() functions 1ddf5b6 lexer: skip interpreter line in any source buffer 9951a00 build: lower minimum required CMake version to v3.13 7b81ab2 main: expose argv as global ARGV array to ucode scripts 7283a70 tests: rename misnamed testcases for consistency 3f80116 compiler: fix local for-loop initializer variable declarations f20b56f compiler: properly parse slashes in parenthesized division expressions 5c4e1ea lib: implement regexp(), a function to construct regexp instances at runtime e546bba lib: implement render(), an include variant capturing output in a string 0cb10c6 vm: implement mechanism to change output file descriptor eb8a64d lib: fix uc_sort() f1ffc9f vm: truncate long values after 60 chars in trace output 850612f compiler: properly handle break/continue in nested scopes f0a9875 compiler: properly handle keyword in parenthesized property access expression 1660433 compiler: fix stack mismatch on compiling `use strict` statements a36e0df syntax: implement support for 'use strict' pragma 827a34a vm, compiler: get rid of unused struct members 594cdf3 lib: implement assert() c4d1648 lib: add support for pretty printing JSON to printf() and sprintf() f2eaea3 lib: gracefully handle truncated format strings in uc_printf_common() 02629b8 lexer: fix infinite loop on parsing unterminated comments 2bc9bac lexer: fix infinite loop on parsing unterminated expression blocks f73e201 lexer: fix infinite loop when parsing regexp literal at EOF 86b4863 compiler: fix segfault on parsing invalid pre/post increment expressions 0e24509 lib: fix reporting source context lines at EOF e66b2ad compiler, lexer: improve lexical state handling e29b574 lib: fix uc_split() quirks 64eec7f treewide: ISO C / pedantic compliance 4af803d build: output error messages on test failures 9ef693e vm: improve context for early errors 6def9fc tests: pass ucode library path through environment d5dd183 treewide: address various sign-compare warnings 28825ac types: support creating ressource values without associated type 9c5106a types: fix potential memory leaks and null pointer accesses c51934a types: fix potential leak of key in ucv_object_add() 7b28727 main: fix ineffective EOF check in parse() 4cf897c lib: uc_system(): fix invalid free() of non-heap memory 35af4ba treewide: rework internal data type system f2c4b79 treewide: fix issues reported by clang code analyzer 93ededb tests: allow executing run_tests.sh from any directory 0e4a387 Add initial GitLab and GitHub CI support df73b25 tests: add more tests 41d33d0 tests: custom: return exit code if tests fails 1c548a6 cmake: do not output binaries into lib directory 2b59097 tests: create custom tests from current tests cases 8039361 main: provide just binary name in help output 778e4f7 lexer: fix incomplete struct initializers 502ecdc cmake: enable extra compiler checks 3c2aeff cmake: fix includes and libraries 617a114 cmake: make 3.0 minimum version f360350 lib: implement sleep(ms) function 7f0ff91 lib: allow parsing non-array, non-object value in json()
Flash instruction: *important*: upgrade vendor firmware to at least V7.1cu.643_B20200521 1. hold the reset button and power on the device. wait for about 10s before releasing the reset button. 2. upload sysupgrade.bin via u-boot recovery page on http://192.168.1.1
* Remove one old patch that does not apply any more. (203) That was originally introduced in 2008 with 563d23459, but does not apply after busybox restructuring with https://git.busybox.net/busybox/commit/networking/udhcp/dhcpc.c?h=1_34_stable&id=e6007c4911c3ea26925f9473b9f156a692585f30 and https://git.busybox.net/busybox/commit/networking/udhcp/dhcpc.c?h=1_34_stable&id=1c7253726fcbab09917f143f0b703efbd2df55c3
* Refresh config and patches.
* Backport upstream fixes for - MIPS compilation breakage and - process substitution regression
Config refresh:
Refresh commands, run after busybox is first built once:
cd utils/busybox/ cd config/ ../convert_menuconfig.pl ../../../../build_dir/target-aarch64_cortex-a53_musl/busybox-default/busybox-1.34.0 cd .. ./convert_defaults.pl < ../../../build_dir/target-aarch64_cortex-a53_musl/busybox-default/busybox-1.34.0/.config > Config-defaults.in
Manual edits needed afterward:
* Config-defaults.in: OpenWrt config symbol IPV6 logic applied to BUSYBOX_DEFAULT_FEATURE_IPV6 * Config-defaults.in: OpenWrt configTARGET_bcm53xx logic applied to BUSYBOX_DEFAULT_TRUNCATE (commit 547f1ec) * Config-defaults.in: OpenWrt logic applied to BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD (commit dc92917) BUSYBOX_DEFAULT_UDHCPC_DEFAULT_INTERFACE (just "") * config/editors/Config.in: Add USE_GLIBC dependency to BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH (commit f141090) * config/shell/Config.in : change at "Options common to all shells" the symbol SHELL_ASH --> BUSYBOX_CONFIG_SHELL_ASH (discussion in http://lists.openwrt.org/pipermail/openwrt-devel/2021-January/033140.html Apparently our script does not see the hidden option while prepending config options with "BUSYBOX_CONFIG_" which leads to a missed dependency when the options are later evaluated.) * Edit Config.in files by adding quotes to sourced items in config/Config.in, config/networking/Config.in and config/util-linux/Config.in (commit 1da014f)
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> (commit: b6cbbbb)
This device is a wireless access point working on the 2.4 GHz and 5 GHz band, based on Qualcomm/Atheros QCA9563 + QCA9886.
Specification - 775 MHz CPU - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - QCA9563: 2.4 GHz 3x3 - QCA9886: 5 GHz - AR8033: 1x 1 Gbs Ethernet - 4x LED, WPS factory reset and power button - bare UART on PCB (accessible through testpoints)
Methods for Flashing: - Apply factory image in OEM firmware web-gui. Wait a minute after the progress bar completes and restart the device. - Sysupgrade on top of existing OpenWRT image - Solder wires onto UART testpoints and attach a terminal. Boot the device and press enter to enter u-boot's menu. Then issue the following commands 1. setenv serverip your-server-ip setenv ipaddr your-device-ip 2. tftp 0x80060000 openwrt-squashfs.bin (Rembember output of size in hex, henceforth "sizeinhex") 3. erase 0x9f030000 +"sizeinhex" 4. cp.b 0x80060000 0x9f030000 0x"sizeinhex" 5. reboot
Recover: - U-boot serial console
Signed-off-by: Robert Balas <balasr@iis.ee.ethz.ch> [convert to nvmem] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: baacdd5)
Sitecom WLR-4100 v1 002 (marked as X4 N300) is a wireless router Specification: SoC: MT7620A RAM: 64 MB DDR2 Flash: MX25L6405D SPI NOR 8 MB WIFI: 2.4 GHz integrated Ethernet: 5x 10/100/1000 Mbps QCA8337 USB: 1x 2.0 LEDS: 2x GPIO controlled, 5x switch Buttons: 1x GPIO controlled UART: row of 4 unpopulated holes near USB port, starting count from white triangle on PCB:
VCC 3.3V GND TX RX
baud: 115200, parity: none, flow control: none
Installation
Connect to one of LAN (yellow) ethernet ports, Open router configuration interface, Go to Toolbox > Firmware, Browse for OpenWrt factory image with dlf extension and hit Apply, Wait few minutes, after the Power LED will stop blinking, the router is ready for configuration.
Known issues Some USB 2.0 devices work at full speed mode 1.1 only
MAC addresses
factory partition only contains one (binary) MAC address in 0x4. u-boot-env contains four (ascii) MAC addresses, of which two appear to be valid.
The factory firmware only assigns ethaddr. Thus, we take the binary value which we can use directly in DTS.
Additional information OEM firmware shell password is: SitecomSenao useful for creating backup of original firmware. There is also another revision of this device (v1 001), based on RT3352 SoC
Signed-off-by: Andrea Poletti <polex73@yahoo.it> [remove config DT label, convert to nvmem, remove MAC address setup from u-boot-env, add MAC address info to commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: de0c380)
firmware-utils: seama.h: replace LGPL-2.1-or-later boilerplate with SPDX
This was missed because scancode license scanner was confused by a slightly different than expected license text (96,75% license score).
License text included "file" instead of "library" in the main part of the licensing info. It also used "The GNU C Library" instead of the standard "This library" in 2nd and 3rd paragraphs.
The first paragraph clearly mentions LGPL-2.1-or-later and the use of "file" instead of "library" should not affect licensing.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (commit: 2f7a733)
The default value for CONFIG_RCU_CPU_STALL_TIMEOUT was changed from 60 seconds to 21 seconds in 2012 in the upstream kernel. Some targets already use 21 seconds.
This patch changes the default value in the generic configuration to 21 seconds and removes the target specific configuration options.
When doing parallel build on a fast machine with bottleneck in i/o, m_xt.so may start linking faster than dynsyms.list gets populated, resulting in error:
ld:dynsyms.list:0: syntax error in dynamic list
Fix this by adding dynsyms.list as make dependency to m_xt.so Described also here: https://bugs.openwrt.org/index.php?do=details&task_id=3353
Change from v1: - add dynsysms.list dependancy only when shared libs are enabled
Signed-off-by: Roman Yeryomin <roman@advem.lv> Fixes: FS#3353 (commit: edd53df)
mvebu: backport CN9130 dts necessary files changes to 5.4
1. Add support for Marvell CN9130 SoC 2. Add support for CP115,and create an armada-cp11x.dtsi file which will be used to instantiate both CP110 and CP115 3. Add support for AP807/AP807-quad,AP807 is a major component of CN9130 SoC series 4. Drop PCIe I/O ranges from CP11x file and externalize PCIe macros from CP11x file
Signed-off-by: Ian Chang <ianchang@ieiworld.com> (commit: c98ddf0)
firmware-utils: tplink-safeloader: use revision field
The structured soft-version partition has a field which contains a (source) revision number. Factory images used to include this, but it was accidentaly removed during an earlier refactoring.
Include the source revision number again in the generated soft-version partition. Additionaly, also show this revision number when printing image info.