aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* libnfnetlink: quote $(FPIC) on command linePhilip Prindeville2021-04-121-2/+2
| | | | | | | | | | | When $(FPIC) gets expanded on the command line (for instance when setting environment variables for libtool, configure, or make) we can't count on it not needing quoting (i.e. it could contain multiple flags separated with spaces). Fixes: dc31191ec3e5 ("build: make sure asm gets built with -DPIC") Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> (cherry picked from commit 7fae64cc065738b73a1dddc2fc28adde36c1ae3d)
* ath79: mikrotik: enable 2nd USB on RouterBOARD 922UAGS-5HPacDKoen Vandeputte2021-04-121-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RB922 boards have 2 separate USB controllers: - 1 is connected to Slot Type A - 1 is connected to the mini PCIe port Enable the 2nd one too. Before: [ 5.339304] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 5.355053] SCSI subsystem initialized [ 5.364184] ehci-fsl: Freescale EHCI Host controller driver [ 5.372377] ehci-platform: EHCI generic platform driver [ 5.378053] ehci-platform 1b000000.usb: EHCI Host Controller [ 5.383861] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1 [ 5.391932] ehci-platform 1b000000.usb: irq 14, io mem 0x1b000000 [ 5.410730] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00 [ 5.417739] hub 1-0:1.0: USB hub found [ 5.422280] hub 1-0:1.0: 1 port detected [ 5.434007] usbcore: registered new interface driver usb-storage After: [ 5.342988] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 5.358687] SCSI subsystem initialized [ 5.367813] ehci-fsl: Freescale EHCI Host controller driver [ 5.375998] ehci-platform: EHCI generic platform driver [ 5.381695] ehci-platform 1b000000.usb: EHCI Host Controller [ 5.387507] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1 [ 5.395571] ehci-platform 1b000000.usb: irq 14, io mem 0x1b000000 [ 5.416050] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00 [ 5.423089] hub 1-0:1.0: USB hub found [ 5.427578] hub 1-0:1.0: 1 port detected [ 5.432432] ehci-platform 1b400000.usb: EHCI Host Controller [ 5.438254] ehci-platform 1b400000.usb: new USB bus registered, assigned bus number 2 [ 5.446325] ehci-platform 1b400000.usb: irq 15, io mem 0x1b400000 [ 5.468049] ehci-platform 1b400000.usb: USB 2.0 started, EHCI 1.00 [ 5.475082] hub 2-0:1.0: USB hub found [ 5.479574] hub 2-0:1.0: 1 port detected [ 5.491305] usbcore: registered new interface driver usb-storage Fixes: 8f93c05a59 ("ath79: add support for MikroTik RouterBOARD 922UAGS-5HPacD") Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com> (cherry picked from commit 172fa3bc7544ce940ce724d682d66109a3e14a11)
* mt76: update to the latest versionFelix Fietkau2021-04-111-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6a3cf95733e2 mt76: fix tx skb error handling in mt76_dma_tx_queue_skb ab9045153343 mt76: mt7915: only modify tx buffer list after allocating tx token id 7e1eff676257 mt76: mt7915: fix unused 'mode' variable 8a2e22fcbf69 mt76: mt7921: fix suspend/resume sequence 27a54e8b687f mt76: mt7921: fix memory leak in mt7921_coredump_work c267322f0bdb mt76: mt7921: switch to new api for hardware beacon filter [v2 update] fd2c59d9ba46 mt76: mt7921: fixup rx bitrate statistics [v2 update] bfa8d5a6a9a1 mt76: adjust to upstream API for enabling threaded NAPI 1706fb6c48e8 mt76: mt7663s: fix rx buffer refcounting c5aca6692c41 mt76: mt7615: enable hw rx-amsdu de-aggregation 9002b0b30aed mt76: mt7615: add rx checksum offload support 8e3f5bfe74f6 mt76: mt7615: add support for rx decapsulation offload 8e3bba8bd3ef mt76: mt7615: fix memory leak in mt7615_coredump_work 760adce29100 mt76: mt7921: fix aggr length histogram 84229a51845a mt76: mt7915: fix aggr len debugfs node 10a95da23cb7 mt76: mt7921: remove unneeded semicolon 2856dc8fb57e mt76: mt7921: fix stats register definitions 1b245e57549d mt76: mt7615: fix TSF configuration 1a2e2965b62b mt76: mt7615: remove hdr->fw_ver check f60ec1b9473d mt76: mt7615: fix mib stats counter reporting to mac80211 8a5b036af48f mt76: mt7915: fix mib stats counter reporting to mac80211 ee6dbcc64f6d mt76: connac: fix kernel warning adding monitor interface e46dd240ce72 mt76: check return value of mt76_txq_send_burst in mt76_txq_schedule_list ddf95ead3bb3 mt76: mt7921: get rid of mt7921_sta_rc_update routine fd2a51ea9dc8 mt76: mt7921: fix the base of PCIe interrupt 28f53d074bb0 mt76: mt7921: fix the base of the dynamic remap 8d737632b57f mt76: mt7921: check mcu returned values in mt7921_start 5ff25c915e62 mt76: mt7915: add missing capabilities for DBDC 58dd3f26c099 mt76: mt7615: fix CSA notification for DBDC 76f4959107ac mt76: mt7615: stop ext_phy queue when mac reset happens 7de0a0654054 mt76: mt7915: fix CSA notification for DBDC e9e418fc7eb0 mt76: mt7915: stop ext_phy queue when mac reset happens 477b78301879 mt76: mt7915: fix PHY mode for DBDC 37b4dc0f7595 mt76: mt76x0u: Add support for TP-Link T2UHP(UN) v1 29a04583aecb mt76: mt7915: fix rxrate reporting a4307e6ba054 mt76: mt7915: fix txrate reporting 256f324f8fcd mt76: mt7915: check mcu returned values in mt7915_ops 638b112188a5 mt76: mt7615: check mcu returned values in mt7615_ops 975cccfa96da mt76: mt7663: fix when beacon filter is being applied aafe972e95b2 mt76: mt7663s: make all of packets 4-bytes aligned in sdio tx aggregation 0d5b1a702715 mt76: mt7663s: fix the possible device hang in high traffic 00628061b546 mt76: mt7615: add missing capabilities for DBDC 2303e1844afd mt76: mt7915: fix possible deadlock while mt7915_register_ext_phy() 6e2b9d258306 mt76: mt7921: reduce mcu timeouts for suspend, offload and hif_ctrl msg 3cf5afc02955 mt76: introduce mcu_reset function pointer in mt76_mcu_ops structure 9af9622df549 mt76: mt7921: introduce mt7921_run_firmware utility routine. e12c44a7e165 mt76: mt7921: introduce __mt7921_start utility routine 7b56d5bf6ea0 mt76: dma: introduce mt76_dma_queue_reset routine a80e50098b51 mt76: dma: export mt76_dma_rx_cleanup routine e0708e296e27 mt76: mt7921: add wifi reset support 87e09e8482cf mt76: mt7921: remove leftovers from dbdc configuration cc933b3669f7 mt76: mt7921: remove redundant check on type ca22cc221ae7 linux-firmware: add firmware for MT7921 0b6c9a043f78 mt76: move de-amsdu buffer per-phy 48a905e23791 mt76: mt7615: fix CSA event format fbef8bba038f mt76: mt7921: remove duplicated macros in mcu.h 6886b57a1534 mt76: connac: introcuce mt76_sta_cmd_info data structure e529e8afe22a mt76: mt7921: properly configure rcpi adding a sta to the fw e4d522776804 mt76: mt7921: fix airtime reporting be2f67e8d3cb mt76: mt7915: fix key set/delete issue 09a1befde4b7 mt76: fix potential DMA mapping leak f66f8f41d47b mt76: mt7915: refresh repeater entry MAC address when setting BSSID 035e2f6f1ddf mt76: mt7921: get rid of mt7921_mac_wtbl_lmac_addr ee29cd5f3a6a mt76: mt7615: only enable DFS test knobs for mt7615 9a98b1a6f9c2 mt76: mt7615: cleanup mcu tx queue in mt7615_dma_reset() 3bd285424e7b mt76: mt7622: trigger hif interrupt for system reset bf6d9ee4acd1 mt76: mt7615: keep mcu_add_bss_info enabled till interface removal 115b74282314 mt76: mt7915: keep mcu_add_bss_info enabled till interface removal 57432e701d1a mt76: mt7915: cleanup mcu tx queue in mt7915_dma_reset() a519c49a6a42 mt76: mt7615: 0-terminate firmware log messages 4a22f2ffae2e mt76: mt7915: 0-terminate firmware log messages b8609066893a mt76: mt7615: fix chip reset on MT7622 and MT7663e 465dda65ee84 mt7615,mt7915: replace fw log 0-terminating code with wiphy info length limit 62b13f5352b8 mt76: mt7921: fix key set/delete issue 0ff3a336a8d8 mt7615,mt7915: fix a compiler warning 113ba8a81d54 mt76: mt7615: remove redundant dev_err call in mt7622_wmac_probe() be1ab3b9ae7c mt76: mt7921: fix typo in mt7921_pci_resume 4e22f0dc934b mt76: mt7915: fix txpower init for TSSI off chips e66a0b9b8d66 mt76: mt7615: always wake the device in mt7615_remove_interface 38f656768a90 mt76: mt7921: always wake the device in mt7921_remove_interface 6ee4770de083 mt76: mt7921: rework mt7921_mcu_debug_msg_event routine e578b4b8d56a mt76: mt7615: fix .add_beacon_offload() f8c6c7cbf10f mt76: mt7915: fix mt7915_mcu_add_beacon 7d35b7a15d1d mt76: mt7915: add wifi subsystem reset 04122c89749d mt76: fix rx amsdu subframe processing 5e764ec9bece mt76: mt7921: introduce MT_WFDMA_DUMMY_CR definition cf0badbc0497 mt76: mt7921: fix inappropriate WoW setup with the missing ARP informaiton f32a4e15f5b2 mt76: mt7921: fix the dwell time control 54f52771a04a mt76: mt7921: fix kernel crash when the firmware fails to download 97189d2a045b mt76: mt7921: fix the insmod hangs dcdbd7c89cf5 mt76: mt7921: fix MT_PCIE_MAC_INT_ENABLE access 813db729c02f mt76: mt7921: reduce the data latency during hw scan 028b7152b1a9 mt76: mt7921: remove 80+80 MHz support capabilities 7714dc914df6 mt76: report Rx timestamp ffd4cf15fa0e mt76: mt7915: add mmio.c fe8717dd573a mt76: mt7615: add missing SPDX tag in mmio.c 6b293c411d22 mt76: mt7615: always add rx header translation tlv when adding stations bf45b30d8919 add missing file Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry-picked from commit 8cc013981d2a017a4604e696e4ec19c846f2c230)
* mac80211: add client mode connection monitor fixFelix Fietkau2021-04-111-0/+31
| | | | | Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry-picked from commit dfdb28c24aa60cf057ec45cbc11ab48ba2655f53)
* mac80211: support rx timestamps for HE ratesFelix Fietkau2021-04-111-0/+134
| | | | | Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry-picked from commit 7d8e14e44f76e18d1696565569ec50ccdce963b3)
* kernel: bump 5.4 to 5.4.111Hauke Mehrtens2021-04-1175-251/+251
| | | | | | | | | | | | | | | | | | | | | Refreshed all patches. The following patches were manually changed: * 610-netfilter_match_bypass_default_checks.patch * 611-netfilter_match_bypass_default_table.patch * 802-can-0002-can-rx-offload-fix-long-lines.patch * 802-can-0003-can-rx-offload-can_rx_offload_compare-fix-typo.patch * 802-can-0004-can-rx-offload-can_rx_offload_irq_offload_timestamp-.patch * 802-can-0005-can-rx-offload-can_rx_offload_reset-remove-no-op-fun.patch * 802-can-0006-can-rx-offload-Prepare-for-CAN-FD-support.patch * 802-can-0018-can-flexcan-use-struct-canfd_frame-for-CAN-classic-f.patch The can-dev.ko model was moved in the upstream kernel. Compile-tested on: x86/64, armvirt/64, ath79/generic Runtime-tested on: x86/64, armvirt/64, ath79/generic Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: move some disabled symbols to genericAleksander Jan Bajkowski2021-04-1126-66/+12
| | | | | | | Move some disabled symbols found in armvirt target to generic. Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl> (cherry picked from commit 12e942b1fdda874542e0a4e6ea892969fedab975)
* sunxi: disable LPAE on cortexa8Zoltan HERPAI2021-04-111-0/+2
| | | | | | | LPAE should be disabled as the Cortex-A8 cores don't support it, and the kernel will crash on boot if it's enabled. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
* build: make sure asm gets built with -DPICPhilip Prindeville2021-04-101-3/+3
| | | | | | | | | | | | | | | | | | Fixes issue openwrt/packages#14921, whereby inline ASM wasn't getting built as PIC; look at gmp-6.2.1/mpn/x86/pentium/popcount.asm for example: ifdef(`PIC',` ... for a routine that exists in both PIC and non-PIC versions. Make sure that wherever $(FPIC) gets passed as a variable expansion that it gets quoted where necessary (such as setting environment variables in shell commands). Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> (cherry picked from commit af22991e03cae55f96b06996df2ff16752cec5d5)
* kernel: DSA roaming fix for Marvell mv88e6xxxDENG Qingfang2021-04-1015-0/+1180
| | | | | | | | | | | | | | | | | | | | | | | | | | Marvell mv88e6xxx switch series cannot perform MAC learning from CPU-injected (FROM_CPU) DSA frames, which results in 2 issues. - excessive flooding, due to the fact that DSA treats those addresses as unknown - the risk of stale routes, which can lead to temporary packet loss Backport those patch series from netdev mailing list, which solve these issues by adding and clearing static entries to the switch's FDB. Add a hack patch to set default VID to 1 in port_fdb_{add,del}. Otherwise the static entries will be added to the switch's private FDB if VLAN filtering disabled, which will not work. The switch may generate an "ATU violation" warning when a client moves from the CPU port to a switch port because the static ATU entry added by DSA core still points to the CPU port. DSA core will then clear the static entry so it is not fatal. Disable the warning so it will not confuse users. Link: https://lore.kernel.org/netdev/20210106095136.224739-1-olteanv@gmail.com/ Link: https://lore.kernel.org/netdev/20210116012515.3152-1-tobias@waldekranz.com/ Ref: https://gitlab.nic.cz/turris/turris-build/-/issues/165 Signed-off-by: DENG Qingfang <dqfext@gmail.com> (cherry picked from commit 920eaab1d8179035d0ae1047e75cf9a50da6a6eb)
* x86/base-files: add support for Sophos SG/XG-105Stan Grishin2021-04-102-0/+11
| | | | | | | | This adds detection of the Sophos SG-105 and Sophos XG-105 models and assignment of ethernet ports these models have to LAN/WAN. Signed-off-by: Stan Grishin <stangri@melmac.net> (cherry picked from commit 64eaf633ff7f9280e04e65ae290eb8b65dd9e021)
* iproute2: fix libbpf detection with NLS enabledTony Ambardar2021-04-102-1/+21
| | | | | | | | | | | | | | | | | | Upstream iproute2 detects libbpf using a one-line $CC test-compile, which normally ignores LDFLAGS. With NLS enabled however, LDFLAGS includes an "rpath-link" linker option needed to resolve libintl.so. Its absence causes both the compile and libbpf detection to fail: ld: warning: libintl.so.8, needed by libbpf.so, not found (try using -rpath or -rpath-link) ld: libelf.so.1: undefined reference to `libintl_dgettext' collect2: error: ld returned 1 exit status Fix this by directly including $LDFLAGS in the test-compile command. Reported-by: Ian Cooper <iancooper@hotmail.com> Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit aab3a04ce87c27996b7ce9ea306db8c6eed86941)
* binutils: fix libbfd missing DSO dependency if NLS enabledTony Ambardar2021-04-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | The libbfd package definition uses $(ICONV_DEPENDS) and $(INTL_DEPENDS) but links against neither, leading to libbfd detection failures in other packages (e.g. bpftools) and on-target relocation problems with libintl.so: root@OpenWrt:/# ldd /usr/lib/libbfd.so ldd (0x77db6000) libc.so => ldd (0x77db6000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x77c6d000) Error relocating /usr/lib/libbfd.so: libintl_dgettext: symbol not found Add NLS-conditional linking of "libintl" to fix this. Also remove libbfd package dependency $(ICONV_DEPENDS) which is not used during building or linking. Tested with QEMU on malta/be32, after building all packages from binutils, bpftools and iproute2, using different libc options musl and glibc. Fixes: 08e817569630 ("binutils: use nls.mk to fix libbfd link errors in other packages") Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit 9a59f62f613b1ca774032ccd80c51c74491b142c)
* bpftools: drop unneeded libintl linking for NLSTony Ambardar2021-04-101-5/+1
| | | | | | | | | There is no direct linking of libintl from bpftools, only secondary linking through libelf, so remove "-lintl" from TARGET_LDFLAGS. Fixes: 5582fbd6135f ("bpftools: support NLS, fix ppc build and update to 5.8.9") Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit c8c638a19b63bf6c3bf8094aebd8fde6feda36ba)
* iproute2: separate tc into tiny and full variantsTony Ambardar2021-04-101-27/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change was investigated previously [1] but not deemed necessary. With the recent addition [2] of modern BPF loader support, however, tc gained dependencies on libelf and libbpf, with a larger installation footprint. Similar to ip-tiny/ip-full, split tc into tc-full and tc-tiny variants, where the latter excludes the eBPF loader, uses a smaller executable, and avoids libelf and libbpf package dependencies. Both variants provide the 'tc' virtual package, with tc-tiny as the default. The previous tc package included a loadable module for iptables actions. Separate this out into a common package, tc-mod-iptables, which both variants depend on. Some package sizes on mips_24kc: Before: 148343 tc_5.11.0-1_mips_24kc.ipk After: 144833 tc-full_5.11.0-2_mips_24kc.ipk 138430 tc-tiny_5.11.0-2_mips_24kc.ipk (and no libelf or libbpf) 4115 tc-mod-iptables_5.11.0-2_mips_24kc.ipk Also fix up some Makefile indentation. [1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447619962 [2] b048a305a3d3 ("iproute2: update to 5.11.0") Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit 72885e9608d9c0fa06abce6bdb6dd054c2116eb7)
* kernel/modules: relocate teql hotplug from iproute2 to kmod-schedTony Ambardar2021-04-103-2/+7
| | | | | | | | | | | | | | | The link equalizer sch_teql.ko of package kmod-sched relies on a hotplug script historically included in iproute2's tc package. In previous discussion [1], consensus was the hotplug script is best located together with the module in kmod-sched, but this change was deferred at the time. Relocate the hotplug script now. This change also simplifies adding a tc variant for minimal size with reduced functionality. [1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447923636 Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit 863ce4f15f74a674f01ab47f445b362c113b113b)
* iproute2: add missing limits.h includesTony Ambardar2021-04-101-0/+45
| | | | | | | | | | | | | | | | This patch has been submitted upstream to fix an error reported by a few users. One instance seen using gcc 10.2.0, binutils 2.35.1 and musl 1.1.24: bpf_glue.c: In function 'get_libbpf_version': bpf_glue.c:46:11: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'AF_MAX'? 46 | char buf[PATH_MAX], *s; | ^~~~~~~~ | AF_MAX Reported-by: Rui Salvaterra <rsalvaterra@gmail.com> Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit 10ffefe60299637bc592ec4ef0dde93e0e2e8344)
* iproute2: update to 5.11.0Tony Ambardar2021-04-1011-29/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The latest iproute2 version brings various improvements and fixes: https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/log/?qt=range&q=v5.10.0..v5.11.0 In particular, ip and tc now use libbpf as the standard way to load BPF programs, rather than the old, limited custom loader. This allows more consistent and featureful BPF program handling e.g. support for global initialized variables. Also fix a longstanding problem with iproute2 builds where unneeded DSO dependencies are added to most utilities, bloating their installation footprint. From research and testing, explicitly using a "--as-needed" linker flag avoids the issue. Update accordingly and drop extra package dependencies from Makefile. Additional build and packaging updates include: - install missing development header to iproute2/bpf_elf.h - propagate OpenWrt verbose flag during build - update and refresh patches Compile and run tested: QEMU/malta-mips32be on kernels 5.4 & 5.10. All iproute2 packages were built and installed to the test image. Some regression testing using ip-full and tc was successfully performed to exercise several kmods, tc modules, and simple BPF programs. Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit b048a305a3d3cbb5375e32757e70aa129b4c7c4f)
* wireguard-tools: depend on kmod-wireguardIlya Lipnitskiy2021-04-101-1/+4
| | | | | | | | | | | | | | | | To the vast majority of the users, wireguard-tools are not useful without the underlying kernel module. The cornercase of only generating keys and not using the secure tunnel is something that won't be done on an embedded OpenWrt system often. On the other hand, maintaining a separate meta-package only for this use case introduces extra complexity. WireGuard changes for Linux 5.10 remove the meta-package. So let's make wireguard-tools depend on kmod-wireguard to make WireGuard easier to use without having to install multiple packages. Fixes: ea980fb9 ("wireguard: bump to 20191226") Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> (cherry picked from commit cbcddc9f318607881799e329b327a68c4e76d5cb)
* kernel: fix kmod-wireguard package fieldsIlya Lipnitskiy2021-04-101-4/+2
| | | | | | | | | | Use NETWORK_SUPPORT_MENU like all other modules in netsupport.mk. Drop SECTION and CATEGORY fields as they are set by default and to match other packages in netsupport.mk. Use better TITLE for kmod-wireguard (taken from upstream drivers/net/Kconfig). Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> (cherry picked from commit 0b53d6f7fa8cc35cec5b22e1c64a2407fab6dfe3)
* wireguard-tools: bump to 1.0.20210223Jason A. Donenfeld2021-04-101-2/+2
| | | | | | | Simple version bump with accumulated fixes. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> (cherry picked from commit e0f7f5bbce0d03e5192b5dad5a24fcb8566da97f)
* kernel: migrate wireguard into the kernel treeIlya Lipnitskiy2021-04-103-89/+184
| | | | | | | | | | | | On Linux 5.4, build WireGuard from backports. Linux 5.10 contains wireguard in-tree. Add in-kernel crypto libraries required by WireGuard along with arch-specific optimizations. Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> (cherry picked from commit 06351f1bd0455abacb700db5098bb798f66948fc) (cherry picked from commit 464451d9ab824c2ed62f7da33f0a965f562714c8)
* kernel: 5.4: import wireguard backportJason A. Donenfeld2021-04-10132-32/+63296
| | | | | | | | | | | | | | | | | | | | | | | | | | Rather than using the clunky, old, slower wireguard-linux-compat out of tree module, this commit does a patch-by-patch backport of upstream's wireguard to 5.4. This specific backport is in widespread use, being part of SUSE's enterprise kernel, Oracle's enterprise kernel, Google's Android kernel, Gentoo's distro kernel, and probably more I've forgotten about. It's definately the "more proper" way of adding wireguard to a kernel than the ugly compat.h hell of the wireguard-linux-compat repo. And most importantly for OpenWRT, it allows using the same module configuration code for 5.10 as for 5.4, with no need for bifurcation. These patches are from the backport tree which is maintained in the open here: https://git.zx2c4.com/wireguard-linux/log/?h=backport-5.4.y I'll be sending PRs to update this as needed. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> (cherry picked from commit 3888fa78802354ab7bbd19b7d061fd80a16ce06b) (cherry picked from commit d54072587146dd0db9bb52b513234d944edabda3) (cherry picked from commit 196f3d586f11d96ba4ab60068cfb12420bcd20fd) (cherry picked from commit 3500fd7938a6d0c0e320295f0aa2fa34b1ebc08d) (cherry picked from commit 23b801d3ba57e34cc609ea40982c7fbed08164e9) (cherry picked from commit 0c0cb97da7f5cc06919449131dd57ed805f8f78d) (cherry picked from commit 2a27f6f90a430342cdbe84806e8b10acff446a2d) Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
* zynq: Enable CONFIG_KERNEL_MODE_NEONIlya Lipnitskiy2021-04-101-1/+0
| | | | | | | | | This flag is set on all other platforms. And Zynq 7000 SoC does have NEON support: https://www.xilinx.com/support/documentation/application_notes/xapp1206-boost-sw-performance-zynq7soc-w-neon.pdf Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> (cherry picked from commit 7d00f632b7b245bcf25783797308325aa255b020)
* bcm4908: enable Netgear R8000P bootloader imageRafał Miłecki2021-04-081-2/+2
| | | | | | | | | | | | | | | | | | | This enables building BCM4908 "raw" image that can be flashed using bootloader web UI. It requires serial console access & stopping booting by the "Press any key to stop auto run". It's easy to build vendor like CHK image but it can't be safely flashed using vendor UI at this point. Netgear implements method called "NAND incremental flashing" that doesn't seem to flash bootfs partition as provided. Above method seems to update vmlinux.lz without updating 94908.dtb. It prevents OpenWrt kernel from booting due to incomplete DTB file. Full Netgear R8000P support can be enabled after finding a way to make vendor firmware flash OpenWrt firmware including the 94908.dtb update. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit d92a9c97bf3700e90af1d3c9157502af660365c0)
* bcm4908: enable target & Asus GT-AC5300 imageRafał Miłecki2021-04-082-1/+3
| | | | | | | | | | OpenWrt was succesfully tested on the GT-AC5300 model. It's possible to: 1. Install OpenWrt using vendor UI 2. Perform UBI aware sysupgrade 3. Install vendor firmware using OpenWrt sysupgrade Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 5e78cb9b85a045f436abf6a03aa5c774d30e1090)
* firmware-utils: bcm4908img: convert into a packageRafał Miłecki2021-04-085-2/+62
| | | | | | | | | | | bcm4908img is a tool managing BCM4908 platform images. It's used for creating them as well as checking, modifying and extracting data from. It's required by both: host (for building firmware images) and target (for sysupgrade purposes). Make it a host/target package. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 9b4fc4cae9fa0cd0cd9060e1c9d33320c3249ced)
* firmware-utils: bcm4908img: fix uninitialized var usageRafał Miłecki2021-04-081-3/+7
| | | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 5a2086d230063b2f83a436ed37b0f6a92706bcb9)
* bcm4908: fix Netgear R8000P imageRafał Miłecki2021-04-081-2/+5
| | | | | | | Use vendor format to allow flashing using Negear UI. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit f2c8c62d98f2137d8af896e56d5e29759cf48715)
* bcm4908: add sysupgrade supportRafał Miłecki2021-04-081-0/+213
| | | | | | | | | | | It supports flashing OpenWrt images (bootfs & UBI upgrade) as well as vendor images (whole MTD partition write). Upgrading cferom is unsupported. It requires copying device specific data (like MAC) to target image before flashing. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit a6a0b252baa6c19dfc62611ea910b56527ce4fa5)
* bcm4908: pad firmware image bootfs JFFS2 partition to 8 MiBRafał Miłecki2021-04-081-1/+1
| | | | | | | | | | This way MTD "bootfs" partition will be always 8+ MiB. This should be enough for any custom / future firmware to fit its bootfs (e.g. big kernel) without having to repertition whole flash. That way we can preserve UBI and its erase counters during sysupgrade. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit ca9b1f15c424d68af0f372c37c8eee81b36ee7e1)
* firmware-utils: bcm4908img: extract bootfs without paddingRafał Miłecki2021-04-081-6/+27
| | | | | | | | | JFFS2 bootfs partition in a BCM4908 image usually includes some padding. For flashing it individually (writing to designed MTD partition) we want just JFFS2 data. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit ed7edf88e20c9dd0026e5c5629d8a6500d3e3f80)
* firmware-utils: bcm4908img: fix extracting cferomRafał Miłecki2021-04-081-1/+1
| | | | | | | Fix offset to extract proper data when image contains vendor header. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit dcbde11af181055f2d1c77ebc19f50c29bbab96e)
* firmware-utils: bcm4908img: support extracting bootfs & rootfsRafał Miłecki2021-04-081-0/+35
| | | | | | | | It's required for upgrading firmware using single partitions instead of just blindly writing whole image. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit e33957c241abf8f0dbf5f3713058d126fb4599b4)
* firmware-utils: bcm4908img: replace size with offsetRafał Miłecki2021-04-081-20/+35
| | | | | | | | It's much easier to operate on BCM4908 image data with absolute offset of each section stored. It doesn't require summing sizes over and over. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 5314cab729b743d3b8b08db4e01c3095017f4e68)
* bcm4908: rename bootfs dummy file to the 1-openwrtRafał Miłecki2021-04-081-1/+1
| | | | | | | | | | | | | The purpose of that dummy file is to make CFE work properly with OpenWrt bootfs. CFE for some reason ignores JFFS2 files with ino 0. Rename it to 1-openwrt so: 1. It's consistent with bcm63xx 2. It's OpenWrt specific so sysupgrade can distinguish it from vendor images Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 880c8b44223c9cbce3dd14da78c33676c6f1a8a6)
* bcm4908: enable JFFS2 supportRafał Miłecki2021-04-081-1/+0
| | | | | | | It's needed for accessing JFFS2 bootfs partition. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 180c4635265b4907221a62b3068ac89447cd83d7)
* firmware-utils: bcm4908img: add bootfs supportRafał Miłecki2021-04-081-3/+337
| | | | | | | | | | | | | This adds support for accessing bootfs JFFS2 partition in the BCM4908 image. Support includes: 1. Listing files 2. Renaming file (requires unchanged name length) Above commands are useful for flashing BCM4908 images which by defualt come with cferom.000 file and require renaming it. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit ed847ef5f340dcae1556cbc6dfaa6657a5179be6)
* firmware-utils: bcm4908img: support extracting image dataRafał Miłecki2021-04-081-0/+87
| | | | | | | It's useful for upgrading cferom, firmware, etc. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 9c039d56a154bb416492bf5657093576d50cc220)
* firmware-utils: bcm4908img: find cferom sizeRafał Miłecki2021-04-081-0/+31
| | | | | | | | It's important for modifying / extracting firmware content. cferom is optional image content at the file beginning. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 6af45b842bd22633fa3ccd57edaf073a759525bb)
* firmware-utils: bcm4908img: use "info" command displaying file infoRafał Miłecki2021-04-081-11/+20
| | | | | | | | BCM4908 image format contains some info that may be useful for info / debugging purposes. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 9b9184f1782489163eb204f3b238de778ae1214b)
* firmware-utils: bcm4908img: support reading from stdinRafał Miłecki2021-04-081-8/+38
| | | | | | | | 1. Don't allow pipe stdin as we need to fseek() 2. Don't alow TTY as it doesn't make sense for binary input Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit d533b27bc09eb5323a05ed44589235a86edcda0d)
* firmware-utils: bcm4908img: detect Netgear vendor firmwareRafał Miłecki2021-04-081-25/+33
| | | | | | | | | Netgear uses CHK header which needs to be skipped when validating BCM4908 image. Detect it directly in the bcm4908img tool. Dealing with binary structs and endianess is way simpler in C. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit a39f85d8b66125f07c4bcbea46b296946de60dc7)
* firmware-utils: bcm4908img: extract parsing codeRafał Miłecki2021-04-081-37/+67
| | | | | | | | | Move code parsing existing firmware file to separated function. This cleans up existing code and allows reusing parsing code for other commands. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 7d5f7439428d2b4c6952af47b36acc010b846372)
* bcm4908: backport DT patch adding Ethernet MAC addressRafał Miłecki2021-04-081-0/+82
| | | | | | | | This tells OS (Linux) where from MAC should be read (bootloader MTD partition). Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 1cc5eb45d5192b41d97d5da58c34353f4c3240f9)
* firmware-utils: bcm4908kernel: name struct fieldsRafał Miłecki2021-04-081-8/+8
| | | | | | | Less magic names / values. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit a3611432a6c3490fb2b6fdbc1ce664cf70900668)
* kernel: create bootfs partition when parsing on BCM4908Rafał Miłecki2021-04-081-5/+9
| | | | | | | | | It's helpful for accessing booting data (DTS, kernel, etc.). It has to be used carefully as CFE's JFFS2 support is quite dumb. It doesn't recognize deleted files and has problems handling 0 inode. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 6dd727ac24fa36ac3f23e9a5cf6781a7d1c6b797)
* firmware-utils: bcm4908img: name fields & valuesRafał Miłecki2021-04-081-8/+22
| | | | | | | Less magic numbers Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 1ff7569387f69550e8a9356a109a875e4fdb4412)
* bcm4908: backport the latest bcm_sf2 commitsRafał Miłecki2021-04-086-111/+210
| | | | | | | | 1. CFP support for BCM4908 2. Upstream RGMII regs fix Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit a49fd9db0a2bfad8ea9a09f32fadbd3cc7e46205)
* bcm4908: backport DTS patch with Ethernet TX IRQRafał Miłecki2021-04-082-1/+31
| | | | | | | It allows bcm4908_enet Linux driver to work more efficiently. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 13d9904acdd24e002aab3d6c3dd7879826b54008)