openwrt/staging/wigyori.git
8 months agosunxi: t113: add an extra step to copy u-boot into bin/ for eMMC boot support sunxi-t113-202306
Zoltan HERPAI [Sat, 26 Aug 2023 23:43:32 +0000 (01:43 +0200)]
sunxi: t113: add an extra step to copy u-boot into bin/ for eMMC boot support

Put an u-boot.bin into bin/ to make it easier for picking it to
install onto mmcblk1boot0.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
8 months agouboot-sunxi: t113: re-spin SMP patches after clock fixes
Zoltan HERPAI [Sat, 26 Aug 2023 23:43:03 +0000 (01:43 +0200)]
uboot-sunxi: t113: re-spin SMP patches after clock fixes

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
8 months agosunxi: t113: add eMMC image generation support
Zoltan HERPAI [Sat, 26 Aug 2023 23:06:33 +0000 (01:06 +0200)]
sunxi: t113: add eMMC image generation support

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
8 months agouboot-sunxi: t113: refresh patches to fix clock issues
Zoltan HERPAI [Sat, 26 Aug 2023 23:05:32 +0000 (01:05 +0200)]
uboot-sunxi: t113: refresh patches to fix clock issues

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
9 months agosunxi: t113: add thermal sensor support
Zoltan HERPAI [Thu, 27 Jul 2023 13:48:27 +0000 (15:48 +0200)]
sunxi: t113: add thermal sensor support

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
9 months agosunxi: t113: enable crypto support
Zoltan HERPAI [Thu, 27 Jul 2023 13:45:30 +0000 (15:45 +0200)]
sunxi: t113: enable crypto support

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
9 months agosunxi: t113: enable MDIO_MUX, likely needed for rgmii bringup on T113
Zoltan HERPAI [Thu, 27 Jul 2023 11:45:26 +0000 (13:45 +0200)]
sunxi: t113: enable MDIO_MUX, likely needed for rgmii bringup on T113

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
9 months agosunxi: t113: update (non-working) GMAC config on YT-113X-SPI
Zoltan HERPAI [Thu, 27 Jul 2023 11:45:04 +0000 (13:45 +0200)]
sunxi: t113: update (non-working) GMAC config on YT-113X-SPI

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
9 months agosunxi: t113: enable watchdog across the board
Zoltan HERPAI [Fri, 21 Jul 2023 20:42:02 +0000 (22:42 +0200)]
sunxi: t113: enable watchdog across the board

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
9 months agouboot-sunxi: add SPI build variant
Zoltan HERPAI [Thu, 20 Jul 2023 16:44:18 +0000 (18:44 +0200)]
uboot-sunxi: add SPI build variant

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
9 months agouboot-sunxi: add SPI patches for T113 and add SPI variant for MYIR
Zoltan HERPAI [Thu, 20 Jul 2023 16:43:48 +0000 (18:43 +0200)]
uboot-sunxi: add SPI patches for T113 and add SPI variant for MYIR

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
9 months agosunxi: generate images for MYIR T113-SPI boards
Zoltan HERPAI [Thu, 20 Jul 2023 11:52:41 +0000 (13:52 +0200)]
sunxi: generate images for MYIR T113-SPI boards

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
9 months agosunxi: t113: add SPI-variant for the MYIR T113 board
Zoltan HERPAI [Thu, 20 Jul 2023 11:50:18 +0000 (13:50 +0200)]
sunxi: t113: add SPI-variant for the MYIR T113 board

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
9 months agosunxi: drop earlier SPI/T113 patch in favour of proper upstreamed ones
Zoltan HERPAI [Thu, 20 Jul 2023 11:49:58 +0000 (13:49 +0200)]
sunxi: drop earlier SPI/T113 patch in favour of proper upstreamed ones

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
9 months agosunxi: enable SPINAND support on 6.1 for the MYIR SPINAND board
Zoltan HERPAI [Thu, 20 Jul 2023 11:48:30 +0000 (13:48 +0200)]
sunxi: enable SPINAND support on 6.1 for the MYIR SPINAND board

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
10 months agosunxi: add i2c device packages to MYIR profile
Zoltan HERPAI [Wed, 5 Jul 2023 21:59:25 +0000 (23:59 +0200)]
sunxi: add i2c device packages to MYIR profile

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
10 months agosunxi: t113: myir: add LEDs, i2c support and i2c devices
Zoltan HERPAI [Wed, 5 Jul 2023 21:58:52 +0000 (23:58 +0200)]
sunxi: t113: myir: add LEDs, i2c support and i2c devices

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
10 months agouboot-sunxi: add PSCI patches to enable 2nd CPU on T113
Zoltan HERPAI [Wed, 5 Jul 2023 09:24:45 +0000 (11:24 +0200)]
uboot-sunxi: add PSCI patches to enable 2nd CPU on T113

Add support for bringing up secondary CPU via PSCI (as it's done on
other Allwinner platforms). Please note that with these patches added,
uboot doesn't compile on non-T113 platforms for now.

[    0.006172] CPU: Testing write buffer coherency: ok
[    0.007066] /cpus/cpu@0 missing clock-frequency property
[    0.007145] /cpus/cpu@1 missing clock-frequency property
[    0.007181] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.009503] cblist_init_generic: Setting adjustable number of callback queues.
[    0.009533] cblist_init_generic: Setting shift to 1 and lim to 1.
[    0.009963] Setting up static identity map for 0x40200000 - 0x40200060
[    0.010371] rcu: Hierarchical SRCU implementation.
[    0.010388] rcu:     Max phase no-delay instances is 1000.
[    0.011158] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.011959] smp: Bringing up secondary CPUs ...
[    0.013757] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.014077] smp: Brought up 1 node, 2 CPUs
[    0.014110] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[    0.014134] CPU: All CPU(s) started in SVC mode.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
10 months agosunxi: t113: enable usbwifi PD17 pin on Rongpin RP-T113
Zoltan HERPAI [Sun, 2 Jul 2023 08:36:49 +0000 (10:36 +0200)]
sunxi: t113: enable usbwifi PD17 pin on Rongpin RP-T113

PD17 (gpio113) needs to be pulled up to switch on power to the
onboard USB wifi.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
10 months agosunxi: t113: update RMII settings on Rongpin and enable USB
Zoltan HERPAI [Fri, 9 Jun 2023 09:39:10 +0000 (11:39 +0200)]
sunxi: t113: update RMII settings on Rongpin and enable USB

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
11 months agosunxi: add getty on ttyS3 and ttyS5
Zoltan HERPAI [Thu, 8 Jun 2023 21:22:48 +0000 (23:22 +0200)]
sunxi: add getty on ttyS3 and ttyS5

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
11 months agosunxi: dts: fix UART3/5 on MYiR/Rongpin boards
Zoltan HERPAI [Thu, 8 Jun 2023 21:20:27 +0000 (23:20 +0200)]
sunxi: dts: fix UART3/5 on MYiR/Rongpin boards

If the dcxo clock-freq is not set, the uart3 and uart5 serials will not be
initialized and the kernel will freeze.

[    0.990726] dw-apb-uart 2500c00.serial: error -EINVAL: clock rate not defined
[    0.998714] dw-apb-uart: probe of 2500c00.serial failed with error -22

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
11 months agosunxi: t113: add Rongpin RP-T113 support
Zoltan HERPAI [Thu, 8 Jun 2023 14:44:03 +0000 (16:44 +0200)]
sunxi: t113: add Rongpin RP-T113 support

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
11 months agosunxi: enable Motorcomm and ICplus PHYs
Zoltan HERPAI [Thu, 8 Jun 2023 14:43:50 +0000 (16:43 +0200)]
sunxi: enable Motorcomm and ICplus PHYs

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
11 months agosunxi: t113: update config
Zoltan HERPAI [Thu, 8 Jun 2023 13:57:42 +0000 (15:57 +0200)]
sunxi: t113: update config

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
11 months agosunxi: update MYiR YT-113 patch
Zoltan HERPAI [Thu, 8 Jun 2023 13:57:27 +0000 (15:57 +0200)]
sunxi: update MYiR YT-113 patch

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
11 months agosunxi: cortexa7: config update to include further T113 options
Zoltan HERPAI [Thu, 8 Jun 2023 13:25:50 +0000 (15:25 +0200)]
sunxi: cortexa7: config update to include further T113 options

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
11 months agosunxi: t113: add MYiR MYD-YT113X support
Zoltan HERPAI [Thu, 8 Jun 2023 13:25:27 +0000 (15:25 +0200)]
sunxi: t113: add MYiR MYD-YT113X support

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
11 months agouboot-sunxi: refresh patches to allow T113 patches to apply
Zoltan HERPAI [Thu, 8 Jun 2023 13:23:51 +0000 (15:23 +0200)]
uboot-sunxi: refresh patches to allow T113 patches to apply

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
11 months agosunxi: add T113-S3 support
Zoltan HERPAI [Thu, 8 Jun 2023 09:41:03 +0000 (11:41 +0200)]
sunxi: add T113-S3 support

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
11 months agouboot-sunxi: add T113-S3 support
Zoltan HERPAI [Thu, 8 Jun 2023 09:40:01 +0000 (11:40 +0200)]
uboot-sunxi: add T113-S3 support

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
11 months agouboot-sunxi: bump to 2023.04
Zoltan HERPAI [Wed, 7 Jun 2023 10:13:11 +0000 (12:13 +0200)]
uboot-sunxi: bump to 2023.04

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
11 months agosunxi: add testing kernel 6.1
Zoltan HERPAI [Tue, 9 May 2023 14:15:02 +0000 (16:15 +0200)]
sunxi: add testing kernel 6.1

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
11 months agosunxi: copy patches from 5.15 to 6.1
Zoltan HERPAI [Wed, 7 Jun 2023 10:13:38 +0000 (12:13 +0200)]
sunxi: copy patches from 5.15 to 6.1

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
11 months agokernel: ltq-ptm: do not write directly to dev->addr
Aleksander Jan Bajkowski [Sat, 6 May 2023 21:14:16 +0000 (23:14 +0200)]
kernel: ltq-ptm: do not write directly to dev->addr

One is never to write to dev->addr directly. In 6.1 it will be a const and
with the newly enabled WERROR, we get a failing grade.

Lets fix this ahead of time.

Ref: https://github.com/torvalds/linux/commit/adeef3e32146a8d2a73c399dc6f5d76a449131b1
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
11 months agokernel: bump 6.1 to 6.1.32
Robert Marko [Tue, 6 Jun 2023 09:36:06 +0000 (11:36 +0200)]
kernel: bump 6.1 to 6.1.32

Removed upstreamed:
generic-backport/610-v6.3-net-page_pool-use-in_softirq-instead.patch[1]

All other patches automatically rebased.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/net?h=v6.1.32&id=7dccd5fa7edb9562da61af820bb9d0346447baf1

Build system: x86_64/Fedora 38
Build-tested: ipq807x/Dynalink DL-WRX36
Runtime-tested: ipq807x/Dynalink DL-WRX36

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agoipq807x: mark MDT loader fix as backport
Robert Marko [Tue, 6 Jun 2023 10:25:27 +0000 (12:25 +0200)]
ipq807x: mark MDT loader fix as backport

MDT loader fix for remoteproc was already merged, so mark it as a backport
with the future 6.5 kernel version.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agoipq807x: refresh kernel config
Robert Marko [Tue, 6 Jun 2023 10:22:50 +0000 (12:22 +0200)]
ipq807x: refresh kernel config

Refresh the kernel config as multiple options were disabled in the generic
config since 6.1 was added to ipq807x.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agoipq807x: renumber upstreamed patches
Robert Marko [Tue, 6 Jun 2023 10:18:37 +0000 (12:18 +0200)]
ipq807x: renumber upstreamed patches

We are running out of 00xx numbers to put backports into, so lets just
renumber all of the upstreamed patches back to 0000 and onwards.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agomediatek: use DEVICE_DTC_FLAGS and drop DTC_FLAGS where not needed
Daniel Golle [Tue, 6 Jun 2023 12:05:50 +0000 (13:05 +0100)]
mediatek: use DEVICE_DTC_FLAGS and drop DTC_FLAGS where not needed

The MT7986 RFB was intended to use device tree overlays and for that
reason modified DTC_FLAGS. zyxel_ex5601-t0-stock later on probably
copied it from there. Both boards do not actually use device tree
overlays, so remove setting DTC_FLAGS from both.

The BPi-R3 does use device tree overlays, use DEVICE_DTC_FLAGS to give
it an extra 4kb of padding for overlays to be applied.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agomediatek: use DEVICE_DTC_FLAGS for BPi-R64
Daniel Golle [Tue, 6 Jun 2023 12:04:08 +0000 (13:04 +0100)]
mediatek: use DEVICE_DTC_FLAGS for BPi-R64

Make sure there is an extra 4kb of padding to apply device tree overlays
on the BPi-R64.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agoimage: introduce DEVICE_DTC_FLAGS and DEVICE_DTCO_FLAGS
Daniel Golle [Tue, 6 Jun 2023 12:01:15 +0000 (13:01 +0100)]
image: introduce DEVICE_DTC_FLAGS and DEVICE_DTCO_FLAGS

Handle compiling device tree overlay blobs separate to allow for
overlays being compiled with different parameters, mostly to safe
space.
Allow defining DEVICE_DTC_FLAGS and DEVICE_DTCO_FLAGS as per-device
parameters to be passed to dtc. Previously some boards directly used
DTC_FLAGS in their build recipe which then also affected other boards.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agogeneric: backport initial LEDs hw control support
Christian Marangi [Sun, 4 Jun 2023 02:26:59 +0000 (04:26 +0200)]
generic: backport initial LEDs hw control support

Backport initial LEDs hw control support. Currently this is limited to
only rx/tx and link events for the netdev trigger but the API got
accepted and the additional modes are working on and will be backported
later.

Refresh every patch and add the additional config flag for QCA8K new
LEDs support.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agomediatek: set new compat version if booted on R64 and R3
Daniel Golle [Tue, 6 Jun 2023 00:14:27 +0000 (01:14 +0100)]
mediatek: set new compat version if booted on R64 and R3

If the board comes up with OpenWrt that means that the bootloader is
recent enough and knows about the new device tree overlays.

Using /etc/board.d/ is not enough in this case because it doesn't
overwrite existing configuration which may exist (and is fine to exist)
if the user updated with 'sysupgrade -F *.itb' and has kept
configuration. They would still need to manually set compat_version
even though the fact that the bootloader env has been updated can be
implied by the fact that the system has started.

Hence we can always set compat_version=1.1 for those two boards using
uci-defaults.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agomediatek: sync MT7986 device trees with upstream
Daniel Golle [Sun, 4 Jun 2023 14:56:15 +0000 (15:56 +0100)]
mediatek: sync MT7986 device trees with upstream

Sync device tree files for MT7986 boards with what landed in upstream
Linux tree to easy maintainance and also allow for a smooth update to
Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agomediatek: use updated device tree overlay mechanism for BPi-R64
Daniel Golle [Sun, 4 Jun 2023 18:55:11 +0000 (19:55 +0100)]
mediatek: use updated device tree overlay mechanism for BPi-R64

Use new device tree overlay mechanism for the BananaPi BPi-R64 board.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agouboot-mediatek: adapt BPi-R3 and BPi-R64 to new device tree overlay
Daniel Golle [Sun, 4 Jun 2023 17:55:17 +0000 (18:55 +0100)]
uboot-mediatek: adapt BPi-R3 and BPi-R64 to new device tree overlay

Update bootloader environment for BPi-R3 and BPi-R64 to adapt to new
device tree overlay mechanism now that support for multiple device
tree overlays has been added.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agogeneric: use only first element in bootconf for uImage.FIT
Daniel Golle [Sun, 4 Jun 2023 17:21:29 +0000 (18:21 +0100)]
generic: use only first element in bootconf for uImage.FIT

Now that it is possible to load several device tree overlays by
appending their config names to bootconf the uImage.FIT partition
parser need to discard everything after the first '#' character in
bootconf when looking up the config node to be used.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agoimage: improve uImage.FIT device tree overlay support
Daniel Golle [Sun, 4 Jun 2023 14:57:25 +0000 (15:57 +0100)]
image: improve uImage.FIT device tree overlay support

Instead of generating full config nodes incl. kernel, generate minimal
config nodes for device tree overlays to be applied to the main config.
In this way, multiple device tree overlays can be applied more easily.
While at it change filenames to upstream style, ie. use dtso and dtbo
suffix for device tree overlays.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agomediatek: convert mt7986a-zyxel-ex5601-t0-stock.dts to UNIX
Daniel Golle [Sun, 4 Jun 2023 15:05:29 +0000 (16:05 +0100)]
mediatek: convert mt7986a-zyxel-ex5601-t0-stock.dts to UNIX

The device tree file was in DOS format (CR-LF). Convert it to UNIX style.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agoRevert "ipq807x: add initial support for prpl Foundation Haze board"
Petr Štetiar [Mon, 5 Jun 2023 09:45:30 +0000 (11:45 +0200)]
Revert "ipq807x: add initial support for prpl Foundation Haze board"

This reverts commit 48603a271e6ff9e5cd851e873429893115e00c94 as this
was commited by accident, its still work in progress.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoRevert "ipq-wifi: add board files for prpl Foundation Haze board"
Petr Štetiar [Mon, 5 Jun 2023 09:45:27 +0000 (11:45 +0200)]
Revert "ipq-wifi: add board files for prpl Foundation Haze board"

This reverts commit 6845c53ec3bb25dbbb0e8bbcf435fc380502fc56.  as this
was commited by accident, its still work in progress.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoRevert "WIP: ipq-wifi: use my fork temporarily until upstreamed"
Petr Štetiar [Mon, 5 Jun 2023 09:45:24 +0000 (11:45 +0200)]
Revert "WIP: ipq-wifi: use my fork temporarily until upstreamed"

This reverts commit 1bad93c42669061b0248ca5cff1d83e399a2ef1a as this was
commited by accident, its still work in progress.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoRevert "ath11k-firmware: update to WLAN.HK.2.9.0.1-01713-QCAHKSWPL_SILICONZ-1"
Robert Marko [Mon, 5 Jun 2023 08:52:55 +0000 (10:52 +0200)]
Revert "ath11k-firmware: update to WLAN.HK.2.9.0.1-01713-QCAHKSWPL_SILICONZ-1"

This reverts commit 5d2de0055504727503a050731c3ca8c75b51f185.

I received multiple reports that in various configurations this FW version
is not stable and crashes, so lets revert to 01385 revision which works.

Fixes #12815
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [fixes tag]
11 months agoramips: fix lzma-loader for ASIARF boards
Daniel Danzberger [Fri, 2 Jun 2023 17:36:28 +0000 (19:36 +0200)]
ramips: fix lzma-loader for ASIARF boards

This fixes a well known "LZMA ERROR 1" error, reported previously on
numerous of similar devices.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
11 months agosdk: Expose CCACHE_DIR option
Jeffery To [Mon, 5 Jun 2023 04:57:51 +0000 (12:57 +0800)]
sdk: Expose CCACHE_DIR option

As the CCACHE option is already exposed, it would be helpful to also
make the ccache directory easily customizable.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
11 months agotools/coreutils: rename list of installed programs
Michael Pratt [Tue, 30 May 2023 09:22:54 +0000 (05:22 -0400)]
tools/coreutils: rename list of installed programs

Rename the list of programs installed by coreutils
to PKG_PROGRAMS, which will create a stampfile for each
through a new feature in host-build.mk.

Also, cleanup a bit to save lines
regarding the usage of this list.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
11 months agotools/findutils: define list of installed programs
Michael Pratt [Tue, 30 May 2023 09:43:00 +0000 (05:43 -0400)]
tools/findutils: define list of installed programs

Define the variable PKG_PROGRAMS for the list
of programs installed by findutils,
which will create a stampfile for each
through a new feature in host-build.mk.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
11 months agohost-build: add support for a stampfile per installed binary
Michael Pratt [Tue, 30 May 2023 11:20:19 +0000 (07:20 -0400)]
host-build: add support for a stampfile per installed binary

Some individual build items install a group of programs
instead of a program matching the name of the build item.

Add support for installing stampfiles for each of the
programs installed by that build item,
which will allow more control and awareness
of what is installed by the rest of the build system,
if, for example, prereq symlink checks are looking
for the same program which is built already.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
11 months agoprereq-build: replace relative symlinks only if broken
Michael Pratt [Mon, 29 May 2023 09:38:33 +0000 (05:38 -0400)]
prereq-build: replace relative symlinks only if broken

Some programs installed to staging_dir/host/bin
also install some symlinks to itself
for an alternative name.

Some of those new symlinks are overwriting
symlinks that were installed by prereq stage.

If prereq stage were to somehow be run again,
it should not be overwriting symlinks
that point to programs that are already built.

To filter that out, catch all symlinks
after first catching all symlinks
that have an absolute target
after all other cases in the case statement,
make sure it is not broken, and if so exit successfully.

Suggested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
11 months agoprereq-build: do not replace binaries with symlinks
Michael Pratt [Sat, 27 May 2023 21:11:47 +0000 (17:11 -0400)]
prereq-build: do not replace binaries with symlinks

Some programs, like bash and patch, are checked by prereq stage
and have a symlink installed, but then is later built from source.

Now that the prereq-build checks are not successful
just by finding the file alone, it is possible for
a new symlink to overwrite the installed binary.

If a normal file is found in staging_dir/host/bin,
let the check look for the associated stampfile, and if found,
skip creation of a symlink and exit successfully.

Suggested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
11 months agoRevert "prereq: SetupHostCommand: fix wrong check result"
Michael Pratt [Thu, 25 May 2023 07:00:57 +0000 (03:00 -0400)]
Revert "prereq: SetupHostCommand: fix wrong check result"

This reverts commit 7855378fcd7ed7cb0a223238a99bac0b8e46c380.

The return "exit 1" was intentional and actually just
makes the symlink checks much more strict.

This new level of strictness added to the checks revealed
what was a confusing regression with prereq stage that
already existed but was not presenting itself
because of the simple way that checks used to be done before.

Either way, reverting to "exit 0" was a nice workaround
until the true root cause was discovered, so as to not interfere
with others' pull requests and builds in the meantime.

It turns out that this problem was the inconsistent value of $PATH
between different commands within the SetupHostCommand recipe,
now fixed in the parent commit, using the variable created
in the parent of the parent commit.

Ref: f75204036c ("prereq-build: allow host command symlinks to update")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
11 months agoprereq-build: fix inconsistent value of $PATH
Michael Pratt [Thu, 25 May 2023 06:31:52 +0000 (02:31 -0400)]
prereq-build: fix inconsistent value of $PATH

In the recipe SetupHostCommand for checking
and creating symlinks, $PATH was only overridden
for one of several commands.

This causes the symlinks to be included
in the paths to pick a program from
when the check was repeated, because
staging_dir/host/bin was included in $PATH,
but only *sometimes*.

When the check ran again, the command succeded
with a $PATH including the symlink,
(eval "$$$$$$$$cmd")
while the path to the program was evaluated
with a $PATH NOT including the symlink,
(bin=...)
causing the symlink to be relinked incorrectly,
instead of passing as exactly the same.

Coincidentally, this was only a problem
if the symlink targeted the alternative
program with a different name.

By overriding the value of $PATH at the invocation of Make,
it will apply to the entire environment of the checks.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
11 months agotreewide: add ORIG_PATH variable
Michael Pratt [Thu, 25 May 2023 06:31:17 +0000 (02:31 -0400)]
treewide: add ORIG_PATH variable

Add a variable that stores the original value of $PATH
in the host system's shell, before Make alters it.

This can be useful for when it is necessary
to ignore symlinks and programs made by the build system.

Define this new variable before all instances of
'export PATH:=' or similar.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
11 months agoWIP: ipq-wifi: use my fork temporarily until upstreamed
Petr Štetiar [Tue, 30 May 2023 13:36:00 +0000 (15:36 +0200)]
WIP: ipq-wifi: use my fork temporarily until upstreamed

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoipq-wifi: add board files for prpl Foundation Haze board
Petr Štetiar [Tue, 30 May 2023 09:07:29 +0000 (11:07 +0200)]
ipq-wifi: add board files for prpl Foundation Haze board

QSDK based factory firmware was setting following board_ids in DTS:

 ath11k_pci 0001:01:00.0: chip_id 0x0 chip_family 0x0 board_id 0xa4 soc_id 0xffffffff
 ath11k c000000.wifi1: chip_id 0x0 chip_family 0x0 board_id 0x294 soc_id 0xffffffff

Thus board-prpl_haze.qcn9074` was extracted from `bus=...qmi-board-id=164.bin`
file and `board-prpl_haze.ipq8074` from `bus=...qmi-board-id=660.bin` file.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoipq807x: add initial support for prpl Foundation Haze board
Petr Štetiar [Mon, 29 May 2023 20:11:45 +0000 (22:11 +0200)]
ipq807x: add initial support for prpl Foundation Haze board

Haze is prpl Foundation's reference board (WNC LVRP).

Board info:

 - IPQ8072A SoC
 - 2 GiB RAM
 - 4 GiB eMMC
 - 8MiB SPI NOR (MX25U6435F)

 - 3x 1GigE ports (QCA8075)
 - 1x 10GigE port (AQR113C)
 - 1x SFP cage

 - WiFi 6GHz 160MHz (QCN9074)
 - WiFi 5GHz 80+80MHz (QCN5054)
 - WiFi 2.4G (QCN5024)

 - ARM Standard 20-pin 2.54mm/0.1" JTAG (1V8 !!!)
 - Bluetooth v5.0 + EDR with integrated Class 1 PA (CYW20704)
 - 1x M.2 B-key socket with PCIe 3.0
 - 1x USB 3.0 port
 - UART 4-pin 3V3(arrow),RX,TX,GND (115200 8N1)
 - Reset and WPS buttons

Flashing instructions:

 1. From U-Boot boot OpenWrt using initramfs image:

    IPQ807x# tftpboot openwrt-ipq807x-generic-prpl_haze-initramfs-uImage.itb && bootm

 2. In OpenWrt running from initramfs execute sysupgrade:

    root@OpenWrt:/# sysupgrade -n /tmp/openwrt-ipq807x-generic-prpl_haze-squashfs-sysupgrade.bin

Work in progress/known issues:

 * SFP feature not implemented/tested
 * M.2 feature not implemented/tested
 * Bluetooth feature not implemented/tested
 * 6GHz wireless should be working, but not tested
 * MAC address assigments for LAN interfaces

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoipq807x: image: factor out common eMMC bits
Petr Štetiar [Tue, 30 May 2023 14:36:05 +0000 (16:36 +0200)]
ipq807x: image: factor out common eMMC bits

For better maintainability and reusability.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoipq807x: image: cleanup unused variables
Petr Štetiar [Tue, 30 May 2023 14:31:39 +0000 (16:31 +0200)]
ipq807x: image: cleanup unused variables

BLOCKSIZE and PAGESIZE seems to be unused on qnap_301w and zyxel_nbg7815
device which use eMMC storage.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoqca-nss-dp: fix oops in nss_dp_probe
Petr Štetiar [Mon, 29 May 2023 17:27:15 +0000 (19:27 +0200)]
qca-nss-dp: fix oops in nss_dp_probe

Currently kernel crashes when of_phy_connect has issues:

 Unable to handle kernel access to user memory outside uaccess routines at virtual address 0000000000000308
 ...
 pc : phy_attached_print+0x28/0x1b0
 lr : phy_attached_info+0x14/0x20
 ...
 Call trace:
  phy_attached_print+0x28/0x1b0
  phy_attached_info+0x14/0x20
  nss_dp_adjust_link+0x544/0x6c4 [qca_nss_dp]

of_phy_connect returns either pointer or NULL, so can't be checked with
IS_ERR macro.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agolibubox: update to the latest version
Felix Fietkau [Wed, 24 May 2023 08:21:23 +0000 (10:21 +0200)]
libubox: update to the latest version

b09b316aeaf6 blobmsg: add blobmsg_parse_attr function
eac92a4d5d82 blobmsg: add blobmsg_parse_array_attr
ef5e8e38bd38 usock: fix poll return code check
6fc29d1c4292 jshn.sh: Add pretty-printing to json_dump
5893cf78da40 blobmsg: Don't do at run-time what can be done at compile-time
362951a2d96e uloop: fix uloop_run_timeout
75a3b870cace uloop: add support for integrating with a different event loop

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agonetifd: update to the latest version
Felix Fietkau [Sun, 4 Jun 2023 16:37:21 +0000 (18:37 +0200)]
netifd: update to the latest version

ec9dba721245 system-linux: fix memory leak in system_bridge_vlan_check

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agounetd: update to the latest version
Felix Fietkau [Sun, 4 Jun 2023 14:54:19 +0000 (16:54 +0200)]
unetd: update to the latest version

412d03012f13 network: prevent adding endpoint routes for addresses on the network
faaf9cee6ef4 utils: fix ipv4 checksum issue
0e1c2fad3540 pex-msg: fix memory leak on fread fail in pex_msg_update_request_init
51be0ed659d0 host: fix crash parsing gateway when no endpoint is specified
ca17601dc24e wg-linux: add support for splitting netlink messages for allowed ips
7d3986b7a5a2 wg-linux: increase default messages size

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agomac80211: ath11k: sync with ath-next
Robert Marko [Fri, 2 Jun 2023 12:12:01 +0000 (14:12 +0200)]
mac80211: ath11k: sync with ath-next

Synchronize the ath11k backports with the current ath-next tree.

This introduces support for MBSSID and EMA, adds factory test mode and
some new HTT stats.

Tested-by: Francisco G Luna <frangonlun@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agomac80211: backport EMA beacon support
Robert Marko [Fri, 2 Jun 2023 12:08:31 +0000 (14:08 +0200)]
mac80211: backport EMA beacon support

Backport EMA beacon support from kernel 6.4.
It is required for MBSSID/EMA suport in ath11k that will follow.

Tested-by: Francisco G Luna <frangonlun@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agoath11k-firmware: update to WLAN.HK.2.9.0.1-01713-QCAHKSWPL_SILICONZ-1
Robert Marko [Fri, 2 Jun 2023 09:30:11 +0000 (11:30 +0200)]
ath11k-firmware: update to WLAN.HK.2.9.0.1-01713-QCAHKSWPL_SILICONZ-1

QCA released a point update for the 2.9.0.1 firmware, so lets update to it.

Runtime tested on Dynalink DL-WRX36.

Tested-by: Francisco G Luna <frangonlun@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agoipq807x: remove 5.15 support
Robert Marko [Sat, 3 Jun 2023 16:10:03 +0000 (18:10 +0200)]
ipq807x: remove 5.15 support

Now that 6.1 is the default kernel, there is no reason to keep 5.15 around
as I dont plan to maintain it anymore so lets remove it.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agoipq807x: switch to kernel 6.1
Robert Marko [Sat, 3 Jun 2023 16:08:03 +0000 (18:08 +0200)]
ipq807x: switch to kernel 6.1

Now that 6.1 kernel is working fine on ipq807x , lets switch to 6.1 as the
default kernel as its increasingly hard to keep backporting upstreamed
changes to 5.15.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agoopenssl: fix uci config for built-in engines
Tianling Shen [Thu, 1 Jun 2023 07:22:26 +0000 (15:22 +0800)]
openssl: fix uci config for built-in engines

Built-in engine configs are added in libopenssl-conf/install stage
already, postinst/add_engine_config is just duplicating them, and
due to the lack of `config` header it results a broken uci config:

> uci: Parse error (invalid command) at line 3, byte 0

```
config engine 'devcrypto'
        option enabled '1'
engine 'devcrypto'
        option enabled '1'
        option builtin '1'
```

Add `builtin` option in libopenssl-conf/install stage and remove
duplicate engine configuration in postinst/add_engine_config to
fix this issue.

Fixes: 0b70d55a64c39d ("openssl: make UCI config aware of built-in engines")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agox86/64: Enable IOMMU_V2 support for later CPUs
Philip Prindeville [Wed, 17 May 2023 23:12:18 +0000 (17:12 -0600)]
x86/64: Enable IOMMU_V2 support for later CPUs

Support newer IOMMU_V2 on AMD platforms, useful for DPDK and KVM.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
11 months agokernel: Backport mvneta crash fix to 5.15
Marek Behún [Wed, 12 Apr 2023 11:01:25 +0000 (13:01 +0200)]
kernel: Backport mvneta crash fix to 5.15

Backport Russell King's series [1]
  net: mvneta: reduce size of TSO header allocation
to pending-5.15 to fix random crashes on Turris Omnia.

This also backports two patches that are dependencies to this series:
  net: mvneta: Delete unused variable
  net: mvneta: fix potential double-frees in mvneta_txq_sw_deinit()

[1] https://lore.kernel.org/netdev/ZCsbJ4nG+So%2Fn9qY@shell.armlinux.org.uk/

Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (squashed)
11 months agorealtek: eth: Do not write directly to dev->addr
Olliver Schinagl [Wed, 24 May 2023 10:58:37 +0000 (12:58 +0200)]
realtek: eth: Do not write directly to dev->addr

One is never to write to dev->addr directly. In 6.1 it will be a const and
with the newly enabled WERROR, we get a failing grade.

Lets fix this ahead of time.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
11 months agorealtek: Add missing headers
Olliver Schinagl [Thu, 25 May 2023 11:38:47 +0000 (13:38 +0200)]
realtek: Add missing headers

We are missing a bunch of headers, which trigger errors on 6.1, probably
due to changed header-in-header dependencies. Best add them now.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
11 months agoramips: tplink,mr600v2: fix image generation for sysupgrade image
Andreas Böhler [Sun, 2 Apr 2023 08:40:47 +0000 (10:40 +0200)]
ramips: tplink,mr600v2: fix image generation for sysupgrade image

The MR600v2 does not find its rootfs if it is neither directly after the
kernel or aligned to an erase block boundary (64k).

This aligns the rootfs to 0x10000 allowing the device to boot again. Based
on investigation by forum user relghuar.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
11 months agonetifd: Fix PKG_MIRROR_HASH
Hauke Mehrtens [Sat, 3 Jun 2023 12:37:37 +0000 (14:37 +0200)]
netifd: Fix PKG_MIRROR_HASH

Fix the PKG_MIRROR_HASH value for netifd.

Fixes: d2ecaaca3404 ("netifd: update to version 2023-05-31")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 months agonetfilter: fix typo in kmod-nft-dup-inet
Kevin Darbyshire-Bryant [Mon, 29 May 2023 17:17:38 +0000 (18:17 +0100)]
netfilter: fix typo in kmod-nft-dup-inet

Fix typo of 'family' in a7e9445975

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
11 months agovalgrind: update to 3.21.0
Hauke Mehrtens [Wed, 31 May 2023 20:51:12 +0000 (22:51 +0200)]
valgrind: update to 3.21.0

Release Notes:
https://valgrind.org/docs/manual/dist.news.html

This improves support for the memory allocator used in musl libc 1.2.2
and later which is currently used by OpenWrt.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 months agokernel: bump 6.1 to 6.1.31
Robert Marko [Wed, 31 May 2023 19:02:52 +0000 (21:02 +0200)]
kernel: bump 6.1 to 6.1.31

All patches automatically rebased.

Build system: x86_64/Fedora 38
Build-tested: ipq807x/Qnap 301W, ipq807x/Dynalink DL-WRX36
Run-tested: ipq807x/Qnap 301W, ipq807x/Dynalink DL-WRX36

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agogeneric: b53: rename exported symbols to avoid upstream conflict
Robert Marko [Fri, 2 Jun 2023 10:27:19 +0000 (12:27 +0200)]
generic: b53: rename exported symbols to avoid upstream conflict

Upstream DSA driver is exporting symbols with the same name as our
downstream swconfig driver, so lets rename the downstream symbols to make
them unique and avoid the conflict on 6.1 kernel.

Without this change, building 6.1 with kmod-switch-bcm53xx would conflict
with the B53 DSA driver and CI would fail.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agokselftests-bpf: add kernel BPF tests
Tony Ambardar [Mon, 17 May 2021 18:57:40 +0000 (11:57 -0700)]
kselftests-bpf: add kernel BPF tests

Build and package kernel self-tests used for BPF testing, program and JIT
development. This package, together with the existing 'kmod-bpf-test', was
extensively used for past upstream Linux JIT submissions [1].

Currently this includes only 'test_verifier'; building 'test_progs' will
fail due to known endian limitations with bpftool skeletons.

[1]:https://lore.kernel.org/bpf/cover.1633392335.git.Tony.Ambardar@gmail.com

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
11 months agokernel: backport libcap workaround for BPF selftests
Tony Ambardar [Tue, 29 Nov 2022 04:43:19 +0000 (20:43 -0800)]
kernel: backport libcap workaround for BPF selftests

Recent libcap versions (>= 2.60) cause problems with BPF kselftests, so
backport an upstream patch that replaces libcap and drops the dependency.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
11 months agobase-files: enable BPF JIT kallsyms by default
Tony Ambardar [Fri, 26 May 2023 08:41:18 +0000 (01:41 -0700)]
base-files: enable BPF JIT kallsyms by default

Set net.core.bpf_jit_kallsyms=1 in /etc/sysctl.d/10-default.conf.

For privileged users, this exports addresses of JIT-compiled programs to
appear in /proc/kallsyms when present, allowing their use for debugging
and in traces.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
11 months agomediatek: use existing I2C clock names
Daniel Golle [Thu, 1 Jun 2023 09:32:19 +0000 (10:32 +0100)]
mediatek: use existing I2C clock names

PCK and MCK should really be P=PMIC and M=MEM, which means that they
should effectively be CLK_PMIC and CLK_ARB.

Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agomediatek: use cpufreq fix suggested by MediaTek
Daniel Golle [Fri, 26 May 2023 12:31:26 +0000 (13:31 +0100)]
mediatek: use cpufreq fix suggested by MediaTek

Use suggested fix for mediatek-cpufreq, patch will also be sent
upstream.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agoarmvirt: switch to kernel 6.1
Mathew McBride [Thu, 1 Jun 2023 05:55:22 +0000 (05:55 +0000)]
armvirt: switch to kernel 6.1

The EFI implementation changes have only been applied
to 6.1, so switch armvirt over to it.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
11 months agokernel: kmod-amazon-ena: move to top level netdevices
Mathew McBride [Wed, 5 Oct 2022 01:40:22 +0000 (12:40 +1100)]
kernel: kmod-amazon-ena: move to top level netdevices

The Amazon ENA network devices are also used on the
AWS Arm (Graviton) instance types, so move it from
the x86-only module file to the top level netdevices.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
11 months agoarmvirt: 64: disable CONFIG_SMC91X
Mathew McBride [Mon, 13 Feb 2023 06:51:26 +0000 (06:51 +0000)]
armvirt: 64: disable CONFIG_SMC91X

The SMC91X family is a ISA-age Ethernet controller.
I'm not particularly sure what it's doing in armvirt/64,
as it's unlikely there is a QEMU or real hardware configuration
that exists with it.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
11 months agoarmvirt: base-files: add tty0 to inittab
Mathew McBride [Mon, 5 Sep 2022 06:56:49 +0000 (16:56 +1000)]
armvirt: base-files: add tty0 to inittab

tty0 is the default console for devices with screens/framebuffers.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
11 months agoarmvirt: config changes required for framebuffer console
Mathew McBride [Mon, 5 Sep 2022 06:55:02 +0000 (16:55 +1000)]
armvirt: config changes required for framebuffer console

These Kconfig options are required to get a screen console
working with the VMware Fusion ARM (Apple Silicon) preview.
They are likely to be the same for other Arm standard
"desktop" hardware that may emerge.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
11 months agoarmvirt: package and select Rockchip DWMAC Ethernet driver
Mathew McBride [Tue, 18 Apr 2023 03:34:23 +0000 (03:34 +0000)]
armvirt: package and select Rockchip DWMAC Ethernet driver

For devices that implement the "rockchip,*-gmac" compatible controller,
including:
- RK3328
- RK3399
- RK3568
- RK3588
- PX30

Signed-off-by: Mathew McBride <matt@traverse.com.au>