openwrt/staging/blocktrron.git
21 months agomxs: fix SD-card image generation for OLinuXino boards
Zoltan HERPAI [Tue, 24 Jan 2023 18:34:22 +0000 (19:34 +0100)]
mxs: fix SD-card image generation for OLinuXino boards

Fixes: mxs: add generic subtarget (64ef920)
Adding the generic target caused the TARGET_BOOTFS_PARTSIZE to stay
hidden for these boards, crashing the FAT filesystem creation.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
21 months agorealtek: eth: Fix missing end of comment marker
Olliver Schinagl [Tue, 24 Jan 2023 12:48:53 +0000 (13:48 +0100)]
realtek: eth: Fix missing end of comment marker

Because this comment is followed by another comment, nothing luckily
breaks, so only a cosmetic change.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
21 months agoubus: update to version 2022-06-15
Petr Štetiar [Thu, 26 Jan 2023 09:34:31 +0000 (10:34 +0100)]
ubus: update to version 2022-06-15

Update which contains just a following fix:

 * ubusd: add lookup command queuing support

   Defers and continues a client's lookup command to avoid unnecessary
   buffering under load.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
21 months agoci: allow custom kernel and target jobs based on labels
Petr Štetiar [Wed, 11 Jan 2023 09:26:16 +0000 (10:26 +0100)]
ci: allow custom kernel and target jobs based on labels

Current job triggers based on matching of changed paths is quite
limited, so lets make it possible to additionally trigger manual CI jobs
by adding CI specific pull request build labels:

 * `ci:target:x86:64` label is going to trigger CI target check jobs for
    x86/64 (sub)target.

 * `ci:kernel:x86:64` label is going to trigger CI kernel check jobs for
    x86/64 (sub)target.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
21 months agolinux-firmware: update to 20230117
Nick Hainke [Wed, 25 Jan 2023 20:29:13 +0000 (21:29 +0100)]
linux-firmware: update to 20230117

Changes:
32d3199 linux-firmware: Update firmware file for Intel Bluetooth AX201
2da8a7a linux-firmware: Update firmware file for Intel Bluetooth AX201
8b5ddf4 linux-firmware: Update firmware file for Intel Bluetooth AX211
4219dac linux-firmware: Update firmware file for Intel Bluetooth AX211
fb34135 linux-firmware: Update firmware file for Intel Bluetooth AX210
becd3fc linux-firmware: Update firmware file for Intel Bluetooth AX200
7101c57 linux-firmware: Update firmware file for Intel Bluetooth AX201
49e87fa linux-firmware: Update firmware file for Intel Bluetooth 9560
86b73ce linux-firmware: Update firmware file for Intel Bluetooth 9260
3723b48 brcm: add configuration files for CyberTan WC121
7f626ef qcom: add firmware files for Adreno A200
fc5a25f rtw89: 8852c: update fw to v0.27.56.10
2ba1bea  QCA: Add Bluetooth firmware for QCA2066
a1ad1d5 amdgpu: add VCN4.0.4 firmware from amd-5.4
9e01e17 amdgpu: add SMU13.0.7 firmware from amd-5.4
3a50eb8 amdgpu: add SDMA6.0.2 firmware from amd-5.4
19995fb amdgpu: add PSP13.0.7 firmware from amd-5.4
32e7c93 amdgpu: add GC11.0.2 firmware from amd-5.4
20c8060 amdgpu: add DCN3.2.1 firmware from amd-5.4
5c8e895 amdgpu: update VCN4.0.0 firmware from amd-5.4
66b3435 amdgpu: update SMU13.0.0 firmware from amd-5.4
604df78 amdgpu: update SDMA6.0.0 firmware from amd-5.4
3e9169a amdgpu: update PSP13.0.0 firmware from amd-5.4
bd1b7f7 amdgpu: update GC11.0.0 firmware from amd-5.4
c8ff1f4 iwlwifi: add new FWs from core76-35 release
5630963 iwlwifi: update cc/Qu/QuZ firmwares for core76-35 release
8bbec22 iwlwifi: add new FWs from core75-47 release
e20a687 iwlwifi: update 9000-family firmwares to core75-47
504b691 amdgpu: update renoir DMCUB firmware
1ed02d5 amdgpu: Update renoir PSP firmware
d0598c3 amdgpu: update copyright date for LICENSE.amdgpu
cee86df linux-firmware: update firmware for MT7921 WiFi device
e2d1174 linux-firmware: update firmware for MT7922 WiFi device
ce7cc73 linux-firmware: update firmware for mediatek bluetooth chip (MT7921)
91f4c6b linux-firmware: update firmware for mediatek bluetooth chip (MT7922)
52e62d6 cxgb4: Update firmware to revision 1.27.1.0
4704e25 qca: Update firmware files for BT chip WCN6750
c9c1958 rtw89: 8852c: update fw to v0.27.56.9
9e91f0c rtw89: 8852c: update fw to v0.27.56.8

Signed-off-by: Nick Hainke <vincent@systemli.org>
21 months agoath79: add support for D-Link DIR-629 A1
Shiji Yang [Thu, 19 Jan 2023 14:20:59 +0000 (14:20 +0000)]
ath79: add support for D-Link DIR-629 A1

Specifications:
  SOC:      QCA9588 CPU 720 MHz AHB 200 MHz
  Switch:   AR8236
  RAM:      64 MiB DDR2-600
  Flash:    8 MiB
  WLAN:     Wi-Fi4 2.4 GHz 3*3
  LAN:      LAN ports *4
  WAN:      WAN port *1
  Buttons:  reset *1 + wps *1
  LEDs: ethernet *5, power, wlan, wps

MAC Address:
  use      address               source
  label    70:62:b8:xx:xx:96     lan && wlan
  lan      70:62:b8:xx:xx:96     mfcdata@0x35
  wan      70:62:b8:xx:xx:97     mfcdata@0x6a
  wlan     70:62:b8:xx:xx:96     mfcdata@0x51

Install via Web UI:
  Apply factory image in the stock firmware's Web UI.

Install via Emergency Room Mode:
  DIR-629 A1 will enter recovery mode when the system fails to boot or
  press reset button for about 10 seconds.

  First, set IP address to 192.168.0.1 and server IP to 192.168.0.10.
  Then we can open http://192.168.0.1 in the web browser to upload
  OpenWrt factory image or stock firmware. Some modern browsers may
  need to turn on compatibility mode.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
21 months agofirmware: intel-microcode: update to 20221108
Linhui Liu [Mon, 23 Jan 2023 12:15:36 +0000 (20:15 +0800)]
firmware: intel-microcode: update to 20221108

Changelog:
  * New Microcodes:
    sig 0x000606c1, pf_mask 0x10, 2022-08-07, rev 0x1000201, size 286720
    sig 0x000b0671, pf_mask 0x32, 2022-09-07, rev 0x010e, size 204800

  * Updated Microcodes:
    sig 0x000706e5, pf_mask 0x80, 2022-08-02, rev 0x00b6, size 113664
    sig 0x000806c1, pf_mask 0x80, 2022-06-28, rev 0x00a6, size 110592
    sig 0x000806d1, pf_mask 0xc2, 2022-06-28, rev 0x0042, size 102400
    sig 0x000806ec, pf_mask 0x94, 2022-07-31, rev 0x00f4, size 105472
    sig 0x00090661, pf_mask 0x01, 2022-07-15, rev 0x0017, size 20480
    sig 0x00090672, pf_mask 0x07, 2022-09-19, rev 0x0026, size 218112
    sig 0x00090675, pf_mask 0x07, 2022-09-19, rev 0x0026
    sig 0x000b06f2, pf_mask 0x07, 2022-09-19, rev 0x0026
    sig 0x000b06f5, pf_mask 0x07, 2022-09-19, rev 0x0026
    sig 0x000906a3, pf_mask 0x80, 2022-09-19, rev 0x0424, size 217088
    sig 0x000906a4, pf_mask 0x80, 2022-09-19, rev 0x0424
    sig 0x000906ed, pf_mask 0x22, 2022-07-31, rev 0x00f4, size 104448
    sig 0x000a0652, pf_mask 0x20, 2022-07-31, rev 0x00f4, size 96256
    sig 0x000a0653, pf_mask 0x22, 2022-07-31, rev 0x00f4, size 97280
    sig 0x000a0655, pf_mask 0x22, 2022-07-31, rev 0x00f4, size 96256
    sig 0x000a0660, pf_mask 0x80, 2022-07-31, rev 0x00f4, size 97280
    sig 0x000a0661, pf_mask 0x80, 2022-07-31, rev 0x00f4, size 96256
    sig 0x000a0671, pf_mask 0x02, 2022-08-02, rev 0x0056, size 103424

We need to update to this version because
https://ftp.debian.org/debian/pool/non-free/i/intel-microcode/intel-microcode_3.20220809.1.tar.xz
has been removed.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
21 months agotcpdump: update to 4.99.3
Nick Hainke [Tue, 24 Jan 2023 23:22:01 +0000 (00:22 +0100)]
tcpdump: update to 4.99.3

Changes:
https://git.tcpdump.org/tcpdump/blob/032e4923e5202ea4d5a6d1cead83ed1927135874:/CHANGES

Signed-off-by: Nick Hainke <vincent@systemli.org>
21 months agokernel: bump 5.15 to 5.15.90
John Audia [Tue, 24 Jan 2023 12:43:03 +0000 (07:43 -0500)]
kernel: bump 5.15 to 5.15.90

All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
21 months agorealtek: rtl931x: drop LINKER_LOAD_ADDRESS bypass
Sander Vanheule [Wed, 25 Jan 2023 21:18:42 +0000 (22:18 +0100)]
realtek: rtl931x: drop LINKER_LOAD_ADDRESS bypass

RTL931x kernel builds were patched to bypass the LINKER_LOAD_ADDRESS
parameter, and hardcode it to 0x80220000. This doesn't make much sense,
since value of LINKER_LOAD_ADDRESS, load-ld, only appears to be a copy
of load-y, adjusted to the linker's taste.

Dropping the hacks for bypassing LINKER_LOAD_ADDRESS results in a kernel
that actually starts booting on an RTL9313 (Netgear MS510TXM), but
currently still hangs when the kernel switches timers.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
21 months agoath79: convert Netgear EX7300 caldata to nvmem
Wenli Looi [Mon, 23 Jan 2023 18:37:07 +0000 (18:37 +0000)]
ath79: convert Netgear EX7300 caldata to nvmem

Transition to specify caldata in the DTS.

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
21 months agoath79: consolidate Netgear EX7300 series images
Wenli Looi [Tue, 22 Nov 2022 18:34:37 +0000 (18:34 +0000)]
ath79: consolidate Netgear EX7300 series images

This change consolidates Netgear EX7300 series devices into two images
corresponding to devices that share the same manufacturer firmware
image. Similar to the manufacturer firmware, the actual device model is
detected at runtime. The logic is taken from the netgear GPL dumps in a
file called generate_board_conf.sh.

Hardware details for EX7300 v2 variants
---------------------------------------
SoC: QCN5502
Flash: 16 MiB
RAM: 128 MiB
Ethernet: 1 gigabit port
Wireless 2.4GHz (currently unsupported due to lack of ath9k support):
- EX6250 / EX6400 v2 / EX6410 / EX6420: QCN5502 3x3
- EX7300 v2 / EX7320: QCN5502 4x4
Wireless 5GHz:
- EX6250: QCA9986 3x3 (detected by ath10k as QCA9984 3x3)
- EX6400 v2 / EX6410 / EX6420 / EX7300 v2 / EX7320: QCA9984 4x4

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
21 months agobuild: add ALT3 and ALT4 vendor/model/variant
Wenli Looi [Tue, 22 Nov 2022 18:26:34 +0000 (18:26 +0000)]
build: add ALT3 and ALT4 vendor/model/variant

This is needed for the Netgear EX7300 series v2.

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
21 months agoCI: push-containers: limit to one concurrent run
Christian Marangi [Tue, 24 Jan 2023 22:23:56 +0000 (23:23 +0100)]
CI: push-containers: limit to one concurrent run

We may find in a situation where due the queue an old run finish after
the last run, resulting in the containers getting overwritten with an
old version.

Limit the push-containers workflow to one concurrent run and cancel any
run in progress.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agotools/cmake: update to 3.25.2
Linhui Liu [Sun, 22 Jan 2023 07:23:00 +0000 (15:23 +0800)]
tools/cmake: update to 3.25.2

Release Notes:
    https://cmake.org/cmake/help/latest/release/3.25.html#id2

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
21 months agotools/ninja: update to 1.11.1
Nick Hainke [Sat, 29 Oct 2022 08:22:36 +0000 (10:22 +0200)]
tools/ninja: update to 1.11.1

Release Notes:
https://github.com/ninja-build/ninja/releases/tag/v1.11.1

Sync the "100-make_jobserver_support.patch" with the PR:
https://github.com/ninja-build/ninja/pull/1140

Signed-off-by: Nick Hainke <vincent@systemli.org>
21 months agokernel: bump 5.10 to 5.10.165
John Audia [Tue, 24 Jan 2023 12:36:07 +0000 (07:36 -0500)]
kernel: bump 5.10 to 5.10.165

All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
21 months agokernel: bump 5.10 to 5.10.164
John Audia [Wed, 18 Jan 2023 19:45:07 +0000 (14:45 -0500)]
kernel: bump 5.10 to 5.10.164

All patches automatically rebased

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
21 months agorealtek: dsa: support active-high LEDs
Lorenz Brun [Wed, 28 Dec 2022 19:54:21 +0000 (20:54 +0100)]
realtek: dsa: support active-high LEDs

The TP-LINK TL-ST1008F has active-high LEDs, so we need a device tree
property to express this.

Signed-off-by: Lorenz Brun <lorenz@brun.one>
[Tidy up code, restrict changes to 5.15]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
21 months agorealtek: rtl931x: drop CONFIG_NO_EXCEPT_FILL hack
Sander Vanheule [Tue, 24 Jan 2023 20:34:58 +0000 (21:34 +0100)]
realtek: rtl931x: drop CONFIG_NO_EXCEPT_FILL hack

On RTL931x builds, CONFIG_RTL931X was used as a stand-in for
CONFIG_NO_EXCEPT_FILL.  Now that the latter is always selected for
devices in the realtek target, this hack can be removed. Resulting
device images are binary identical.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
21 months agorealtek: Refresh kernel config with no_except_fill
Olliver Schinagl [Mon, 9 Jan 2023 13:39:45 +0000 (14:39 +0100)]
realtek: Refresh kernel config with no_except_fill

Update the config files with the previous commit.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
21 months agorealtek: Do not set KERNEL_ENTRY just to avoid NO_EXCEPT_FILL
Olliver Schinagl [Sun, 8 Jan 2023 16:30:07 +0000 (17:30 +0100)]
realtek: Do not set KERNEL_ENTRY just to avoid NO_EXCEPT_FILL

It seems like we are offsetting the KERNEL_ENTRY to +0x400, which is
also accomplished by the NO_EXCEPT_FILL configuration option.

Since this is the default for MIPS_GENERIC_KERNEL, lets push a little
bit closer to that one by doing the same thing.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
21 months agopistachio: switch to 5.15 by default
Nick Hainke [Sun, 22 Jan 2023 20:09:21 +0000 (21:09 +0100)]
pistachio: switch to 5.15 by default

It appears that only a few users are using the pistachio SoC. The most
active user of the target has already approved the testing kernel and
so it is very unlikely bugs will be reported in the near future.
Therefore, the target should be directly bumped to 5.15.

Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Nick Hainke <vincent@systemli.org>
21 months agopistachio: add 5.15 testing kernel
Nick Hainke [Wed, 28 Sep 2022 12:14:13 +0000 (14:14 +0200)]
pistachio: add 5.15 testing kernel

Manually refreshed:
- 903-MIPS-DTS-img-marduk-Add-NXP-SC16IS752IPW.patch
- 905-MIPS-DTS-img-marduk-Add-led-aliases.patch (led node was renamed to led-1)

Automatically refreshed:
- 109-MIPS-DTS-img-marduk-switch-mmc-to-1-bit-mode.patch
- 401-mtd-nor-support-mtd-name-from-device-tree.patch
- 901-MIPS-DTS-img-marduk-Add-SPI-NAND-flash.patch
- 902-MIPS-DTS-img-marduk-Add-Cascoda-CA8210-6LoWPAN.patch
- 904-MIPS-DTS-img-marduk-Add-partition-name.patch

Enable testing kernel.

Co-Developed-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Nick Hainke <vincent@systemli.org>
21 months agopistachio: 5:15: copy config and patch from 5.10
Nick Hainke [Wed, 28 Sep 2022 12:12:13 +0000 (14:12 +0200)]
pistachio: 5:15: copy config and patch from 5.10

Copy config and patch from kernel 5.10 to kernel 5.15.

Signed-off-by: Nick Hainke <vincent@systemli.org>
[Updated the copy]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
21 months agoCI: tools: directly copy prebuilt tools in container
Christian Marangi [Thu, 10 Nov 2022 18:53:15 +0000 (19:53 +0100)]
CI: tools: directly copy prebuilt tools in container

Directly copy prebuilt tools in container instead of creating an
archieve and extracting it later in other workflows.

Update build workflow to support this new implementation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agoCI: tools: skip including dl dir in prebuilt tools tar
Christian Marangi [Fri, 11 Nov 2022 15:50:27 +0000 (16:50 +0100)]
CI: tools: skip including dl dir in prebuilt tools tar

We can now drop the dl dir in the prebuilt tools tar as package archieve
is not a requirement anymore and won't trigger a package recompile.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agobuild: skip download for host build with AUTOREMOVE if already compiled
Christian Marangi [Fri, 11 Nov 2022 15:40:45 +0000 (16:40 +0100)]
build: skip download for host build with AUTOREMOVE if already compiled

Packages in general use 4 check to trigger a recompile:
- timestamp for the build_dir
- timestamp for the staging stamp dir
- depends hash for the build_dir prepared file
- presence of package archieve in dl

If host tools are prebuilt and shipped in a container or manually
installed from an archieve, it would be ideal to skip including the
package archieve and just provide the build_dir prepared files and the
staging stamp file (and the actualy prebuilt tools).

Add some logic to skip dl download for host tools if AUTOREMOVE is
selected and checks for the presence of staging dir stamp file and build
dir stamp file.

If one of these requirements are not met, the package is redownloaded
and rebuilt.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agoscripts: ext-tools: add option to only refresh timestamps
Christian Marangi [Thu, 10 Nov 2022 18:50:39 +0000 (19:50 +0100)]
scripts: ext-tools: add option to only refresh timestamps

It's possible to have prebuilt tools already extracted. Add option to
just refresh the timestamps.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agoscripts: ext-tools: follow links for host tools path
Christian Marangi [Fri, 11 Nov 2022 01:32:15 +0000 (02:32 +0100)]
scripts: ext-tools: follow links for host tools path

Host tools path may be a symbolic link. Use -H with find to follow path
links passed from command line to find command.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agogeneric: backport fix for #nvmem-cell-cells false warning
Robert Marko [Sun, 22 Jan 2023 10:47:23 +0000 (11:47 +0100)]
generic: backport fix for #nvmem-cell-cells false warning

Recent backport of NVMEM layout support as well as acommpanying OF changes
introduced a false #nvmem-cell-cells warning as #nvmem-cell-cells are
fully optional.

So, backport an upstream fix for this.

Fixes: 11759a5bf3c6 ("kernel: backport of changes & helpers")
Signed-off-by: Robert Marko <robimarko@gmail.com>
21 months agoCI: tools: add gnu-getopt to macOS CI
Rosen Penev [Sat, 21 Jan 2023 22:59:27 +0000 (14:59 -0800)]
CI: tools: add gnu-getopt to macOS CI

This used to be implicit. No longer for some reason.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
21 months agorssileds: bump PKG_RELEASE due to libiwinfo ABI change
Christian Marangi [Sun, 22 Jan 2023 18:51:39 +0000 (19:51 +0100)]
rssileds: bump PKG_RELEASE due to libiwinfo ABI change

Bump PKG_RELEASE due to libiwinfo ABI change to trigger a package
rebuild.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agorpcd: bump libiwinfo abi requirement to >= 2023-01-21
Christian Marangi [Sun, 22 Jan 2023 18:50:04 +0000 (19:50 +0100)]
rpcd: bump libiwinfo abi requirement to >= 2023-01-21

Bump libiwinfo abi requirement to >= 2023-01-21 for rpcd.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agoiwinfo: update to latest Git HEAD
Christian Marangi [Mon, 23 Jan 2023 12:51:43 +0000 (13:51 +0100)]
iwinfo: update to latest Git HEAD

1e4e709 iwinfo: readd missing define for IWINFO_AUTH in header

Fixes: #11860
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agofstool: bump to latest Git HEAD
Christian Marangi [Sun, 22 Jan 2023 16:27:04 +0000 (17:27 +0100)]
fstool: bump to latest Git HEAD

1ea5855 partname: Introduce fstools_partname_fallback_scan option

While at it also drop AUTORELEASE from PKG_RELEASE.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agoramips: Fix root volume for tplink-er605-v2
Nikolay Martynov [Sat, 7 Jan 2023 03:44:10 +0000 (22:44 -0500)]
ramips: Fix root volume for tplink-er605-v2

This device has two sets of volumes: main ones (`kernel`, `rootfs`, etc) and
'backup' (`kernel.b`, `rootfs.b`, etc). Bootloader tries to determine which set of
volumes to use by looking at contens of `extra-para` and `extra-para.b` volumes.
These volumes contain JSON that looks like this:

```
{
"dbootFlag": "1",
"integerFlag": "1",
"fwFlag": "GOOD",
"score":1
}
```

It looks like the bootloader looks for `"fwFlag": "GOOD"` (as opposed to `BAD`)
then it compares `score` field - whichever 'good' volume has bigger score wins.
This determines which set of volumes to use to boot.

So for example if `extra-para` is good and has bigger score then `kernel`,
`rootfs`, etc volumes are used. This means bootloader needs to explain to the
kernel which volume to use for the rootfs. After looking at bootloader code with
disassembler I think it contains a bug. Relevant part of code looks something
like this:

```
  if (image_id == 0) {
    rootfs_volume_id = 8;
    rootfs_volume_name = "rootfs";
  }
  else {
    rootfs_volume_id = 0xf;
    rootfs_volume_name = "rootfs.b";
  }
  sprintf(
    &buffer,
    0x800,
    "console=ttyS0,115200 noinitrd ubi.mtd=3,2048 ubi.block=0,%s
    root=/dev/ubiblock0_%d DKMGT_IMAGE_ID=%d DKMGT_IMAGE_TYPE=ubi",
    rootfs_volume_name,
    rootfs_volume_id,
    image_id
    );
```

Where `image_id == 0` if 'normal' (not '*.b' set of volumes is used).
However from device dumps we know that from the factory `rootfs.b` has id 8 and
`rootfs` has id 15.

So from above we can see that ids and names of rootfs volumes do not match. More
over - they are hardcoded in the bootloader.

Both things are problematic for OpwnWRT which completely removes volumes on
update meaning that volume ids may actually change.

So instead of relying on bootloader to provide the kernel with root device this
patch forces kernel to determine root automatically - and it defaults to
`rootfs` volume which is correct for our purposes.

Overall this makes image boot fine from flash after sysupgrade from inirams.
assuming `extra-para*` volumes make bootloader use non-'*.b' set of volumes.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
21 months agoomap: refresh config
Alexey Smirnov [Tue, 17 Jan 2023 04:37:59 +0000 (07:37 +0300)]
omap: refresh config

Refresh target config by running:
make kernel_nconfig CONFIG_TARGET=target

Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
21 months agoomap: enable ARM Accelerated Cryptographic Algorithms
Alexey Smirnov [Mon, 16 Jan 2023 12:34:48 +0000 (15:34 +0300)]
omap: enable ARM Accelerated Cryptographic Algorithms

This selects cryptographic algorithms implemented
using ARM specific CPU features.

Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
21 months agoomap: enable cpuidle driver
Alexey Smirnov [Mon, 16 Jan 2023 12:21:59 +0000 (15:21 +0300)]
omap: enable cpuidle driver

This enables generic cpuidle driver for ARM.

Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
21 months agotoolchain: musl: Fix symbol loading in gdb
Hauke Mehrtens [Tue, 10 Jan 2023 18:50:12 +0000 (19:50 +0100)]
toolchain: musl: Fix symbol loading in gdb

Fix DT_DEBUG handling on MIPS in musl libc.
With this change gdb will load the symbol files for shared libraries on MIPS too.

This patch was taken from this thread: https://www.openwall.com/lists/musl/2022/01/09/4

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
21 months agokernel: bump 5.15 to 5.15.89
John Audia [Wed, 18 Jan 2023 19:46:43 +0000 (14:46 -0500)]
kernel: bump 5.15 to 5.15.89

Removed upstreamed:
  ipq806x/patches-5.15/007-v6.3-ASoC-qcom-lpass-cpu-Fix-fallback-SD-line-index-handl.patch[1]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.89&id=d4fa65960a9d0cb87a1102d47145675ceed7a4e6

All other patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
21 months agoopenssl: fix VIA Padlock AES-192 and 256 encryption
ValdikSS ValdikSS [Fri, 20 Jan 2023 11:41:35 +0000 (14:41 +0300)]
openssl: fix VIA Padlock AES-192 and 256 encryption

Byte swapping code incorrectly uses the number of AES rounds to swap expanded
AES key, while swapping only a single dword in a loop, resulting in swapped
key and partially swapped expanded keys, breaking AES encryption and
decryption on VIA Padlock hardware.

This commit correctly sets the number of swapping loops to be done.

Upstream: https://github.com/openssl/openssl/commit/2bcf8e69bd92e33d84c48e7d108d3d46b22f8a6d

Acked-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: ValdikSS ValdikSS <iam@valdikss.org.ru>
21 months agorealtek: use irq_force_affinity on otto timer instead
INAGAKI Hiroshi [Sat, 24 Dec 2022 12:34:29 +0000 (21:34 +0900)]
realtek: use irq_force_affinity on otto timer instead

After commit e0d2c59ee995 ("genirq: Always limit the affinity to online
CPUs", 5.10) on Linux, the cpumask passed to irq_set_affinity of irqchip
driver is limited to online CPUs. When irq_do_set_affinity called from
otto timer driver with only one secondary CPU, that CPU is not marked as
online yet, filtered out by cpu_online_mask and fall to error path.
Then, fail to set affinity for that CPU and it leads to instability of
timer on secondary CPU(s).

At least, RTL839x system will be affected.

log:

[   37.560020] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[   37.638025] rcu:     1-...!: (0 ticks this GP) idle=6ac/0/0x0 softirq=0/0 fqs=1  (false positive?)
[   37.752683]  (detected by 0, t=6002 jiffies, g=-1179, q=26293)
[   37.829510] Sending NMI from CPU 0 to CPUs 1:
[   37.886857] NMI backtrace for cpu 1 skipped: idling at r4k_wait_irqoff+0x1c/0x24
[   37.984801] rcu: rcu_sched kthread timer wakeup didn't happen for 5999 jiffies! g-1179 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402
[   38.132743] rcu:     Possible timer handling issue on cpu=1 timer-softirq=0
[   38.221033] rcu: rcu_sched kthread starved for 6000 jiffies! g-1179 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=1
[   38.356336] rcu:     Unless rcu_sched kthread gets sufficient CPU time, OOM is now expected behavior.
[   38.474440] rcu: RCU grace-period kthread stack dump:
...

Replace to irq_force_affinity from irq_set_affinity and ignore
cpu_online_mask to fix the issue.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Tested-by: Olliver Schinagl <oliver@schinagl.nl>
21 months agotoolchain/binutils: add support for version 2.40
Linhui Liu [Sun, 15 Jan 2023 04:39:06 +0000 (12:39 +0800)]
toolchain/binutils: add support for version 2.40

Release notes:
    https://sourceware.org/pipermail/binutils/2023-January/125671.html

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
21 months agotrusted-firmware-a.mk: fix build with binutils 2.39+
Linhui Liu [Tue, 17 Jan 2023 01:27:38 +0000 (09:27 +0800)]
trusted-firmware-a.mk: fix build with binutils 2.39+

Starting from version 2.39 binutils now warns about sections with rwx
permissions. While this is generally desirable it breaks building
ARM TrustedFirmware-A bl2 which treats warnings as errors.
Disable the warning/error for now to fix build.

Reference: 0579d9f5bc4b3a3d1b32526c71a6b77c4888bfcb

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
21 months agotoolchain/binutils: remove old sha256sum
Linhui Liu [Sun, 15 Jan 2023 09:48:08 +0000 (17:48 +0800)]
toolchain/binutils: remove old sha256sum

Fixes: b3b0a25ee8cf5f508f06822d53af0b60e3116d8a
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
21 months agodnsmasq: set an increased cachesize default value
Hannu Nyman [Sun, 27 Nov 2022 20:27:06 +0000 (22:27 +0200)]
dnsmasq: set an increased cachesize default value

Dnsmasq DNS cache size is only 150 by default.
Set the uci default value to 1000, so that cache gets used more
and unnecessary DNS queries to upstream can be avoided.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
21 months agokernel: mtk-bmt: fix usage of _oob_read
Chuanhong Guo [Sat, 21 Jan 2023 02:47:59 +0000 (10:47 +0800)]
kernel: mtk-bmt: fix usage of _oob_read

_oob_read returns number of bitflips on success while
bbt_nand_read should return 0.

Fixes: 2d49e49b18 ("mediatek: bmt: use generic mtd api")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
21 months agorpcd: update to latest Git HEAD
Christian Marangi [Sat, 21 Jan 2023 00:26:05 +0000 (01:26 +0100)]
rpcd: update to latest Git HEAD

c0df2a7 iwinfo: add "band" and "mhz" to the scan output
06ad60f iwinfo: add "band" to the freqlist output
b32fd32 iwinfo: add flags to freqlist output

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agoiwinfo: update to latest Git HEAD
Christian Marangi [Sat, 21 Jan 2023 00:23:22 +0000 (01:23 +0100)]
iwinfo: update to latest Git HEAD

Bump ABI to 20230121 due to struct changes

f766138 cli: print the flags on the frequency list
8ee7971 lib: add IWINFO_FREQ_FLAG_NAMES
81184d2 nl80211: fix some comments
2c4ee84 nl80211: prefer non-supplicant-based devices
6194aaf nl80211: simplify iterating over phy's devices
acbf4fe nl80211: remove redundant check in nl80211_phy2ifname()
0172c97 cli: print the frequency and band on the scan list
bbe424f cli: print the band on the frequency list
afa147c nl80211: add "mhz" and "band" to iwinfo_scanlist_entry
0d5ea34 nl80211: add "band" to iwinfo_freqlist_entry
dba0f06 nl80211: add support for radiation and indoor chan restriction
7e3d7de iwinfo: reorganize iwinfo header to enum and defines
9b47b03 devices: add USB devices supported by the mt76 driver
c0fda7c utils: skip comment lines when parsing devices.txt
dbc0ee7 cli: describe USB devices as such
891acee devices: add MediaTek MT7628 card
fac0787 devices: add support for declaring compatible matched devices

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agoipq806x: Initial TP-Link and ASUS OnHub support
Brian Norris [Fri, 13 Jan 2023 05:32:22 +0000 (21:32 -0800)]
ipq806x: Initial TP-Link and ASUS OnHub support

TP-Link and ASUS OnHub devices are very similar, sharing many of the
same characteristics and much of their Device Tree. They both run a
version of ChromeOS for their factory firmware, and so installation
instructions look very similar to Google Wifi [1].

Things I've tested, and are working:

 * Ethernet
 * WiFi (2.4 and 5 GHz)
 * LEDs
 * USB
 * eMMC
 * Serial console (if you wire it up yourself)
 * 2x CPU
 * Speaker

== Installation instructions summary ==

1. Flash *-factory.bin to a USB drive (e.g., with `dd`)
2. Insert USB drive, to boot OpenWrt from USB
3. Copy the same *-factory.bin over to device, and flash it to eMMC to
   make OpenWrt permanent

== Developer mode, booting from USB (Step 2) ==

To enter Developer Mode and boot OpenWrt from a USB stick:

1. Unplug power
2. Gain access to the "developer switch" through the bottom of the
   device
3. Hold down the "reset switch" (near the USB port / power plug)
4. Plug power back in
5. The LED on the device should turn white, then blink orange, then
   red. Release the reset switch.
6. Insert USB drive with OpenWrt factory.bin
7. Press the hidden developer switch under the device to boot to USB;
   you should see some activity lights (if you have any) on your USB
   drive
8. Depending on your configuration, the router's LED(s) should come on.
   You're now running OpenWrt off a USB stick.

These instructions are derived from:

https://www.exploitee.rs/index.php/Rooting_The_Google_OnHub#Enabling_%22Developer_Mode%22_on_the_OnHub
https://www.exploitee.rs/index.php/Asus_OnHub#Enabling_%22Developer_Mode%22_on_the_OnHub

~~Finding the developer switch:~~ for TP-Link, the developer switch is
on the bottom of the device, underneath some of the rubber padding and a
screw. For ASUS, remove the entire base, via 4 screws under the rubber
feet. See the Exploitee instructions for more info and photos.

== Making OpenWrt permanent (on eMMC) (Step 3) ==

Once you're running OpenWrt via USB:

1. Connect Ethernet to the LAN port; router's LAN address should be at
   192.168.1.1
2. Connect another system to the router's LAN, and copy the factory.bin
   image over, via SCP and SSH:

     scp -O openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin root@192.168.1.1:
     ssh root@192.168.1.1 -C "dd if=/dev/zero bs=512 seek=7552991 of=/dev/mmcblk0 count=33 && \
     dd if=/root/openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin of=/dev/mmcblk0"
3. Reboot and remove the USB drive.

== Developer mode beep ==

Note that every time you boot the OnHub in developer mode, the device
will play a loud "beep" after a few seconds. This is described in the
Chromium docs [2], and is intended to make it clear that the device is
not running Google software. It is nontrivial to completely disable this
beep, although it's possible to "acknowledge" developer mode (and skip
the beep) by using a USB keyboard to press CTRL+D every time you boot.

[1] https://openwrt.org/toh/google/wifi
[2] https://chromium.googlesource.com/chromiumos/docs/+/HEAD/developer_mode.md

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
21 months agofstools: bump to latest Git HEAD
Christian Marangi [Fri, 20 Jan 2023 14:06:11 +0000 (15:06 +0100)]
fstools: bump to latest Git HEAD

e9b59f0 partname: Ignore root=PARTUUID...

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agoipq806x: Add kmod-sound-soc-ipq8064-storm
Brian Norris [Fri, 13 Jan 2023 05:32:20 +0000 (21:32 -0800)]
ipq806x: Add kmod-sound-soc-ipq8064-storm

For IPQ8064 systems based off the "Google Storm" reference platform,
such as the TP-Link OnHub.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
21 months agoipq806x: ASoC: qcom: lpass-cpu: Fix fallback SD line index handling
Brian Norris [Fri, 13 Jan 2023 05:32:19 +0000 (21:32 -0800)]
ipq806x: ASoC: qcom: lpass-cpu: Fix fallback SD line index handling

This fixes device tree registration for 'qcom,lpass-cpu' as used by
qcom-ipq8064 SoCs, and allows speaker audio to function.

This patch has been submitted (and merged, for -next; likely v6.3)
upstream.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
21 months agoipq806x: config-5.15: Normalize
Brian Norris [Fri, 13 Jan 2023 05:32:18 +0000 (21:32 -0800)]
ipq806x: config-5.15: Normalize

Refresh target config with `make kernel_menuconfig`, then save the
result. This drops missing symbols or otherwise accounts for defaults.
It should not change any functionality.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
21 months agoipq806x: Point to externally compiled dtbs in recipes
Brian Norris [Fri, 13 Jan 2023 05:32:17 +0000 (21:32 -0800)]
ipq806x: Point to externally compiled dtbs in recipes

Similar to commit 4d8b42d8a777 ("ipq40xx: point to externally compiled
dtbs in recipes").

Currently, we patch our DTS files into the kernel source tree, so the
kernel build process will produce DTBs for us. The kernel-to-DTS
dependency can cause buildroot to perform excessive rebuilds of the
kernel though, which slows down device development iteration.

Buildroot also compiles DTBs on its own, to
$(KDIR)/image-$(DEVICE_DTS).dtb. With small adjustments, we can leverage
this, and stop patching DTS files into the kernel Makefile at the same
time.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
21 months agobase-files: Remove nand.sh dependency from emmc upgrade
Brian Norris [Fri, 13 Jan 2023 05:32:16 +0000 (21:32 -0800)]
base-files: Remove nand.sh dependency from emmc upgrade

emmc_do_upgrade() relies on identify() from the nand.sh upgrade helper.
This only works because FEATURES=emmc targets also tend to include
FEATURES=nand.

Rename identify_magic() to identify_magic_long() to match the common.sh
style and make it clear it pairs with other *_long() variants (and not,
say *_word()).

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
21 months agoucode: update to latest Git HEAD
Brian Norris [Fri, 13 Jan 2023 05:32:21 +0000 (21:32 -0800)]
ucode: update to latest Git HEAD

To bring in isatty() support.

Includes new commits:

be30472bfdbb fs: add `isatty()` function
0a58d510529e nl80211: add support for NL80211_ATTR_MPATH_INFO

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
[ remove additional merge commit ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agomvebu: cortexa9: use renamed U-boot binaries
Josef Schlehofer [Thu, 19 Jan 2023 08:10:41 +0000 (09:10 +0100)]
mvebu: cortexa9: use renamed U-boot binaries

Due to upstream change in U-boot the binaries were renamed [1].

[1] https://source.denx.de/u-boot/u-boot/-/commit/87ac4b4b4ca5f00e2ddcdac41c9dc691ab2aecf1

Fixes: 2f83369e3e97 ("uboot-mvebu: update to version 2023.01")
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
21 months agoCI: kernel: enable target testing also for pull request event
Christian Marangi [Fri, 20 Jan 2023 14:13:21 +0000 (15:13 +0100)]
CI: kernel: enable target testing also for pull request event

Testing target changes was only set for push events. Enable this also
for pull request events to enable testing pr making specific target
changes.

Fixes: 57a02cbbff5b ("CI: kernel: test each target with additional changes than target/linux")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoipq807x: Add ZyXEL NBG7815
André Valentin [Tue, 3 Jan 2023 18:23:41 +0000 (19:23 +0100)]
ipq807x: Add ZyXEL NBG7815

ZyXEL NBG7815 is a premium 802.11ax "tri"-band router/AP.
Specifications:
* CPU: Qualcomm IPQ8072A Quad core Cortex-A53 2.2GHz
* RAM: 1 GB 2x Nanya NT5CC256M16ER-EK
* Storage:
        * 8MB serial flash Winbond W25Q64DW
        * 4GB eMMC flash Kingston EMMC04G-M627
* Ethernet:
        * 4x1G RJ45 ports (QCA8074A) with 1x status LED per port
        * 1x2.5G RJ45 port (QCA8081) with 1x status LED
        * 1x10G RJ45 port (AQR113C) with 1x status LED
* Switch: Qualcomm Atheros QCA8075
* WLAN:
        * 2.4GHz: Qualcomm QCN5024 4x4@40MHz 802.11b/g/n/ax 1147 Mbps PHY rate
        * 2x 5GHz: Qualcomm QCN5054 4x4 802.11a/b/g/n/ac/ax 2402 PHY rate
* Bluetooth CSR8811 using HSUART, currently unsupported
* USB: 1x USB3.0 Type-A port
* LED-s currently not supported:
        * White
        * Dark Blu
        * Amber
        * Purple
        * Purple and dark blue
        * Red
* Buttons:
        * 1x Soft reset
* Power: 12V DC Jack

Installation instructions:
* Disconnect WAN
* Reset device to factory defaults by pushing reset button 15 sec,
  LEDs should lit orange color.
* After 5-10 minutes, when the LEDs turn constant dark blue,
  put your LAN cable and connect at address 192.168.123.1 by telnet on port 23
* Login with
  NBG7815 login: root
  password: nbg7815@2019
* cd /tmp/ApplicationData
* wget -O openwrt-ipq807x-generic-zyxel_nbg7815-squashfs-sysupgrade.bin http://...
* wget https://github.com/itorK/nbg7815_tools/blob/main/flash_to_openwrt.sh
* run flash_to_openwrt.sh
If you can't use wget, you can transfer the files via nc.
See https://openwrt.org/inbox/toh/zyxel/nbg7815_armor_g5 for installation details.

Bluetooth usage:
* you need at least package bluez-utils, recommended bluez-daemon
* run following commands to enable and start
  hciattach  /dev/ttyMSM1 bcsp
  hciconfig hci0 up

Many thanks to itorK for his work on this device:
https://github.com/itorK/openwrt/tree/nbg7815

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: André Valentin <avalentin@marcant.net>
22 months agoipq807x: add nvmem uboot-env support
André Valentin [Tue, 17 Jan 2023 22:07:42 +0000 (23:07 +0100)]
ipq807x: add nvmem uboot-env support

Enabling kernel symbol CONFIG_NVMEM_U_BOOT_ENV allows to use u-boot
environement variable ethaddr with nvmen. That way it is possible to assign
the MAC address to the ethernet device driver.

Example of usage in dts:
....
partition@600000 {
compatible = "u-boot,env";
label = "0:appsblenv";
reg = <0x600000 0x10000>;

macaddr_lan: ethaddr {
};
};
....
&dp5 {
status = "okay";
phy-handle = <&qca8081>;
label = "wan";
nvmem-cells = <&macaddr_lan>;
nvmem-cell-names = "mac-address-ascii";
mac-address-increment = <1>;
};

This is needed for Zyxel NBG7815.

Signed-off-by: André Valentin <avalentin@marcant.net>
22 months agobpf: ignore missing LLVM bins on package for non compile steps
Christian Marangi [Wed, 18 Jan 2023 11:22:12 +0000 (12:22 +0100)]
bpf: ignore missing LLVM bins on package for non compile steps

To download a package the LLVM bins are not strictly needed.
Currently with an example run of make package/bridger/download V=s, the
build fail with

make[2]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt/package/network/services/bridger'
bash: line 1: /home/ansuel/openwrt-ansuel/openwrt/staging_dir/host/llvm-bpf/bin/clang: No such file or directory
bash: line 1: [: : integer expression expected
/home/ansuel/openwrt-ansuel/openwrt/include/bpf.mk:71: *** ERROR: LLVM/clang version too old. Minimum required: 12, found: .  Stop.
make[2]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt/package/network/services/bridger'
time: package/network/services/bridger/download#0.04#0.00#0.06
    ERROR: package/network/services/bridger failed to build.

This is wrong since it may be needed to download the required packages
first and then compile them later.

Fix this by ignoring the LLVM bin check on non compile steps.

Tested-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agombedtls: move source modification to patch
David Bauer [Wed, 18 Jan 2023 21:06:36 +0000 (22:06 +0100)]
mbedtls: move source modification to patch

Patch the mbedtls source instead of modifying the compile-targets
in the prepare buildstep within OpenWrt.

Signed-off-by: David Bauer <mail@david-bauer.net>
22 months agouboot-mediatek: Fix ramips/mt76x8 buildbot
Jo Deisenhofer [Tue, 17 Jan 2023 18:46:04 +0000 (19:46 +0100)]
uboot-mediatek: Fix ramips/mt76x8 buildbot

Move defines from header to defconfig
The package build and the Buildbot hang in 'make syncconfig' for
u-boot-ravpower_rp-wd009 because CONFIG_SYS_MIPS_TIMER_FREQ is not in
the .config, causing a console prompt. Also moved two other defines in
defconfig causing duplicate definition warnings.

Fixes: 3d5c5427e17a ("uboot-mediatek: update to U-Boot 2023.01")
Signed-off-by: Jo Deisenhofer <jo.deisenhofer@gmail.com>
22 months agouboot-envtools: ipq40xx: fix WHW03V2 mtd partition
Vincent Tremblay [Tue, 17 Jan 2023 14:02:38 +0000 (09:02 -0500)]
uboot-envtools: ipq40xx: fix WHW03V2 mtd partition

The configured u_env partition for the Linksys WHW03 V2 was not correct.
It should have been set to mtd6.

This fix allow to flash the OEM firmware from OpenWRT and to change the
boot partition using fw_setenv.

Fixes: 9e4ede8344d6 ("ipq40xx: add support for Linksys WHW03 V2")
Signed-off-by: Vincent Tremblay <vincent@vtremblay.dev>
22 months agoipq40xx: convert Extreme AP3915i to DSA
James Andrewartha [Tue, 17 Jan 2023 07:02:02 +0000 (15:02 +0800)]
ipq40xx: convert Extreme AP3915i to DSA

Convert and re-enabled Extreme AP3915i to DSA.

Signed-off-by: James Andrewartha <trs80@ucc.asn.au>
22 months agouboot-mvebu: update to version 2023.01
Josef Schlehofer [Thu, 12 Jan 2023 16:27:14 +0000 (17:27 +0100)]
uboot-mvebu: update to version 2023.01

In the version 2023.01, the U-boot image was renamed because of the
upstream change [1]

[1] https://source.denx.de/u-boot/u-boot/-/commit/87ac4b4b4ca5f00e2ddcdac41c9dc691ab2aecf1

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
22 months agolibpcap: update to 1.10.3
Nick Hainke [Sun, 15 Jan 2023 18:53:35 +0000 (19:53 +0100)]
libpcap: update to 1.10.3

Changelog:
https://git.tcpdump.org/libpcap/blob/95691ebe7564afa3faa5c6ba0dbd17e351be455a:/CHANGES

Refresh patch:
- 300-Add-support-for-B.A.T.M.A.N.-Advanced.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
22 months agoipset: update to 7.17
Nick Hainke [Fri, 30 Dec 2022 20:00:10 +0000 (21:00 +0100)]
ipset: update to 7.17

Release notes:
https://lwn.net/Articles/918784/

Signed-off-by: Nick Hainke <vincent@systemli.org>
22 months agoinclude: use libdeflate's gzip to decompress
Rosen Penev [Sat, 7 Jan 2023 08:18:34 +0000 (00:18 -0800)]
include: use libdeflate's gzip to decompress

libdeflate decompresses much faster than gzip.

Example:

~/d/openwrt> time gzip -dc dl/cmake-3.25.1.tar.gz > /dev/null

________________________________________________________
Executed in    1.01 secs      fish           external
   usr time  912.61 millis    1.67 millis  910.94 millis
   sys time   32.21 millis    0.25 millis   31.96 millis

~/d/openwrt> time libdeflate-gzip -dc dl/cmake-3.25.1.tar.gz > /dev/null

________________________________________________________
Executed in  523.04 millis    fish           external
   usr time  415.48 millis    1.07 millis  414.41 millis
   sys time  107.74 millis    0.15 millis  107.59 millis

~/d/openwrt> time gzip -dc dl/tessdata-4.1.0.tar.gz > /dev/null

________________________________________________________
Executed in    8.99 secs    fish           external
   usr time    8.90 secs  530.00 micros    8.90 secs
   sys time    0.07 secs   63.00 micros    0.07 secs

~/d/openwrt> time libdeflate-gzip -dc dl/tessdata-4.1.0.tar.gz > /dev/null

________________________________________________________
Executed in    2.74 secs    fish           external
   usr time    2.38 secs  537.00 micros    2.38 secs
   sys time    0.35 secs   66.00 micros    0.35 secs

Place libdeflate into tools-core as it is needed to decompress other
archives.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
22 months agolibdeflate: Avoid circular dependencies
Olliver Schinagl [Fri, 13 Jan 2023 09:50:30 +0000 (10:50 +0100)]
libdeflate: Avoid circular dependencies

CMake depends on (libdeflate-)gunzip, libdeflate depends on Cmake, so we
can't win.

Luckily libdeflate is _very_ easy to build, without any build system, so
lets just manually compile it and be done with it.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
22 months agolibdeflate: Update to v1.17
Olliver Schinagl [Sun, 15 Jan 2023 14:28:59 +0000 (15:28 +0100)]
libdeflate: Update to v1.17

The new version of libdeflate makes it a little easier to build it
without any build system.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
22 months agotools: Improve diffability/maintainability
Olliver Schinagl [Tue, 17 Jan 2023 19:54:05 +0000 (20:54 +0100)]
tools: Improve diffability/maintainability

Like with commit ae614fb397c2 ("tools: Improve diffability/maintainability")
we also want tools-core to be easy to maintain. While a smaller target,
it's still usefull and makes things nice and consistent.

To avoid duplicating any tools in the comment, simplify the comment
instead.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
22 months agobuild: fix incomplete initramfs compression options
Tony Butler [Tue, 29 Nov 2022 01:37:20 +0000 (17:37 -0800)]
build: fix incomplete initramfs compression options

Requires: tools/lz4, tools/lzop

complete the wiring so that these options work:
* `CONFIG_KERNEL_INITRAMFS_COMPRESSION_LZO`
* `CONFIG_KERNEL_INITRAMFS_COMPRESSION_LZ4`

Signed-off-by: Tony Butler <spudz76@gmail.com>
[remove blocking dependencies for separate ramdisk, fix lzop options]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
22 months agotools/lzop: add `lzop` binaries
Tony Butler [Tue, 29 Nov 2022 01:32:11 +0000 (17:32 -0800)]
tools/lzop: add `lzop` binaries

Depends: `tools/liblzo`

`lzop` is the standard executable for LZO compression

the initramfs generator offers the LZO option but there was no
executable to support it actually working

Signed-off-by: Tony Butler <spudz76@gmail.com>
22 months agotools/liblzo: add `liblzo` library
Tony Butler [Tue, 29 Nov 2022 01:06:46 +0000 (17:06 -0800)]
tools/liblzo: add `liblzo` library

prerequisite of upcoming `tools/lzop` addition, and subsequent initramfs
and squashfs cleanups

same as `packages/lzo` modified to be a HOST/tools type build,
and should always be the same version and sources when either one is
bumped

because this (and `packages/lzo`) only provide liblzo and no
executables, use the clearer name `tools/liblzo`

Signed-off-by: Tony Butler <spudz76@gmail.com>
22 months agotools/lz4: add `lz4` binaries
Tony Butler [Tue, 29 Nov 2022 00:01:26 +0000 (16:01 -0800)]
tools/lz4: add `lz4` binaries

same as `packages/liblz4` modified to be a HOST/tools type build with
unified liblz4 (this is also the dev package for liblz4)

the image initramfs generator offers the LZ4 option but there was no
executable to support it actually working

Signed-off-by: Tony Butler <spudz76@gmail.com>
22 months agoipq40xx: add DSL support for FritzBox 7530
Martin Schiller [Wed, 21 Aug 2019 07:10:46 +0000 (09:10 +0200)]
ipq40xx: add DSL support for FritzBox 7530

Set up MAC, LED, settings and default packages for DSL usage, similar
to the lantiq target.

Due to licensing uncertainty, we do not include the firmware files for the
DSL drivers. To have a working DSL setup, follow the instructions below.

Download the firmware files locally:

  mkdir -p files/lib/firmware/09a9
  wget -P files/lib/firmware/09a9 https://gitlab.com/prpl-foundation/intel/vrx518_aca_fw/-/raw/ugw-8.5.2/platform/xrx500/aca_fw.bin
  wget -P files/lib/firmware https://gitlab.com/prpl-foundation/intel/vrx518_ppe_fw/-/raw/ugw_8.5.2.10/platform/xrx500/ppe_fw.bin
  wget -P files/lib/firmware https://gitlab.com/prpl-foundation/intel/dsl_vr11_firmware_xdsl/-/raw/ugw-8.5.2/xcpe_8D1507_8D0901.bin
  ln -s xcpe_8D1507_8D0901.bin files/lib/firmware/vdsl.bin

For people building their own images:

Run the above commands in the root of your local OpenWrt clone,
and the firmware files will be part of the resulting images.

For people downloading images:

Copy the firmware files onto the router once it's booted up:
  scp -O -r files/lib/firmware root@fritz:/lib
Reboot the device afterwards.

Signed-off-by: Martin Schiller <ms.3headeddevs@gmail.com>
[cleaned up]
Signed-off-by: Andre Heider <a.heider@gmail.com>
[set up LED]
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agoipq40xx: fritzbox-7530.dts: increase dma coherent pool size
Martin Schiller [Wed, 21 Aug 2019 06:39:30 +0000 (08:39 +0200)]
ipq40xx: fritzbox-7530.dts: increase dma coherent pool size

This is needed by the mei driver to be able to download the firmware.

Signed-off-by: Martin Schiller <ms.3headeddevs@gmail.com>
Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agoltq-vdsl-vr11-app: add version 4.23.1 for vr11 targets
Martin Schiller [Wed, 21 Aug 2019 07:00:08 +0000 (09:00 +0200)]
ltq-vdsl-vr11-app: add version 4.23.1 for vr11 targets

This uses version 4.23.1 of the dsl_cpe_control package from the Intel
UGW 8.5.2.10 for the VRX518.

Signed-off-by: Martin Schiller <ms.3headeddevs@gmail.com>
[rebased]
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
[update to 4.23.1, added Jan's vector mac patch, fix warnings,
 switch to tag tarball]
Signed-off-by: Andre Heider <a.heider@gmail.com>
[add missing nLine in autoboot script, fix disconnect on termination,
 remove unneeded VR9 leftovers in init script]
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agoltq-dsl-base: enable for ipq40xx
Andre Heider [Sat, 18 Dec 2021 11:01:03 +0000 (12:01 +0100)]
ltq-dsl-base: enable for ipq40xx

This is required by the DSL userland tool for hotplug support.

Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agokernel: add new ltq-vdsl-vr11 driver
Martin Schiller [Wed, 21 Aug 2019 06:55:25 +0000 (08:55 +0200)]
kernel: add new ltq-vdsl-vr11 driver

This uses version 4.23.1 of the drv_dsl_cpe_api package from the Intel
UGW 8.5.2.10 for the VRX518.

Signed-off-by: Martin Schiller <ms.3headeddevs@gmail.com>
[rebased and updated for kernel 5.10]
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
[update to 4.23.1, switch to tag tarball, update patches]
Signed-off-by: Andre Heider <a.heider@gmail.com>
[added fix for elapsed time and upstream MINEFTR]
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agokernel: add new ltq-vdsl-vr11-mei driver
Martin Schiller [Wed, 21 Aug 2019 06:44:58 +0000 (08:44 +0200)]
kernel: add new ltq-vdsl-vr11-mei driver

This uses version 1.11.1 of the drv_mei_cpe package from the Intel UGW
8.5.2.10 for the VRX518.

Signed-off-by: Martin Schiller <ms.3headeddevs@gmail.com>
[updated for kernel 5.10]
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
[update to 1.11.1, switch to tag tarball, update patches]
Signed-off-by: Andre Heider <a.heider@gmail.com>
[update for kernel 5.15]
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agoltq-ifxos: enable for ipq40xx
Andre Heider [Sat, 18 Dec 2021 10:59:47 +0000 (11:59 +0100)]
ltq-ifxos: enable for ipq40xx

This is required for the MEI CPE driver.

Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agokernel: add Intel/Lantiq VRX518 TC driver
Martin Schiller [Wed, 21 Aug 2019 06:36:05 +0000 (08:36 +0200)]
kernel: add Intel/Lantiq VRX518 TC driver

This driver version is also included in Intel UGW 8.5.2.10.

Signed-off-by: Martin Schiller <ms.3headeddevs@gmail.com>
[updated for kernel 5.10]
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
[update to 1.5.12.4, switch to tag tarball]
Signed-off-by: Andre Heider <a.heider@gmail.com>
[add working software data path]
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agoipq40xx: add Intel/Lantiq ATM hacks
Martin Schiller [Wed, 21 Aug 2019 06:33:43 +0000 (08:33 +0200)]
ipq40xx: add Intel/Lantiq ATM hacks

Similar to the lantiq platform, these are required for DSL support.

Signed-off-by: Martin Schiller <ms.3headeddevs@gmail.com>
[switch to kernel 5.10 and 5.15]
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
[update patches based on UGW 8.5.2.10, remove 5.10 support]
Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agokernel: add Intel/Lantiq VRX518 EP driver
Martin Schiller [Wed, 21 Aug 2019 06:29:33 +0000 (08:29 +0200)]
kernel: add Intel/Lantiq VRX518 EP driver

This driver was picked from the Intel UGW 8.5.2.

Signed-off-by: Martin Schiller <ms.3headeddevs@gmail.com>
[updated for kernel 5.10]
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
[update to 8.5.2]
Signed-off-by: Andre Heider <a.heider@gmail.com>
[fix masking interrupts and add locking]
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agoprocd: update to git HEAD
Daniel Golle [Mon, 16 Jan 2023 22:03:31 +0000 (22:03 +0000)]
procd: update to git HEAD

 04d7570 jail: fs: don't overwrite existing mount target
 6b9629b jail: don't assume positive return value of creat
 190f13a init: attempt to mount efivarfs

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
22 months agomediatek: filogic: fix sysupgrade on MMC on the BPi-R3
Daniel Golle [Mon, 16 Jan 2023 21:02:00 +0000 (21:02 +0000)]
mediatek: filogic: fix sysupgrade on MMC on the BPi-R3

A previous attempt to simplify things went wrong and now sysupgrade
is broken on this device. Fix that.

Fixes: de94587e70 ("mediatek: filogic: don't rely on image preset in flash or sysupgrade")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
22 months agomediatek: mt7622: fix sysupgrade on MMC on BPi-R64
Daniel Golle [Mon, 16 Jan 2023 21:00:41 +0000 (21:00 +0000)]
mediatek: mt7622: fix sysupgrade on MMC on BPi-R64

A previous attempt to simplify things went wrong and now sysupgrade
is broken on this device. Fix that.

Fixes: d640cbac0e ("mediatek: mt7622: don't rely on existing image for sysupgrade")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
22 months agokernel: fix kernel panic in mtk_ppe
Daniel Golle [Mon, 16 Jan 2023 19:40:24 +0000 (19:40 +0000)]
kernel: fix kernel panic in mtk_ppe

The patch that adds support for hw flow-offloading counters on newer
MediaTek SoCs tries to prints acct->packets and acct->bytes in debugfs,
without checking that acct isn't null. This causes a kernel panic when
trying to read /sys/kernel/debug/ppe0/entries on older MediaTek SoCs.
Fix this by adding a check for acct.

Fixes: openwrt#11756
Fixes: 9721a42a27 ("kernel: support hw flow-offloading counters on newer MediaTek SoCs")
Reported-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
22 months agoarchs38: switch to 5.15 by default
Nick Hainke [Fri, 13 Jan 2023 23:20:32 +0000 (00:20 +0100)]
archs38: switch to 5.15 by default

It appears that only a few users are using the archs38 SoC. The most
active user of the target has already approved the testing kernel and
so it is very unlikely bugs will be reported in the near future.
Therefore, the target should be directly bumped to 5.15.

Signed-off-by: Nick Hainke <vincent@systemli.org>
22 months agodosfstools: switch to AC_CHECK_LIB dosfstools
David Bauer [Mon, 16 Jan 2023 00:30:29 +0000 (01:30 +0100)]
dosfstools: switch to AC_CHECK_LIB

This fixes spurious build-errors on OpenWrt, where the AM_ICONV macro
is undefined while invoking autoconfig. Later in the build, the ICONV
LDOPTIONS are set to @LIBICONV@, failing the build.

Signed-off-by: David Bauer <mail@david-bauer.net>
22 months agodosfstools: refresh patches
David Bauer [Mon, 16 Jan 2023 17:25:40 +0000 (18:25 +0100)]
dosfstools: refresh patches

Signed-off-by: David Bauer <mail@david-bauer.net>
22 months agoipq807x: add Dynalink DL-WRX36
Dirk Buchwalder [Fri, 5 Aug 2022 09:38:37 +0000 (11:38 +0200)]
ipq807x: add Dynalink DL-WRX36

Dynalink DL-WRX36 is a AX WIFI router with 4 1G and 1 2.5G ports.

Specifications:

    •     CPU: Qualcomm IPQ8072A Quad core Cortex-A53 2.2GHz
    •     RAM: 1024MB of DDR3
    •     Storage: 256MB Nand
    •     Ethernet: 4x 1G RJ45 ports (QCA8075) + 1 2.5G Port (QCA8081)
    •     WLAN:
          2.4GHz: Qualcomm QCN5024 2x2 802.11b/g/n/ax 1174 Mbps PHY rate
          5GHz: Qualcomm QCN5054 4x4 802.11a/b/g/n/ac/ax 2402 PHY rate
    •     1x USB 3.0

    •     1 gpio-controlled dual color led (blue/red)

            • Buttons: 1x soft reset / 1x WPS
            • Power: 12V DC jack

        A poulated serial header is onboard (J1004)
        the connector size is a 4-pin 2.0 mm JST PH.
        RX/TX is working, u-boot bootwait is active, secure boot is enabled.

        Notes:
- Serial is completely deactivated in the stock firmware image.
- This commit adds only single partition support, that means
  sysupgrade is upgrading the current rootfs partition.
- Installation can be done by serial connection or
  SSH access on OEM firmware

Installation Instructions:

Most part of the installation is performed from an initramfs image
running OpenWrt, and there are two options to boot it.

Boot initramfs option 1: Using serial connection (3.3V)
1. Stop auto boot to get to U-boot shell
2. Transfer initramfs image to device
   (openwrt-ipq807x-generic-dynalink_dl-wrx36-initramfs-uImage.itb)
   Tested using TFTP and a FAT-formatted USB flash drive.
3. Boot the initramfs image
   # bootm

Boot initramfs option 2: From SSH access on OEM firmware
1. Copy the initramfs image to a FAT-formatted flash drive
   (tested on single-partition drive) and connect it to device USB port.
2. Change boot command so it loads the initramfs image on next boot
   Fallback to OEM firmware is provided.
   # fw_setenv bootcmd 'usb start && fatload usb 0:1 0x44000000 openwrt-ipq807x-generic-dynalink_dl-wrx36-initramfs-uImage.itb && bootm 0x44000000; bootipq'
3. Reboot the device to boot the initramfs
   # reboot

Install OpenWrt from initramfs image:
1. Use SCP (or other way) to transfer OpenWrt factory image
2. Connect to device using SSH (on a LAN port)
3. Check MTD partition table.
   rootfs and rootfs_1 should be mtd18 and mtd20
   depending on current OEM slot.
   # cat /proc/mtd
4. Do a ubiformat to both rootfs partitions:
   # ubiformat /dev/mtd18 -y -f /path_to/factory_image
   # ubiformat /dev/mtd20 -y -f /path_to/factory_image
5. Set U-boot env variable: mtdids
   # fw_setenv mtdids 'nand0=nand0'
6. Get offset of mtd18 to determine current OEM slot
   - If current OEM slot is 1, offset is 16777216  (0x1000000)
   - If current OEM slot is 2, offset is 127926272 (0x7a00000)
   # cat /sys/class/mtd/mtd18/offset
7. Set U-boot env variable: mtdparts
   If current OEM slot is 1, run:
   # fw_setenv mtdparts 'mtdparts=nand0:0x6100000@0x1000000(fs),0x6100000@0x7a00000(fs_1)'
   If current OEM slot is 2, run:
   # fw_setenv mtdparts 'mtdparts=nand0:0x6100000@0x7a00000(fs),0x6100000@0x1000000(fs_1)'
8. Set U-boot env variable: bootcmd
   # fw_setenv bootcmd 'setenv bootargs console=ttyMSM0,115200n8 ubi.mtd=rootfs rootfstype=squashfs rootwait; ubi part fs; ubi read 0x44000000 kernel; bootm 0x44000000#config@rt5010w-d350-rev0'
9. Reboot the device
   # reboot

        Note: this PR adds only single partition support, that means sysupgrade is
              upgrading the current rootfs partition

Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
22 months agoipq807x: add Edgecore EAP102
Matthew Hagan [Sat, 29 Jan 2022 00:03:11 +0000 (09:03 +0900)]
ipq807x: add Edgecore EAP102

The Edgecore EAP102 is a wall/ceiling mountable AP. The AP can be
powered by either PoE or AC adapter.

Device info:
 - IPQ8071-A SoC
 - 1GiB RAM
 - 256MiB NAND flash
 - 32MiB SPI NOR
 - 2 Ethernet ports
 - 1 Console port
 - 2GHz/5GHz AX WLAN
 - 2 USB 2.0 ports

Install instructions:

Prerequistes - TFTP server, preferrably within 192.168.1.0/24
       Console cable plugged in (115200 8N1 no flow control)

1. Power on device and interrupt u-boot to obtain u-boot CLI

2. set serverip to IP address of the TFTP server:

`setenv serverip 192.168.1.250`

3. Download image from TFTP server:

`tftpboot 0x44000000 openwrt-ipq807x-generic-edgecore_eap102-squashfs-nand-factory.ubi`

4. Flash ubi image to both partitions and reset:

`sf probe
 imxtract 0x44000000 ubi
 nand device 0
 nand erase 0x0 0x3400000
 nand erase 0x3c00000 0x3400000
 nand write $fileaddr 0x0 $filesize
 nand write $fileaddr 0x3c00000 $filesize
 reset`

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
22 months agoipq807x: Add Xiaomi AX9000
Robert Marko [Mon, 10 Jan 2022 23:50:37 +0000 (00:50 +0100)]
ipq807x: Add Xiaomi AX9000

Xiaomi AX9000 is a premium 802.11ax "tri"-band router/AP.
Specifications:
* CPU: Qualcomm IPQ8072A Quad core Cortex-A53 2.2GHz
* RAM: 1024MB of DDR3
* Storage: 256MB of parallel NAND
* Ethernet:
* 4x1G RJ45 ports (QCA8075) with 1x status LED per port
* 1x2.5G RJ45 port (QCA8081) with 1x status LED
* WLAN:
* PCI based Qualcomm QCA9889 1x1 802.11ac Wawe 2 for IoT
* 2.4GHz: Qualcomm QCN5024 4x4@40MHz 802.11b/g/n/ax 1147 Mbps PHY rate
* 5.8GHz: Qualcomm QCN5054 4x4@80MHz or 2x2@160MHz 802.11a/b/g/n/ac/ax 2402Mbps PHY rate
* 5GHz: PCI based Qualcomm QCN9024 4x4@160MHz 802.11a/b/g/n/ac/ax 4804Mbps PHY rate
* USB: 1x USB3.0 Type-A port
* LED-s:
* System (Blue and Yellow)
* Network (Blue and Yellow)
* RGB light bar on top in X shape
* Buttons:
* 1x Power switch
* 1x Soft reset
* 1x Mesh button
* Power: 12V DC Jack

Installation instructions:

Obtaining SSH access is mandatory
https://openwrt.org/inbox/toh/xiaomi/ax9000#obtain_ssh_access

Installation is done by the ubiformat method, through SSH:
1. Open an SSH shell to the router
2. Copy the file openwrt-ipq807x-generic-xiaomi_ax9000-initramfs-factory.ubi to the /tmp directory
3. Check which rootfs partition is your router booted in (0 = rootfs | 1 = rootfs_1):
nvram get flag_boot_rootfs

4. Find the rootfs and rootfs_1 mtd indexes respectively:
cat /proc/mtd
Please confirm if mtd21 and mtd22 are the correct indexes from above!

5. Use the command ubiformat to flash the opposite mtd with UBI image:

If nvram get flag_boot_rootfs returned 0:
ubiformat /dev/mtd22 -y -f /tmp/openwrt-ipq807x-generic-xiaomi_ax9000-initramfs-factory.ubi && nvram set flag_boot_rootfs=1 && nvram set flag_last_success=1 && nvram commit

otherwise:
ubiformat /dev/mtd21 -y -f /tmp/openwrt-ipq807x-generic-xiaomi_ax9000-initramfs-factory.ubi && nvram set flag_boot_rootfs=0 && nvram set flag_last_success=0 && nvram commit

6. Reboot the device by:
reboot

Previous commands flashed an ubinized OpenWrt initramfs that will serve as the intermediate step
since OpenWrt uses unified rootfs in order to fully utilize NAND and provide enough space for packages.
Continue in order to pernamently flash OpenWrt:

7. SSH into OpenWrt from one of the LAN ports
8. Copy the file openwrt-ipq807x-generic-xiaomi_ax9000-squashfs-sysupgrade.bin to the /tmp directory
9. Sysupgrade the device:
sysupgrade -n /tmp/openwrt-ipq807x-generic-xiaomi_ax9000-squashfs-sysupgrade.bin

Device will reboot with OpenWrt, and then sysupgrade can be used to upgrade the device when desired.

Signed-off-by: Robert Marko <robimarko@gmail.com>
22 months agoipq807x: add QNAP 301w
Dirk Buchwalder [Sat, 1 Jan 2022 22:20:19 +0000 (23:20 +0100)]
ipq807x: add QNAP 301w

QNAP 301w is a AX WIFI router with 4 1G and 2 10G ports.

Specifications:

    •     CPU: Qualcomm IPQ8072A Quad core Cortex-A53 2.2GHz
    •     RAM: 1024MB of DDR3
    •     Storage: 4GB eMMC (contains kernel and rootfs) / 8MB NOR
          (contains art and u-boot-env)
    •     Ethernet: 4x 1G RJ45 ports + 2 10G ports (Aquantia AQR113C)
    •     WLAN:
          2.4GHz: Qualcomm QCN5024 4x4 (40 MHz) 802.11b/g/n/ax 1174 Mbps PHY rate
          5GHz: Qualcomm QCN5054 4x4 (80 MHz) or 2x2 (160 MHz) 802.11a/b/g/n/ac/ax 2402 PHY rate

    •     LEDs:
          7 x GPIO-controlled dual color LEDs + 2 GPIO-controlled single color LEDs

            • Buttons: 1x soft reset / 1x WPS
            • Power: 12V DC jack

        A poulated serial header is onboard.
        RX/TX is working, bootwait is active, secure boot is not enabled.

        SSH can be activated in the stock firmware, hold WPS button til the second beep
(yes the router has a buzzer)
        SSH is available on port 22200, login with user admin and
password "mac address of the router".

        Installation Instructions:

            • obtain serial access (https://openwrt.org/inbox/toh/qnap/301w#serial)
            • stop auto boot
            • setenv serverip 192.168.10.1
            • setenv ipaddr 192.168.10.10
            • tftpboot the initramfs image
              (openwrt-ipq807x-generic-qnap_301w-initramfs-fit-uImage.itb)
            • bootm

            • make sure that current_entry is set to "0":
              "fw_printenv -n current_entry" should be print "0". If not,
       do "fw_setenv current_entry 0"
            • copy openwrt-ipq807x-generic-qnap_301w-squashfs-sysupgrade.bin
          to the device to /tmp folder
            • sysupgrade -n /tmp/openwrt-ipq807x-generic-qnap_301w-squashfs-sysupgrade.bin
              this flashes openwrt to the first kernel and rootfs partition (mmcblk0p1 / mmcblk0p4)
            • reboot

        Note: this leaves the second kernel / rootfs parition untouched. So if you want
              to go back to stock, stop u-boot autoboot, "setenv current_entry 1" ,
       "saveenv", "bootipq".
              Stock firmware should start from the second partition.
      Then do a firmwareupgrade in the stock gui, that should overwrite the openwrt
      in the first partitions

        Make 10G Aquantia phy's work:
              The aquantia phy's need a firmware to work. This can either be loaded
      in linux with a userspace tool or in u-boot.

              I was not successfull to load the firmware in linux (aq-fw-download) but luckily there is
      aq_load_fw available in u-boot. But first the right firmware needs to write
      to the 0:ETHPHYFW mtd partition (it is empty on my device)

              Grab the ethphy firmware image from:
      https://github.com/kirdesde/nbg7815_gpl/blob/master/target/linux/ipq/ipq807x_64/prebuilt_images/AQR_ethphyfw.mbn
      and scp that to openwrt.

              Check the 0:ETHPHYFW partition number:
              cat /proc/mtd|grep "0:ETHPHYFW", should be mtd10.

              Backup the 0:ETHPHYFW partition:
              dd if=/dev/mtd10 of=/tmp/ethphyfw.backup, scp ethphyfw.backup to a save place.

              Write the new firmware image to the 0:ETHPHYFW partition:
              "mtd erase /dev/mtd10", "mtd -n write AQR_ethphyfw.mbn /dev/mtd10".

              Reboot to u-boot.

              Check if aq_load_fw is working:

              "aq_load_fw 0", that checks the firmware and if successfull,
      loads iram and dram to one of the aquantia phy's.

              If that worked, add the aq_load_fw to the bootcmd:
              setenv bootcmd "aq_load_fw 0 && aq_load_fw 8 && bootipq"

              "saveenv"

              "reset"

              Board reboots and the firmware load to both phy's should start and
      then openwrt boots.

              Check if the 10G ports work.

              Note: lan port labeled "10G-2" is configured as WAN port as per default.
      All other port are in the br-lan. This can be changed in the network config.

Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>