Commit Graph

5140 Commits

Author SHA1 Message Date
Christian Marangi
03a0395eb2 scripts/download.pl: fix support for aria2c download tool on macos
Currently we use /dev/shm to place aria2c tmp file. This is not present
on macos. Use the openwrt tmp directory instead of the linux-only
/dev/shm to save compatibility with more os.

Fixes: d39123626931 ("download.pl: add aria2c support")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-27 16:58:32 +08:00
Christian Marangi
5ae6c9be69 scripts/download.pl: fix mirrors regression for curl and wget
With the introduction of aria2c support, curl and wget no longer try to
download the file from mirrors. Fix this regression by emptying the
remaining mirrors list only when aria2c is used.

Fixes: d39123626931 ("download.pl: add aria2c support")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-27 16:57:59 +08:00
Christian Marangi
b0ea2f3b0a scripts/download.pl: fix whitespace in mirror urls and drop for
Fix whitespace in mirror urls and replace for loop with join+map logic.

Fixes: d39123626931 ("download.pl: add aria2c support")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-27 16:57:30 +08:00
Bradford Zhang
320adae6f6 download.pl: add aria2c support
Use aria2c download tool by default on package download if available in
the system.
aria2c permits to use multiple mirrors and may improve download speed on
special context where servers are hard to reach.

Co-authored-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Bradford Zhang <zyc@zyc.name>
[ fix wrong var in the script and improve commit description ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-27 16:56:58 +08:00
Petr Štetiar
331a9f6589 scripts/download.pl: fix downloads with wget
Several users of wget for downloads (curl is not available in the
system) have reported broken download functionality:

 wget --tries=5 --timeout=20 --output-document=-  https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.10.142.tar.xz
 http://: Invalid host name.

Thats all happening due to '' was passed as an argument, which got later
expanded to http://.

In the context of a list constructor '' is not nothing, it is an empty
string element.  So fix it by using () as it will yield "nothing" and
thus not introduce an empty string element.

Fixes: #10692
Fixes: 90c6e3aedf16 ("scripts: always check certificates")
Signed-off-by: Jo-Philipp Wich <jo@mein.io> [shellwords() -> ()]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-09-27 16:56:13 +08:00
Petr Štetiar
62b20da0b1 scripts/download.pl: silence can't exec curl warning
When running build in verbose mode `make V=s` we can see a lot of
following warnings when curl is not available in the system:

 Can't exec "curl": No such file or directory at scripts/download.pl line 77.

So lets fix it by redirecting of the stderr to null hole.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-09-27 16:55:42 +08:00
Josh Roys
06fc719231 scripts: always check certificates
Remove flags from wget and curl instructing them to ignore bad server
certificates. Although other mechanisms can protect against malicious
modifications of downloads, other vectors of attack may be available
to an adversary.

TLS certificate verification can be disabled by turning oof the
"Enable TLS certificate verification during package download" option
enabled by default in the "Global build settings" in "make menuconfig"

Signed-off-by: Josh Roys <roysjosh@gmail.com>
[ add additional info on how to disable this option ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-27 16:54:52 +08:00
AmadeusGhost
558ac14171 mediaTek: drop unused pins for redmi ax6000 2022-09-26 16:37:53 +08:00
Daniel Golle
08a9eb94b1 kernel: pick patches for MediaTek Ethernet from linux-next
Pick patches with several fixes and improvements, preparation for
upcoming WED (TX) [1] as well as basic XDP support [2] with MediaTek's
Filogic SoCs to the mtk_eth_soc driver.

Also pick follow-up patch fixing Ethernet on MT7621 [3].

Tested on Bananapi BPi-R3 (MT7986), Bananapi BPi-R64 (MT7622),
Bananapi BPi-R2 (MT7623), MikroTik RouterBoard M11G (MT7621).

[1]: https://patchwork.kernel.org/project/netdevbpf/list/?series=662108&state=*
[2]: https://patchwork.kernel.org/project/netdevbpf/list/?series=675368&state=*
     (the first part of the series adding wed nodes to mt7986a.dtsi was
      applied to the copy of mt7986a.dtsi in our tree)
[3]: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=5e69163d3b9931098922b3fc2f8e786af8c1f37e

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-26 16:35:29 +08:00
Daniel Golle
5844b77bad kernel: mt7530: add support for in-band managed link
Add support for in-band managed link status to support SFP cage
connected to port 5 of the MT7531 switch on the Bananapi BPi-R3.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-26 16:33:04 +08:00
Daniel Golle
8a3e2d34a2 kernel: mtk_sgmii: re-organize PCS link status reporting
Don't report speed in case link is down.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-26 16:32:36 +08:00
Rafał Miłecki
f2dd752bf2 kernel: backport U-Boot environment data NVMEM driver
It parses U-Boot env data into NVMEM cells.
Fixes: 978bfe3 ("kernel: replace downstream get_mtd_device_by_node()
implementation"), #10177, #10178

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-09-26 16:31:29 +08:00
lovehackintosh
98a38cf20a
kernel: bump 5.19 to 5.19.11 (#10172)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-09-25 16:35:12 +08:00
lovehackintosh
34c08ba1da
kernel: bump 5.10 to 5.10.145 (#10173)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-09-25 16:35:00 +08:00
lovehackintosh
4d84789cdd
kernel: bump 5.15 to 5.15.70 (#10174)
Manually rebased:
hack-5.15/780-usb-net-MeigLink_modem_support.patch

Removed upstreamed:
mpc85xx/patches-5.15/110-gpio-mpc8xxx-Fix-support-for-IRQ_TYPE_LEVEL_LOW-flow.patch

All other patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-09-25 16:34:49 +08:00
AmadeusGhost
2b5dd9ff0f meson: add support for Thunder OneCloud
The device tree file is from armbian/build/tree/master/patch/kernel/archive/
meson-5.18 (Author: hzyitc). Swipe into the sd card or u disk to boot.
2022-09-25 16:21:21 +08:00
AmadeusGhost
947b99eeb7 meson: fixes support for Amlogic S805
1. Fixes CPU and regulator boot problems
2. Enable CPUFREQ, I2C, RTC and THERMAL support
3. Disabled annoying debug logs, refresh kconfig
4. Fix compilation failure due to wrong kconfig

Fixes: #10042

Signed-off-by: AmadeusGhost <amadeus@openjmu.xyz>
2022-09-25 16:16:26 +08:00
lovehackintosh
6fc2d00f25
kernel: bump 5.4 to 5.4.214 (#10170)
Manually rebased:
 generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch
 ipq806x/patches-5.4/0063-2-tsens-support-configurable-interrupts.patch
 layerscape/patches-5.4/301-arch-0008-arm-add-new-non-shareable-ioremap.patch
 layerscape/patches-5.4/820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh.patch
 layerscape/patches-5.4/801-audio-0008-Revert-ASoC-Remove-dev_err-usage-after-platform_get_.patch
 octeon/patches-5.4/700-allocate_interface_by_label.patch

All other patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-09-24 12:09:08 +08:00
aakkll
f777bcac76
kernel: bump 5.19 to 5.19.10 (#10168)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>

Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2022-09-23 13:52:30 +08:00
lean
19c9fb9439 kernel: bump 5.15 to 5.15.69 2022-09-23 01:14:09 +08:00
lean
978bfe37bd kernel: replace downstream get_mtd_device_by_node() implementation 2022-09-22 19:29:52 +08:00
lean
9ee64a9f38 e2guardian: fix gcc11 compile error 2022-09-22 13:41:34 +08:00
Sergey V. Lobanov
d0460e6b92 iucode-tool: fix host-compile on macos and non-x86 linux
iucode-tool/host is used by intel-microcode to manipulate with
microcode.bin file. iucode-tool requires cpuid.h at compile time
for autodection feature, but non-x86 build hosts does not have
this header file (e.g. ubuntu 20.04 aarch64) or this header
generates compile time error (#error macro) (e.g. macos arm64).

This patch provides compat cpuid.h to build iucode-tool/host on
non-x86 linux hosts and macos. CPU autodectection is not required
for intel-microcode package build so compat cpuid.h is ok for
OpenWrt purposes.

glibc and argp lib are not present in macos so iucode-tool/host
build fails. This patch adds argp-standalone/host as build
dependency if host os is macos.

Generated ucode (intel-microcode package) is exactly the same on
Linux x86_64 (Ubuntu 20.04), Linux aarch64 (Ubuntu 20.04) and
Darwin arm64 (MacOS 11.6) build hosts.

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
2022-09-22 13:37:04 +08:00
lean
4f056f8ef3 autocore: ethinfo: rewritten in lua 2022-09-21 18:12:59 +08:00
zhangguanzhang
ac7d6a4778
umbim: fixes build with gcc 11 (#10163)
Fixes: https://github.com/coolsnowwolf/lede/issues/10126
2022-09-21 13:10:23 +08:00
AmadeusGhost
a7a5b42f8a rockchip: replace patches with upstream 2022-09-20 20:20:53 +08:00
Michael Pratt
e623e8cd60 tools/cmake: fix download url with make variables
Use a make variable pattern for the url
so that only one version number needs to be changed
when version is bumped.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
2022-09-20 20:18:18 +08:00
Felix Fietkau
9676f90040 kernel: backport MTK ethernet/WLAN offload fixes
Fixes issues with offloading to WED, especially with VLAN bridges involved

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-20 20:16:26 +08:00
Chuanhong Guo
525b01ad91 mediatek: build ubnt-ledbar as a module
The config for LEDS_UBNT_LEDBAR doesn't stay in mt7629 kconfig because
of its I2C dependency. Build it as a module and let buildroot handle
this config option instead.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-09-20 20:15:43 +08:00
naoki66
c910efbac4
system.ntp.enable_server default (#10158) 2022-09-20 19:50:09 +08:00
AmadeusGhost
32aea04c4c mediatek: sync upstream source code
Fixes: #10156
2022-09-19 22:00:03 +08:00
Chuanhong Guo
3a90d86a78 kernel: 5.15: add support for ESMT F50x1G41LB
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-09-19 21:54:35 +08:00
Daniel Golle
c5d67f13f0 mediatek: fix sysupgrade on MTK7986 rfba AP
A line in platform.sh was accidentally removed when adding support
for the Bananapi BPi-R3.
Re-add it to fix sysupgrade on the MTK7986 rfba AP.

Fixes: a96382c1bb ("mediatek: add support for Bananapi BPi-R3")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-19 21:52:54 +08:00
Daniel Golle
4983058f5f mediatek: filogic: use WPS button instead of RST on BPi-R3
The GPIO used for the RST button is also used for PCIe-CLKREQ signal.
Hence it cannot be used as button signal if PCIe is also used.
Wire up WPS button to serve as KEY_RESTART in Linux and "reset" button
in U-Boot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-19 21:50:39 +08:00
Daniel Golle
fad0b7b5c8 mediatek: bpi-r64: make initramfs/recovery optional
Only include recovery image in SD card image generated for the
BananaPi BPi-R64 if building with CONFIG_TARGET_ROOTFS_INITRAMFS
This allows to build images larger than 32 MB (the limit for
initramfs/recovery image) by deselecting initramfs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-19 21:43:07 +08:00
Daniel Golle
d3f45415a2 mediatek: bpi-r3: make initramfs/recovery optional
Only include recovery image in SD card image generated for the
BananaPi BPi-R3 if building with CONFIG_TARGET_ROOTFS_INITRAMFS.
This allows to build images larger than 32 MB (the limit for
initramfs/recovery image) by deselecting initramfs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-19 21:40:18 +08:00
Daniel Golle
54950ebefb uboot-mediatek: replace patches with updated versions
Weijie Gao has submitted an updated version of the patchset adding
support for MT7986 and MT7981 to U-Boot. Use that v2 patchset.

Changes of v2:
- Add cpu driver for print_cpuinfo()
- Fix NULL pointer dereference in mtk_image
  (was already fixed in OpenWrt)
- Fix coding style
- Minor changes

https://patchwork.ozlabs.org/project/uboot/list/?series=316148

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-19 21:36:40 +08:00
Daniel Golle
fa84a35840 mediatek: add support for Bananapi BPi-R3
The Bananapi BPi-R3 is a development router board built around the
MediaTek Filogic 830 (MT7986A) SoC.
The board can boot either from microSD, SPI-NAND, SPI-NOR or eMMC.
Only either SPI-NAND or SPI-NOR can be used at the same time, also only
either microSD or eMMC can be used. The various storage options can be
selected using small SMD switches on the board.

Specs:
 * MediaTek MT7986A (Filogic 830) 4x ARM Cortex A53
 * 4T4R 2.4G 802.11bgnax (MT7975N)
 * 4T4R 5G 802.11anac/ax (MT7975P)
 * 2 GB DDR4 RAM
 * 8 GB eMMC
 * 128 MB SPI-NAND flash
 * 32 MB SPI-NOR flash
 * on-board MT7531 GbE switch
 * 2x SFP+ (1 GbE / 2.5 GbE)
 * 5x GbE network port
 * miniPCIe slot (only USB 2.0 connected)
 * uSIM slot (connected to miniPCIe interface)
 * M.2 KEY-E PCIe interface (PCIe x2)
 * microSD card interface
 * 26 PIN GPIO

Hardware details: https://wiki.banana-pi.org/Banana_Pi_BPI-R3

Working:
 * all 4 boot methods incl. installation via U-Boot, sysupgrade, ...
 * copper LAN and WAN ports
 * SFP1 (connected to gmac1, eth1 in Linux)
 * WiFi
 * LEDs
 * Buttons
 * PSTORE/ramoops based dual-boot

Not Working (missing driver features):
 * SFP2 (connected to MT7531 switch)

Untested:
 * M.2/NGFF slot (PCIe x2)
 * mPCIe slot (USB 2.0 + SIM)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-19 21:34:49 +08:00
Daniel Golle
0584843979 uboot-envtools: add support for Bananapi BPi-R3
Create new mediatek_filogic file and add entries for environment on
MMC, UBI and NOR for the Bananapi BPi-R3.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-19 21:29:42 +08:00
Daniel Golle
dcab6a3663 uboot-mediatek: add support for Bananapi BPi-R3
The Bananapi BPi-R3 board can boot from eMMC, SD card, SPI-NAND and
SPI-NOR, depending on the position of switches controlling the BOOTSEL
bootstrap pins as we as hard-wired chip-select lines. The position of the
chip-select switch SW6 decides whether either SD card or eMMC can be
accessed, SW5 selects either SPI-NAND or SPI-NOR.

Generate U-Boot for all 4 boot options. The SD card version allows
installation to SPI-NAND and SPI-NOR (eMMC cannot be accessed
simultanously with the SD card), the SPI-NAND version allows installation
to eMMC.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-19 21:29:25 +08:00
Daniel Golle
a4a0faa748 generic: 5.15: get uImage.FIT partition parser ready
Prepare uImage.FIT partition parser for Linux 5.15

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-09-19 21:26:27 +08:00
Daniel Golle
967902aff5 uboot-mediatek: no compression means IH_COMP_NONE
Treat missing compression node in FIT image as IH_COMP_NONE.
This is implicentely already happening in most places, but for now
was still triggering an annoying warning about initramfs compression
being obsolete despite compression note being absent.
Fix this.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-19 21:23:41 +08:00
Daniel Golle
af68e43f0e uboot-mediatek: mt7986: add generic reset button support
Allow resetting environment to default values when defined button
exists in device tree.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-19 21:23:04 +08:00
Daniel Golle
3abe3dd5e8 uboot-mediatek: mt7986: support PSTORE/ramoops
Assign reserved memory for PSTORE/ramoops for the MT7986 SoC.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-19 21:22:42 +08:00
Daniel Golle
fa440f78f0 uboot-mediatek: additions from MTK SDK
* updated SNAND/SNFI driver brings support for MT7981
 * add support for MediaTek NAND Memory bad Block Management (NMBM)
   (not used for any boards atm, but could be useful in future)
 * wire up NMBM support for MT7622, MT7629, MT7981 and MT7986
 * replace some local patches with updated version from SDK
 * bring some legacy precompiler symbols which haven't been converted
   into Kconfig symbols in U-Boot 2022.07, remove when bumbping to
   U-Boot 2022.10:
   100-28-include-configs-mt7986-h-from-SDK.patch

Source: https://github.com/mtk-openwrt/u-boot
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-19 21:22:21 +08:00
Daniel Golle
c9ead0cf50 uboot-mediatek: add support for MT798x platforms
Import pending patches to support the upcoming Filogic platforms.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-19 21:21:56 +08:00
AmadeusGhost
3d0e662aae uboot-mediatek: sync upstream source 2022-09-19 21:20:35 +08:00
AmadeusGhost
8a353822ed Revert "kernel: bump 5.4 to 5.4.211"
This reverts commit 548ac73c5b.
2022-09-19 21:01:08 +08:00
lean
86eb0f2e34 autocore-arm: disable wireless port info show 2022-09-18 21:42:25 +08:00
Sungbo Eo
7901118997 mac80211: rt2x00: fix typo
Add missing semicolon and refresh patches.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2022-09-18 21:30:20 +08:00