1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-26 09:37:29 +02:00
Commit Graph

3402 Commits

Author SHA1 Message Date
Rafał Miłecki
7a7b2fd809 kernel: add the latest mtd patch extending ofpart parser
This adds the latest version of ofpart commit. It hopefully
1. Doesn't break compilation
2. Doesn't break partitioning
(this time).

It's required to implement fixed partitioning with some quirks. It's
required by bcm53xx, bcm4908, kirkwood, lantiq and mvebu.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-03-01 18:18:38 +01:00
Felix Fietkau
7a6d074824 kernel: add support for enabling fit firmware partition parser via cmdline
This is useful for dual-boot setups where the loader sets variables depending
on the flash boot partition.
For example the Linksys E8450 sets mtdparts=master for the first partition
and mtdparts=slave for the second one.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-28 00:46:11 +00:00
Daniel Golle
6b0295a47d image: extend FIT partition parser for use on eMMC/SDcard
Introduce a magic GUID_PARTITION_LINUX_FIT_GUID to designate a GPT
partition to be interpreted by the FIT partition parser.
In that way, sub-partitions for (external-data) uImage.FIT stored
directly in a partition can be split, similar like we do for devices
with raw flash storage.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-28 00:09:09 +00:00
Jason A. Donenfeld
2a27f6f90a kernel: backport pending fix to select CPU_MIPS64
The CPU_MIPS64 and CPU_MIPS32 variables are supposed to be able to
distinguish broadly between 64-bit and 32-bit MIPS CPUs. However, they
weren't selected by the specialty CPUs, Octeon and Loongson, which meant
it was possible to hit a weird state of:

   MIPS=y, CONFIG_64BIT=y, CPU_MIPS64=n

This commit rectifies the issue by having CPU_MIPS64 be selected when
the missing Octeon or Loongson models are selected.

In particular, this affects our octeonplus target.

It has been posted to LKML here:
https://lore.kernel.org/linux-mips/20210227122605.2680138-1-Jason@zx2c4.com/

Cc: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Cc: David Bauer <mail@david-bauer.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-02-27 19:14:27 +01:00
Aleksander Jan Bajkowski
598de0f41c kernel: move some new symbols available on 5.10 to generic
Move some disabled config options found in sunxi target to generic.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-02-27 16:49:02 +01:00
Daniel González Cabanelas
cbcac4fde8 kernel: b53: update the BCM5365 UID
BCM63XX internal PHYs and BCM5365 SoC internal switch are both using the
same phy_driver->phy_id, causing conflicts and unnecessary probes. E.g
the BCM63XX phy internal IRQ is lost on the first probe.

The full BCM5365 UID is 0x00406370.

Use an additional byte to mask the BCM5365 UID to avoid duplicate driver
phy_id's. This will fix the IRQ issue in internal BCM63XX PHYs and avoid
more conflicts in the future.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
2021-02-26 21:11:19 +01:00
Ilya Lipnitskiy
23b801d3ba kernel: 5.4: generic: add missing symbols
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-26 20:41:01 +01:00
Ilya Lipnitskiy
3500fd7938 kernel: 5.4: fix patches after wireguard backport
No major problems, just a minor Kconfig fix and a refresh.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-26 20:41:01 +01:00
Jason A. Donenfeld
3888fa7880 kernel: 5.4: import wireguard backport
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>
2021-02-26 20:41:01 +01:00
Jason A. Donenfeld
7d4143234c kernel: 5.10: wireguard: backport 5.12-rc1 changes in net.git
These will eventually make their way to 5.10, but it could be a while.

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=ee576c47db60432c37e54b1e2b43a8ca6d3a8dca
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=5a0598695634a6bb4126818902dd9140cd9df8b6
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=99fff5264e7ab06f45b0ad60243475be0a8d0559
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=8b5553ace83cced775eefd0f3f18b5c6214ccf7a
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=bce2473927af8de12ad131a743f55d69d358c0b9

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
[Rename 082-wireguard-kconfig... to 083-wireguard-kconfig...]
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-26 20:41:00 +01:00
Lech Perczak
59d065c9f8 ramips: add support for ZTE MF283+
ZTE MF283+ is a dual-antenna LTE category 4 router, based on Ralink
RT3352 SoC, and built-in ZTE P685M PCIe MiniCard LTE modem.

Hardware highlighs:
- CPU: MIPS24KEc at 400MHz,
- RAM: 64MB DDR2,
- Flash: 16MB SPI,
- Ethernet: 4 10/100M port switch with VLAN support,
- Wireless: Dual-stream 802.11n (RT2860), with two internal antennas,
- WWAN: Built-in ZTE P685M modem, with two internal antennas and two
  switching SMA connectors for external antennas,
- FXS: Single ATA, with two connectors marked PHONE1 and PHONE2,
  internally wired in parallel by 0-Ohm resistors, handled entirely by
  internal WWAN modem.
- USB: internal miniPCIe slot for modem,
  unpopulated USB A connector on PCB.
- SIM slot for the WWAN modem.
- UART connector for the console (unpopulated) at 3.3V,
  pinout: 1: VCC, 2: TXD, 3: RXD, 4: GND,
  settings: 57600-8-N-1.
- LEDs: Power (fixed), WLAN, WWAN (RGB),
  phone (bicolor, controlled by modem), Signal,
  4 link/act LEDs for LAN1-4.
- Buttons: WPS, reset.

Installation:
As the modem is, for most of the time, provided by carriers, there is no
possibility to flash through web interface, only built-in FOTA update
and TFTP recovery are supported.

There are two installation methods:
(1) Using serial console and initramfs-kernel - recommended, as it
allows you to back up original firmware, or
(2) Using TFTP recovery - does not require disassembly.

(1) Using serial console:
To install OpenWrt, one needs to disassemble the
router and flash it via TFTP by using serial console:
- Locate unpopulated 4-pin header on the top of the board, near buttons.
- Connect UART adapter to the connector. Use 3.3V voltage level only,
  omit VCC connection. Pin 1 (VCC) is marked by square pad.
- Put your initramfs-kernel image in TFTP server directory.
- Power-up the device.
- Press "1" to load initramfs image to RAM.
- Enter IP address chosen for the device (defaults to 192.168.0.1).
- Enter TFTP server IP address (defaults to 192.168.0.22).
- Enter image filename as put inside TFTP server - something short,
  like firmware.bin is recommended.
- Hit enter to load the image. U-boot will store above values in
  persistent environment for next installation.
- If you ever might want to return to vendor firmware,
  BACK UP CONTENTS OF YOUR FLASH NOW.
  For this router, commonly used by mobile networks,
  plain vendor images are not officially available.
  To do so, copy contents of each /dev/mtd[0-3], "firmware" - mtd3 being the
  most important, and copy them over network to your PC. But in case
  anything goes wrong, PLEASE do back up ALL OF THEM.
- From under OpenWrt just booted, load the sysupgrade image to tmpfs,
  and execute sysupgrade.

(2) Using TFTP recovery
- Set your host IP to 192.168.0.22 - for example using:
sudo ip addr add 192.168.0.22/24 dev <interface>
- Set up a TFTP server on your machine
- Put the sysupgrade image in TFTP server root named as 'root_uImage'
  (no quotes), for example using tftpd:
  cp openwrt-ramips-rt305x-zte_mf283plus-squashfs-sysupgrade.bin /srv/tftp/root_uImage
- Power on the router holding BOTH Reset and WPS buttons held for around
  5 seconds, until after WWAN and Signal LEDs blink.
- Wait for OpenWrt to start booting up, this should take around a
  minute.

Return to original firmware:
Here, again there are two possibilities are possible, just like for
installation:
(1) Using initramfs-kernel image and serial console
(2) Using TFTP recovery

(1) Using initramfs-kernel image and serial console
- Boot OpenWrt initramfs-kernel image via TFTP the same as for
  installation.
- Copy over the backed up "firmware.bin" image of "mtd3" to /tmp/
- Use "mtd write /tmp/firmware.bin /dev/mtd3", where firmware.bin is
  your backup taken before OpenWrt installation, and /dev/mtd3 is the
  "firmware" partition.

(2) Using TFTP recovery
- Follow the same steps as for installation, but replacing 'root_uImage'
  with firmware backup you took during installation, or by vendor
  firmware obtained elsewhere.

A few quirks of the device, noted from my instance:
- Wired and wireless MAC addresses written in flash are the same,
  despite being in separate locations.
- Power LED is hardwired to 3.3V, so there is no status LED per se, and
  WLAN LED is controlled by WLAN driver, so I had to hijack 3G/4G LED
  for status - original firmware also does this in bootup.
- FXS subsystem and its LED is controlled by the
  modem, so it work independently of OpenWrt.
  Tested to work even before OpenWrt booted.
  I managed to open up modem's shell via ADB,
  and found from its kernel logs, that FXS and its LED is indeed controlled
  by modem.
- While finding LEDs, I had no GPL source drop from ZTE, so I had to probe for
  each and every one of them manually, so this might not be complete -
  it looks like bicolor LED is used for FXS, possibly to support
  dual-ported variant in other device sharing the PCB.
- Flash performance is very low, despite enabling 50MHz clock and fast
  read command, due to using 4k sectors throughout the target. I decided
  to keep it at the moment, to avoid breaking existing devices - I
  identified one potentially affected, should this be limited to under
  4MB of Flash. The difference between sysupgrade durations is whopping
  3min vs 8min, so this is worth pursuing.

In vendor firmware, WWAN LED behaviour is as follows, citing the manual:
- red - no registration,
- green - 3G,
- blue - 4G.
Blinking indicates activity, so netdev trigger mapped from wwan0 to blue:wwan
looks reasonable at the moment, for full replacement, a script similar to
"rssileds" would need to be developed.

Behaviour of "Signal LED" in vendor firmware is as follows:
- Off - no signal,
- Blinking - poor coverage
- Solid - good coverage.

A few more details on the built-in LTE modem:
Modem is not fully supported upstream in Linux - only two CDC ports
(DIAG and one for QMI) probe. I sent patches upstream to add required device
IDs for full support.
The mapping of USB functions is as follows:
- CDC (QCDM) - dedicated to comunicating with proprietary Qualcomm tools.
- CDC (PCUI) - not supported by upstream 'option' driver yet. Patch
  submitted upstream.
- CDC (Modem) - Exactly the same as above
- QMI - A patch is sent upstream to add device ID, with that in place,
  uqmi did connect successfully, once I selected correct PDP context
  type for my SIM (IPv4-only, not default IPv4v6).
- ADB - self-explanatory, one can access the ADB shell with a device ID
  added to 51-android.rules like so:

SUBSYSTEM!="usb", GOTO="android_usb_rules_end"
LABEL="android_usb_rules_begin"
SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", ATTR{idProduct}=="1275", ENV{adb_user}="yes"
ENV{adb_user}=="yes", MODE="0660", GROUP="plugdev", TAG+="uaccess"
LABEL="android_usb_rules_end"

While not really needed in OpenWrt, it might come useful if one decides to
move the modem to their PC to hack it further, insides seem to be pretty
interesting. ADB also works well from within OpenWrt without that. O
course it isn't needed for normal operation, so I left it out of
DEVICE_PACKAGES.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[remove kmod-usb-ledtrig-usbport, take merged upstream patches]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-26 13:57:54 +01:00
John Audia
4b92663f7a kernel: bump 5.4 to 5.4.100
Ran update_kernel.sh in a fresh clone without any existing toolchains.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[refresh again]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-25 13:08:09 +01:00
Kabuli Chana
dc8cc44612 kernel: bump version 5.10 to 5.10.18
update kernel version, refresh current patchset

Signed-off-by: Kabuli Chana <newtownBuild@gmail.com>
[rebase/refresh]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-24 18:45:59 +01:00
8d766aa669 kernel: add further missing symbols
CONFIG_NET_DSA_MV88E6XXX_PTP was simply missing in generic config.

CONFIG_I2C_PXA_SLAVE was previously enabled via i2c-pxa package,
but got removed there without moving the symbol to generic config.

Fixes: dd13add3ce ("kernel: i2c-pxa: remove slave")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-24 02:53:53 +01:00
Daniel Golle
e6aac8d98f image: add support for building FIT image with filesystem
Allow for single (external-data) FIT image to hold kernel, dtb and
squashfs. In that way, the bootloader verifies the system integrity
including the rootfs, because what's the point of checking that the
hash of the kernel is correct if it won't boot in case of squashfs
being corrupted? Better allow bootloader to check everything needed
to make it at least up to failsafe mode. As a positive side effect
this change also makes the sysupgrade process on nand potentially
much easier as it is now.
In short: mkimage has a parameter '-E' which allows generating FIT
images with 'external' data rather than embedding the data into the
device-tree blob itself. In this way, the FIT structure itself remains
small and can be parsed easily (rather than having to page around
megabytes of image content). This patch makes use of that and adds
support for adding sub-images of type 'filesystem' which are used to
store the squashfs. Now U-Boot can verify the whole OS and the new
partition parsers added in the Linux kernel can detect the filesystem
sub-images, create partitions for them, and select the active rootfs
volume based on the configuration in FIT (passing configuration via
device tree could be implemented easily at a later stage).

This new FIT partition parser works for NOR flash (on top of mtdblock),
NAND flash (on top of ubiblock) as well as classic block devices
(ie. eMMC, SDcard, SATA, NVME, ...).
It could even be used to mount such FIT images via `losetup -P` on a
user PC if this patch gets included in Linux upstream one day ;)

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-24 01:35:20 +00:00
DENG Qingfang
920eaab1d8 kernel: DSA roaming fix for Marvell mv88e6xxx
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>
2021-02-23 21:10:56 +01:00
5e9b07ff36 kernel: add symbol CONFIG_POWER_RESET_LINKSTATION
Add symbol to generic config (this was added between 5.4 and 5.10),
and remove it from the targets where it was added by kernel_oldconfig
in the meantime.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-23 21:08:21 +01:00
David Bauer
55ed4bf6d7 generic: add missing symbols
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-23 20:13:37 +01:00
Rui Salvaterra
dc6ac62046 kernel: 5.10: add further generic kconfig symbols
This will make the specific kconfig smaller.

Reviewed-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
[improved commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-23 18:31:35 +01:00
Álvaro Fernández Rojas
7405ff5d4b kernel: mtdsplit: add support for BCM63XX CFE firmware
Broadcom CFE bootloader relies on a tag for identifying the current firmware,
such as version, image start address, kernel address and size, rootfs size,
board id, signatures, etc.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-02-22 18:09:03 +01:00
David Bauer
f79f496ed6 generic: add missing symbol
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-22 00:57:34 +01:00
Aleksander Jan Bajkowski
777e67301a kernel: sort config
This was done by executing this script:

find . -name "config-*"  > ../configs.txt
for config in $(cat ../configs.txt); do
	./scripts/kconfig.pl '+' $config /dev/null > $config-new
	mv $config-new $config
done
rm ../configs.txt

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-02-21 23:52:26 +01:00
Álvaro Fernández Rojas
7747b3fa36 generic: add bcm2835-rng quality patch
This patch allows devices without a high resolution timer to boot up faster.
It should speed up boots for bcm2708 and bcm63xx.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-02-20 18:59:25 +01:00
John Audia
5d3a6fd970 kernel: bump 5.4 to 5.4.99
Ran update_kernel.sh in a fresh clone without any existing toolchains.
No manual changes needed.

Build system: x86_64
Build-tested: bcm27xx/bcm2711

Signed-off-by: John Audia <graysky@archlinux.us>
2021-02-18 20:04:50 +01:00
David Bauer
5408399fcb generic: don't lock when recursively deleting partitions
When recursively deleting partitions, don't acquire the masters
partition lock twice. Otherwise the process endy up in a deadlocked
state.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-18 01:16:40 +01:00
David Bauer
0621b23efb generic: add various kernel 5.10 config symbols
These symbols were unset when configuring for ath79.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-18 01:16:20 +01:00
Álvaro Fernández Rojas
f323dec4f8 bcm63xx: add kernel 5.10 support
Runtime-tested on Comtrend AR-5387un.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-02-17 20:40:16 +01:00
Daniel Golle
5bb9954826 kernel: update kernel 5.10 to 5.10.16
Compile and runtime-tested on mediatek/mt7622

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-17 13:48:43 +00:00
0e43f62f21 kernel: 5.10: refresh patches
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-16 23:48:23 +01:00
0c7340f0a2 kernel: 5.10: add missing partitions doc syntax commit
This patch has been added to 5.4, but not been copied to 5.10:
7495acb555 ("kernel: backport mtd commit converting partitions doc syntax")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-16 23:48:23 +01:00
1013bf433b kernel: hack-5.10: make UDP tunneling user-selectable
This applies another patch from 5.4 to 5.10 as well:
de09355f74 ("kernel/hack-5.4: make UDP tunneling user-selectable")

UDP tunneling support isn't user-selectable, but it's required by WireGuard
which is, for the time being, an out-of-tree module. We currently work around
this issue by selecting an unrelated module which depends on UDP tunnelling
(VXLAN). This is inconvenient, as it implies this unrelated module needs to be
built-in when doing a monolithic build.

Fix this inconvenience by making UDP tunneling user-selectable in the kernel
configuration.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-16 23:48:23 +01:00
487b7ae5eb kernel: 5.4: fix .patch file extension
File extension was truncated for
pending-5.4/770-11-net-ethernet-mtk_eth_soc-avoid-rearming-interrupt-if.pa

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-16 23:48:23 +01:00
99f2b464b4 kernel: 5.10: fix busy wait loop in mediatek PPE code
Reapply changes added to 5.4 but not copied to 5.10:
3da4acaa7b ("kernel: fix busy wait loop in mediatek PPE code")

The intention is for the loop to timeout if the body does not succeed.
The current logic calls time_is_before_jiffies(timeout) which is false
until after the timeout, so the loop body never executes.

time_is_after_jiffies(timeout) will return true until timeout is less
than jiffies, which is the intended behavior here.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-16 23:46:30 +01:00
0e407dfe8b generic: ar8216: update version switch for of_get_phy_mode fix
Kernel has changed the of_get_phy_mode API in commit 0c65b2b90d13
("net: of_get_phy_mode: Change API to solve int/unit warnings").

This is already included in kernel 5.5, so fix the version switch
(though this will not actually matter for the versions we support).

Similar driver adjustments to account for the API change will
probably be necessary to various other local drivers.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-16 23:42:43 +01:00
David Bauer
a24df045db generic: ar8216: fix kernel 5.10 compile error
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-16 22:53:10 +01:00
Felix Fietkau
b10d604459 kernel: add linux 5.10 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-16 20:06:51 +01:00
Rafał Miłecki
09fbc79bf6 kernel: drop ofpart patch dropped from upstream mtd tree
It stopped ofpart_parser_init() from being called

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-02-15 15:06:40 +01:00
Rafał Miłecki
ac7d45b5e7 kernel: backport "ofpart" mtd parser upstream quirks support
This adds quirks support to the "ofpart" parser. It's required to
support fixed partitions that require some extra logic.

Right now only BCM4908 binding is supported (BCM4908 requires detecting
currently used "firmware" partition).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-02-15 12:02:33 +01:00
Ilya Lipnitskiy
3da4acaa7b kernel: fix busy wait loop in mediatek PPE code
The intention is for the loop to timeout if the body does not succeed.
The current logic calls time_is_before_jiffies(timeout) which is false
until after the timeout, so the loop body never executes.

time_is_after_jiffies(timeout) will return true until timeout is less
than jiffies, which is the intended behavior here.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-15 08:13:16 +01:00
John Audia
e95b1b23f1 kernel: bump 5.4 to 5.4.97
Ran update_kernel.sh in a fresh clone without any existing toolchains.

Manually rebased:
 bcm27xx
  950-0267-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
 bcm53xx
  180-usb-xhci-add-support-for-performing-fake-doorbell.patch
 layerscape
  302-dts-0008-arm64-dts-ls1046a-accumulated-change-to-ls1046a-boar.patch
  820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch
  820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch

Build system: x86_64
Build-tested: bcm27xx/bcm2711, ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions/everything functional.

Signed-off-by: John Audia <graysky@archlinux.us>
[remove quilt comment, fix/adjust 820-usb-* layerscape patches]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-11 16:08:28 +01:00
598b29585e target: use SPDX license identifiers on Makefiles
Use SPDX license tags to allow machines to check licenses.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-10 15:47:18 +01:00
David Bauer
0c499f6068 mac80211: convert UniFi Outdoor+ HSR support to OF
Enable support for the Ubiquiti UniFi Outdoor+ RF filter via
device-tree. The old way of using platform data is not required anymore,
as it was only used on the now removed ar71xx target.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-01 00:47:36 +01:00
John Audia
2c35899d81 kernel: bump 5.4 to 5.4.93
All modification made by update_kernel.sh in a fresh clone without
existing toolchains.

Build system:       x86_64
Build-tested:       ipq806x/R7800, bcm27xx/bcm2711
Run-tested:         ipq806x/R7800
Compile-tested [*]: ath79/{tiny,generic}, ipq40xx, octeon,
                    ramips/mt7621, realtek, x86/64
Run-tested [*]:     ath79/generic, ipq40xx, octeon, ramips/mt7621

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Stijn Segers <foss@volatilesystems.org> [*]
2021-01-29 14:22:09 +01:00
John Audia
9ad912d159 kernel: bump 5.4 to 5.4.92
All modification made by update_kernel.sh in a fresh clone without
existing toolchains.

Build system:       x86_64
Build-tested:       ipq806x/R7800, bcm27xx/bcm2711
Run-tested:         ipq806x/R7800
Compile-tested [*]: ath79/{tiny,generic}, ipq40xx, octeon,
                    ramips/mt7621, realtek, x86/64.
Run-tested [*]:     ath79/generic, octeon, ramips/mt7621, realtek.

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Stijn Segers <foss@volatilesystems.org> [*]
2021-01-26 00:49:53 +01:00
Bjørn Mork
402408b368 kernel: mtdsplit_uimage: replace "edimax, uimage" parser
The "edimax,uimage"" parser can be replaced by the generic
parser using device specific openwrt,partition-magic and
openwrt,offset properties.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2021-01-22 21:03:11 +01:00
Bjørn Mork
3f36dffbde kernel: mtdsplit_uimage: add "openwrt, offset" and "openwrt, partition-magic"
Some devices prepend a standard U-Boot Image with a vendor specific
header, having its own magic. Adding two new properties will support
validation of such images, including the additional magic.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2021-01-22 21:03:11 +01:00
Bjørn Mork
ff7709d223 kernel: mtdsplit_uimage: replace "netgear, uimage" parser
The "netgear,uimage" parser can be replaced by the generic
parser using device specific openwrt,ih-magic and
openwrt,ih-type properties.

Device tree properties for the following devices have not
been set, as they have been dropped from OpenWrt with the
removal of the ar71xx target:

 FW_MAGIC_WNR2000V1     0x32303031
 FW_MAGIC_WNR2000V4     0x32303034
 FW_MAGIC_WNR1000V2_VC  0x31303030
 FW_MAGIC_WPN824N       0x31313030

Tested-by: Sander Vanheule <sander@svanheule.net>  # WNDR3700v2
Tested-by: Stijn Segers <foss@volatilesystems.org> # WNDR3700v1
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2021-01-22 21:03:11 +01:00
Bjørn Mork
de64d4b958 kernel: mtdsplit_uimage: add "openwrt, ih-type" device-tree property
Some devices use uimage headers with a non-default ih_type. Add
support for overriding this in device tree.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2021-01-22 21:03:11 +01:00
Bjørn Mork
647fdafcc5 kernel: mtdsplit_uimage: replace "allnet, uimage" parser
Convert users to the generic "openwrt,uimage" using device specific
"openwrt,ih-magic" properties, and remove "allnet,uimage".

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2021-01-22 21:03:11 +01:00
Bjørn Mork
01a1e21863 kernel: mtdsplit_uimage: replace "openwrt, okli" parser
The only difference between the "openwrt,okli" and the generic
parser is the magic.  Set this in device tree for all affected
devices and  remove the "openwrt,okli" parser.

Tested-by: Michael Pratt <mcpratt@protonmail.com> # EAP300 v2, ENS202EXT and ENH202
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2021-01-22 21:03:11 +01:00