aboutsummaryrefslogtreecommitdiffstats
path: root/target
Commit message (Collapse)AuthorAgeFilesLines
* realtek: remove KERNEL_PATCHVER overridesSander Vanheule2023-01-294-8/+0
| | | | | | | | | | On the realtek target, the subtarget makefiles include a KERNEL_PATCHVER setting, shadowing KERNEL_PATCHVER from target/linux/realtek/Makefile. This makes the realtek target an exception in this regard, and makes switching kernel version a bit bothersome. Remove the overrides so all subtargets use the same kernel version. Signed-off-by: Sander Vanheule <sander@svanheule.net>
* kernel: make it possible for packages to select page pool supportFelix Fietkau2023-01-292-0/+22
| | | | | | Will be used by the next mt76 update Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: add fix for a page pool related crash on GROFelix Fietkau2023-01-292-0/+70
| | | | | | Needed for upcoming mt76 page pool support Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: backport page pool fragment support from v5.15Felix Fietkau2023-01-294-4/+802
| | | | | | Required for an upcoming mt76 update Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mediatek: fix wrong return code in platform_check_image()Chen Minqiang2023-01-292-1/+2
| | | | | | Ensure that the platform_check_image() function returns an error code. Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
* ramips: mt7621: add support for Xiaomi Mi Router 4A Gigabit v2Dmitry Sokolov2023-01-286-132/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device is the same as Xiaomi Mi Router 4A Gigabit, except of: - 5G WiFi is MT7663 - addresses of leds, wifi and eth ports are slightly changed Specs: SoC: MT7621 CPU: 2 x 880 MHz ROM: 16 MB RAM: 128 MB WLAN: MT7603, MT7663 MAC addresses: WAN **** factory 0xe006 (label) LAN *:f7 factory 0xe000 2.4 GHz *:f8 factory 0x0000+0x4 (mtd-eeprom+0x4) 5 GHz *:f9 factory 0x8000+0x4 (mtd-eeprom+0x4) Installation: Factory firmware is based on a custom OpenWrt 17.x. Installation is the same as for Xiaomi Mi Router 4A Gigabit. Probably the easiest way to install is to use the script from this repository: https://github.com/acecilia/OpenWRTInvasion/pull/155 In a more advanced case, you can do everything yourself: - gain access to the device through one of the exploits described in the link above - upload sysupgrade image to /tmp - overwrite stock firmware: # mtd -e OS1 -r write /tmp/sysupgrade.bin OS1 Recovery: Recovery procedure is the same as for Xiaomi Mi Router 4A Gigabit. Possible options can be found here: https://openwrt.org/inbox/toh/xiaomi/xiaomi_mi_router_4a_gigabit_edition One of the ways is to use another router with OpenWrt: - connect both routers by their LAN ports - download stock firmware from [1] - place it inside /tmp/test.bin on the main router - configure PXE/TFTP on the main router - power off 4Av2, hold Reset button, power on - as soon as image download via TFTP starts, Reset can be released - blinking blue wan LED will indicate the end of the flashing process, now router can be rebooted [1] http://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/r4av2/miwifi_r4av2_firmware_release_2.30.28.bin Signed-off-by: Dmitry Sokolov <e323w@proton.me>
* ramips: improve support for Zyxel Keenetic Extra IIMaxim Anisimov2023-01-283-13/+27
| | | | | | | | | | | - drop unneeded default-state for led_power - concat firmware partitions to extend available free space - increase spi flash frequency to 32 Mhz (value from stock firmware bootlog) - drop broken-flash-reset because of onboard flash chip W25Q256FV has reset support - add compatible for pcie wifi according to kernel documetation - switch to wan mac address with offset 0x28 in rf-eeprom Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
* ramips: use hex value in zyimage command for Keenetic KN-3010Maxim Anisimov2023-01-281-1/+1
| | | | | | | This is cosmetic change. The hex value is related to the device model and more human friendly. Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
* ath79: add LTE packages for GL-XE300Tom Herbers2023-01-281-1/+2
| | | | | | | | | | | | | | | | | Add LTE packages required for operating the LTE modems shipped with the GL-XE300. Example configuration for an unauthenticated dual-stack APN: network.wwan0=interface network.wwan0.proto='qmi' network.wwan0.device='/dev/cdc-wdm0' network.wwan0.apn='internet' network.wwan0.auth='none' network.wwan0.delay='10' network.wwan0.pdptype='IPV4V6' Signed-off-by: Tom Herbers <mail@tomherbers.de>
* ath79: improve support for Letv LBA-047-CHShiji Yang2023-01-282-37/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Convert wireless calibration data to NVMEM. 2. Enable control green status LED and change default LED behaviors. The three LEDs of LBA-047-CH are in the same position, and the green LED will be completely covered by the other two LEDs. So don's use green LED as WAN indicator to ensure that only one LED is on at a time. LED Factory OpenWrt blue internet fail failsafe && upgrade green internet okay run red boot boot 3. Reduce the SPI clock to 30 MHz because the ath79 target does not support 50 MHz SPI operation well. Keep the fast-read support to ensure the spi-mem feature (b3f9842330) is enabled. 4. Remove unused package "uboot-envtools". 5. Split the factory image into two parts: rootfs and kernel. This change can reduce the factory image size and allow users to upgrade the OpenWrt kernel loader uImage (OKLI) independently. The new installation method: First, rename "squashfs-kernel.bin" to "openwrt-ar71xx-generic-ap147-16M-kernel.bin" and rename "rootfs.bin" to "openwrt-ar71xx-generic-ap147-16M-rootfs-squashfs.bin". Then we can press reset button for about 5 seconds to enter tftp download mode. Finally, set IP address to 192.168.67.100 and upload the above two parts via tftp server. Tested on Letv LBA-047-CH Signed-off-by: Shiji Yang <yangshiji66@qq.com>
* ath79: calibrate dlink dir-825 c1 and dir-835 a1 with nvmemEdward Chow2023-01-283-8/+39
| | | | | | | | | | | | | Driver for both soc (2.4GHz Wifi) and pci (5 GHz) now pull the calibration data from the nvmem subsystem. This allows us to move the userspace caldata extraction for the pci-e ath9k supported wifi into the device-tree definition of the device. Currently, "mac-address-ascii" cells only works for ethernet and wmac devices, so PCI ath9k device uses the old method to calibrate. Signed-off-by: Edward Chow <equu@openmail.cc>
* kernel: add kmod-lib-842Tony Butler2023-01-281-0/+1
| | | | | | | | | | "842" is a compression scheme and this is the software implementation which is too slow to really use beyond a proof of concept. It can be selected in ZRAM, ZSWAP, or `fs/pstore`, and is here for completeness. In general you need a Power8 or better with 842-in-hardware for it to be fast, but other 842-accelerators are emerging. Signed-off-by: Tony Butler <spudz76@gmail.com>
* ath79: add label-mac-device for GL-XE300Tom Herbers2023-01-281-0/+4
| | | | | | | This adds an label-mac-device alias which refrences the mac which is printed on the Label of the device. Signed-off-by: Tom Herbers <mail@tomherbers.de>
* realtek: dgs-1210-10mp: update sfp phy-handleDaniel Groth2023-01-282-4/+4
| | | | | | | | Adjust the wrong phy-handle definitions for the sfp ports so that they match the correct switch ports. Fixes: 89eb8b50d18d ("realtek: dgs-1210-10mp: add full sfp description") Signed-off-by: Daniel Groth <flygarn12@gmail.com>
* ath79: add support for Senao Engenius EWS660APMichael Pratt2023-01-284-0/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FCC ID: A8J-EWS660AP Engenius EWS660AP is an outdoor wireless access point with 2 gigabit ethernet ports, dual-band wireless, internal antenna plates, and 802.3at PoE+ **Specification:** - QCA9558 SOC 2.4 GHz, 3x3 - QCA9880 WLAN mini PCIe card, 5 GHz, 3x3, 26dBm - AR8035-A PHY RGMII GbE with PoE+ IN - AR8033 PHY SGMII GbE with PoE+ OUT - 40 MHz clock - 16 MB FLASH MX25L12845EMI-10G - 2x 64 MB RAM - UART at J1 populated, RX grounded - 6 internal antenna plates (5 dbi, omni-directional) - 5 LEDs, 1 button (power, eth0, eth1, 2G, 5G) (reset) **MAC addresses:** Base MAC addressed labeled as "MAC" Only one Vendor MAC address in flash eth0 *:d4 MAC art 0x0 eth1 *:d5 --- art 0x0 +1 phy1 *:d6 --- art 0x0 +2 phy0 *:d7 --- art 0x0 +3 **Serial Access:** the RX line on the board for UART is shorted to ground by resistor R176 therefore it must be removed to use the console but it is not necessary to remove to view boot log optionally, R175 can be replaced with a solder bridge short the resistors R175 and R176 are next to the UART RX pin **Installation:** 2 ways to flash factory.bin from OEM: Method 1: Firmware upgrade page: OEM webpage at 192.168.1.1 username and password "admin" Navigate to "Firmware Upgrade" page from left pane Click Browse and select the factory.bin image Upload and verify checksum Click Continue to confirm and wait 3 minutes Method 2: Serial to load Failsafe webpage: After connecting to serial console and rebooting... Interrupt uboot with any key pressed rapidly execute `run failsafe_boot` OR `bootm 0x9fd70000` wait a minute connect to ethernet and navigate to "192.168.1.1/index.htm" Select the factory.bin image and upload wait about 3 minutes **Return to OEM:** If you have a serial cable, see Serial Failsafe instructions otherwise, uboot-env can be used to make uboot load the failsafe image ssh into openwrt and run `fw_setenv rootfs_checksum 0` reboot, wait 3 minutes connect to ethernet and navigate to 192.168.1.1/index.htm select OEM firmware image from Engenius and click upgrade **TFTP recovery:** Requires serial console, reset button does nothing rename initramfs.bin to '0101A8C0.img' make available on TFTP server at 192.168.1.101 power board, interrupt boot execute tftpboot and bootm 0x81000000 **Format of OEM firmware image:** The OEM software of EWS660AP is a heavily modified version of Openwrt Kamikaze. One of the many modifications is to the sysupgrade program. Image verification is performed simply by the successful ungzip and untar of the supplied file and name check and header verification of the resulting contents. To form a factory.bin that is accepted by OEM Openwrt build, the kernel and rootfs must have specific names... openwrt-ar71xx-generic-ews660ap-uImage-lzma.bin openwrt-ar71xx-generic-ews660ap-root.squashfs and begin with the respective headers (uImage, squashfs). Then the files must be tarballed and gzipped. The resulting binary is actually a tar.gz file in disguise. This can be verified by using binwalk on the OEM firmware images, ungzipping then untaring. Newer EnGenius software requires more checks but their script includes a way to skip them, otherwise the tar must include a text file with the version and md5sums in a deprecated format. The OEM upgrade script is at /etc/fwupgrade.sh. OKLI kernel loader is required because the OEM software expects the kernel to be no greater than 1536k and the factory.bin upgrade procedure would otherwise overwrite part of the kernel when writing rootfs. Note on PLL-data cells: The default PLL register values will not work because of the external AR8035 switch between the SOC and the ethernet port. For QCA955x series, the PLL registers for eth0 and eth1 can be see in the DTSI as 0x28 and 0x48 respectively. Therefore the PLL registers can be read from uboot for each link speed after attempting tftpboot or another network action using that link speed with `md 0x18050028 1` and `md 0x18050048 1`. The clock delay required for RGMII can be applied at the PHY side, using the at803x driver `phy-mode`. Therefore the PLL registers for GMAC0 do not need the bits for delay on the MAC side. This is possible due to fixes in at803x driver since Linux 5.1 and 5.3 Tested-by: Niklas Arnitz <openwrt@arnitz.email> Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: add pcie1 wifi device to Senao qca955x AP DTSIMichael Pratt2023-01-288-5/+38
| | | | | | Each individual device DTS now enables either pcie0 or pcie1. Signed-off-by: Michael Pratt <mcpratt@pm.me>
* pistachio: Cleanup kernel configurationHauke Mehrtens2023-01-281-12/+1
| | | | | | | This removes some kernel configuration options which are not needed. This brings the target closer to the OpenWrt standard configuration. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* realtek: Refresh kernel patchesHauke Mehrtens2023-01-281-1/+1
| | | | | | | Make the patches apply cleanly again. Fixes: 4db8598e4296 ("realtek: Do not set KERNEL_ENTRY just to avoid NO_EXCEPT_FILL") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* realtek: timer: Fix cosmetic whitespace in commentsOlliver Schinagl2023-01-281-20/+7
| | | | | | Comments are a bit weird in the timer driver, lets fix those. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
* realtek: timer: Remove CEVT_RTL9300 completelyOlliver Schinagl2023-01-283-268/+0
| | | | | | | As the timer has been fixed now, we can drop the CEVT_RTL9300 timer all together. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
* realtek: timer: Activate for RTL930x devicesOlliver Schinagl2023-01-283-15/+16
| | | | | | | | | Use the new timer driver for the RTL930x devices. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> [remove old clock provider, select MIPS_EXTERNAL_TIMER and refresh kernel config] Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: timer: Register enabled scheduler clockSander Vanheule2023-01-282-2/+2
| | | | | | | | | | | | | Before calling sched_clock_register(), the timer used to drive the scheduling clock should already be enabled. Otherwise the kernel log will show strange time jumps during, and the watchdog might not be pinged in a timely fashion, resulting in reboots. [ 0.160281] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 78.104319] clocksource: Switched to clocksource realtek_otto_timer Fixes: 3cc801117118 ("realtek: resurrect timer driver") Signed-off-by: Sander Vanheule <sander@svanheule.net>
* mxs: fix SD-card image generation for OLinuXino boardsZoltan HERPAI2023-01-271-1/+1
| | | | | | | | | Fixes: mxs: add generic subtarget (64ef920) Adding the generic target caused the TARGET_BOOTFS_PARTSIZE to stay hidden for these boards, crashing the FAT filesystem creation. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
* realtek: eth: Fix missing end of comment markerOlliver Schinagl2023-01-271-1/+1
| | | | | | | Because this comment is followed by another comment, nothing luckily breaks, so only a cosmetic change. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
* ath79: add support for D-Link DIR-629 A1Shiji Yang2023-01-264-0/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: SOC: QCA9588 CPU 720 MHz AHB 200 MHz Switch: AR8236 RAM: 64 MiB DDR2-600 Flash: 8 MiB WLAN: Wi-Fi4 2.4 GHz 3*3 LAN: LAN ports *4 WAN: WAN port *1 Buttons: reset *1 + wps *1 LEDs: ethernet *5, power, wlan, wps MAC Address: use address source label 70:62:b8:xx:xx:96 lan && wlan lan 70:62:b8:xx:xx:96 mfcdata@0x35 wan 70:62:b8:xx:xx:97 mfcdata@0x6a wlan 70:62:b8:xx:xx:96 mfcdata@0x51 Install via Web UI: Apply factory image in the stock firmware's Web UI. Install via Emergency Room Mode: DIR-629 A1 will enter recovery mode when the system fails to boot or press reset button for about 10 seconds. First, set IP address to 192.168.0.1 and server IP to 192.168.0.10. Then we can open http://192.168.0.1 in the web browser to upload OpenWrt factory image or stock firmware. Some modern browsers may need to turn on compatibility mode. Signed-off-by: Shiji Yang <yangshiji66@qq.com>
* kernel: bump 5.15 to 5.15.90John Audia2023-01-2610-19/+19
| | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
* realtek: rtl931x: drop LINKER_LOAD_ADDRESS bypassSander Vanheule2023-01-252-118/+0
| | | | | | | | | | | | | RTL931x kernel builds were patched to bypass the LINKER_LOAD_ADDRESS parameter, and hardcode it to 0x80220000. This doesn't make much sense, since value of LINKER_LOAD_ADDRESS, load-ld, only appears to be a copy of load-y, adjusted to the linker's taste. Dropping the hacks for bypassing LINKER_LOAD_ADDRESS results in a kernel that actually starts booting on an RTL9313 (Netgear MS510TXM), but currently still hangs when the kernel switches timers. Signed-off-by: Sander Vanheule <sander@svanheule.net>
* ath79: convert Netgear EX7300 caldata to nvmemWenli Looi2023-01-252-7/+22
| | | | | | Transition to specify caldata in the DTS. Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
* ath79: consolidate Netgear EX7300 series imagesWenli Looi2023-01-257-251/+282
| | | | | | | | | | | | | | | | | | | | | | | This change consolidates Netgear EX7300 series devices into two images corresponding to devices that share the same manufacturer firmware image. Similar to the manufacturer firmware, the actual device model is detected at runtime. The logic is taken from the netgear GPL dumps in a file called generate_board_conf.sh. Hardware details for EX7300 v2 variants --------------------------------------- SoC: QCN5502 Flash: 16 MiB RAM: 128 MiB Ethernet: 1 gigabit port Wireless 2.4GHz (currently unsupported due to lack of ath9k support): - EX6250 / EX6400 v2 / EX6410 / EX6420: QCN5502 3x3 - EX7300 v2 / EX7320: QCN5502 4x4 Wireless 5GHz: - EX6250: QCA9986 3x3 (detected by ath10k as QCA9984 3x3) - EX6400 v2 / EX6410 / EX6420 / EX7300 v2 / EX7320: QCA9984 4x4 Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
* kernel: bump 5.10 to 5.10.165John Audia2023-01-243-4/+4
| | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me>
* kernel: bump 5.10 to 5.10.164John Audia2023-01-242-2/+2
| | | | | | | | | | All patches automatically rebased Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me>
* realtek: dsa: support active-high LEDsLorenz Brun2023-01-242-0/+10
| | | | | | | | | The TP-LINK TL-ST1008F has active-high LEDs, so we need a device tree property to express this. Signed-off-by: Lorenz Brun <lorenz@brun.one> [Tidy up code, restrict changes to 5.15] Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: rtl931x: drop CONFIG_NO_EXCEPT_FILL hackSander Vanheule2023-01-242-34/+0
| | | | | | | | | On RTL931x builds, CONFIG_RTL931X was used as a stand-in for CONFIG_NO_EXCEPT_FILL. Now that the latter is always selected for devices in the realtek target, this hack can be removed. Resulting device images are binary identical. Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: Refresh kernel config with no_except_fillOlliver Schinagl2023-01-248-0/+8
| | | | | | Update the config files with the previous commit. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
* realtek: Do not set KERNEL_ENTRY just to avoid NO_EXCEPT_FILLOlliver Schinagl2023-01-243-3/+4
| | | | | | | | | | It seems like we are offsetting the KERNEL_ENTRY to +0x400, which is also accomplished by the NO_EXCEPT_FILL configuration option. Since this is the default for MIPS_GENERIC_KERNEL, lets push a little bit closer to that one by doing the same thing. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
* pistachio: switch to 5.15 by defaultNick Hainke2023-01-241-2/+1
| | | | | | | | | | It appears that only a few users are using the pistachio SoC. The most active user of the target has already approved the testing kernel and so it is very unlikely bugs will be reported in the near future. Therefore, the target should be directly bumped to 5.15. Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Nick Hainke <vincent@systemli.org>
* pistachio: add 5.15 testing kernelNick Hainke2023-01-2410-36/+72
| | | | | | | | | | | | | | | | | | | Manually refreshed: - 903-MIPS-DTS-img-marduk-Add-NXP-SC16IS752IPW.patch - 905-MIPS-DTS-img-marduk-Add-led-aliases.patch (led node was renamed to led-1) Automatically refreshed: - 109-MIPS-DTS-img-marduk-switch-mmc-to-1-bit-mode.patch - 401-mtd-nor-support-mtd-name-from-device-tree.patch - 901-MIPS-DTS-img-marduk-Add-SPI-NAND-flash.patch - 902-MIPS-DTS-img-marduk-Add-Cascoda-CA8210-6LoWPAN.patch - 904-MIPS-DTS-img-marduk-Add-partition-name.patch Enable testing kernel. Co-Developed-by: Hauke Mehrtens <hauke@hauke-m.de> Tested-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Nick Hainke <vincent@systemli.org>
* pistachio: 5:15: copy config and patch from 5.10Nick Hainke2023-01-2414-0/+1180
| | | | | | | | Copy config and patch from kernel 5.10 to kernel 5.15. Signed-off-by: Nick Hainke <vincent@systemli.org> [Updated the copy] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* generic: backport fix for #nvmem-cell-cells false warningRobert Marko2023-01-232-0/+88
| | | | | | | | | | | Recent backport of NVMEM layout support as well as acommpanying OF changes introduced a false #nvmem-cell-cells warning as #nvmem-cell-cells are fully optional. So, backport an upstream fix for this. Fixes: 11759a5bf3c6 ("kernel: backport of changes & helpers") Signed-off-by: Robert Marko <robimarko@gmail.com>
* ramips: Fix root volume for tplink-er605-v2Nikolay Martynov2023-01-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device has two sets of volumes: main ones (`kernel`, `rootfs`, etc) and 'backup' (`kernel.b`, `rootfs.b`, etc). Bootloader tries to determine which set of volumes to use by looking at contens of `extra-para` and `extra-para.b` volumes. These volumes contain JSON that looks like this: ``` { "dbootFlag": "1", "integerFlag": "1", "fwFlag": "GOOD", "score":1 } ``` It looks like the bootloader looks for `"fwFlag": "GOOD"` (as opposed to `BAD`) then it compares `score` field - whichever 'good' volume has bigger score wins. This determines which set of volumes to use to boot. So for example if `extra-para` is good and has bigger score then `kernel`, `rootfs`, etc volumes are used. This means bootloader needs to explain to the kernel which volume to use for the rootfs. After looking at bootloader code with disassembler I think it contains a bug. Relevant part of code looks something like this: ``` if (image_id == 0) { rootfs_volume_id = 8; rootfs_volume_name = "rootfs"; } else { rootfs_volume_id = 0xf; rootfs_volume_name = "rootfs.b"; } sprintf( &buffer, 0x800, "console=ttyS0,115200 noinitrd ubi.mtd=3,2048 ubi.block=0,%s root=/dev/ubiblock0_%d DKMGT_IMAGE_ID=%d DKMGT_IMAGE_TYPE=ubi", rootfs_volume_name, rootfs_volume_id, image_id ); ``` Where `image_id == 0` if 'normal' (not '*.b' set of volumes is used). However from device dumps we know that from the factory `rootfs.b` has id 8 and `rootfs` has id 15. So from above we can see that ids and names of rootfs volumes do not match. More over - they are hardcoded in the bootloader. Both things are problematic for OpwnWRT which completely removes volumes on update meaning that volume ids may actually change. So instead of relying on bootloader to provide the kernel with root device this patch forces kernel to determine root automatically - and it defaults to `rootfs` volume which is correct for our purposes. Overall this makes image boot fine from flash after sysupgrade from inirams. assuming `extra-para*` volumes make bootloader use non-'*.b' set of volumes. Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
* omap: refresh configAlexey Smirnov2023-01-221-1/+4
| | | | | | | Refresh target config by running: make kernel_nconfig CONFIG_TARGET=target Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
* omap: enable ARM Accelerated Cryptographic AlgorithmsAlexey Smirnov2023-01-221-0/+12
| | | | | | | This selects cryptographic algorithms implemented using ARM specific CPU features. Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
* omap: enable cpuidle driverAlexey Smirnov2023-01-221-0/+2
| | | | | | This enables generic cpuidle driver for ARM. Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
* kernel: bump 5.15 to 5.15.89John Audia2023-01-223-44/+2
| | | | | | | | | | | | | | | Removed upstreamed: ipq806x/patches-5.15/007-v6.3-ASoC-qcom-lpass-cpu-Fix-fallback-SD-line-index-handl.patch[1] 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.89&id=d4fa65960a9d0cb87a1102d47145675ceed7a4e6 All other patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
* realtek: use irq_force_affinity on otto timer insteadINAGAKI Hiroshi2023-01-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit e0d2c59ee995 ("genirq: Always limit the affinity to online CPUs", 5.10) on Linux, the cpumask passed to irq_set_affinity of irqchip driver is limited to online CPUs. When irq_do_set_affinity called from otto timer driver with only one secondary CPU, that CPU is not marked as online yet, filtered out by cpu_online_mask and fall to error path. Then, fail to set affinity for that CPU and it leads to instability of timer on secondary CPU(s). At least, RTL839x system will be affected. log: [ 37.560020] rcu: INFO: rcu_sched detected stalls on CPUs/tasks: [ 37.638025] rcu: 1-...!: (0 ticks this GP) idle=6ac/0/0x0 softirq=0/0 fqs=1 (false positive?) [ 37.752683] (detected by 0, t=6002 jiffies, g=-1179, q=26293) [ 37.829510] Sending NMI from CPU 0 to CPUs 1: [ 37.886857] NMI backtrace for cpu 1 skipped: idling at r4k_wait_irqoff+0x1c/0x24 [ 37.984801] rcu: rcu_sched kthread timer wakeup didn't happen for 5999 jiffies! g-1179 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 [ 38.132743] rcu: Possible timer handling issue on cpu=1 timer-softirq=0 [ 38.221033] rcu: rcu_sched kthread starved for 6000 jiffies! g-1179 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=1 [ 38.356336] rcu: Unless rcu_sched kthread gets sufficient CPU time, OOM is now expected behavior. [ 38.474440] rcu: RCU grace-period kthread stack dump: ... Replace to irq_force_affinity from irq_set_affinity and ignore cpu_online_mask to fix the issue. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Tested-by: Olliver Schinagl <oliver@schinagl.nl>
* kernel: mtk-bmt: fix usage of _oob_readChuanhong Guo2023-01-211-2/+8
| | | | | | | | _oob_read returns number of bitflips on success while bbt_nand_read should return 0. Fixes: 2d49e49b18 ("mediatek: bmt: use generic mtd api") Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ipq806x: Initial TP-Link and ASUS OnHub supportBrian Norris2023-01-2112-2/+931
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link and ASUS OnHub devices are very similar, sharing many of the same characteristics and much of their Device Tree. They both run a version of ChromeOS for their factory firmware, and so installation instructions look very similar to Google Wifi [1]. Things I've tested, and are working: * Ethernet * WiFi (2.4 and 5 GHz) * LEDs * USB * eMMC * Serial console (if you wire it up yourself) * 2x CPU * Speaker == Installation instructions summary == 1. Flash *-factory.bin to a USB drive (e.g., with `dd`) 2. Insert USB drive, to boot OpenWrt from USB 3. Copy the same *-factory.bin over to device, and flash it to eMMC to make OpenWrt permanent == Developer mode, booting from USB (Step 2) == To enter Developer Mode and boot OpenWrt from a USB stick: 1. Unplug power 2. Gain access to the "developer switch" through the bottom of the device 3. Hold down the "reset switch" (near the USB port / power plug) 4. Plug power back in 5. The LED on the device should turn white, then blink orange, then red. Release the reset switch. 6. Insert USB drive with OpenWrt factory.bin 7. Press the hidden developer switch under the device to boot to USB; you should see some activity lights (if you have any) on your USB drive 8. Depending on your configuration, the router's LED(s) should come on. You're now running OpenWrt off a USB stick. These instructions are derived from: https://www.exploitee.rs/index.php/Rooting_The_Google_OnHub#Enabling_%22Developer_Mode%22_on_the_OnHub https://www.exploitee.rs/index.php/Asus_OnHub#Enabling_%22Developer_Mode%22_on_the_OnHub ~~Finding the developer switch:~~ for TP-Link, the developer switch is on the bottom of the device, underneath some of the rubber padding and a screw. For ASUS, remove the entire base, via 4 screws under the rubber feet. See the Exploitee instructions for more info and photos. == Making OpenWrt permanent (on eMMC) (Step 3) == Once you're running OpenWrt via USB: 1. Connect Ethernet to the LAN port; router's LAN address should be at 192.168.1.1 2. Connect another system to the router's LAN, and copy the factory.bin image over, via SCP and SSH: scp -O openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin root@192.168.1.1: ssh root@192.168.1.1 -C "dd if=/dev/zero bs=512 seek=7552991 of=/dev/mmcblk0 count=33 && \ dd if=/root/openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin of=/dev/mmcblk0" 3. Reboot and remove the USB drive. == Developer mode beep == Note that every time you boot the OnHub in developer mode, the device will play a loud "beep" after a few seconds. This is described in the Chromium docs [2], and is intended to make it clear that the device is not running Google software. It is nontrivial to completely disable this beep, although it's possible to "acknowledge" developer mode (and skip the beep) by using a USB keyboard to press CTRL+D every time you boot. [1] https://openwrt.org/toh/google/wifi [2] https://chromium.googlesource.com/chromiumos/docs/+/HEAD/developer_mode.md Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* ipq806x: Add kmod-sound-soc-ipq8064-stormBrian Norris2023-01-211-0/+29
| | | | | | | For IPQ8064 systems based off the "Google Storm" reference platform, such as the TP-Link OnHub. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* ipq806x: ASoC: qcom: lpass-cpu: Fix fallback SD line index handlingBrian Norris2023-01-211-0/+42
| | | | | | | | | | This fixes device tree registration for 'qcom,lpass-cpu' as used by qcom-ipq8064 SoCs, and allows speaker audio to function. This patch has been submitted (and merged, for -next; likely v6.3) upstream. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* ipq806x: config-5.15: NormalizeBrian Norris2023-01-211-9/+11
| | | | | | | | Refresh target config with `make kernel_menuconfig`, then save the result. This drops missing symbols or otherwise accounts for defaults. It should not change any functionality. Signed-off-by: Brian Norris <computersforpeace@gmail.com>