aboutsummaryrefslogtreecommitdiffstats
path: root/target
Commit message (Collapse)AuthorAgeFilesLines
* armsr: add kmod-sfp to default device profileMathew McBride2023-08-191-1/+1
| | | | | | | This brings the 23.05 branch into parity with the main. kmod-sfp was in the main branch profile but not the 23.05 version. Signed-off-by: Mathew McBride <matt@traverse.com.au>
* armsr: armv8: fix invalid symbol value for FSL_ENETC_QOSMathew McBride2023-08-191-1/+1
| | | | | | | | | | | | | The kernel FSL_ENETC_QOS option is only a compile time option, it does not result in a separate module being built. Set it to 'y' to resolve a warning from the kernel compile: .config:2654:warning: symbol value 'm' invalid for FSL_ENETC_QOS Signed-off-by: Mathew McBride <matt@traverse.com.au> Fixes: c3151b6f045 ("armvirt: 64: add support for other SystemReady-compatible vendors") (cherry picked from commit 7770d08e2bd28c9c0dc0b3dc0aaf74074ad5772a)
* armsr: armv8: package and select MDIO driver for Thunder SoC'sMathew McBride2023-08-191-1/+13
| | | | | | | | This MDIO driver was already being built, but not installed due to being selected by the ThunderX Ethernet driver. Signed-off-by: Mathew McBride <matt@traverse.com.au> (cherry picked from commit 0018b335313ec7d866bf9e22273b620759e29598)
* armsr: add Marvell (Cavium) ThunderX2 network driverMathew McBride2023-08-192-3/+21
| | | | | | | | | | The initial armv8 module incorrectly labelled the Thunder(v1) as supporting the ThunderX2, when they have different drivers. Add kmod-octeon-tx2 to support the newer devices. Signed-off-by: Mathew McBride <matt@traverse.com.au> (cherry picked from commit 7c5bdff9c472a3f008ac15cc1ccb81cd23b20e1f)
* armsr: armv8: add bcmgenet (Raspberry Pi 4 GENET) to profileMathew McBride2023-08-191-1/+2
| | | | | | | | kmod-bcmgenet is needed for Ethernet support on the Raspberry Pi 4. Signed-off-by: Mathew McBride <matt@traverse.com.au> (cherry picked from commit 911ee97774d2542300916f0e2763aa54c2a4dff1)
* armsr: armv8: add Broadcom GENET and MDIO modulesMathew McBride2023-08-191-0/+22
| | | | | | | | | | | | | | These are used by common Broadcom SoC's like the BCM2711 (RPi4) and iProc network processor. Tested on the RPi4B using the Raspberry Pi UEFI+ACPI firmware[1]. Signed-off-by: Mathew McBride <matt@traverse.com.au> [1] - https://github.com/pftf/RPi4 (cherry picked from commit 27ca83c6270a4cc6922cdae82bb5c01e4e2d1d22)
* armsr: armv8: enable AHCI/SATA controllers for mvebu,qoriq,junoMathew McBride2023-08-191-0/+3
| | | | | | | | | | | | | | | | When comparing the generated OpenWrt .config to the Linux arm64 defconfig, I noticed these SATA controllers were not included. As they may be used as a boot drive, they should be built into the kernel. CONFIG_SATA_MVEBU is for Marvell platforms. CONFIG_SATA_QORIQ is for NXP Layerscape. CONFIG_SATA_SIL24 is for Arm's Juno development board, see Linux kernel commit d7c38ff1cd86 ("arm64: defconfig: Add Juno SATA controller"). Signed-off-by: Mathew McBride <matt@traverse.com.au> (23.05/5.15 version of commit 9cb173e9f18da2530c3570479567d8130b05e5f8)
* armsr: armv8: synchronize PCIE related options with arm64 defconfigMathew McBride2023-08-191-0/+20
| | | | | | | | | This turns on various PCI related options which are enabled in the Linux kernel arch/arm64/configs/defconfig but not yet in the OpenWrt config. Signed-off-by: Mathew McBride <matt@traverse.com.au> (23.05/5.15 version of commit 15d3536c9deb2927c9a39350c6fa2e59f859df2a)
* armsr: armv8: enable Broadcom arch'esMathew McBride2023-08-191-0/+60
| | | | | | | | | | | | | | | This is part of an effort to reduce differences between the OpenWrt armsr/armv8 config and Linux arm64 defconfig. This enables CONFIG_ARCH_BCM and downstream CONFIG_ARCH_BCM2835 (= BCM2711 like Raspberry Pi 4) and CONFIG_ARCH_BCM_IPROC (Broadcom iProc packet processors). The broadband specific SoC's (ARCH_BCMBCA) are left out as it is assumed these will not be doing EFI boot. Signed-off-by: Mathew McBride <matt@traverse.com.au> (23.5/5.15 version of commit df23eed17925b8cadccec53a784a12468a8a2e85)
* armsr: armv8: enable CONFIG_ARCH_RENESASMathew McBride2023-08-191-0/+67
| | | | | | | | | | | Renesas markets several embedded Arm64 SoCs in the RZ series (RZ/G, RZ/V), so should be enabled in a general purpose target. Automotive (R-Car) SoC's are not enabled by this change. Signed-off-by: Mathew McBride <matt@traverse.com.au> (23.05/5.15 version of commit 1ff4f4df230166994c660ad77479f248223ce45b)
* armsr: enable ACPI_BUTTONMathew McBride2023-08-191-0/+1
| | | | | | | | | | | | | A review of the generated OpenWrt kernel .config vs the Linux arm64 defconfig showed that this option was not being enabled, as it is disabled in OpenWrt's generic config. ACPI_BUTTON is needed to report and respond to power button events, so it should be enabled. Signed-off-by: Mathew McBride <matt@traverse.com.au> (23.05/5.15 version of commit c4c60e4b192180288aab577e166091c2d4c470af)
* armsr: armv8: sync CPU features, EFI, CMA and scheduler options with Linux ↵Mathew McBride2023-08-191-1/+44
| | | | | | | | | | | | defconfig To bring the armsr/armv8 kernel configuration closer to the Linux arm64 defconfig, synchronize options related to CPU features (especially more recent Armv8.X variants), scheduler, EFI vars, CMA and scheduler options. Signed-off-by: Mathew McBride <matt@traverse.com.au> (23.05/5.15 version commit 22e0c7be47ca55b7366dc569926724271d51cb77)
* armsr: armv8: enable KVM hostMathew McBride2023-08-191-0/+6
| | | | | | | | | | | x86/64 enables support for KVM so I can't see a reason why not on armsr/armv8 as well. Arm CPU errata workaround items related to virtualization are also enabled by this change. Signed-off-by: Mathew McBride <matt@traverse.com.au> (23.05/5.15 version of commit e505873e65f72b5e89c136dbb61d992a2219b6eb)
* armsr: armv8: sync Arm64 erratum options with kernel defconfigMathew McBride2023-08-191-0/+28
| | | | | | | | | | | | To reduce differences with the Linux arm64 defconfig, sync the enabled erratum items with defconfig. There are still some options not selected due to CONFIG_KVM or other options not enabled in OpenWrt by default. Signed-off-by: Mathew McBride <matt@traverse.com.au> (23.05/5.15 version of commit 5c4239ac3f189352698de706599bc32a6e457532)
* kernel: modules: add xdp-sockets-diag supportTianling Shen2023-08-191-0/+10
| | | | | | | Support for PF_XDP sockets monitoring interface used by the ss tool. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> (cherry picked from commit 06e64f9b364abe15c27bf0a7225fcac740819668)
* kernel: bump 5.15 to 5.15.127John Audia2023-08-199-24/+24
| | | | | | | | | | | | | Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.127 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> (cherry picked from commit 973c5d4a1d5d732f46b577384f39da2336a80fb1)
* x86: Add virtualization time sync supportHauke Mehrtens2023-08-152-0/+10
| | | | | | | | | | | | | This compiles the CONFIG_PTP_1588_CLOCK support into the kernel binary and activates the drivers for KVM and VMware which allow syncing the host time with the VM when OpenWrt is running in a VM. With this change the CONFIG_HYPERV_UTILS driver is now build into the kernel, because it depends on the PTP framework being compiled in. CONFIG_HYPERV_UTILS was build as a module, but not packages before. Fixes: #13277 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 54d470ed0ecaff9e8084c013ddbc95e8afc3ab42)
* x86: Activate CONFIG_PCIEASPMHauke Mehrtens2023-08-153-0/+15
| | | | | | | | | | This activates PCI Express ASPM control in Linux. Without this option it is completely controlled by the BIOS, now Linux will take over and apply some workarounds if needed. Fixes: #13248 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit ff71035751bf440401b4bbc32e0b61ba11178234)
* ramips: improve Xiaomi mi-mini indicationsIvan Pavlov2023-08-151-5/+4
| | | | | | | Sets status indications led color on Xiaomi mi-mini router as other Xiaomi routers Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com> (cherry picked from commit 54e5e396c59948224dfb8ccf7aa8afe11462f647)
* ipq40xx: meraki: define DTB load addressRobert Marko2023-08-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | It seems that the Meraki bootloader does not respect the kernel ARM booting specification[1] that requires that address where DTB is located needs to be 64-bit aligned and often places the DTB on a non 64-bit aligned address and then kernel fails to find the DTB magic and fails to boot. Even worse, there is no prints until early printk is enabled and then its visible that kernel is trying to find the ATAG-s as DTB was not found or is invalid. Unifi 6 devices had the same issue and it can be solved by passing the load adress as part of the FIT image. It seems that the vendor was aware of the issue and is always relocating the DTB to 0x89000000, so lets just do the same. Now that booting is reliable, reenable default images for the Meraki MR33 and MR74 devices. Reviewed-by: Lech Perczak lech.perczak@gmail.com Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit f1c80445bd7e3b2f7fc3e4c8136402b30834d4e9)
* ipq40xx: meraki: remove swconfig in DEVICE_PACKAGESRobert Marko2023-08-151-1/+1
| | | | | | | | ipq40xx was converted to DSA and swconfig is not being included at all in the default packages so there is no need to drop it from device packages. Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit bb4a25860f593790aaedc1b31dde33fbc519e7bf)
* ipq40xx: commonize Meraki recipeRobert Marko2023-08-151-8/+7
| | | | | | | | MR33 and MR74 share pretty much everything in the image recipe, so lets extract a common recipe to avoid duplication. Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit 9e9dc1890c6f58d858208136ecfa435445dfca09)
* kernel: bump 5.15 to 5.15.126John Audia2023-08-156-5/+9
| | | | | | | | | | | | | | | | 1. Disable unneeded errata Kconfig symbols 2. Update kernel Changelog: https://lore.kernel.org/stable/2023081111-unlocking-synopsis-d7d5@gregkh/ 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> (cherry picked from commit 64782497dbdf124d9f7979ae1aa48f20c9b9dec8)
* generic: backport fix for Winbond SPI NANDDaniel Golle2023-08-131-0/+49
| | | | | | | | Avoid using stack allocated memory for DMA operations. Fixes: 156c00dedc ("generic: backport Winbond W25N02KV SPI-NAND support") Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit e6f8b699189139f09c3685332310ff870610de5e)
* generic: 5.15: rename patches to match correct versionDaniel Golle2023-08-132-0/+0
| | | | | | | | Rename two patches which were only accepted in Linux 6.2, but were marked as if they were accepted in Linux 6.1. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 42e14d3ed870e56c29bff84ce686839d9bab2034)
* armsr: remove redundant phy-marvell-10g moduleDaniel Golle2023-08-131-11/+0
| | | | | | | | | | | | the Marvell 10G PHY driver is no way specific to ARM SystemReady systems, it frequently occurs on SFP+ copper modules and is useful on many targets. Hence it been added to package/kernel/linux/modules/netdevices and we can remove the now redundant target-specific module. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit c524a76f4c09a4e3fa4572612d336b4ef7ff2fb8)
* mediatek: filogic: mt7988: mark RTC clock as criticalDaniel Golle2023-08-131-1/+8
| | | | | | | | | A dependency of the MT7988 MMC host controller on the SoC's RTC clock being running has been discovered. Mark RTC clock as critical to fix MMC host on MT7988. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 0454691960e16bb93ed01f89352cbb375008aaf5)
* mvebu: mcbin-singleshot: enable hearbeat LED by defaultTomasz Maciej Nowak2023-08-111-0/+22
| | | | | | | | | | This has been a part of modified upstream patch but got lost on major kernel bump to 5.15, so bring it back. Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com> [Add patch for kernel 6.1 too] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 5e6bab661a1028d583338c5823f6a3b9d6444ce0)
* ath79: move ubnt-xm 64M RAM boards back to genericFelix Baumann2023-08-118-31/+33
| | | | | | | | | | return ubnt_rocket-m and ubnt_powerbridge-m back to ath79-generic They have enough RAM-ressources to not be considered as tiny. This reverts the commit f4415f7635164ec07ddc22f56df93555804b5767 partially Signed-off-by: Felix Baumann <felix.bau@gmx.de> (cherry picked from commit 9e86a96af5ecea6e73fa463d6cfa4408e2b49d35)
* kernel: bump 5.15 to 5.15.125John Audia2023-08-1026-37/+39
| | | | | | | | | | | | | 1. Add new symbols to generic config 2. Bump kernel Changelog: https://lore.kernel.org/stable/2023080818-groin-gradient-a031@gregkh/ All patches automatically rebased. Signed-off-by: John Audia <therealgraysky@proton.me> [Refreshed on top of OpenWrt 23.05] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit daed3322d347cae5fa538907b5f1fa5d5cfc08c6)
* kernel: bump 5.15 to 5.15.124John Audia2023-08-1024-38/+42
| | | | | | | | | | | | | | | | Changelog: https://lore.kernel.org/stable/2023080341-curliness-salary-4158@gregkh/ 1. Needed to make a change to to package/kernel/linux/modules/netsupport.mk due to upstream moving vxlan to its own directory[1]. @john-tho suggested using the the 6.1 xvlan FILES to circumvent. 2. All patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.124&id=77396fa9096abdbfbb87d63e73ad44d5621cf103 Signed-off-by: John Audia <therealgraysky@proton.me> [Refreshed on top of OpenWrt 23.05] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 81c1172c3626157ff9a146430cd14e32c9c80a5a)
* realtek: add support for HPE 1920-8g-poe+Pawel Dembicki2023-08-096-108/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware information: --------------------- - RTL8380 SoC - 8 Gigabit RJ45 PoE ports (built-in RTL8218B) - 2 SFP ports (built-in SerDes) - RJ45 RS232 port on front panel - 32 MiB NOR Flash - 128 MiB DDR3 DRAM - PT7A7514 watchdog - PoE chips: Nuvoton M0516LDE + BCM59121 Known issues: --------------------- - PoE LEDs are uncontrolled. (Manual taken from f2f09bc00280) Booting initramfs image: ------------------------ - Prepare a FTP or TFTP server serving the OpenWrt initramfs image and connect the server to a switch port. - Connect to the console port of the device and enter the extended boot menu by typing Ctrl+B when prompted. - Choose the menu option "<3> Enter Ethernet SubMenu". - Set network parameters via the option "<5> Modify Ethernet Parameter". Enter the FTP/TFTP filename as "Load File Name" ("Target File Name" can be left blank, it is not required for booting from RAM). Note that the configuration is saved on flash, so it only needs to be done once. - Select "<1> Download Application Program To SDRAM And Run". Initial installation: --------------------- - Boot an initramfs image as described above, then use sysupgrade to install OpenWrt permanently. After initial installation, the bootloader needs to be configured to load the correct image file - Enter the extended boot menu again and choose "<4> File Control", then select "<2> Set Application File type". - Enter the number of the file "openwrt-kernel.bin" (should be 1), and use the option "<1> +Main" to select it as boot image. - Choose "<0> Exit To Main Menu" and then "<1> Boot System". NOTE: The bootloader on these devices can only boot from the VFS filesystem which normally spans most of the flash. With OpenWrt, only the first part of the firmware partition contains a valid filesystem, the rest is used for rootfs. As the bootloader does not know about this, you must not do any file operations in the bootloader, as this may corrupt the OpenWrt installation (selecting the boot image is an exception, as it only stores a flag in the bootloader data, but doesn't write to the filesystem). Example PoE config file (/etc/config/poe): --------------------- config global option budget '180' config port option enable '1' option id '1' option name 'lan8' option poe_plus '1' option priority '2' config port option enable '1' option id '2' option name 'lan7' option poe_plus '1' option priority '2' config port option enable '1' option id '3' option name 'lan6' option poe_plus '1' option priority '2' config port option enable '1' option id '4' option name 'lan5' option poe_plus '1' option priority '2' config port option enable '1' option id '5' option name 'lan4' option poe_plus '1' option priority '2' config port option enable '1' option id '6' option name 'lan3' option poe_plus '1' option priority '2' config port option enable '1' option id '7' option name 'lan2' option poe_plus '1' option priority '2' config port option enable '1' option id '8' option name 'lan1' option poe_plus '1' option priority '2' Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> (cherry picked from commit b370753fc409eb2220af7caed9ffd66beed2d041)
* mediatek: filogic: restore non-const type in pinctrl-mt7988 driverDaniel Golle2023-08-071-17/+17
| | | | | | | | | When building with Linux 5.15 the 'const' type results in warnings. Restore the original non-const type in those cases. Fixes: 36d0aa9c2d ("mediatek: filogic: sync pinctrl-mt7988 with MediaTek SDK") Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 1eb67cb0704a61f49d9be9f88aecbce1d881f8c9)
* mediatek: filogic: update MT7988 device treeDaniel Golle2023-08-072-166/+394
| | | | | | | | | * move ethernet to mt7988a.dtsi * move switch definition to mt7988a.dtsi * add PHY LEDs Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 64b99802a61a477ed23fc1f3426fb19d1bc0c6f3)
* mediatek: filogic: sync pinctrl-mt7988 with MediaTek SDKDaniel Golle2023-08-071-115/+300
| | | | | | | Update pinctrl driver for the MT7988 with driver from mtk-openwrt-feeds. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 36d0aa9c2db0f74614b04a152fb092bcc74afb8e)
* mediatek: filogic: enable driver for MediaTek XS-PHYDaniel Golle2023-08-071-1/+1
| | | | | | | | Enable driver for MediaTek SuperSpeedPlus XS-PHY transceiver for the USB3.1 GEN2 controllers found in the MT7988 SoC. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit dc4aafb30939316a163c2eaede6811d871cace2f)
* mediatek: filogic: fix broken sysupgrade scriptPetr Štetiar2023-08-071-0/+1
| | | | | | | | | Changes introduced in commit 54dc1cde48a4 ("mediatek: filogic: add support for Xiaomi WR30U") missed to end the case item with mandatory `;;` which lead to a broken sysupgrade. Fixes: 54dc1cde48a4 ("mediatek: filogic: add support for Xiaomi WR30U") Signed-off-by: Petr Štetiar <ynezz@true.cz>
* mediatek: filogic: add specific layout for WR30UHank Moretti2023-08-075-0/+43
| | | | | | | | | Because this device enable NMBM by default, most users use custom U-Boot with NMBM-Enabled in Chinese forums. This layout is the same as the ubootmod layout but enabling NMBM. Signed-off-by: Hank Moretti <mchank9999@gmail.com>
* mediatek: filogic: add support for Xiaomi WR30UHank Moretti2023-08-077-3/+366
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specification: SoC: MediaTek MT7981B 2x A53 Flash: ESMT F50L1G41LB 128MB RAM: NT52B128M16JR-FL 256MB Ethernet: 4x 10/100/1000 Mbps Switch: MediaTek MT7531AE WiFi: MediaTek MT7976C Button: Reset, Mesh Power: DC 12V 1A Flash instructions: 1. Get ssh access Check this link: https://forum.openwrt.org/t/openwrt-support-for-xiaomi-ax3000ne/153769/22 2. Backup import partitions ``` dev: size erasesize name mtd1: 00100000 00020000 "BL2" mtd2: 00040000 00020000 "Nvram" mtd3: 00040000 00020000 "Bdata" mtd4: 00200000 00020000 "Factory" mtd5: 00200000 00020000 "FIP" mtd8: 02200000 00020000 "ubi" mtd9: 02200000 00020000 "ubi1" mtd12: 00040000 00020000 "KF" ``` Use these commands blow to backup your stock partitions. ``` nanddump -f /tmp/BL2.bin /dev/mtd1 nanddump -f /tmp/Nvram.bin /dev/mtd2 nanddump -f /tmp/Bdata.bin /dev/mtd3 nanddump -f /tmp/Factory.bin /dev/mtd4 nanddump -f /tmp/FIP.bin /dev/mtd5 nanddump -f /tmp/ubi.bin /dev/mtd8 nanddump -f /tmp/KF.bin /dev/mtd12 ``` Then, transfer them to your computer via scp, netcat, tftp or others and keep them in a safe place. 3. Setup Nvram Get the current stock: `cat /proc/cmdline` If you find `firmware=0` or `mtd=ubi`, use these commands: ``` nvram set boot_wait=on nvram set uart_en=1 nvram set flag_boot_rootfs=1 nvram set flag_last_success=1 nvram set flag_boot_success=1 nvram set flag_try_sys1_failed=0 nvram set flag_try_sys2_failed=0 nvram commit ``` If you find `firmware=1` or `mtd=ubi1`, use these commands: ``` nvram set boot_wait=on nvram set uart_en=1 nvram set flag_boot_rootfs=0 nvram set flag_last_success=0 nvram set flag_boot_success=1 nvram set flag_try_sys1_failed=0 nvram set flag_try_sys2_failed=0 nvram commit ``` 4. Flash stock-initramfs-factory.ubi If you find `firmware=0` or `mtd=ubi`: `ubiformat /dev/mtd9 -y -f /tmp/stock-initramfs-factory.ubi` If you find `firmware=1` or `mtd=ubi1`: `ubiformat /dev/mtd8 -y -f /tmp/stock-initramfs-factory.ubi` Then reboot your router, it should boot to the openwrt initramfs system now. 5. Setup uboot-env Now it will be setup automatically in upgrade process, you can skip this step. If your `fw_setenv` did not work, you need run this command: `echo "/dev/mtd1 0x0 0x10000 0x20000" > /etc/fw_env.config` Then setup uboot-env: ``` fw_setenv boot_wait on fw_setenv uart_en 1 fw_setenv flag_boot_rootfs 0 fw_setenv flag_last_success 1 fw_setenv flag_boot_success 1 fw_setenv flag_try_sys1_failed 8 fw_setenv flag_try_sys2_failed 8 fw_setenv mtdparts "nmbm0:1024k(bl2),256k(Nvram),256k(Bdata), 2048k(factory),2048k(fip),256k(crash),256k(crash_log), 34816k(ubi),34816k(ubi1),32768k(overlay),12288k(data),256k(KF)" ``` 6. Flash stock-squashfs-sysupgrade.bin Use shell command: `sysupgrade -n /tmp/stock-squashfs-sysupgrade.bin` Or go to luci web. If you need to change to Openwrt U-Boot layout, do next. If you do not need, please ignore it. Change to OpenWrt U-Boot: 1. Flash ubootmod-initramfs-factory.ubi Check mtd partitions: `cat /proc/mtd` ``` mtd7: 00040000 00020000 "KF" mtd8: 02200000 00020000 "ubi_kernel" mtd9: 04e00000 00020000 "ubi" ``` Run following command: `ubiformat /dev/mtd8 -y -f /tmp/ubootmod-initramfs-factory.ubi` Then reboot your router, it should boot to the openwrt initramfs system now. 2. Check mtd again ``` mtd7: 00040000 00020000 "KF" mtd8: 07000000 00020000 "ubi" ``` Make sure mtd8 is ubi. 3. Install kmod-mtd-rw Run command: `opkg update && opkg install kmod-mtd-rw` Or get it in openwrt server, or build it yourself, then install it manually Then run this command: `insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1` 4. Clean up pstore Run Command: `rm -f /sys/fs/pstore/*` 5. Format ubi and create new ubootenv volume ``` ubidetach -p /dev/mtd8; ubiformat /dev/mtd8 -y; ubiattach -p /dev/mtd8 ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB ``` 6. (Optional) Add recovery boot feature. ``` ubimkvol /dev/ubi0 -n 2 -N recovery -s 10MiB ubiupdatevol /dev/ubi0_2 /tmp/ubootmod-initramfs-recovery.itb ``` 7. Flash Openwrt U-Boot ``` mtd write /tmp/ubootmod-preloader.bin BL2 mtd write /tmp/ubootmod-bl31-uboot.fip FIP ``` 6. Flash ubootmod-squashfs-sysupgrade.itb Use shell command: `sysupgrade -n /tmp/ubootmod-squashfs-sysupgrade.itb` Or go to luci web. Now everything is done, Enjoy! Go Back to stock from Openwrt U-Boot: 1. Force flash ubootmod-initramfs-recovery.itb Use shell command: `sysupgrade -F -n /tmp/ubootmod-initramfs-recovery.itb` Or go to luci web. Then it should boot to the openwrt initramfs system now. 2. Format ubi and Nvram ``` ubidetach -p /dev/mtd8; ubiformat /dev/mtd8 -y; ubiattach -p /dev/mtd8 mtd erase Nvram ``` 3. Install kmod-mtd-rw Run command: `opkg update && opkg install kmod-mtd-rw` Or get it in openwrt server, or build it yourself, then install it manually Then run this command: `insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1` 4. Flash stock U-Boot and ubi ``` mtd write /tmp/BL2.bin BL2 mtd write /tmp/FIP.bin FIP mtd write /tmp/ubi.bin ubi ``` Then reboot your router, waiting it finished rollback in minutes. Go Back to stock from stock layout Openwrt: Just run command: `ubiformat /dev/mtd8 -y -f /tmp/ubi.bin` Then reboot your router, waiting it finished rollback in minutes. Notes: 1. Openwrt U-Boot and ubootmod openwrt did not enable NMBM. Please make your backup safe. Signed-off-by: Hank Moretti <mchank9999@gmail.com>
* mediatek: add support for Acer Predator W6David Bauer2023-08-058-0/+579
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SOC: MediaTek MT7986A RAM: 1GB DDR4 FLASH: 4GB eMMC WiFi: 2x2 2.4 GHz 802.11 b/g/n/ax MT7916 DBDC 4x4 5 GHz 802.11 a/n/ac/ax MT7986 2x2 6 GHz 802.11ax MT7916 DBDC ETH: 4x LAN 1Gbit/s (MT7531) 1x WAN 2.5Gbit/s (GPY211) BTN: RESET, WPS LED: Antenna LEDs (GPIO) Mood-LED (Kinetic KTD2601) - unsupported UART: Header nest to USB port - 3V3 115200 8N1 [BUTTON] GND - RX - TX [USB] Installation ------------ 1. Connect to the device using serial console. 2. Interrupt the Autoboot process when promted by sending '0' twice. 3. Serve the OpenWrt initramfs image using TFTP at 192.168.1.66. Name the image "predator.bin" and conenct the TFTP server to the routers LAN port. 4. Configure U-Boot to allow loading unsigned images from MMC $ setenv bootcmd 'mmc read 0x40000000 0x00004400 0x0010000; fdt addr $(fdtcontroladdr); fdt rm /signature; bootm 0x40000000'; saveenv 5. Transfer the image from U-Boot $ setenv serverip 192.168.1.66; setenv ipaddr 192.168.1.1; tftpboot 0x46000000 predator.bin; fdt addr $(fdtcontroladdr); fdt rm /signature; bootm 6. Wait for OpenWrt to boot 7. Transfer the OpenWrt sysupgrade image to the router using scp. 8. Install OpenWrt using sysupgrade. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 7e7eb5312d7810084547bb54a4b6867c2da08182)
* kernel: bump 5.15 to 5.15.123John Audia2023-07-3194-569/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manually rebased: bcm4908/patches-5.15/071-v6.1-0001-net-broadcom-bcm4908_enet-handle-EPROBE_DEFER-when-g.patch bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch ipq40xx/patches-5.15/902-dts-ipq4019-ap-dk04.1.patch[*] bcm27xx/patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch Removed upstreamed: backport-5.15/735-v6.5-net-bgmac-postpone-turning-IRQs-off-to-avoid-SoC-han.patch[1] backport-5.15/817-v6.5-01-leds-trigger-netdev-Recheck-NETDEV_LED_MODE_LINKUP-o.patch[2] pending-5.15/143-jffs2-reduce-stack-usage-in-jffs2_build_xattr_subsys.patch[3] pending-5.15/160-workqueue-fix-enum-type-for-gcc-13.patch[4] bcm53xx/patches-5.15/036-v6.5-0003-ARM-dts-BCM5301X-Drop-clock-names-from-the-SPI-node.patch[5] bcm53xx/patches-5.15/036-v6.5-0015-ARM-dts-BCM5301X-fix-duplex-full-full-duplex.patch[6] ipq807x/patches-5.15/0048-v6.1-clk-qcom-reset-Allow-specifying-custom-reset-delay.patch[7] ipq807x/patches-5.15/0049-v6.2-clk-qcom-reset-support-resetting-multiple-bits.patch[8] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=02474292a44205c1eb5a03634ead155a3c9134f4 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=86b93cbfe104e99fd3d25a49748b99fb88101573 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=79b9ab357b6f5675007f4c02ff8765cbd8dc06a2 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=d528faa9e828b9fc46dfb684a2a9fd8c2e860ed8 5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=5899bc4058e89d5110a23797ff94439c53b77c25 6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=95afd2c7c7d26087730dc938709e025a303e5499 7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=40844343a8853a08b049d50c967e2a1e28f0ece6 8. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=6ad5ded420f5d96f7c65b68135f5787a1c7e58d7 Build system: x86/64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John Audia <therealgraysky@proton.me> [rebased ipq40xx/patches-5.15/902-dts-ipq4019-ap-dk04.1.patch ] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 8590531048f138ff719c8b317c443a6a7538a762) [Refreshed on top of openwrt-23.05] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* bcm53xx: backport more DT changes queued for v6.6Rafał Miłecki2023-07-298-28/+290
| | | | | | | Those sort out BCM53573 Ethernet info finally. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit ca8868a51127f6081a524d47eab937b90af0bf05)
* bcm53xx: add BCM53573 Ethernet fix sent upstream for v6.6Rafał Miłecki2023-07-291-0/+28
| | | | | | | | | | | | | | It seems that DSA-based b53 driver never worked with BCM53573 SoCs and BCM53125. In case of swconfig-based b53 this fixes a regression. Switching bgmac from using mdiobus_register() to of_mdiobus_register() resulted in MDIO device (BCM53125) having of_node set (see of_mdiobus_register_phy()). That made downstream b53 driver read invalid data from DT and broke Ethernet support. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 79fd3e62b4910731c13692b2daa2083e0f95c023)
* ipq4019: fix support for AVM FRITZ!Repeater 3000Alexander Friese2023-07-271-0/+3
| | | | | | | | | new versions of the device have NAND with 8bit ECC which was not yet supported before. This change removes ECC restrictions. Signed-off-by: Alexander Friese <af944580@googlemail.com> (cherry picked from commit 6b11f0ec83ceb9747dcbb0ffca0882b90da46b59)
* ipq40xx: add support for Teltonika RUTX50David Bauer2023-07-265-2/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- CPU: Qualcomm IPQ4018 RAM: 256M Flash: 16MB SPI-NOR (W25Q128) 128MB SPI-NAND (XTX) WiFi: 2T2R (2GHz 802.11n ; 5 GHz 802.11ac) ETH: 4x LAN ; 1x WAN (Gigabit) CELL: Quectel RG501Q 3G/4G/5G UART: Available on the goldfinger connector (Pinout silkscreened) 115200 8N1 3V3 - Only connect RX / TX / GND Installation ------------ 1. Enable SSH in the Teltonika UI (System --> Administration --> Access Control) 2. Check from which partition set the device is currently running from. $ cat /proc/boot_info/rootfs/primaryboot In case this output reads 0, install a Software update from Teltonika first. After upgrade completion, check this file now reads 1 before continuing. 2. Transfer the OpenWrt factory image to the device using scp. Use the same password (user root!) as used for the Web-UI. $ scp -O openwrt-factory.bin root@192.168.1.1:/tmp 3. Connect to the device using ssh as the root user. 4. Install OpenWrt by writing the factory image to flash. $ ubiformat /dev/mtd16 -y -f /tmp/openwrt-factory.bin 5. Instruct the bootloaer to boot from the first partition set. $ echo 0 > /proc/boot_info/rootfs/primaryboot $ cat /proc/boot_info/getbinary_bootconfig > /tmp/bootconfig.bin $ cat /proc/boot_info/getbinary_bootconfig1 > /tmp/bootconfig1.bin $ mtd write /tmp/bootconfig.bin /dev/mtd2 $ mtd write /tmp/bootconfig1.bin /dev/mtd3 6. Reboot the device. $ reboot Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 844bb4bfad84cc6267f9b138d1f63b07ed3b77d0)
* ipq40xx: move Teltonika RUT STM32 IO to specific DTSDavid Bauer2023-07-262-37/+37
| | | | | | | Prepare to re-use the DTS for the RUTX50. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit dbc4be142e206e681ac53afa3fd1e4018e7843b7)
* kernel: move NXP DPAA2 SFP patches to generic patchesMathew McBride2023-07-262-2/+2
| | | | | | | | | | | | | These are used by both the armsr (EFI boot) and layerscape targets for phylink-controlled SFP support on NXP DPAA2 platforms (LS1088,LS2088,LX2160). This is in place of commit a7bd96c98f8f ("layerscape: add patches for SFP support on DPAA2 platforms") in the main branch. armsr in main started at kernel 6.1 so there is not an equivalent 5.15 commit to cherry pick. Signed-off-by: Mathew McBride <matt@traverse.com.au>
* layerscape: base-files: remove redundant RAMFS_COPY_* additionsMathew McBride2023-07-261-2/+2
| | | | | | | | All the tools (e.g fw_setenv, ubiupdatevol) and config (fw_env.config) needed for sysupgrade are already included in /lib/upgrade/stage2 Signed-off-by: Mathew McBride <matt@traverse.com.au> (cherry picked from commit 094c37708ace9040e294c5aa7be34bc9e7a8dcc1)
* layerscape: remove Traverse LS1043 boardsMathew McBride2023-07-2610-735/+0
| | | | | | | | | | | | | | | | | The Traverse LS1043 boards were not publicly released, all the production has been going to OEM customers who do not use the image format defined in the OpenWrt tree. Only a few samples were circulated outside Traverse and our OEM customers. The public release (then called Five64) of this series was cancelled in favour of our LS1088A based design (Ten64). It is best to remove these boards to avoid wasting OpenWrt project and contributor resources. Signed-off-by: Mathew McBride <matt@traverse.com.au> (cherry picked from commit 8e7ba6fbae80838c2219ee38307af9c883606c2c)
* layerscape: armv8_64b: add Traverse Ten64 NAND variantMathew McBride2023-07-267-1/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Ten64 board[1] is based around NXP's Layerscape LS1088A SoC. It is capable of booting both standard Linux distributions from disk devices, using EFI, and booting OpenWrt from NAND. See the online manual for more information, including the flash layout[2]. This patchset adds support for generating Ten64 images for NAND boot. For disk boot, one can use the EFI support that was recently added to the armvirt target. We previously supported NAND users by building inside our armvirt/EFI target[3], but this approach is not suitable for OpenWrt upstream. Users who used our supplied NAND images will be able to upgrade to this via sysupgrade. Signed-off-by: Mathew McBride <matt@traverse.com.au> [1] - https://www.traverse.com.au/hardware/ten64 [2] - https://ten64doc.traverse.com.au/hardware/flash/ [3] - Example: https://gitlab.com/traversetech/ls1088firmware/openwrt/-/commit/285e4360e1604eb466880d245d48efd9962143a5 (cherry picked from commit af0546da3440dba24217949527e503820350ff05)