aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
Commit message (Collapse)AuthorAgeFilesLines
...
* kernel: backport LEDs driver for BCMBCA devicesRafał Miłecki2022-07-185-0/+499
| | | | | | | This includes BCM63xx and BCM4908 families. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit d9ab1e56d8d16182bd292f393c012d7e6873ed89)
* ath79: bsap18x0: pad rootfs imageTomasz Maciej Nowak2022-07-151-1/+1
| | | | | | | | | | | This image is supposed to be written with help of bootloader to the flash, but as it stands, it's not aligned to block size and RedBoot will happily create non-aligned partition size in FIS directory. This could lead to kernel to mark the partition as read-only, therefore pad the image to block erase size boundary. Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com> (cherry picked from commit 9decd2a8436d2bb6b5f436268c92a6e6728486ce)
* ath79: ja76pf2: use nvmem cells to specify MAC addressesTomasz Maciej Nowak2022-07-152-4/+15
| | | | | | | | | | | | | The bootloader on this board hid the partition containig MAC addresses and prevented adding this space to FIS directory, therefore those had to be stored in RedBoot configuration as aliases to be able to assigne them to proper interfaces. Now that fixed partition size are used instead of redboot-fis parser, the partition containig MAC addresses could be specified, and with marking it as nvmem cell, we can assign them without userspace involvement. Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com> (cherry picked from commit b52719b71a3337e5ae840c7a50fe41ebdc070f4e)
* ath79: move image check for devices with RedBootTomasz Maciej Nowak2022-07-152-31/+46
| | | | | | | | | | | Don't comence the switch to RAMFS when the image format is wrong. This led to rebooting the device, which could lead to false impression that upgrade succeded. Being here, factor out the code responsible for upgrading RedBoot devices to separate file. Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com> (cherry picked from commit 5897c52e78e3cd3846db083d48dd9d6b47ff3a08)
* ath79: switch some RedBoot based devices to OKLI loaderTomasz Maciej Nowak2022-07-157-37/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the kernel has switched version to 5.10, JA76PF2 and RouterStations lost the capability to sysupgrade the OpenWrt version. The cause is the lack of porting the patches responsible for partial flash erase block writing and these boards FIS directory and RedBoot config partitions share the same erase block. Because of that the FIS directory can't be updated to accommodate kernel/rootfs partition size changes. This could be remedied by bootloader update, but it is very intrusive and could potentially lead to non-trivial recovery procedure, if something went wrong. The less difficult option is to use OpenWrt kernel loader, which will let us use static partition sizes and employ mtd splitter to dynamically adjust kernel and rootfs partition sizes. On sysupgrade from ath79 19.07 or 21.02 image, which still let to modify FIS directory, the loader will be written to kernel partition, while the kernel+rootfs to rootfs partition. The caveats are: * image format changes, no possible upgrade from ar71xx target images * downgrade to any older OpenWrt version will require TFTP recovery or usage of bootloader command line interface To downgrade to 19.07 or 21.02, or to upgrade if one is already on OpenWrt with kernel 5.10, for RouterStations use TFTP recovery procedure. For JA76PF2 use instructions from this commit message: commit 0cc87b3bacee ("ath79: image: disable sysupgrade images for routerstations and ja76pf2"), replacing kernel image with loader (loader.bin suffix) and rootfs image with firmware (firmware.bin suffix). Fixes: b10d6044599d ("kernel: add linux 5.10 support") Fixes: 15aa53d7ee65 ("ath79: switch to Kernel 5.10") Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com> (mkubntimage was moved to generic-ubnt.mk) Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (cherry picked from commit 5c142aad7bc018fe000789740a486c49973035b8)
* rockchip: reliably distribute net interruptsRonny Kotzschmar2022-07-151-2/+9
| | | | | | | | | | On the NanoPI R4S it takes an average of 3..5 seconds for the network devices to appear in '/proc/interrupts'. Wait up to 10 seconds to ensure that the distribution of the interrupts really happens. Signed-off-by: Ronny Kotzschmar <ro.ok@me.com> (cherry picked from commit 9b00e9795660f53caf1f4f5fd932bbbebd2eeeb1)
* realtek: build sane factory images for DGS-1210 modelsMarkus Stockhausen2022-07-082-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | During upload of firmware images the WebUI and CLI patch process extracts a version information from the uploaded file and stores it onto the jffs2 partition. To be precise it is written into the flash.txt or flash2.txt files depending on the selected target image. This data is not used anywhere else. The current OpenWrt factory image misses this label. Therefore version information shows only garbage. Fix this. Before: DGS-1210-20> show firmware information IMAGE ONE: Version : xfo/QE~WQD"A\Scxq... Size : 5505185 Bytes After: DGS-1210-20> show firmware information IMAGE ONE: Version : OpenWrt Size : 5505200 Bytes Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> (cherry picked from commit fae3ac3560459320a88be86b31c572c4bca42645)
* realtek: build factory images for all DGS-1210 modelsMarkus Stockhausen2022-07-081-7/+7
| | | | | | | | | | Currently we build factory images only for DGS-1210-28 model. Relax that constraint and take care about all models. Tested on DGS-1210-20 and should work on other models too because of common flash layout. Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> (cherry picked from commit 2b49ec3a28ad09446f48f1f830a42bdfe3bce9be)
* realtek: rename u-boot-env2 to board-nameLuiz Angelo Daros de Luca2022-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | Some realtek boards have two u-boot-env partitions. However, in the DGS-1210 series, the mtdblock2 partition is not a valid u-boot env and simply contains the board/device name, followed by nulls. 00000000 44 47 53 2d 31 32 31 30 2d 32 38 2d 46 31 00 00 |DGS-1210-28-F1..| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00040000 00000000 44 47 53 2d 31 32 31 30 2d 35 32 2d 46 31 00 00 |DGS-1210-52-F1..| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00040000 The misleading u-boot-env2 name also confuses uboot-envtools. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> (cherry picked from commit 8b798dbb39856463878efb07ddef87ce2e522ceb)
* realtek: build DGS-1210 images with CAMEO tagMarkus Stockhausen2022-07-082-0/+5
| | | | | | | | | From now on we will insert CAMEO tags into sysupgrade images for DGS-1210 devices. This will make the "OS:...FAILED" and "FS:...FAILED" messages go away. Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> (cherry picked from commit e763c4c89fc5569d7264ff60837eb4aff69a0bfb)
* realtek: add DGS-1210-28 factory imageLuiz Angelo Daros de Luca2022-07-082-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DGS-1210 switches support dual image, with each image composed of a kernel and a rootfs partition. For image1, kernel and rootfs are in sequence. The current OpenWrt image (written using a serial console), uses those partitions together as the firmware partition, ignoring the partition division. The current OEM u-boot fails to validate image1 but it will only trigger firmware recovery if both image1 and image2 fail, and it does not switch the boot image in case one of them fails the check. The OEM factory image is composed of concatenated blocks of data, each one prefixed with a 0x40-byte cameo header. A normal OEM firmware will have two of these blocks (kernel, rootfs). The OEM firmware only checks the header before writing unconditionally the data (except the header) to the correspoding partition. The OpenWrt factory image mimics the OEM image by cutting the kernel+rootfs firmware at the exact size of the OEM kernel partition and packing it as "the kernel partition" and the rest of the kernel and the rootfs as "the rootfs partition". It will only work if written to image1 because image2 has a sysinfo partition between kernel2 and rootfs2, cutting the kernel code in the middle. Steps to install: 1) switch to image2 (containing an OEM image), using web or these CLI commands: - config firmware image_id 2 boot_up - reboot 2) flash the factory_image1.bin to image1. OEM web (v6.30.016) is crashing for any upload (ssh keys, firmware), even applying OEM firmwares. These CLI commands can upload a new firmware to the other image location (not used to boot): - download firmware_fromTFTP <tftpserver> factory_image1.bin - config firmware image_id 1 boot_up - reboot To debrick the device, you'll need serial access. If you want to recover to an OpenWrt, you can replay the serial installation instructions. For returning to the original firmware, press ESC during the boot to trigger the emergency firmware recovery procedure. After that, use D-Link Network Assistant v2.0.2.4 to flash a new firmware. The device documentation does describe that holding RESET for 12s trigger the firmware recovery. However, the latest shipped U-Boot "2011.12.(2.1.5.67086)-Candidate1" from "Aug 24 2021 - 17:33:09" cannot trigger that from a cold boot. In fact, any U-Boot procedure that relies on the RESET button, like reset settings, will only work if started from a running original firmware. That, in practice, cancels the benefit of having two images and a firmware recovery procedure (if you are not consider dual-booting OpenWrt). Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> (cherry picked from commit 1005dc0a64587e954364ff3a64bbb38b2ca371cd)
* bcm53xx: enable & setup packet steeringRafał Miłecki2022-07-082-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Packet steering can improve NAT masquarade performance on Northstar by 40-50%. It makes reaching 940-942 Mb/s possible on BCM4708 (and obviously BCM47094 too). Add scripts setting up the most optimal Northstar setup. Below are testing results for running iperf TCP traffic from LAN to WAN. They were used to pick up golden values. ┌──────────┬──────────┬────────────────────┬────────────────────┐ │ eth0 │ br-lan │ flow_offloading=0 │ flow_offloading=1 │ │ │ ├─────────┬──────────┼─────────┬──────────┤ │ rps_cpus │ rps_cpus │ BCM4708 │ BCM47094 │ BCM4708 │ BCM47094 │ ├──────────┼──────────┼─────────┼──────────┼─────────┼──────────┤ │ 0 │ 0 │ 387 │ 671 │ 707 │ 941 │ │ 0 │ 1 │ 343 │ 576 │ 705 │ 941 │ │ 0 │ 2 │ ✓ 574 │ ✓ 941 │ 704 │ 940 │ │ 1 │ 0 │ 320 │ 549 │ 561 │ 941 │ │ 1 │ 1 │ 327 │ 551 │ 553 │ 941 │ │ 1 │ 2 │ 523 │ ✓ 940 │ 559 │ 940 │ │ 2 │ 0 │ 383 │ 652 │ ✓ 940 │ 941 │ │ 2 │ 1 │ 448 │ 754 │ ✓ 942 │ 941 │ │ 2 │ 2 │ 404 │ 655 │ ✓ 941 │ 941 │ └──────────┴──────────┴─────────┴──────────┴─────────┴──────────┘ Above tests were performed with all eth0 interrupts handled by CPU0. Setting "echo 2 > /proc/irq/38/smp_affinity" was tested on BCM4708 but it didn't increased speeds (just required different steering): ┌──────────┬──────────┬───────────┐ │ eth0 │ br-lan │ flow_offl │ │ rx-0 │ rx-0 │ oading=0 │ │ rps_cpus │ rps_cpus │ BCM4708 │ ├──────────┼──────────┼───────────┤ │ 0 │ 0 │ 384 │ │ 0 │ 1 │ ✓ 574 │ │ 0 │ 2 │ 348 │ │ 1 │ 0 │ 383 │ │ 1 │ 1 │ 412 │ │ 1 │ 2 │ 448 │ │ 2 │ 0 │ 321 │ │ 2 │ 1 │ 520 │ │ 2 │ 2 │ 327 │ └──────────┴──────────┴───────────┘ Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit fcbd39689ebfef20c62fe3882d51f3af765e8028)
* bcm53xx: disable GRO by default at kernel levelRafał Miłecki2022-07-081-0/+36
| | | | | | | | | | | This improves NAT masquarade network performance. An alternative to kernel change would be runtime setup but that requires ethtool and identifying relevant network interface and all related switch ports interfaces. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 82d0dd8f8aa11249944fe39cd0d75a1524ec22ec)
* bcm53xx: revert bgmac back to the old limited max frame sizeRafał Miłecki2022-07-081-0/+33
| | | | | | | | | | | | Bumping max frame size has significantly affected network performance. It was done by upstream commit that first appeared in the 5.7 release. This change bumps NAT masquarade speed from 196 Mb/s to 383 Mb/s for the BCM4708 SoC. Ref: f55f1dbaad33 ("bcm53xx: switch to the kernel 5.10") Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 230c9da963aad9e1a2f8f128c30067ccad2efef8)
* kernel: drop patch adding hardcoded kernel compilation flagsRafał Miłecki2022-07-081-25/+0
| | | | | | | | | | | | | | | | | | | | 1. KCFLAGS should be used for custom flags 2. Optimization flags are arch / SoC specific 3. -fno-reorder-blocks may *worsen* network performace on some SoCs 4. Usage of flags was *reversed* since 5.4 and noone reported that If we really need custom flags then CONFIG_KERNEL_CFLAGS should get default value adjusted properly (per target). Ref: 4e0c54bc5bc8 ("kernel: add support for kernel 5.4") Link: http://lists.openwrt.org/pipermail/openwrt-devel/2022-June/038853.html Link: https://patchwork.ozlabs.org/project/openwrt/patch/20190409093046.13401-1-zajec5@gmail.com/ Cc: Felix Fietkau <nbd@nbd.name> Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: Rui Salvaterra <rsalvaterra@gmail.com> Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 22168ae68101b95d03741b0e9e8ad20b8a5ae5b7)
* kernel: use KCFLAGS for passing EXTRA_OPTIMIZATION flagsRafał Miłecki2022-07-081-9/+3
| | | | | | | | | | This uses kernel's generic variable and doesn't require patching it with a custom Makefile change. It's expected *not* to change any behaviour. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 1d42af720c6b6dcfcdd0b89bce386fca1607dcb3) Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> (cherry picked from commit 24e27bec9a6df1511a504cf04cd9578a23e74657)
* kernel: Add missing mediatek configuration optionsHauke Mehrtens2022-07-062-2/+3
| | | | | | | | | | | | When building the mediatek/mt7629 target in OpenWrt 22.03 the kernel does not have a configuration option for CONFIG_CRYPTO_DEV_MEDIATEK. Add this option to the generic kernel configuration and also add two other configuration options which are removed when we refresh the mt7629 kernel configuration. Fixes: 2bea35cb55d7 ("mediatek: remove crypto-hw-mtk package") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit dcc0fe24ea216d32300c0f01c8879e586d89cc1e)
* mediatek: mt7622: fix white dome LED of UniFi 6 LRDaniel Golle2022-07-041-3/+1
| | | | | | | | | | | The recent differentiation between v1 and v2 of the UniFi 6 LR added support for the v2 version which has GPIO-controlled LEDs instead of using an additional microcontroller to drive an RGB led. The polarity of the white LED, however, was inverted and the default states didn't make a lot of sense after all. Fix that. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit f58e562b07803192d029a6be8c8c372e1ed11c68)
* mvebu: cortexa72: fix ImageBuilder for IEI Puzzle devicesDaniel Golle2022-07-041-2/+0
| | | | | | | | | | The line trying to generate the standard sdcard.img.gz fails due to boot.scr not being generated. Remove the line in order to use the default sdcard.img.gz which is exactly the same but includes generating the boot.scr file. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 1d3b57dbeeae70ab3a8f71d3bdb6fd41a00e1d22)
* mediatek: add Ubiquiti UniFi 6 LR v2 targetsHenrik Riomar2022-07-044-0/+239
| | | | | | | | | | | | | | | | Add targets: * Ubiquiti UniFi 6 LR v2 * Ubiquiti UniFi 6 LR v2 (U-Boot mod) This target does not have a RGB led bar like v1 did Used target/linux/ramips/dts/mt7621_ubnt_unifi.dtsi as inspiration The white dome LED is default-on, blue will turn on when the system is in running state Signed-off-by: Henrik Riomar <henrik.riomar@gmail.com> (cherry picked from commit 31d86a1a119265393db02aa66e6bc6518ee7b905)
* mediatek: new target ubnt_unifi-6-lr-v1-ubootmodHenrik Riomar2022-07-042-5/+6
| | | | | | | | | based on current ubnt_unifi-6-lr-ubootmod Signed-off-by: Daniel Golle <daniel@makrotopia.org> [added SUPPORTED_DEVICES for compatibility with existing setups] Signed-off-by: Henrik Riomar <henrik.riomar@gmail.com> (cherry picked from commit 5c8d3893a78fd81454930de30d90efaef99f8734)
* mediatek: new target mt7622-ubnt-unifi-6-lr-v1Henrik Riomar2022-07-045-31/+35
| | | | | | | | | | | | | Based on current mt7622-ubnt-unifi-6-lr, this is a preparation for adding a v2 version of this target * v1 - with led-bar * v2 - two simple GPIO connected LEDs (in later commits) Signed-off-by: Daniel Golle <daniel@makrotopia.org> [added SUPPORTED_DEVICES for compatibility with existing setups] Signed-off-by: Henrik Riomar <henrik.riomar@gmail.com> (cherry picked from commit 15a02471bb854245f8f94398c1e1d9ce29c2c341)
* mediatek: build ubnt-ledbar as a moduleChuanhong Guo2022-07-044-4/+18
| | | | | | | | | The config for LEDS_UBNT_LEDBAR doesn't stay in mt7629 kconfig because of its I2C dependency. Build it as a module and let buildroot handle this config option instead. Signed-off-by: Chuanhong Guo <gch981213@gmail.com> (cherry picked from commit d9ea9c06e98b597174e0e94e0a13934637c0c03e)
* mediatek: remove crypto-hw-mtk packageEneas U de Queiroz2022-07-041-23/+0
| | | | | | | | The MediaTek's Crypto Engine module is only available for mt7623, in which case it is built into the kernel. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com> (cherry picked from commit 3f2d0703b60357e3ff1865783335be9f51528eb8)
* mediatek: mt7622: fix banana pi r64 wps buttonNick Hainke2022-07-041-0/+40
| | | | | | | | | | | | | | | | Fix the wps button to prevent wrongly detected recovery procedures. In the official banana pi r64 git the wps button is set to GPIO_ACTIVE_LOW and not GPIO_ACTIVE_HIGH. Import patch to fix on boot unwanted recovery entering: Press the [f] key and hit [enter] to enter failsafe mode Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level - failsafe button wps was pressed - - failsafe - Signed-off-by: Nick Hainke <vincent@systemli.org> (cherry-picked from commit 668619425526cb0d43f8536a2f6f15a6314e6553)
* mediatek/mt7629: Activate CONFIG_ARM_ARCH_TIMER_EVTSTREAMHauke Mehrtens2022-07-031-0/+2
| | | | | | | | | | The kernel configuration option CONFIG_MACH_MT7629 selects CONFIG_HAVE_ARM_ARCH_TIMER now. Handle this change in the config-5.10. This fixes some build problems. Fixes: 81530d69ef58 ("kernel: bump 5.10 to 5.10.121") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: Refresh patches for all targetsHauke Mehrtens2022-07-0336-155/+79
| | | | | | | | | | | | | | | | This refreshes the patches on top of kernel 5.4.127. Deleted (upstreamed): bcm27xx/patches-5.10/950-0005-Revert-mailbox-avoid-timer-start-from-callback.patch [0] bcm27xx/patches-5.10/950-0678-bcm2711_thermal-Don-t-clamp-temperature-at-zero.patch [1] Needed manual modifications: bcm27xx/patches-5.10/950-0410-drm-atomic-Pass-the-full-state-to-CRTC-atomic-begin-.patch [0]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.127&id=bb2220e0672b7433a9a42618599cd261b2629240 [1]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.127&id=83603802954068ccd1b8a3f2ccbbaf5e0862acb0 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ramips: improve YunCore AX820 LEDsThibaut VARÈNE2022-07-011-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least two AX820 hardware variants are known to exist, but they cannot be distinguished (same hardware revision, no specific markings). They appear to have the same LED hardware, but wired differently: - One has a red system LED at GPIO 15, a green wlan2g LED at GPIO 14 and a blue wlan5g LED at GPIO 16; - The other only offers a green system LED at GPIO 15, with GPIO 14 and 16 being apparently not connected Finally, a Yuncore datasheet says the canonical wiring should be: - Blue wlan2g GPIO 14, green system GPIO 15, red wlan5g GPIO 16 All GPIOs are tied to a single RGB LED which is exposed via lightpipe on the device front casing. Considering the above, this patch exposes all three LEDs, preserves the common system LED (GPIO 15) as the openwrt status LED, and removes the color information from the LEDs names since it is not consistent across hardware. The LED naming is made consistent with other YunCore devices. A note is added in DTS to ensure this information is always available and prevent unwanted changes in the future. Fixes: #10131 "YunCore AX820: GPIO LED not correct" Reviewed-by: Sander Vanheule <sander@svanheule.net> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* kernel: bump 5.10 to 5.10.127John Audia2022-07-018-18/+18
| | | | | | | All patches automatically rebased. Signed-off-by: John Audia <therealgraysky@proton.me> (cherry picked from commit 433dc5892a60003753655aac6e6a4b59fb13b2e4)
* qoriq: enable Book-E Watchdog TimerStijn Tintel2022-07-011-0/+2
| | | | | | | | | | | | | | | | Enable PowerPC Book-E Watchdog Timer support. Having this enabled in-kernel will result in procd starting it during boot. This effectively solves the problem of the WDT in the Winbond W83793 chip potentially resetting the system during sysupgrade, which could result in an unbootable device. While the driver is modular, resulting in procd not starting the WDT during boot (because that happens before kmod load), the WDT handover during sysupgrade results in the WDT being started. This normally shouldn't be a problem, but the W83793 WDT does not like procd's defaults, nor the handover happening during sysupgrade. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit 04071cb111f290417074de130d34ae5895fd3a7b)
* ipq40xx: cut ath10k board file for mikrotik subtargetJohn Thomson2022-07-013-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid shipping ath10k board file in Mikrotik initram images Most will only ever need to use these initram images once—to initially load OpenWrt, but fix these images for more consistent Wi-Fi performance between the initram and installed squashfs images. OpenWrt BUILDBOT config ignores -cut packages in the initram images build. This results in BUILDBOT initram images including the linux-firmware qca4019 board-2.bin, and (initram image booted) Mikrotik devices loading a generic BDF, rather than the intended BDF data loaded from NOR as an api 1 board_file. buildbot snapshot booted as initram image: cat /etc/openwrt_version r19679-810eac8c7f dmesg | grep ath10k | grep -E board\|BDF [ 9.794556] ath10k_ahb a000000.wifi: Loading BDF type 0 [ 9.807192] ath10k_ahb a000000.wifi: board_file api 2 bmi_id 0:16 crc32 11892f9b [ 12.457105] ath10k_ahb a800000.wifi: Loading BDF type 0 [ 12.464945] ath10k_ahb a800000.wifi: board_file api 2 bmi_id 0:17 crc32 11892f9b CC: Robert Marko <robimarko@gmail.com> Fixes: 5eee67a72fed ("ipq40xx: mikrotik: dont include ath10k-board-qca4019 by default") Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au> Reviewed-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit 602b5f6c60a2827bd918dfae0ffb271f8b88f4df) Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ipq40xx: mikrotik: dont include ath10k-board-qca4019 by defaultRobert Marko2022-07-011-0/+1
| | | | | | | | | | | | | Since MikroTik subtarget now uses dynamic BDF loading its crucial that it doesnt include the board-2.bin at all which is provided by the ath10k-board-qca4019 package. So to resolve this dont include the ath10k-board-qca4019 package on the MikroTik subtarget. Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit 5eee67a72fed52ac686dd467d93eea95d44c8dff) Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ipq-wifi: remove packaged BDF-s for MikroTik devicesRobert Marko2022-07-011-6/+4
| | | | | | | | | | | | | Since we now provide the BDF-s for MikroTik IPQ40xx devices on the fly, there is noneed to include package and ship them like we do now. This also resolves the performance issues that happen as MikroTik changes the boards and ships them under the same revision but they actually ship with and require a different BDF. Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit ab141a6e2cb645ff64adb107af2e8973a720c1c7) Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ipq40xx: mikrotik: provide BDF-s on demandRobert Marko2022-07-011-0/+23
| | | | | | | | | | | | | Since we now can pass the API 1 BDF-s aka board.bin to the ath10k driver per radio lets use that to provide the BDF-s for MikroTik devices. This also resolves the performance issues that happen as MikroTik changes the boards and ships them under the same revision but they actually ship with and require a different BDF. Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit 4d4462cc2ace4b044e99e9b22a24cb4d89c7db95) Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* qoriq: enable HARDENED_USERCOPYStijn Tintel2022-07-011-1/+0
| | | | | | | | The random crashes observed with HARDENED_USERCOPY enabled no longer seem to occur. Enable HARDENED_USERCOPY to improve security. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit 61587c92425ecdcabb82a6c81cff698a23ffb049)
* qoriq: disable CONFIG_COMPATStijn Tintel2022-07-011-8/+0
| | | | | | | | We do not need support for 32 bit applications, as we're building everything for 64 bit. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit 3e1848ee0ff3b01461a9d2f772bde27a4101f3d9)
* qoriq: 02_network fix sweth globbing logicThibaut VARÈNE2022-07-011-1/+1
| | | | | | | This prevents invalid configuration of non-existent sweth devices. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit 5fdbae463c57fa48709d876abaadbbbd5938f84f)
* qoriq: define reset button for Firebox M300Thibaut VARÈNE2022-07-012-1/+13
| | | | | | | This patch provides support for the Firebox M300 reset button. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit 19231cf83835db563ee7431b502fe1695ef1f559)
* qoriq: define leds for Firebox M300Thibaut VARÈNE2022-07-012-1/+22
| | | | | | | | | This patch provides support for the Firebox M300 only user-controllable bi-color LED, and makes the green "shield" LED act as the typical OpenWrt status led. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit 4ab421b81d383c127135716f56a1e18337575516)
* ath79: add support for RouterBOARD mAPThibaut VARÈNE2022-06-305-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MikroTik mAP-2nd (sold as mAP) is an indoor 2.4Ghz AP with 802.3af/at PoE input and passive PoE passthrough. See https://mikrotik.com/product/RBmAP2nD for more details. Specifications: - SoC: QCA9533 - RAM: 64MB - Storage: 16MB NOR - Wireless: QCA9533 802.11b/g/n 2x2 - Ethernet: 2x 10/100 ports, 802.3af/at PoE in port 1, 500 mA passive PoE out on port 2 - 7 user-controllable LEDs Note: the device is a tiny AP and does not distinguish between both ethernet ports roles, so they are both assigned to lan. With the current setup, ETH1 is connected to eth1 and ETH2 is connected to eth0 via the embedded switch port 2. Flashing: TFTP boot initramfs image and then perform sysupgrade. The "ETH1" port must be used to upload the TFTP image. Follow common MikroTik procedure as in https://openwrt.org/toh/mikrotik/common. Tested-By: Andrew Powers-Holmes <aholmes@omnom.net> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit e1223dbee332b89caf71850eb909104529595c31)
* ipq40xx: mikrotik: make RouterBoot partition writeableThibaut VARÈNE2022-06-305-5/+0
| | | | | | | | | | Linux MTD requires the parent partition be writable for a child partition to be allowed write permission. In order for soft_config to be writeable (and modifiable via sysfs), the parent RouterBoot partition must be writeable Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit bb929a0f9cbabef59eaced57d5162d112640c3cd)
* ath79: mikrotik: add rw soft_config to extra devicesJohn Thomson2022-06-302-2/+0
| | | | | | | | Linux MTD requires the parent partition be writable for a child partition to be allowed write permission. Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au> (cherry picked from commit 86fb287ad564e344d9630d8235104da144406d08)
* kernel: fix variable erasesize patchJohn Thomson2022-06-301-208/+64
| | | | | | | | | | Update this pending patch to remove the untested (variable eraseregions) section, alongside simplifying the patch. Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au> [refresh and split out unrelated refreshes] Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit 4f7065ed250932d6ff725ba175e734ad4c782f14)
* x86: 64: Add kmod-igc to default packagesHauke Mehrtens2022-06-291-1/+1
| | | | | | | | | This adds the igc driver for the Intel 2.5GBit Ethernet chip to the default packages. Fixes: #10064 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit aae3a8a254275f8be5c45d766ac7b5afb82a9fe6)
* kernel: add missing symbol to 5.10 configStijn Tintel2022-06-291-0/+1
| | | | | | | | | Kernel 5.10.124 introduced a new symbol 'LIB_MEMNEQ'. Add it to the generic 5.10 config. Fixes: 9e5d743422ed ("kernel: bump 5.10 to 5.10.124") Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit f3caba679b812bdaa374929350548025e792eeec)
* qoriq: use FIT uImage for Firebox M300 kernelStijn Tintel2022-06-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires U-Boot environment changes: setenv OpenWrt_kernel watchguard_firebox-m300-fit-uImage.itb setenv loadaddr 0x20000000 setenv wgBootSysA 'setenv bootargs root=/dev/mmcblk0p2 rw rootdelay=2 console=$consoledev,$baudrate fsl_dpaa_fman.fsl_fm_max_frm=1530; mmc dev 0; ext2load mmc 0:1 $loadaddr $OpenWrt_kernel; bootm $loadaddr' Trying to sysupgrade an image containing this change on an M300 already running OpenWrt will fail with the following error: Tue Jun 14 12:06:21 EEST 2022 upgrade: The device is supported, but the config is incompatible to the new image (1.0->1.1). Please upgrade without keeping config (sysupgrade -n). Tue Jun 14 12:06:21 EEST 2022 upgrade: Kernel switched to FIT uImage. Update U-Boot environment. Tue Jun 14 12:06:21 EEST 2022 upgrade: Reading partition table from bootdisk... Tue Jun 14 12:06:21 EEST 2022 upgrade: Extract boot sector from the image Tue Jun 14 12:06:21 EEST 2022 upgrade: Reading partition table from image... Image check failed. This is to prevent rendering your device unbootable. Make the U-Boot environment changes as instruced above, and then flash the image using sysupgrade -F. The config can be kept, there is no need to use -n. After the new image booted successfully, you can increase the compat_version: uci set system.@system[0].compat_version='1.1' uci commit Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit c4b499bc03ab0e2eea643c46d1d781ab64e78931)
* qoriq: use KERNEL_SUFFIX in Build/sdcard-imgStijn Tintel2022-06-291-1/+1
| | | | | | | | | | Use the KERNEL_SUFFIX variable in Build/sdcard-img, rather than using hardcoded "-kernel.bin", to allow overriding KERNEL_SUFFIX for a device. Fixes: 080a769b4da8 ("qoriq: new target") Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit 86948716dbc1c220d4be504cfe5433bfd9e1d630)
* kernel: bump 5.10 to 5.10.125John Audia2022-06-273-3/+3
| | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800 Signed-off-by: John Audia <therealgraysky@proton.me> (cherry picked from commit 53d99fedc7afd96adfb6f38fc939c9ee9981c2ed)
* kernel: bump 5.10 to 5.10.124John Audia2022-06-2727-91/+91
| | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800 Signed-off-by: John Audia <therealgraysky@proton.me> (cherry picked from commit 9e5d743422edc4036cda7d96b96ba62705f382de)
* kernel: bump 5.10 to 5.10.122John Audia2022-06-2721-56/+56
| | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800 Signed-off-by: John Audia <therealgraysky@proton.me> (cherry picked from commit 9edc514e3dafcc36db69046a37daab818cfc1a07)