Commit Graph

42 Commits

Author SHA1 Message Date
Felix Fietkau
a06e023b4e mac80211: remove old legacy legacy drivers
Get rid of drivers that are either limited to 802.11b/g or don't even support
cfg80211/mac80211. Most of these are either limited to boards that we don't even
support anymore because of firmware size, or were only used for custom hacks by
a really small number of users in the past.
Let's get rid of those to reduce the maintenance effort and the number of useless
packages

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-09 20:44:28 +01:00
Hauke Mehrtens
ff06edd1f0 kernel: Activate CONFIG_GPIOLIB in generic configuration
All targets expect the malta target already activate the CONFIG_GPIOLIB
option. Move it to generic kernel configuration and also activate it for
malta.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
John Audia
9e5d743422 kernel: bump 5.10 to 5.10.124
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-06-27 00:57:15 +02:00
Tomasz Maciej Nowak
539e60539a generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM]
This is now built-in, enable so it won't propagate on target configs.

Link: https://lkml.org/lkml/2022/1/3/168
Fixes: 79e7a2552e ("kernel: bump 5.15 to 5.15.44")
Fixes: 0ca93670693b ("kernel: bump 5.10 to 5.10.119")
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
(Link to Kernel's commit taht made it built-in,
CRYPTO_LIB_BLAKE2S[_ARM|_X86] as it's selectable, 5.10 backport)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-24 17:10:24 +02: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
Daniel Golle
3a14580411 kernel: delete Linux 5.4 config and patches
As the upcoming release will be based on Linux 5.10 only, remove all
kernel configuration as well as patches for Linux 5.4.
There were no targets still actively using Linux 5.4.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-03-21 11:36:30 +00:00
Rafał Miłecki
29f12fefc0 bcm47xx: switch to kernel 5.10
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-11-08 15:56:39 +01:00
Rafał Miłecki
6cdac99401 bcm47xx: fix bgmac regression present in 5.10 kernel
This fixes:
[    2.548098] bgmac_bcma bcma0:1: Failed to register fixed PHY device
[    2.554584] bgmac_bcma bcma0:1: Cannot connect to phy
and downstream (swconfig-based) b53 driver failing to load.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-11-08 15:55:40 +01:00
Rafał Miłecki
4cd97e4760 bcm47xx: relocate LZMA loader
Kernel 5.10 grew bigger than 5.4 so we need to bump BZ_TEXT_START to
allow lzma loader hanel its size.

At the same time BZ_STACK_START needs to be increased to avoid
overwriting the stack.

For a reference see:
d5cf4a5aa4 ("brcm47xx: relocate loader to higher address")
2909a4b78e ("brcm47xx: relocate the stack in loader")

Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-08 15:55:26 +01:00
Rafał Miłecki
d88f3b8a42 bcm47xx: add kernel 5.10 support
It's for *development* only as it doesn't work with lzma-loader due to
bigger size.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-10-21 17:38:17 +02:00
Moritz Warning
b34aa6aff7 bcm47xx: use device vendor/model variable
Remove use of DEVICE_TITLE in favor of the
DEVICE_VENDOR and DEVICE_MODEL as used by
all other targets.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
2021-09-23 21:45:30 -10:00
Rafał Miłecki
9530b9bb78 bcm47xx: make WGT634U NVRAM patch apply again
Fixes: 1c48eee5b2 ("kernel: backport Broadcom NVRAM driver cleanups")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-03-12 21:09:11 +01:00
Adrian Schmutzler
85b1f4d8ca treewide: remove execute bit and shebang from board.d files
So far, board.d files were having execute bit set and contained a
shebang. However, they are just sourced in board_detect, with an
apparantly unnecessary check for execute permission beforehand.

Replace this check by one for existance and make the board.d files
"normal" files, as would be expected in /etc anyway.

Note:

This removes an apparantly unused '#!/bin/sh /etc/rc.common' in
target/linux/bcm47xx/base-files/etc/board.d/01_network

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-03-06 11:30:06 +01:00
Adrian Schmutzler
ef2cb8572b treewide: rename IMAGE_PREFIX/IMAGE_NAME to DEVICE_IMG_*
We so far had two variables IMG_PREFIX and IMAGE_PREFIX with
different content. Since these names are obviously quite
confusing, this patch renames the latter to DEVICE_IMG_PREFIX,
as it's a device-dependent variable, while IMG_PREFIX is only
(sub)target-dependent.

For consistency, also rename IMAGE_NAME to DEVICE_IMG_NAME, as
that's a device-dependent variable as well.

Cc: Paul Spooren <mail@aparcar.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-25 18:11:06 +01:00
Adrian Schmutzler
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
Sungbo Eo
583e39e3d5 kernel: drop empty kmod-ledtrig-* packages
The following four led triggers are enabled in generic config.

* kmod-ledtrig-default-on
* kmod-ledtrig-heartbeat
* kmod-ledtrig-netdev
* kmod-ledtrig-timer

Drop the packages and remove them from DEVICE_PACKAGES.
There's no other package depending on them in this repo.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2021-01-15 18:24:31 +01:00
Adrian Schmutzler
9b1b89229f kernel: bump 5.4 to 5.4.86
Removed upstreamed patches:
  pending-5.4/499-mtd-parser-cmdline-Fix-parsing-of-part-names-with-co.patch

Manually merged:
  pending-5.4/611-netfilter_match_bypass_default_table.patch
  layerscape/302-dts-0112-arm64-dts-fsl-ls1028a-prepare-dts-for-overlay.patch

Build-tested: ipq806x/R7800, bcm27xx/bcm2711, ath79/{generic,tiny},
              ipq40xx, octeon, ramips/mt7621, realtek, x86/64
Run-tested: ipq806x/R7800, realtek

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: John Audia <graysky@archlinux.us>
Tested-by: Stijn Segers <foss@volatilesystems.org>
2021-01-01 17:07:28 +01:00
John Audia
4e39949dd1 kernel: bump 5.4 to 5.4.80
Removed since could be reverse-applied by quilt and found to be
included upstream:
  backport-5.4/789-net-usb-qmi_wwan-Set-DTR-quirk-for-MR400.patch

All modifications made by update_kernel.sh

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

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Curtis Deptuck <curtdept@me.com> [x86_64 build/run]
2020-11-26 11:17:55 +01:00
Adrian Schmutzler
2785126650 kernel: remove support for kernel 4.19
We use 5.4 on all targets by default, and 4.19 has never been released
in a stable version. There is no reason to keep it.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-30 19:29:59 +01:00
John Audia
bee76f1bfa kernel: bump 5.4 to 5.4.64
Remove upstreamed patches:
 generic-backport
  701-v5.5-net-core-use-listified-Rx-for-GRO_NORMAL-in-napi_gro.patch

Manually merged:
 mediatek/patches-5.4
  0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch

All other modifications made by update_kernel.sh

Build-tested: ipq806x, lantiq/xrx200, mvebu, x86/64
Run-tested: ipq806x (R7800), mvebu (mamba, rango),
  lantiq/xrx200 (Easybox 904 xDSL), x86/64

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[add community build/run tests to commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-12 01:28:50 +02:00
Petr Štetiar
a14f5bb4bd treewide: use wpad-basic-wolfssl as default
In order to support SAE/WPA3-Personal in default images. Replace almost
all occurencies of wpad-basic and wpad-mini with wpad-basic-wolfssl for
consistency. Keep out ar71xx from the list as it won't be in the next
release and would only make backports harder.

Build-tested (build-bot settings):
ath79: generic, ramips: mt7620/mt76x8/rt305x, lantiq: xrx200/xway,
sunxi: a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
[rebase, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-20 14:19:39 +02:00
Adrian Schmutzler
d0cb71a896 bcm47xx: use vendor_model scheme for device/image names
Most targets have been updated to consistently use the vendor_model
scheme for device definitions and thus, image names.

Apply this to bcm47xx as well. This does _not_ apply any other
specific naming changes.

Cc: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-12 11:08:05 +02:00
Felix Fietkau
b0f7ea2853 kernel: unify CONFIG_GPIO_SYSFS in kernel configs
Enable it for all platforms

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-06 12:37:04 +02:00
Rafał Miłecki
e47bec489f bcm47xx: switch to kernel 5.4
Switch, LEDs, USB, buttons, sysupgrade testedon BCM4706.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2020-08-04 15:51:08 +02:00
Petr Štetiar
504000d520 treewide: use DEFAULT := n to disable non-broken devices
This uses DEFAULT := n on a bunch of devices that previously were
"disabled" by commenting out TARGET_DEVICES. This will allow to
build them without having to modify the code, but they will not
be selected for default build or buildbots.

The change is applied to all devices that are not "broken", but suffer
from image site limitations or similar, or have been added in the past
but never confirmed to run on the device properly:

at91: at91-q5xr5:
  kernel image too big
  31aeae0774 ("at91: do not build image for at91-q5xr5")

bcm47xx: asus-rt-ac66u:
  disabled since it was added in 2015
  69aefc771f ("brcm47xx: build images for Asus devices")

bcm47xx: netgear-wndr3400-vcna, netgear-wnr3500u, netgear-wnr3500-v2-vc
  added disabled in 2012, but never confirmed to work on devices
  5dec9dd3b2 ("brcm47xx: add code to generate images for some netgear
    devices")

bcm53xx: netgear-r8500
  added disabled: "start working on Netgear R8500"
  3b76c7cf0b ("bcm53xx: start working on Netgear R8500")

Signed-off-by: Petr Štetiar <ynezz@true.cz>
[limit to subset of devices, adjust commit message/title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-30 21:48:38 +02:00
Adrian Schmutzler
a2fee73e27 bcm47xx: fix switch setup for Linksys WRT610N v2
WRT610N V2 is not detected by the initial network configuration script.
The switch remains unconfigured and wlan/lan vlans are not created.

This adds the correct setup for the device.

Fixes: FS#1869

Suggested-by: Alessandro Radicati
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-21 11:55:31 +02:00
Adrian Schmutzler
eb15b0e0c9 bcm47xx: disable image for Linksys WRT160n v3
The device can only hold 3.6 MB, but newer images (since 18.06)
are bigger, so flashing a new version fails.

This disables default build for this device based on the bug report
referenced below.

Fixes: FS#1963

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-13 10:37:22 +02:00
Hauke Mehrtens
6062d85892 kernel: Update kernel 4.19 to version 4.19.131
Fixes:
- CVE-2020-10757

The "mtd: rawnand: Pass a nand_chip object to nand_release()" commit was
backported which needed some adaptations to other code.

Run tested: ath79
Build tested: ath79

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-07-04 21:12:42 +02:00
Edward Matijevic
6da3194127 bcm47xx: add support for NETGEAR R6200 V1
This patch adds supports for the NETGEAR R6200 V1
This device is mainlined in Linux as of 5.4

Specification:
   - SOC: Broadcom BCM4718A1 (480 MHz)
   - Flash: 16MB (Macronix MX25L128)
   - RAM: 128MB DDR2
   - SWITCH: BCM53125
   - Ethernet: 5x GE (1 WAN + 4 LAN, Inverted order)
   - WLAN 2.4G: In SOC
   - WLAN 5GHz: miniPCIe card, BCM4352 (ID: 4360)
   - USB: 1x USB 2.0 port (Type A)
   - Buttons: Reset, WLAN, WPS
   - LED: Amber for Power, others need a workaround
   - UART: 1x UART on PCB

LED Issues: They are controlled by a 74HC164 via bit banging(GPIO 6/7)

Firmware Install Instructions
=============================
Using the device specific .chk, use that file to perform
a normal device upgrade in the OEM admin page.

Signed-off-by: Edward Matijevic <motolav@gmail.com>
2020-06-24 00:17:49 +02:00
Adrian Schmutzler
48c1fdd046 treewide: drop shebang from non-executable target files
This drops the shebang from all target files for /lib and
/etc/uci-defaults folders, as these are sourced and the shebang
is useless.

While at it, fix the executable flag on a few of these files.

This does not touch ar71xx, as this target is just used for
backporting now and applying cosmetic changes would just complicate
things.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-16 14:26:33 +02:00
Adrian Schmutzler
1226113fe2 bcm47xx: move device definitions to subfiles
With several subtargets, the image/Makefile becomes crowded after a
while. Many targets have moved their device definitions to $subtarget.mk
files to have them more organized, let's do this here as well.

Cc: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-12 19:01:47 +02:00
Sungbo Eo
6ea87d35c6 bcm47xx: fix brcm-wl module loading
_dma_cache_wback_inv needs to be exported to load wl module successfully.

root@OpenWrt:/# insmod wl
[  363.867779] wl: Unknown symbol _dma_cache_wback_inv (err -2)
failed to insert /lib/modules/5.4.40/wl.ko

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Cc: Rafał Miłecki <rafal@milecki.pl>
2020-06-03 16:49:28 +02:00
Adrian Schmutzler
06feb09e54 bcm47xx: remove support for kernel 4.14
We currently support three kernel versions on this target, let's
just get rid of the oldest one.

Cc: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-05-30 11:30:06 +02:00
Koen Vandeputte
7dd2d7289a kernel: bump 4.19 to 4.19.122
Refreshed all patches.

Remove upstreamed:
- 551-loop-Better-discard-support-for-block-devices.patch

Fixed:
- CVE-2020-11884
- CVE-2020-12114
- CVE-2019-3016
- CVE-2020-11669

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-05-12 12:36:28 +02:00
Petr Štetiar
23916bca61 kernel: bump 5.4 to 5.4.33
Refreshed patches, removed upstreamed patches:

 oxnas: 001-irqchip-versatile-fpga-Handle-chained-IRQs-properly.patch
 oxnas: 002-irqchip-versatile-fpga-Apply-clear-mask-earlier.patch

Run tested: qemu-x86-64, apalis
Build tested: x86/64, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-04-17 15:18:12 +02:00
Petr Štetiar
9ba09653ad treewide: remove maintainer variable from targets
There is no such role as target maintainer anymore, one should always
send corresponding changes for the review and anyone from the commiters
is allowed to merge them or eventually use the hand break and NACK them.

Lets make it clear, that it is solely a community doing the maintenance
tasks.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Piotr Dymacz <pepe2k@gmail.com>
2020-03-16 22:21:45 +01:00
Rafał Miłecki
d369d92fc7 bcm47xx: add support for kernel 5.4
Ethernet, switch, LEDs, buttons, USB, sysupgrade & LuCI were
successfully tested on BCM4706.

WARNING: Hack for BCM4710 adding BCM4710_PROTECTED_FILL_TLB() to the
local_r4k_flush_cache_sigtramp() could not be ported. That function has
been dropped in:
commit adcc81f148d7 ("MIPS: math-emu: Write-protect delay slot emulation pages")
commit 3315b6b336c8 ("MIPS: Delete unused flush_cache_sigtramp()")
it's unsure if that chipset will still work reliably.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2020-03-10 15:50:55 +01:00
Rafał Miłecki
5c98041d5a bcm47xx: switch to kernel 4.19
Ethernet, switch, LEDs, buttons, USB, sysupgrade & LuCI were
successfully tested on BCM4706.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2020-03-10 15:50:55 +01:00
Koen Vandeputte
f4bea1b6a3 kernel: bump 4.14 to 4.14.171
Refreshed all patches.

Fixes:
- CVE-2013-1798

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-02-24 14:18:59 +01:00
Adrian Schmutzler
8fe5ad5d33 brcm47xx: rename target to bcm47xx
This change makes the names of Broadcom targets consistent by using
the common notation based on SoC/CPU ID (which is used internally
anyway), bcmXXXX instead of brcmXXXX.
This is even used for target TITLE in make menuconfig already,
only the short target name used brcm so far.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-02-14 14:10:51 +01:00