Commit Graph

54351 Commits

Author SHA1 Message Date
Tomasz Maciej Nowak
5c142aad7b ath79: switch some RedBoot based devices to OKLI loader
After the kernel has switched version to 5.10, JA76PF2 and
RouterStations lost the capability to sysupgrade the OpenWrt version.
The cause is the lack of porting the patches responsible for partial
flash erase block writing and these boards FIS directory and RedBoot
config partitions share the same erase block. Because of that the FIS
directory can't be updated to accommodate kernel/rootfs partition size
changes. This could be remedied by bootloader update, but it is very
intrusive and could potentially lead to non-trivial recovery procedure,
if something went wrong. The less difficult option is to use OpenWrt
kernel loader, which will let us use static partition sizes and employ
mtd splitter to dynamically adjust kernel and rootfs partition sizes.
On sysupgrade from ath79 19.07 or 21.02 image, which still let to modify
FIS directory, the loader will be written to kernel partition, while the
kernel+rootfs to rootfs partition.

The caveats are:
* image format changes, no possible upgrade from ar71xx target images
* downgrade to any older OpenWrt version will require TFTP recovery or
  usage of bootloader command line interface

To downgrade to 19.07 or 21.02, or to upgrade if one is already on
OpenWrt with kernel 5.10, for RouterStations use TFTP recovery
procedure. For JA76PF2 use instructions from this commit message:
commit 0cc87b3bac ("ath79: image: disable sysupgrade images for routerstations and ja76pf2"),
replacing kernel image with loader (loader.bin suffix) and rootfs
image with firmware (firmware.bin suffix).

Fixes: b10d604459 ("kernel: add linux 5.10 support")
Fixes: 15aa53d7ee ("ath79: switch to Kernel 5.10")
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
(mkubntimage was moved to generic-ubnt.mk)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-24 17:09:54 +02:00
Tomasz Maciej Nowak
4cca0947ff ath79: jj76pf2: enable TCN75 sensor
This SBC has Microchip TCN75 sensor, wich measures ambient temperature.
Specify it in dts to allow readout by applications using kernel hwmon
API.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2022-06-24 17:09:53 +02:00
Mark Mentovai
f614332197 include/prereq-build.mk: macOS cross build improvements
This updates prereq-build.mk to find a suitable realpath utility, and
adds another place to look for a suitable getopt utility.

realpath has been used most notably by scripts/ipkg-build since
commit bb95be9265 ("scripts,ipkg-build: use realpath for pkg_dir")
and there are assorted other uses of it during a build.
It is ordinarily provided by GNU coreutils. This adds a SetupHostCommand
to locate it either under its own name or under grealpath, the name that
it will be available as under MacPorts or Homebrew, which use
--program-prefix=g.

Similarly, update the SetupHostCommand for getopt to be able to locate a
util-linux getopt at the default path used by MacPorts, in the same
fashion that
commit cc16f5d73e ("build: try to find getopt in macOS homebrew's standard location")'
did for Homebrew. As there is no standard alternative --program-prefix
for util-linux utilities in the way that GNU packages often use a "g"
prefix, this path-based approach is required in case a non-util-linux
getopt (such as one provided by an OS) shadows the util-linux getopt
in the PATH.

Signed-off-by: Mark Mentovai <mark@moxienet.com>
2022-06-24 17:07:56 +02:00
Alexey Smirnov
ed4d743a2c omap: enable 5.15 as testing kernel
Compiled for and run-tested on BBB

Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
2022-06-24 09:18:03 +02:00
Alexey Smirnov
97d9f515b7 omap: update config for 5.15
This was done by executing make kernel_oldconfig

Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
2022-06-24 09:18:03 +02:00
Alexey Smirnov
3b548d091e omap: copy config from 5.10 to 5.15
copy config from 5.10 to 5.15

Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
2022-06-24 09:18:03 +02:00
Stefan Kalscheuer
f8fa38c13f kernel: add kmod-leds-turris-omnia
Add support for LEDs of the CZ.NIC Turris Omnia using the upstream
driver.

There is no generic way to control the LEDs in UCI manner, however
the kernel module is the first step to actually use the RGB LEDs in
custom logic.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
(removed DMARC notice, added driver to Turris Omnia, moved module
recipe to target/linux/mvebu/modules.mk)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-24 09:18:03 +02:00
Bjørn Mork
79112e7d47 ramips: force ZyXEL NR7101 to boot from "Kernel" partition
Make sure BootingFlag points to the system partition we install to.

The BootingFlag variable selects which system partition the system
boots from (0 => "Kernel", 1 => "Kernel2"). OpenWrt does not yet have
device specific support for this dual image scheme, and can therefore
only boot from "Kernel".

This has not been an issue until now, since all known OEM firmware
versions have ignored "Kernel2" - leaving the BootingFlag fixed at 0.
But the newest OEM firmware has a new upgrade procedure, installing
to the "inactive" system partition and setting BootingFlag accordingly.

This workaround is needed until the dual image scheme is fully
supported.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2022-06-24 09:18:03 +02:00
Arınç ÜNAL
a1ad837735 ramips: mt7621-dts: fix claiming rgmii2 pin group for EdgeRouter X SFP
For a TX->TX connected external phy to transmit/receive data, the rgmii2
pin group needs to be claimed with gpio function, at least for EdgeRouter X
SFP. We already claim the pin group under the pinctrl node with gpio
function on the gpio node on mt7621_ubnt_edgerouter-x.dtsi.

However, we should claim a pin group under its consumer node. It's the
ethernet node in this case, which we already claim the rgmii2 pin group
under it on mt7621.dtsi. Therefore, set the function as gpio on the rgmii2
node for EdgeRouter X SFP and get rid of claiming the rgmii2 pin group
under the pinctrl node. With this change, we also get to remove a
definition from mt7621_ubnt_edgerouter-x.dtsi which is specific to
EdgeRouter X SFP.

This change is tested on an EdgeRouter X SFP.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
2022-06-24 09:18:03 +02:00
Rafał Miłecki
c6f16b63fa bcm53xx: copy patch disabling GRO to kernel 5.15
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-06-24 09:09:27 +02:00
Rafał Miłecki
fcbd39689e bcm53xx: enable & setup packet steering
Packet steering can improve NAT masquarade performance on Northstar by
40-50%. It makes reaching 940-942 Mb/s possible on BCM4708 (and
obviously BCM47094 too). Add scripts setting up the most optimal
Northstar setup.

Below are testing results for running iperf TCP traffic from LAN to WAN.
They were used to pick up golden values.

┌──────────┬──────────┬────────────────────┬────────────────────┐
│   eth0   │  br-lan  │ flow_offloading=0  │ flow_offloading=1  │
│          │          ├─────────┬──────────┼─────────┬──────────┤
│ rps_cpus │ rps_cpus │ BCM4708 │ BCM47094 │ BCM4708 │ BCM47094 │
├──────────┼──────────┼─────────┼──────────┼─────────┼──────────┤
│        0 │        0 │     387 │      671 │     707 │      941 │
│        0 │        1 │     343 │      576 │     705 │      941 │
│        0 │        2 │   ✓ 574 │    ✓ 941 │     704 │      940 │
│        1 │        0 │     320 │      549 │     561 │      941 │
│        1 │        1 │     327 │      551 │     553 │      941 │
│        1 │        2 │     523 │    ✓ 940 │     559 │      940 │
│        2 │        0 │     383 │      652 │   ✓ 940 │      941 │
│        2 │        1 │     448 │      754 │   ✓ 942 │      941 │
│        2 │        2 │     404 │      655 │   ✓ 941 │      941 │
└──────────┴──────────┴─────────┴──────────┴─────────┴──────────┘

Above tests were performed with all eth0 interrupts handled by CPU0.
Setting "echo 2 > /proc/irq/38/smp_affinity" was tested on BCM4708 but
it didn't increased speeds (just required different steering):

┌──────────┬──────────┬───────────┐
│   eth0   │  br-lan  │ flow_offl │
│   rx-0   │   rx-0   │ oading=0  │
│ rps_cpus │ rps_cpus │  BCM4708  │
├──────────┼──────────┼───────────┤
│        0 │        0 │       384 │
│        0 │        1 │     ✓ 574 │
│        0 │        2 │       348 │
│        1 │        0 │       383 │
│        1 │        1 │       412 │
│        1 │        2 │       448 │
│        2 │        0 │       321 │
│        2 │        1 │       520 │
│        2 │        2 │       327 │
└──────────┴──────────┴───────────┘

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-06-24 07:39:51 +02:00
Rafał Miłecki
82d0dd8f8a bcm53xx: disable GRO by default at kernel level
This improves NAT masquarade network performance.

An alternative to kernel change would be runtime setup but that requires
ethtool and identifying relevant network interface and all related
switch ports interfaces.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-06-24 07:39:27 +02:00
Bjørn Mork
d6eebaf995 realtek: fix gcc-12 build with -Werror=array-compare
Removing this gcc-12 error:

arch/mips/rtl838x/setup.c:64:30: error: comparison between two arrays [-Werror=array-compare]
   64 |         else if (__dtb_start != __dtb_end)

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2022-06-22 18:37:40 +02:00
Andreas Böhler
d9e12c21fa realtek: make "u-boot-env" partition writable for Netgear 3xx series
The Netgear GS3xx devices do not properly initialise the port LEDs during
startup unless the boot command in U-Boot is changed. Making the U-Boot
env partition writable allows this modification to be done from within
OpenWrt by calling "fw_setenv bootcmd rtk network on\; boota".

Signed-off-by: Andreas Böhler <dev@aboehler.at>
2022-06-22 17:52:30 +02:00
Stijn Segers
9c381d3386 realtek: make Netgear GS1xx u-boot env partition writable
Make the u-boot environment partition for the NETGEAR
GS108T v3 and GS110TPP writable (they share a DTS), so
the values can be manipulated from userspace.

See https://forum.openwrt.org/t/57875/1567 for a real
world example.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2022-06-22 17:51:02 +02:00
Paul Maruhn
7e4de89e63 ath79: support for TP-Link EAP225-Outdoor v3
This model is almost identical to the EAP225-Outdoor v1.
Major difference is the RTL8211FS PHY Chipset.

Device specifications:
* SoC: QCA9563 @ 775MHz
* Memory: 128MiB DDR2
* Flash: 16MiB SPI-NOR
* Wireless 2.4GHz (SoC): b/g/n 2x2
* Wireless 5GHz (QCA9886): a/n/ac 2x2 MU-MIMO
* Ethernet (RTL8211FS): 1× 1GbE, PoE

Flashing instructions:
* ssh into target device with recent (>= v1.6.0) firmware
* run `cliclientd stopcs` on target device
* upload factory image via web interface

Debricking:
To recover the device, you need access to the serial port. This requires
fine soldering to test points, or the use of probe pins.
* Open the case and solder wires to the test points: RXD, TXD and TPGND4
  * Use a 3.3V UART, 115200 baud, 8n1
* Interrupt bootloader by holding ctrl+B during boot
* upload initramfs via built-in tftp client and perform sysupgrade
    setenv ipaddr 192.168.1.1 # default, change as required
    setenv serverip 192.168.1.10 # default, change as required
    tftp 0x80800000 initramfs.bin
    bootelf $fileaddr

MAC addresses:
MAC address (as on device label) is stored in device info partition at
an offset of 8 bytes. ath9k device has same address as ethernet, ath10k
uses address incremented by 1.
From stock ifconfig:

    ath0      Link encap:Ethernet  HWaddr D8:...:2E
    ath10     Link encap:Ethernet  HWaddr D8:...:2F
    br0       Link encap:Ethernet  HWaddr D8:...:2E
    eth0      Link encap:Ethernet  HWaddr D8:...:2E

Signed-off-by: Paul Maruhn <paulmaruhn@posteo.de>
Co-developed-by: Philipp Rothmann <philipprothmann@posteo.de>
Signed-off-by: Philipp Rothmann <philipprothmann@posteo.de>
[Add pre-calibraton nvme-cells]
Tested-by: Tido Klaassen <tido_ff@4gh.eu>
Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-06-22 17:47:11 +02:00
Philipp Rothmann
8bd5bbad1e ath79: generic: add support for Realtek PHY
Some models of the TP-Link EAP225 series use a Realtek PHY,
therefore the driver is added.

Signed-off-by: Philipp Rothmann <philipprothmann@posteo.de>
2022-06-22 17:47:11 +02:00
Felix Fietkau
a703f9ed0b mt76: update to the latest version
4554ee652caf mt76: mt7921: fix warning Using plain integer as NULL pointer
a3f1d6ccf3ca mt76: mt7921: add missing bh-disable around rx napi schedule
9aeca2a5ce47 mt76: mt7921: get rid of mt7921_mcu_exit
fee8a5911c76 mt76: connac: move shared fw structures in connac module
db4d784ae7ba mt76: mt7921: move fw toggle in mt7921_load_firmware
16ab6bf49556 mt76: connac: move mt76_connac2_load_ram in connac module
29fd748801c6 mt76: connac: move mt76_connac2_load_patch in connac module
051c68d18214 mt76: mt7663: rely on mt76_connac2_fw_trailer
d6ae3505ac6c mt76: enable the VHT extended NSS BW feature
488a5ccc9762 mt76: mt7921: rely on mt76_dev in mt7921_mac_write_txwi signature
934029bb93e2 mt76: mt7915: rely on mt76_dev in mt7915_mac_write_txwi signature
ecefae4c7d72 mt76: connac: move mac connac2 defs in mt76_connac2_mac.h
b5eecc841df8 mt76: connac: move connac2_mac_write_txwi in mt76_connac module
012e619a07b9 mt76: connac: move mt76_connac2_mac_add_txs_skb in connac module
1b492be795ea mt76: mt7921: not support beacon offload disable command
f1f46d3b4b19 mt76: mt7921: fix command timeout in AP stop period
cae61112ef1d mt76: connac: move HE radiotap parsing in connac module
487674062643 mt76: connac: move mt76_connac2_reverse_frag0_hdr_trans in mt76-connac module
649bdc4983c4 mt76: connac: move mt76_connac2_mac_fill_rx_rate in connac module
cb75aaa39252 mt76: mt7921s: remove unnecessary goto in mt7921s_mcu_drv_pmctrl
e0eaf66eaebb mt76: mt7615: do not update pm stats in case of error
f8d125b4ea30 mt76: mt7921: do not update pm states in case of error
6329a834907e mt76: mt7921s: fix possible sdio deadlock in command fail
8a04f1b04662 mt76: mt7921: fix aggregation subframes setting to HE max
e52283439094 mt76: mt7915: disable UL MU-MIMO for mt7915
fd3958970e3d mt76: mt7921: enlarge maximum VHT MPDU length to 11454
18df38fe77f7 mt76: mt7915: get rid of unnecessary new line in mt7915_mac_write_txwi
149e95f5d7a6 mt76: connac: move mt76_connac_fw_txp in common module
899d192e8a79 mt76: move mt7615_txp_ptr in mt76_connac module
7184f0a6f6a5 mt76: connac: move mt76_connac_tx_free in shared code
c42d45278fa5 mt76: connac: move mt76_connac_tx_complete_skb in shared code
0993f4ef96f8 mt76: connac: move mt76_connac_write_hw_txp in shared code
467960fab791 mt76: connac: move mt7615_txp_skb_unmap in common code
2e758064b085 mt76: mt7915: rely on mt76_connac_tx_free
2065a7901671 mt76: move mcu_txd/mcu_rxd structures in shared code
576c1b7c472b mt76: move mt76_connac2_mcu_fill_message in mt76_connac module
7275f7758090 mt76: mt7915: fix incorrect testmode ipg on band 1 caused by wmm_idx

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-06-21 20:56:31 +02:00
Kevin Darbyshire-Bryant
24e27bec9a kernel: filter -no-plt from KCFLAGS
Compiler option -no-plt will break kernel builds on some architectures
eg. (x86)  Filter this option from the recently introduced handling of
KCFLAGS vs EXTRA_OPTIMISATION

Fixes: 1d42af720c ("kernel: use KCFLAGS for passing EXTRA_OPTIMIZATION flags")

Suggested-by: Felix Fietkau <nbd@nbd.name>

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2022-06-21 16:41:17 +01:00
Stijn Tintel
33e7f7c028 hostapd: document ubus methods
Document the ubus methods we added to hostapd so that people don't have
to read code to figure out which methods are available and what they do.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-06-21 16:19:42 +03:00
Florian Fainelli
5f10805094 bcm47xx: Fix Netgear WNR3500L v2 image format
CFE on these devices expects to find the kernel compressed with LZMA but
with no dictionnary and no loader, adjust the image generation
accordingly.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-06-20 14:29:12 -07:00
Florian Fainelli
0c9d07a3b4 bcm47xx: Updated devices database for Netgear WNR3500L V2
Update the device databases to contain an entry for the Netgear WNR3500L
v2 router, the same buttons and LEDs mapping as v1 is used.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-06-20 14:29:12 -07:00
Florian Fainelli
acff8aec0c bcm47xx: Add support for brcmnand controller on BCMA bus
Back port the patches being submitted upstream in order to make the NAND
controller work on BCM47187/5358. This is a prerequisite for supporting
devices like the Netgear WNR3500L V2.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-06-20 14:29:12 -07:00
Florian Fainelli
cd3de51bb4 broadcom-wl: Fix compilation with kernel 5.10
This adds a few fixes for compiling against Linux 5.10:

1. segment_eq() has been removed with upstream commit
   428e2976a5bf7e7f5554286d7a5a33b8147b106a ("uaccess: remove
   segment_eq") and can use uaccess_kernel() instead
2. ioremap_nocache() is removed and is now an alias for ioremap() with
   upstream commit 4bdc0d676a643140bdf17dbf7eafedee3d496a3c ("remove
   ioremap_nocache and devm_ioremap_nocache")

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-06-20 14:29:12 -07:00
Rafał Miłecki
22168ae681 kernel: drop patch adding hardcoded kernel compilation flags
1. KCFLAGS should be used for custom flags
2. Optimization flags are arch / SoC specific
3. -fno-reorder-blocks may *worsen* network performace on some SoCs
4. Usage of flags was *reversed* since 5.4 and noone reported that

If we really need custom flags then CONFIG_KERNEL_CFLAGS should get
default value adjusted properly (per target).

Ref: 4e0c54bc5b ("kernel: add support for kernel 5.4")
Link: http://lists.openwrt.org/pipermail/openwrt-devel/2022-June/038853.html
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20190409093046.13401-1-zajec5@gmail.com/
Cc: Felix Fietkau <nbd@nbd.name>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-06-20 22:17:38 +02:00
Rafał Miłecki
907d7d7472 kernel: support setting extra CFLAGS for kernel compilation
They may be used e.g. to optimize kernel size or performance.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-06-20 22:17:38 +02:00
Martin Blumenstingl
a1354accc0 lantiq: dts: fix reset controller reference on Danube and AR9
ar9.dtsi and danube.dtsi only have one reset controller and they are
naming it "reset". This is equivalent to "reset0" in vr9.dtsi. Fix the
references to the reset controller in the recently added PCI controller
reset line.

Fixes: 087f2cba26 ("lantiq: dts: Add the reset line for the PCI controller")
Reported-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2022-06-20 19:43:33 +02:00
Piotr Dymacz
fd72e595c2 ramips: fix booting on ZyXEL NBG-419N v2
This fixes a well known "LZMA ERROR 1" error, reported previously on
numerous of other devices from 'ramips' target.

Fixes: #9842
Fixes: #8964

Reported-by: Juergen Hench <jurgen.hench@gmail.com>
Tested-by: Juergen Hench <jurgen.hench@gmail.com>
Signed-off-by: Demetris Ierokipides <ierokipides.dem@gmail.com>
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-06-20 11:05:41 +02:00
Rafał Miłecki
1d42af720c kernel: use KCFLAGS for passing EXTRA_OPTIMIZATION flags
This uses kernel's generic variable and doesn't require patching it with
a custom Makefile change. It's expected *not* to change any behaviour.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-06-19 23:23:18 +02:00
Rafał Miłecki
77692d6112 kernel: backport mtd parser for Sercomm partitions
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-06-19 22:10:03 +02:00
Alin Nastac
289c46869b 464xlat: delete SNATed conntracks on interface teardown
Existing conntracks will continue to be SNATed to 192.0.0.1 even after
464xlat interface gets teared down. To prevent this, matching
conntracks must be killed.

Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
2022-06-19 21:54:05 +02:00
Logan Blyth
36e46c3c13 mvebu: add SolidRun ClearFog GT 8K
ClearFog GT 8K is device sold by SolidRun. It is marketed as a
development board, not a consumer product. The device tree file for this board
is upstream in kernel.org.

Signed-off-by: Logan Blyth <mrbojangles3@gmail.com>
2022-06-19 12:40:30 +02:00
Christian Lamparter
cd1b4ea5aa apm821xx: align gpio-keys node names with dt-schema
As per the series:
<https://www.spinics.net/lists/devicetree/msg508906.html>

"Enforce specific naming pattern for children (keys) to narrow the
pattern thus do not match other properties.  This will require all
children to be properly prefixed or suffixed (button, event, switch
or key)."

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-19 12:40:30 +02:00
Mark Mentovai
c9725d4fb6 failsafe: run on all consoles listed in /proc/cmdline
On x86, when both CONFIG_GRUB_CONSOLE and CONFIG_GRUB_SERIAL are set (as
they are by default), the kernel command line will have two console=
entries, such as

    console=tty0 console=ttyS0,115200n8

Failsafe was only running a shell on the first defined console, the VGA
console. This is a problem for devices like apu2, where there is only a
serial console and it appears on ttyS0.

Moreover, the console prompt to enter failsafe during boot was delivered
to, and its input read from, the last console= on the kernel command
line. So while the failsafe shell was on the first defined console, only
the last defined console could be used to enter failsafe during boot.

In contrast, the x86 bootloader (GRUB) operates on both the serial
console and the VGA console by virtue of "terminal_{input,output}
console serial". GRUB also provided an alternate means to enter failsafe
from either console. The presence of two console= kernel command line
parameters causes kernel messages to be delivered to both. Under normal
operation (not failsafe), procd runs login in accordance with inittab,
which on x86 specifies ttyS0, hvc0, and tty1, allowing login through any
of serial, hypervisor, or VGA console. Thus, serial access was
consistently available on x86 devices with serial consoles under normal
operation, except for shell access in failsafe mode (without editing the
kernel command line).

By presenting the failsafe prompt, reading failsafe prompt input, and
running failsafe shells on all consoles listed in /proc/cmdline,
failsafe mode will work correctly on devices with a serial console (like
apu2), and the same image without any need for reconfiguration can be
shared by devices with the more traditional (for x86) VGA console. This
improvement should benefit any system with multiple console= arguments,
including x86 and bcm27xx (Raspberry Pi).

Signed-off-by: Mark Mentovai <mark at moxienet.com>
2022-06-19 12:40:30 +02:00
Leo Soares
dc59a22f1d libusb: fix missing link
adds `libusb-1.0.so` link on the target root again.

Fixes: 43539a6aab ("libusb: make InstallDev explicit")
Signed-off-by: Leo Soares <leo@hyper.ag>
(added fixed tag, reworded commit)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-19 12:40:30 +02:00
Martin Blumenstingl
087f2cba26 lantiq: dts: Add the reset line for the PCI controller
The PCI controller has it's reset line wired up to bit 13 of RCU.
Describe this in our .dtsi files.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2022-06-19 12:31:02 +02:00
Zhijun You
00f64ed660 ath10k: backport encapsulation offload support
This backports encap offload support from upstream.
On some ath10k devices there can be about 10% improvement on tx throughput.
Users can turn it on by setting frame_mode=2.

Signed-off-by: Zhijun You <hujy652@gmail.com>
2022-06-19 12:31:02 +02:00
Chris Blake
949e8ba521 ath79: add support for Netgear PGZNG1
This adds support for the Netgear PGZNG1, also known as the ADT Pulse
Gateway.

Hardware:
CPU: Atheros AR9344
Memory: 256MB
Storage: 256MB NAND Hynix H27U2G8F2CTR-BC
USB: 1x USB 2.0
Ethernet: 2x 100Mb/s
WiFi: Atheros AR9340 2.4GHz 2T2R
Leds: 8 LEDs
Button: 1x Reset Button
UART:
Header marked JPE1. Pinout is VCC, TX, RX, GND. The marked pin, closest
to the JPE1 marking, is VCC. Note VCC isn't required to be connected
for UART to work.

Enable Stock Firmware Shell Access:
1. Interrupt u-boot and run the following commands
setenv console_mode 1
saveenv
reset

This will enable a UART shell in the firmware. You can then login using
the root password of `icontrol`. If that doesn't work, the device is
running a firmware based on OpenWRT where you can drop into failsafe to
mount the FS and then modify /etc/passwd.

Installation Instructions:
1. Interupt u-boot and run the following commands
setenv active_image 0
setenv stock_bootcmd nboot 0x81000000 0 \${kernel_offset}
setenv openwrt_bootcmd nboot 0x82000000 0 \${kernel_offset}
setenv bootcmd run openwrt_bootcmd
saveenv

2. boot initramfs image via TFTP u-boot
tftpboot 0x82000000 openwrt-ath79-nand-netgear_pgzng1-initramfs-kernel.bin; bootm 0x82000000

3. Once booted, use LuCI sysupgrade to
flash openwrt-ath79-nand-netgear_pgzng1-squashfs-sysupgrade.bin

MAC Table:
WAN (eth0): xx:xa - caldata 0x0
LAN (eth1): xx:xb - caldata 0x6
WLAN (phy0): xx:xc - burned into ath9k caldata

Not Working:
Z-Wave
RS422

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
(added more hw-info, fixed file permissions)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-19 12:31:02 +02:00
Chris Blake
77a14795df kernel: add kmod-leds-pca955x
This patch adds support for the mainline kernel module for the PCA955x
LED driver. Note this requires i2c and GPIO support. Also worth calling
out this driver also enables GPIO support, depending on device tree
configuration.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
2022-06-19 12:31:02 +02:00
Chris Blake
78ecaebdff kernel: add upstream patches for pca955x led driver
These patches are to support the pca955x led with OpenWRT correctly via
device tree on linux 5.10. Without these, the new LED function/color/reg
features can not be used.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
2022-06-19 12:31:02 +02:00
Josef Schlehofer
2e0afef246 uboot-rockchip: drop CONFIG_IDENT_STRING
This row is no longer necessary as it was replaced by LOCALVERSION in
uboot.mk, which explicitly sets OpenWrt version to all U-boot packages accross
OpenWrt. [1]

[1] d6aa9d9e07

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2022-06-19 12:31:02 +02:00
Josef Schlehofer
25534d5cc2 tools/libressl: update to version 3.4.3
Release notes:
https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.4.3-relnotes.txt

```
It includes the following security fix:

    * A malicious certificate can cause an infinite loop.
      Reported by and fix from Tavis Ormandy and David Benjamin, Google.
```

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2022-06-19 12:31:02 +02:00
Josef Schlehofer
dc7f78da97 mpc85xx: p2020: add RTC ds1307 to kernel
If the RTC module is compiled as a module, the hctosys fails to
initialize because ds1307 is loaded later.

Fixes:
[    2.004145] hctosys: unable to open rtc device (rtc0)
[   11.957997] rtc-ds1307 0-006f: registered as rtc0

This is similar to commit 5481ce9a11,
which was done for imx6 target.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2022-06-19 12:31:02 +02:00
Matthew Hagan
811538ab22 ipq40xx: add support for Meraki MR74
The Meraki MR74 is part of the "Insect" series. This device is
essentially an outdoor variant of the MR33 with identical hardware, but
requiring a config@3 DTS option to be set to allow booting with the
stock u-boot.

The install procedure is replicated from the MR33, with the exception
being that the MR74 sysupgrade image must be used.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2022-06-19 12:31:02 +02:00
Christian Lamparter
5f7828fcc2 apm821xx: MBL: make mtd chip work
The MBL has a 512KiB Microchip SST39VF040 chip for uboot and
not much else.

Thanks to Ewald who figured out that the "jedec-probe" vs.
"jedec-flash" was the wrong binding. With this information
and the jedec-probe support enabled => the chip works.

| physmap-flash 4fff80000.nor_flash: physmap platform flash device: [mem 0x4fff80000-0x4ffffffff]
| Found: SST 39LF040
| 4fff80000.nor_flash: Found 1 x8 devices at 0x0 in 8-bit bank

Suggested-by: Ewald Comhaire <e.comhaire@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-19 12:31:02 +02:00
Josef Schlehofer
6006f73383 mpc85xx: enable NAND support for all subtargets
In subtarget p2020, there wasn't enabled nand support, and because of
that there weren't available tools from mtd-utils package, which has
utilities for NAND flash memory even though reference board, which
is the only currently supported device in p2020 subtarget has NAND [1].

All subtargets in mpc85xx has already enabled nand support, let's do it
globally.

[1] https://www.nxp.com/design/qoriq-developer-resources/p2020-reference-design-board:P2020RDB

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2022-06-19 12:31:02 +02:00
Marek Behún
742926e5f5 kernel: Backport mv88e6xxx patch to keep pvid at 0 if VLAN-unaware and remove hack
Keeping the pvid at 0 when VLAN-unaware makes it possible to drop the
hack introduced in commit 920eaab1d8 ("kernel: DSA roaming fix for
Marvell mv88e6xxx"). Dropping the hack makes it possible to use VLAN
interfaces with VID 1 on DSA ports without problems with FDB.

Signed-off-by: Marek Behún <kabel@kernel.org>
(cherry picked from commit 9caa6f0aa7)
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
[drop kernel patch hack from Linux version 5.15, drop paragraph about
backport patch, which is not necessary as it is included in kernel 5.15]
2022-06-19 12:31:02 +02:00
Christian Lamparter
554ca44730 bcm53xx: remove 07_set_preinit_iface_bcm53xx
with the switch to DSA setup, the switch gets correctly
programmed via the device-tree now. This hack is no
longer necessary.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-19 12:31:02 +02:00
Christian Lamparter
ac2166b135 kernel: move Toshiba-TC58NVG0S3H patch to ipq40xx redux
Linux' upstream MTD-Maintainer Miquèl Raynal noted:
|Reverting seems the safest option here, not knowing how many devices
|have these damaged/counterfeit chips. If it is just a couple and only on
|Fritzboxes, as suggested in the Github issue this patch could be
|carried through OpenWrt and that would seem more future proof IMHO.

This patch follows up with the first patch. It actually
moves the patches out of target/linux/generic/pending into
the ipq40xx's patch heap and adds a little note what happend.

For more information, discussions or reports about bad TC58NVG0S3Hs,
please visit the OpenWrt's Github Issue #9962:
<https://github.com/openwrt/openwrt/issues/9962>

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-19 12:31:02 +02:00
Florian Eckert
9379bc2fcf netfilter: kmod-nft-xfrm
Add kmod-nft-xfrm package.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-06-19 12:31:02 +02:00