openwrt/staging/stintel.git
20 months agoWIP: Odroid N2 support meson
Stijn Tintel [Mon, 13 Sep 2021 21:26:16 +0000 (00:26 +0300)]
WIP: Odroid N2 support

Untested.

20 months agomesongx: new target
Stijn Tintel [Tue, 27 Jun 2017 07:37:10 +0000 (09:37 +0200)]
mesongx: new target

This target supports Amlogic S9 SoCs.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
20 months agoodroid-firmware: add new package
Stijn Tintel [Mon, 8 Oct 2018 21:54:23 +0000 (00:54 +0300)]
odroid-firmware: add new package

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
20 months agouboot-mesongx: add new package
Stijn Tintel [Tue, 27 Jun 2017 07:36:26 +0000 (09:36 +0200)]
uboot-mesongx: add new package

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
20 months agoarm-trusted-firmware-meson: new package
Stijn Tintel [Mon, 16 Aug 2021 21:13:41 +0000 (00:13 +0300)]
arm-trusted-firmware-meson: new package

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
20 months agotools: add fiptool
Stijn Tintel [Tue, 27 Jun 2017 07:32:57 +0000 (09:32 +0200)]
tools: add fiptool

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
20 months agotools: add meson-tools
Stijn Tintel [Tue, 27 Jun 2017 07:19:16 +0000 (09:19 +0200)]
tools: add meson-tools

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
20 months agostrace: disable autoreconf
Stijn Tintel [Wed, 22 Sep 2021 10:50:04 +0000 (13:50 +0300)]
strace: disable autoreconf

With autoreconf enabled, building strace fails:
Makefile:9303: *** missing separator.  Stop.

Contents of that line:
@CODE_COVERAGE_RULES@

Disabling autoreconf fixes the problem. As the autoreconfig fixup was
enabled in the initial commit of strace to the repo, it's hard to figure
out why it was enabled. It was most likely required to build at that
time, but as it now builds fine without it, just disable the fixup.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
20 months agolibmnl: fix build when bash is not located at /bin/bash
Mark Mentovai [Sun, 10 Jul 2022 23:43:05 +0000 (19:43 -0400)]
libmnl: fix build when bash is not located at /bin/bash

This fixes the libmnl build on macOS, which ships with an outdated bash
at /bin/bash. During the OpenWrt build, a modern host bash is built and
made available at staging_dir/host/bin/bash, which is present before
/bin/bash in the build's PATH.

This is similar to 8f7ce3aa6dda, presently appearing at
package/kernel/mac80211/patches/build/001-fix_build.patch.

Signed-off-by: Mark Mentovai <mark@mentovai.com>
20 months agoramips: add support for H3C TX1800 Plus / TX1801 Plus / TX1806
Shiji Yang [Sun, 20 Mar 2022 15:42:37 +0000 (23:42 +0800)]
ramips: add support for H3C TX1800 Plus / TX1801 Plus / TX1806

H3C TX180x series WiFi6 routers are customized by different carrier.
While these three devices look different, they use the same motherboard
inside. Another minor difference comes from the model name definition
in the u-boot environment variable.

Specifications:
 SOC:      MT7621 + MT7915
 ROM:      128 MiB
 RAM:      256 MiB
 LED:      status *2
 Button:   reset *1 + wps/mesh *1
 Ethernet:        lan *3 + wan *1 (10/100/1000Mbps)
 TTL Baudrate:    115200
 TFTP server IP:  192.168.124.99

MAC Address:
 use        address(sample 1)   address(sample 2)    source
 label      88:xx:xx:98:xx:12   88:xx:xx:a2:xx:a5   u-boot-env@ethaddr
 lan        88:xx:xx:98:xx:13   88:xx:xx:a2:xx:a6   $label +1
 wan        88:xx:xx:98:xx:12   88:xx:xx:a2:xx:a5   $label
 WiFi4_2G   8a:xx:xx:58:xx:14   8a:xx:xx:52:xx:a7   (Compatibility mode)
 WiFi5_5G   8a:xx:xx:b8:xx:14   8a:xx:xx:b2:xx:a7   (Compatibility mode)
 WiFi6_2G   8a:xx:xx:18:xx:14   8a:xx:xx:12:xx:a7
 WiFi6_5G   8a:xx:xx:78:xx:14   8a:xx:xx:72:xx:a7

Compatibility mode is used to guarantee the connection of old devices
that only support WiFi4 or WiFi5.

TFTP + TTL Installation:
Although a TTL connection is required for installation, we do not need
to tear down it. We can find the TTL port from the cooling hole at the
bottom. It is located below LAN3 and the pins are defined as follows:
|LAN1|LAN2|LAN3|----|WAN|
--------------------
    |GND|TX|RX|VCC|

1. Set tftp server IP to 192.168.124.99 and put initramfs firmware in
   server's root directory, rename it to a simple name "initramfs.bin".
2. Plug in the power supply and wait for power on, connect the TTL cable
   and open a TTL session, enter "reboot", then enter "Y" to confirm.
   Finally push "0" to interruput boot while booting.
3. Execute command to install a initramfs system:
   # tftp 0x80010000 192.168.124.99:initramfs.bin
   # bootm 0x80010000
4. Backup nand flash by OpenWrt LuCI or dd instruction. We need those
   partitions if we want to back to stock firmwre due to official
   website does not provide download link.
   # dd if=/dev/mtd1 of=/tmp/u-boot-env.bin
   # dd if=/dev/mtd4 of=/tmp/firmware.bin
5. Edit u-boot env to ensure use default bootargs and first image slot:
   # fw_setenv bootargs
   # fw_setenv bootflag 0
6. Upgrade sysupgrade firmware.
7. About restore stock firmware: flash the "firmware" and "u-boot-env"
   partitions that we backed up in step 4.
   # mtd write /tmp/u-boot-env.bin u-boot-env
   # mtd write /tmp/firmware.bin firmware

Additional Info:
The H3C stock firmware has a 160-byte firmware header that appears to
use a non-standard CRC32 verification algorithm. For this part of the
data, the u-boot does not check it so we can just directly replace it
with a placeholder.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
20 months agokernel: bump 5.15 to 5.15.58
John Audia [Fri, 29 Jul 2022 16:07:55 +0000 (12:07 -0400)]
kernel: bump 5.15 to 5.15.58

All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200
Run-tested: bcm2711/RPi4B, mt7622/RT3200

Signed-off-by: John Audia <therealgraysky@proton.me>
20 months agox86: update defconfig for 5.15.57
John Audia [Mon, 25 Jul 2022 12:27:13 +0000 (08:27 -0400)]
x86: update defconfig for 5.15.57

Add some new/missing symbols relating to speculative execution mitigations[1].

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v5.15.57&id2=v5.15.56

Signed-off-by: John Audia <therealgraysky@proton.me>
20 months agokernel: bump 5.15 to 5.15.57
John Audia [Sat, 23 Jul 2022 19:21:20 +0000 (15:21 -0400)]
kernel: bump 5.15 to 5.15.57

All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200
Run-tested: bcm2711/RPi4B, mt7622/RT3200

Signed-off-by: John Audia <therealgraysky@proton.me>
20 months agokernel: bump 5.15 to 5.15.56
John Audia [Thu, 21 Jul 2022 20:12:42 +0000 (16:12 -0400)]
kernel: bump 5.15 to 5.15.56

Manually rebased:
  bcm27xx/patches-5.15/950-0470-sound-usb-add-device-quirks-for-A4Tech-FHD-1080p-web.patch

Remove upstreamed:
  bcm27xx/patches-5.15/950-0060-tty-amba-pl011-Add-un-throttle-support.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.56&id=2db3b95166f72e6481a79b82b1d6f94f4b18fcc1

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200
Run-tested: bcm2711/RPi4B, mt7622/RT3200

Signed-off-by: John Audia <therealgraysky@proton.me>
20 months agokernel: bump 5.15 to 5.15.55
John Audia [Fri, 15 Jul 2022 12:20:36 +0000 (08:20 -0400)]
kernel: bump 5.15 to 5.15.55

All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200
Run-tested: bcm2711/RPi4B, mt7622/RT3200

Signed-off-by: John Audia <therealgraysky@proton.me>
20 months agokernel: bump 5.15 to 5.15.54
John Audia [Tue, 12 Jul 2022 15:52:59 +0000 (11:52 -0400)]
kernel: bump 5.15 to 5.15.54

All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200
Run-tested: bcm2711/RPi4B, mt7622/RT3200

Signed-off-by: John Audia <therealgraysky@proton.me>
20 months agoarm-trusted-firmware-mvebu: update cm3 gcc to 11.2
Andre Heider [Tue, 21 Jun 2022 12:32:50 +0000 (14:32 +0200)]
arm-trusted-firmware-mvebu: update cm3 gcc to 11.2

https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads

Signed-off-by: Andre Heider <a.heider@gmail.com>
20 months agoarm-trusted-firmware-mvebu: update to v2.7
Andre Heider [Tue, 21 Jun 2022 12:09:56 +0000 (14:09 +0200)]
arm-trusted-firmware-mvebu: update to v2.7

Remove the backported patches and add another to allow building with the
OpenWrt build system.

Signed-off-by: Andre Heider <a.heider@gmail.com>
20 months agoarm-trusted-firmware-mvebu: bump mox-boot-builder to v2022.06.11
Andre Heider [Tue, 21 Jun 2022 12:09:40 +0000 (14:09 +0200)]
arm-trusted-firmware-mvebu: bump mox-boot-builder to v2022.06.11

Remove the gold patch, since upstream doesn't hardcode it anymore.

406454d wtmi: Don't print another newline on standalone build
ec97868 Bump mox-imager commit
e4c4b9d wtmi: Call main from C code in startup
4c1d3ff wtmi: Move startup assmebly to C file as inline assmebly
ee570ea wtmi: Indent Makefiles
18a7c0b wtmi: Use -f{function,data}-sections and --gc-sections
47ad100 wtmi: Use bfd linker instead of gold
5e34aa1 wtmi: Keep .data* and .bss* sections in linker scripts
7a4e3d2 wtmi: compressed, reload_helper: Discard .ARM* section
d943726 wtmi: compressed: Keep main function in linker script
d4f0fc6 wtmi: Keep main function in linker script
092148c wtmi: Fix -Warray-bounds warning
469e1b6 wtmi: Add do_div() implementation from Linux
90f46a0 Bump mox-imager commit
8bc6254 wtmi: Always use gold and link with --rosegment and --gc-sections flags
0b68a33 wtmi: Implement Marvell's OTP write commands
53d2a1c Bump mox-imager commit
b4c34b4 Rename arm-trusted-firmware to trusted-firmware-a
5f79ace Sync mox-imager submodule URL
a1cdd32 Sync TF-A submodule URL
58ef1af Sync u-boot submodule URL
90d28e1 wtmi: Check argument validity in Marvell's CMD_OTP_READ_1B command more
3a48cf1 Bump mox-imager commit
807a3e1 wtmi: Implement Marvell's OTP read commands
77b1232 wtmi: Enable OTP read/write mailbox commands
9724d41 wtmi: Add is_secure_boot()
03de0c1 Bump mox-imager commit
2133601 wtmi: Fix efuse_write_row_with_ecc_lock() for masked ECC rows
545a89f wtmi: Don't allow masked rows in efuse_write_row_with_ecc_lock()
94ebc98 wtmi: Don't program already programmed bits in efuse_raw_write()
2369750 wtmi: Remove inline specifier from is_row_masked()
53e2636 wtmi: Use ARRAY_SIZE()
cc3e23b wtmi: Remove duplicate checks
89d24be Makefile: ignore clean target errors
9ee8b8d Bump mox-imager commit
489262b Bump mox-imager commit
79d2f32 deploy: Print board type in deploy output
78f15b0 deploy: Print board version without board type bits in deploy output
e69fdfa deploy: Always determine 512 MiB RAM when deploying RIPE Atlas Probe
d1f7d07 deploy: Write eMMC Boot Mode into OTP when deploying RIPE Atlas Probe
d43a089 Bump mox-imager commit
49ac21d deploy: Use get_ram_size() from ddr.c
1e7705d Print DDR type and size when initializing
6f85e72 Move get_ram_size() to ddr.c
edb1079 wtmi: Rename Atlas_RIPE to RIPE_Atlas
e6a3aee wtmi: Inform about board type in CMD_BOARD_INFO
50aeae5 wtmi: Read only bits 53:48 of row eFuse 42 as board version
b882398 wtmi: Add README.md (document OTP content)
c068431 wtmi: Add ARRAY_SIZE() macro
4af2317 wtmi: Use 50 MHz as SPI clock rate
226fc5c wtmi: Add fast spi_write() function
518c914 wtmi: clock: Check for zero loops, not argument, in ndelay() / udelay()
89a21c5 wtmi: Fix comment
7b3e11a wtmi: Add clk command to print xtal and TBG clock rates
5127638 wtmi: Use the signed keyword when defining signed types
fb31ed2 wtmi: Fix DDR training failure check
1b1b938 wtmi: clock: Check for zero in ndelay() / udelay()
c0ee09a wtmi: Print correct DDR version in debug message
edfb875 Bump mox-imager commit
85cb5e3 Bump mox-imager commit
c4e9334 wtmi: debug: interpret char 127 as backspace
a778fd9 Bump mox-imager commit

Signed-off-by: Andre Heider <a.heider@gmail.com>
20 months agoarm-trusted-firmware-mvebu: bump mv-ddr-marvell to current version
Andre Heider [Tue, 21 Jun 2022 12:09:21 +0000 (14:09 +0200)]
arm-trusted-firmware-mvebu: bump mv-ddr-marvell to current version

6ff988f mv_ddr: a3700: Use the right size for memset to not overflow
0f3e893 mv_ddr: a38x: fix BYTE_HOMOGENEOUS_SPLIT_OUT decision
4bae770 mv_ddr: a38x: fix SPLIT_OUT_MIX state decision
cdefd8b mv_ddr: a38x: Fix Synchronous vs Asynchronous mode determination
8c42ad9 mv_ddr_4_training: cast uint64_t to unsigned long long

Signed-off-by: Andre Heider <a.heider@gmail.com>
20 months agoarm-trusted-firmware-mvebu: bump a3700-utils to current version
Andre Heider [Tue, 21 Jun 2022 12:08:55 +0000 (14:08 +0200)]
arm-trusted-firmware-mvebu: bump a3700-utils to current version

1d97715 wtmi: Discard ELF symbols from firmware binary
2d2a21c wtmi: Allow access to the 43th OTP row
e733e9f Fix boot from SATA build
4392eaf wtmi: Fix sending status code of cmd execution
14b3c61 Wtpdownloader: Remove out-of-dated x86-64 ELF binary WtpDownload_linux
e345b95 Wtpdownloader: Fix setting tty c_cflag options
0c502d5 Wtpdownloader: Call HandlePendingMessages() after Port->WtpCmd is freed
d91761a Wtpdownloader: Fix memory leaks
bc11d18 Wtpdownloader: Check for number of read bytes prior touching read buffer
58db335 Wtpdownloader: Add missing check in SendContinuousForceConsoleMode() if byte was really read
a4029c0 Wtpdownloader: Fix 32/64-bit host detection
3679034 Wtpdownloader: Print missing newline at the end of output

Signed-off-by: Andre Heider <a.heider@gmail.com>
20 months agouboot-mvebu: update to v2022.07
Andre Heider [Mon, 11 Jul 2022 17:49:21 +0000 (19:49 +0200)]
uboot-mvebu: update to v2022.07

Remove one merged patch.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Tested-by: Josef Schlehofer <pepe.schlehofer@gmail.com> [Turris Omnia]
20 months agotools/libressl: disable assembly code for all hosts
Michael Pratt [Wed, 20 Jul 2022 23:17:22 +0000 (19:17 -0400)]
tools/libressl: disable assembly code for all hosts

This SSL library is for hosts only
and not shipped as a build product,
therefore its performance quality (speed) is not critical.

Assembly code is broken in LibreSSL for some x86_64 hosts (part of git history)
and for some RISC host archs like armv7l, aarch64, powerpc, ppc64, etc...
so let's just disable it for all hosts.

For example, this fixes an instance on ARM hosts
where the host Python 3 builds broken modules which link to LibreSSL,
even with patches that enable LibreSSL support
with the import error "unexpected reloc type 3".

Ref: a395563f6 ("build: fix libressl build on x32 (amd64ilp32) host ")
Suggested-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
20 months agotools/libressl: ensure PIC-only object compilation
Michael Pratt [Wed, 20 Jul 2022 23:14:10 +0000 (19:14 -0400)]
tools/libressl: ensure PIC-only object compilation

Line up configure arguments for cleaner git diff and editing and grepping.

LibreSSL must be built with PIC, and has the flags for it already in CFLAGS.
Add the configure option native to LibreSSL to use only PIC in objects,
which further enforces that each object in the library has the PIC flag
to prevent a mixture of PIC / non-PIC objects within it.

Ref: 96a940308 ("tools: libressl: always build as PIC")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
20 months agomac80211: Update to version 5.15.58-1
Hauke Mehrtens [Sat, 30 Jul 2022 23:24:00 +0000 (01:24 +0200)]
mac80211: Update to version 5.15.58-1

This updates mac80211 to version 5.15.58-1 which is based on kernel
5.15.58.
The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
20 months agotools: bump 7z package to 22.01
Sander Vanheule [Sun, 31 Jul 2022 13:19:29 +0000 (15:19 +0200)]
tools: bump 7z package to 22.01

Version 22.00 of 7z causes build failures on systems using GCC 12 with
the following error:

    ../../../../C/LzmaEnc.c: In function 'LzmaEnc_CodeOneMemBlock':
    ../../../../C/LzmaEnc.c:2996:19: error: storing the address of local
    variable 'outStream' in '*p.rc.outStream' [-Werror=dangling-pointer=]
     2996 |   p->rc.outStream = &outStream.vt;
          |   ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
    ../../../../C/LzmaEnc.c:2979:28: note: 'outStream' declared here
     2979 |   CLzmaEnc_SeqOutStreamBuf outStream;
          |                            ^~~~~~~~~
    ../../../../C/LzmaEnc.c:2979:28: note: 'pp' declared here

Upgrade to version 22.01 which contains the required fix.

Fixes: 5fcc6f0f1942 ("tools: add 7z host package")
Suggested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
20 months agoustream-ssl: prevent unused crypto lib dependencies from being compiled
Boris Krasnovskiy [Fri, 22 Jul 2022 15:06:38 +0000 (11:06 -0400)]
ustream-ssl: prevent unused crypto lib dependencies from being compiled

Prevented unused crypto lib dependencies from being compiled

Signed-off-by: Boris Krasnovskiy <borkra@gmail.com>
20 months agohostapd: prevent unused crypto lib dependencies from being compiled
Boris Krasnovskiy [Fri, 22 Jul 2022 15:06:10 +0000 (11:06 -0400)]
hostapd: prevent unused crypto lib dependencies from being compiled

Prevented unused crypto lib dependencies from being compiled

Signed-off-by: Boris Krasnovskiy <borkra@gmail.com>
20 months agowolfssl: fix math library build
John Audia [Thu, 21 Jul 2022 19:59:30 +0000 (15:59 -0400)]
wolfssl: fix math library build

Apply upstream patch[1] to fix breakage around math libraries.
This can likely be removed when 5.5.0-stable is tagged and released.

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

1. https://github.com/wolfSSL/wolfssl/pull/5390

Signed-off-by: John Audia <therealgraysky@proton.me>
20 months agolibcap: update to 2.65
Nick Hainke [Tue, 26 Jul 2022 14:18:51 +0000 (16:18 +0200)]
libcap: update to 2.65

Changes:
a47d86d Up the release version to 2.65
fc99e56 Include more signatures in pgp.keys.asc.
52288cc Close out this comment in the go/Makefile
eb0f1df Prevent 'capsh --user=xxx --' from generating a bash error.
9a95791 Improve documentation for cap_get_pid and cap_reset_ambient.
21d08b0 Fix syntax error in DEBUG protected setcap.c code.
9425048 More useful captree usage string and man page.

Signed-off-by: Nick Hainke <vincent@systemli.org>
20 months agolibcap: update to 2.64
Nick Hainke [Tue, 26 Jul 2022 14:16:27 +0000 (16:16 +0200)]
libcap: update to 2.64

Changes:
38cfa2e Up the release version to 2.64
7617af6 Avoid a deadlock in forked psx thread exit.
fc029cb Include LIBCAP_{MAJOR,MINOR} #define's in sys/capability.h
ceaa591 Clarify how the cap_get_pid() argument is interpreted.
15cacf2 Fix prctl return code/errno handling in libcap.
aae9374 Be explicit about CGO_ENABLED=1 for compare-cap build.
66a8a14 psx: free allocated memory at exit.

Signed-off-by: Nick Hainke <vincent@systemli.org>
20 months agomtools: update to 4.0.40
Nick Hainke [Tue, 26 Jul 2022 14:46:44 +0000 (16:46 +0200)]
mtools: update to 4.0.40

Changes:
- Remove libbsd dependency
- Better compatibility with legacy platforms such as AT&T UnixPC
- Upgraded to autoconf 2.71

Signed-off-by: Nick Hainke <vincent@systemli.org>
20 months agoodhcp6c: update to latest git HEAD
Dávid Benko [Fri, 29 Jul 2022 12:55:21 +0000 (14:55 +0200)]
odhcp6c: update to latest git HEAD

9212bfc odhcp6c: fix IA discard when T1 > 0 and T2 = 0

Signed-off-by: Dávid Benko <davidbenko@davidbenko.dev>
20 months agokernel: add kmod-nvme package
Daniel Golle [Tue, 26 Jul 2022 08:17:07 +0000 (10:17 +0200)]
kernel: add kmod-nvme package

Add driver for NVM Express block devices, ie. PCIe connected SSDs.

Targets which allow booting from NVMe (x86, maybe some mvebu boards come
to mind) should have it built-in, so rootfs can be mounted from there.
For targets without NVMe support in bootloader or BIOS/firmware it's
sufficient to provide the kernel module package.

On targets having the NVMe driver built-in the resulting kmod package
is an empty dummy. In any case, depending on or installing kmod-nvme
results in driver support being available (either because it was already
built-in or because the relevant kernel modules are added and loaded).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
20 months agoimage-commands: fix generating out-of-tree DTO
Daniel Golle [Thu, 14 Jul 2022 03:25:36 +0000 (04:25 +0100)]
image-commands: fix generating out-of-tree DTO

Hack path so DTO generation works also for out-of-tree device tree
sources which currently fail.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
20 months agouboot-mediatek: reorder patches
Daniel Golle [Sun, 17 Jul 2022 20:41:31 +0000 (21:41 +0100)]
uboot-mediatek: reorder patches

Rename/reorder patches to avoid duplicate usage of 300-* prefix.
No functional changes.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
20 months agowolfssl: make shared again
Jo-Philipp Wich [Sun, 24 Jul 2022 11:23:36 +0000 (13:23 +0200)]
wolfssl: make shared again

Disable the usage of target specific CPU crypto instructions by default
to allow the package being shared again. Since WolfSSL does not offer
a stable ABI or a long term support version suitable for OpenWrt release
timeframes, we're forced to frequently update it which is greatly
complicated by the package being nonshared.

People who want or need CPU crypto instruction support can enable it in
menuconfig while building custom images for the few platforms that support
them.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
20 months agokernel: bump 5.10 to 5.10.134
John Audia [Fri, 29 Jul 2022 16:25:26 +0000 (12:25 -0400)]
kernel: bump 5.10 to 5.10.134

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
20 months agox86: update defconfig for 5.10.133
John Audia [Mon, 25 Jul 2022 14:16:43 +0000 (10:16 -0400)]
x86: update defconfig for 5.10.133

Add some new/missing symbols relating to speculative execution mitigations[1].

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v5.10.133&id2=v5.10.132

Signed-off-by: John Audia <therealgraysky@proton.me>
20 months agokernel: bump 5.10 to 5.10.133
John Audia [Mon, 25 Jul 2022 13:21:12 +0000 (09:21 -0400)]
kernel: bump 5.10 to 5.10.133

All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
20 months agokernel: bump 5.10 to 5.10.132
John Audia [Thu, 21 Jul 2022 20:19:32 +0000 (16:19 -0400)]
kernel: bump 5.10 to 5.10.132

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
20 months agobcm4908: enable & setup packet steering
Rafał Miłecki [Thu, 28 Jul 2022 15:46:33 +0000 (17:46 +0200)]
bcm4908: enable & setup packet steering

Without packet steering NAT masquarade speed on BCM4908 /jumps/ between
two speeds:
1. 826 Mb/s (±3 Mb/s)
2. 909 Mb/s (±8 Mb/s)
and it never reaches ~940 Mb/s.

Proper packet steering can improve it. Below are testing results for
running iperf TCP traffic from LAN to WAN. They were used to pick up
golden values.

┌──────────┬──────────┬───────────┐
│   eth0   │  br-lan  │   speed   │
│ rps_cpus │ rps_cpus │   [Mbps]  │
├──────────┼──────────┼───────────┤
│        0 │        0 │ 743 / 804 │
│        0 │        1 │ 738 / 821 │
│        0 │        2 │     ✓ 940 │
│        0 │        4 │     ✓ 938 │
│        0 │        8 │     ✓ 941 │
├──────────┼──────────┼───────────┤
│        1 │        0 │       829 │
│        1 │        1 │       829 │
│        1 │        2 │     ✓ 942 │
│        1 │        4 │     ✓ 941 │
│        1 │        8 │     ✓ 941 │
├──────────┼──────────┼───────────┤
│        2 │        0 │     ✓ 942 │
│        2 │        1 │       926 │
│        2 │        2 │     ✓ 942 │
│        2 │        4 │     ✓ 942 │
│        2 │        8 │     ✓ 941 │
├──────────┼──────────┼───────────┤
│        4 │        0 │     ✓ 941 │
│        4 │        1 │       925 │
│        4 │        2 │     ✓ 941 │
│        4 │        4 │     ✓ 941 │
│        4 │        8 │     ✓ 941 │
├──────────┼──────────┼───────────┤
│        8 │        0 │     ✓ 942 │
│        8 │        1 │       925 │
│        8 │        2 │     ✓ 941 │
│        8 │        4 │     ✓ 942 │
│        8 │        8 │     ✓ 942 │
└──────────┴──────────┴───────────┘

Ref: fcbd39689ebfe ("bcm53xx: enable & setup packet steering")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
20 months agoRevert "realtek: remove support for HPE 1920 series"
Daniel Golle [Thu, 28 Jul 2022 14:45:03 +0000 (16:45 +0200)]
Revert "realtek: remove support for HPE 1920 series"

This reverts commit a63aeaecf1f3387df020854c9b22a365207399ce.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
20 months agofirmware-utils: update to git HEAD
Daniel Golle [Thu, 28 Jul 2022 14:43:17 +0000 (16:43 +0200)]
firmware-utils: update to git HEAD

 4f8d03d mkh3cimg: add image tool for H3C devices
 2483fe7 mkh3cvfs: add filesystem tool for H3C devices

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
20 months agorealtek: remove support for HPE 1920 series
Sander Vanheule [Thu, 28 Jul 2022 13:13:52 +0000 (15:13 +0200)]
realtek: remove support for HPE 1920 series

Support for HPE 1920 images depends on two non-existent tools (mkh3cimg
and mkh3cvfs) from the in the firmware-utils package. Revert commit
f2f09bc00280 ("realtek: add support for HPE 1920 series") until support
for these tools is merged and made available in OpenWrt.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
20 months agorealtek: add support for HPE 1920 series
Jan Hoffmann [Sat, 23 Jul 2022 20:53:19 +0000 (22:53 +0200)]
realtek: add support for HPE 1920 series

Hardware information:
---------------------

- HPE 1920-8G:
  - RTL8380 SoC
  - 8 Gigabit RJ45 ports (built-in RTL8218B)
  - 2 SFP ports (built-in SerDes)

- HPE 1920-16G / HPE 1920-24G (same board):
  - RTL8382 SoC
  - 16/24 Gigabit RJ45 ports (built-in RTL8218B, 1/2 external RTL8218D)
  - 4 SFP ports (external RTL8214FC)

- Common:
  - RJ45 RS232 port on front panel
  - 32 MiB NOR Flash
  - 128 MiB DDR3 DRAM
  - PT7A7514 watchdog

Booting initramfs image:
------------------------

- Prepare a FTP or TFTP server serving the OpenWrt initramfs image and
  connect the server to a switch port.

- Connect to the console port of the device and enter the extended
  boot menu by typing Ctrl+B when prompted.

- Choose the menu option "<3> Enter Ethernet SubMenu".

- Set network parameters via the option "<5> Modify Ethernet Parameter".
  Enter the FTP/TFTP filename as "Load File Name" ("Target File Name"
  can be left blank, it is not required for booting from RAM). Note that
  the configuration is saved on flash, so it only needs to be done once.

- Select "<1> Download Application Program To SDRAM And Run".

Initial installation:
---------------------

- Boot an initramfs image as described above, then use sysupgrade to
  install OpenWrt permanently. After initial installation, the
  bootloader needs to be configured to load the correct image file

- Enter the extended boot menu again and choose "<4> File Control",
  then select "<2> Set Application File type".

- Enter the number of the file "openwrt-kernel.bin" (should be 1), and
  use the option "<1> +Main" to select it as boot image.

- Choose "<0> Exit To Main Menu" and then "<1> Boot System".

NOTE: The bootloader on these devices can only boot from the VFS
filesystem which normally spans most of the flash. With OpenWrt, only
the first part of the firmware partition contains a valid filesystem,
the rest is used for rootfs. As the bootloader does not know about this,
you must not do any file operations in the bootloader, as this may
corrupt the OpenWrt installation (selecting the boot image is an
exception, as it only stores a flag in the bootloader data, but doesn't
write to the filesystem).

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
20 months agotools: add 7z host package
Jan Hoffmann [Sat, 23 Jul 2022 20:53:18 +0000 (22:53 +0200)]
tools: add 7z host package

Add the 7zr command line tool, which is a version of the 7z application
that only supports 7z archives.

7z is one of the two compression formats supported in H3C firmware
images (the alternative would be ARJ).

(Alternatively, the 7zr command line tool could also be built from a
current version of the public-domain LZMA SDK. That would require
repackaging the source package, as it is only provided in 7z format.)

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
20 months agokernel: mtdsplit: add support for H3C VFS filesystem
Jan Hoffmann [Sat, 23 Jul 2022 20:53:17 +0000 (22:53 +0200)]
kernel: mtdsplit: add support for H3C VFS filesystem

The bootloader on some H3C devices (for example HPE 1920 switches) only
supports booting from flash by reading an image from an "VFS" filesystem
which spans most of the available flash. The filesystem size is hard-
coded in the bootloader. However, as long as no write operations are
performed in the bootloader menu, it is sufficient if the start of the
partition contains a valid filesystem with the kernel image.

This mtdsplit parser reads the size and location of the kernel image and
finds the location of the rootfs stored after it. It assumes that the
filesystem image matches the layout of one generated by mkh3cvfs, with
a filename of "openwrt-kernel.bin" for the kernel image.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
20 months agorealtek: clean up rtl838x MDIO busy wait loop
Jan Hoffmann [Sat, 23 Jul 2022 20:53:16 +0000 (22:53 +0200)]
realtek: clean up rtl838x MDIO busy wait loop

Don't use udelay to allow other kernel tasks to execute if the kernel
has been built without preemption. Also determine the timeout based on
jiffies instead of loop iterations.

This is especially important on devices containing a watchdog with a
short timeout. Without this change, the watchdog is not serviced during
PHY patching which can take multiple seconds.

Tested-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
20 months agorealtek: add SFP support for RTL8214FC PHY
Jan Hoffmann [Sat, 23 Jul 2022 20:53:15 +0000 (22:53 +0200)]
realtek: add SFP support for RTL8214FC PHY

Probe the SFP module during PHY initialization and implement
insertion/removal handlers to automatically configure the media type
of the respective port.

Suggested-by: Birger Koblitz <git@birger-koblitz.de>
Tested-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
20 months agorealtek: rtl83xx-phy: decouple RTL8214FC media change and power config
Jan Hoffmann [Sat, 23 Jul 2022 20:53:14 +0000 (22:53 +0200)]
realtek: rtl83xx-phy: decouple RTL8214FC media change and power config

Move RTL8214FC power configuration to newly created suspend and resume
methods. A media change now only results in power configuration if the
PHY is not suspended, to avoid powering up a port when the interface is
currently not up.

While at it, remove the rtl8380 prefix from function names, as this is
actually not SoC-specific.

Tested-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
20 months agorealtek: rtl83xx-phy: fix RTL8214FC media change
Jan Hoffmann [Sat, 23 Jul 2022 20:53:13 +0000 (22:53 +0200)]
realtek: rtl83xx-phy: fix RTL8214FC media change

Toggle power on the individual PHY instead of the package. Otherwise
a media change always toggles power on the first port, and not the one
that is being configured.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
20 months agorealtek: make DGS-1210 u-boot-env partition writeable
Markus Stockhausen [Fri, 8 Jul 2022 15:27:22 +0000 (17:27 +0200)]
realtek: make DGS-1210 u-boot-env partition writeable

We are close to provide enduser friendly OpenWrt images for DGS-1210
switches that do not need serial console. Nevertheless a small bit is
missing. We cannot switch back to the vendor partition or initiate a
download of a vendor firmware image. To issue this from inside OpenWrt
we need write access to U-Boot environment.

Case 1: Switch back to secondary (vendor) image
> fw_setenv bootcmd run addargs\; bootm 0xb4e80000
> fw_setenv image /dev/mtdblock7
> reboot

Case 2: Issue D-Link Network Assistant based download on next reboot.
This is a combination of some vendor specific protocol (DDP) and a
TFTP download afterwards.
> fw_setenv bootstop on
> reboot

Allow these commands by opening up u-boot-env for write access.
Tested on DGS-1210-20.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
20 months agouboot-bcm4908: include SoC in output files
Rafał Miłecki [Wed, 20 Jul 2022 11:47:06 +0000 (13:47 +0200)]
uboot-bcm4908: include SoC in output files

This fixes problem of overwriting BCM4908 U-Boot and DTB files by
BCM4912 ones. That bug didn't allow booting BCM4908 devices.

Fixes: f4c2dab544ec2 ("uboot-bcm4908: add BCM4912 build")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
20 months agobcm4908: build bootfs image per-SoC
Rafał Miłecki [Wed, 20 Jul 2022 11:47:05 +0000 (13:47 +0200)]
bcm4908: build bootfs image per-SoC

In theory we could have just 1 bootfs image for all devices as each
device has its own entry in the "configurations" node. It doesn't work
well with default configuration though.

If something goes wrong U-Boot SPL can be interrupted (by pressing A) to
enter its minimalistic menu. It allows ignoring boardid. In such case
bootfs default configuration is used.

For above reason each SoC family (BCM4908, BCM4912) should have its own
bootfs built. It allows each of them to have working default
configuration.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
20 months agoCI: run inside the buildbot docker container
Paul Spooren [Sun, 20 Mar 2022 15:31:24 +0000 (15:31 +0000)]
CI: run inside the buildbot docker container

Run github actions insider buildbot docker container.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[ run container under buildbot user ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
20 months agoCI: add Kernel compile tests
Paul Spooren [Wed, 9 Mar 2022 17:22:22 +0000 (18:22 +0100)]
CI: add Kernel compile tests

Add Github Actions yaml script to build test kernel PR changes for
each target.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[ add commit description ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
20 months agoscripts: ext-toolchain: add support for musl
Christian Marangi [Sun, 17 Jul 2022 15:56:59 +0000 (17:56 +0200)]
scripts: ext-toolchain: add support for musl

Openwrt now supports only glibc and musl. Add support for musl and
rework the libc check to handle the new config flags and correctly
compile package basend on that.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
20 months agoscripts: ext-toolchain: add support for info.mk in probe_cc
Christian Marangi [Sun, 17 Jul 2022 15:56:36 +0000 (17:56 +0200)]
scripts: ext-toolchain: add support for info.mk in probe_cc

Openwrt generate info.mk that contains the libc type. For probe_cc check
if the file exist and parse directly it for LIBC type.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
20 months agoscripts: ext-toolchain: actually probe libc type on config generation
Christian Marangi [Sun, 17 Jul 2022 15:53:58 +0000 (17:53 +0200)]
scripts: ext-toolchain: actually probe libc type on config generation

Currently we never call probe_cc before config generation, this cause
the script to never actually detect the correct libc type.
Call probe_cc before config generation to correctl set the .config file.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
20 months agoscripts: ext-toolchain: add option to overwrite config
Christian Marangi [Mon, 4 Jul 2022 16:22:18 +0000 (18:22 +0200)]
scripts: ext-toolchain: add option to overwrite config

It can be useful to overwrite an already generated config.
Option are simply added at the end of the config and make defconfig
will overwrite the relevant option with the new one.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
20 months agoscripts: ext-toolchain: fix wrong prefix in print_config generation
Christian Marangi [Sun, 3 Jul 2022 00:20:11 +0000 (02:20 +0200)]
scripts: ext-toolchain: fix wrong prefix in print_config generation

The parsed prefix in print_config is wrong and this produce broken
generated .config that won't work with any external toolchain.

Currently the prefix from a CC of

'arm-openwrt-linux-muslgnueabi-gcc-12.1.0'

produce a prefix

'arm-openwrt-linux-muslgnueabi-gcc-'

This is wrong as the real prefix should be

'arm-openwrt-linux-muslgnueabi-'

This is probably caused by a change in how the toolchain is now handled
that now append also the gcc version. Probably in ancient days the
version wasn't part of the name and the prefix generation stripped the
'-gcc' instead of the gcc version.

Fix this and correctly strip the gcc version and the gcc suffix to
correctly call toolchain bins.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
20 months agorules_mk: don't include wrapped bin with external toolchains
Christian Marangi [Sun, 3 Jul 2022 00:06:21 +0000 (02:06 +0200)]
rules_mk: don't include wrapped bin with external toolchains

Don't add wrapped bin to the TARGET_PATH as it does cause compilation
error.

cmake.mk will use the "command -v" and will use the wrapped bin instead
of the external toolchain bin as they have the same name and command
will select the first result.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
20 months agorules_mk: use gcc versions for external toolchain
Vincent Wiemann [Mon, 28 Dec 2020 15:00:13 +0000 (16:00 +0100)]
rules_mk: use gcc versions for external toolchain

When using the OpenWrt toolchain as an external toolchain the build
failed due to missing LTO support. By choosing the GCC wrappers of
the tools this commit makes sure that the LTO-enabled executables
are being used.

Signed-off-by: Vincent Wiemann <vincent.wiemann@ironai.com>
[ wrap the commit description to 72 char ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
20 months agolantiq: fix network port GPIO settings for Fritzbox 3390
Daniel Kestrel [Fri, 22 Jul 2022 19:01:49 +0000 (21:01 +0200)]
lantiq: fix network port GPIO settings for Fritzbox 3390

There are forum reports that 2 LAN ports are not working, the
GPIO settings are adjusted to fix the problem.

Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
20 months agoipq806x: Archer VR2600: fix switch ports numbering
Christian Lamparter [Tue, 19 Jul 2022 17:46:38 +0000 (19:46 +0200)]
ipq806x: Archer VR2600: fix switch ports numbering

The order of LAN ports shown in Luci is reversed compared to what is
written on the case of the device.  Fix the order so that they match.

Fixes: #10275
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
20 months agolayerscape: update remaining PKG_HASH / PKG_MIRROR_HASH
Christian Lamparter [Tue, 19 Jul 2022 18:11:02 +0000 (20:11 +0200)]
layerscape: update remaining PKG_HASH / PKG_MIRROR_HASH

The change of the PKG_VERSION caused the hash of the package to
change. This is because the PKG_VERSION is present in the
internal directory structure of the archive.

Fixes: e879cccaa215 ("uboot-layerscape: update PKG_HASH")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
20 months agogeneric: 5.15: Disable more config symbols
Martin Blumenstingl [Mon, 21 Mar 2022 17:50:11 +0000 (18:50 +0100)]
generic: 5.15: Disable more config symbols

These came up while trying to build the lantiq target with Linux 5.15.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
20 months agorealtek: clear spurious GPIO interrupts
Sander Vanheule [Thu, 21 Jul 2022 20:43:39 +0000 (22:43 +0200)]
realtek: clear spurious GPIO interrupts

The interrupt controller in the internal GPIO peripheral will sometimes
generate spurious interrupts. If these are not properly acknowledged, the
system will be held busy until reboot. These spurious interrupts are identified
by the fact that there is no system IRQ number associated, since the interrupt
line was never allocated. Although most prevalent on RTL839x, RTL838x SoCs have
also displayed this behaviour.

Reported-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> # DGS-1210-52
Reported-by: Birger Koblitz <mail@birger-koblitz.de> # Netgear GS724TP v2
Reported-by: Jan Hoffmann <jan@3e8.eu> # HPE 1920-16G
Signed-off-by: Sander Vanheule <sander@svanheule.net>
21 months agoramips: add support for ZyXEL NWA50AX / NWA55AXE
David Bauer [Fri, 27 May 2022 15:48:06 +0000 (17:48 +0200)]
ramips: add support for ZyXEL NWA50AX / NWA55AXE

Hardware
--------
CPU:    Mediatek MT7621
RAM:    256M DDR3
FLASH:  128M NAND
ETH:    1x Gigabit Ethernet
WiFi:   Mediatek MT7915 (2.4/5GHz 802.11ax 2x2 DBDC)
BTN:    1x Reset (NWA50AX only)
LED:    1x Multi-Color (NWA50AX only)

UART Console
------------
NWA50AX:
Available below the rubber cover next to the ethernet port.
NWA55AXE:
Available on the board when disassembling the device.

Settings: 115200 8N1

Layout:

<12V> <LAN> GND-RX-TX-VCC

Logic-Level is 3V3. Don't connect VCC to your UART adapter!

Installation Web-UI
-------------------
Upload the Factory image using the devices Web-Interface.

As the device uses a dual-image partition layout, OpenWrt can only
installed on Slot A. This requires the current active image prior
flashing the device to be on Slot B.

If the currently installed image is started from Slot A, the device will
flash OpenWrt to Slot B. OpenWrt will panic upon first boot in this case
and the device will return to the ZyXEL firmware upon next boot.

If this happens, first install a ZyXEL firmware upgrade of any version
and install OpenWrt after that.

Installation TFTP
-----------------
This installation routine is especially useful in case
 * unknown device password (NWA55AXE lacks reset button)
 * bricked device

Attach to the UART console header of the device. Interrupt the boot
procedure by pressing Enter.

The bootloader has a reduced command-set available from CLI, but more
commands can be executed by abusing the atns command.

Boot a OpenWrt initramfs image available on a TFTP server at
192.168.1.66. Rename the image to owrt.bin

 $ atnf owrt.bin
 $ atna 192.168.1.88
 $ atns "192.168.1.66; tftpboot; bootm"

Upon booting, set the booted image to the correct slot:

 $ zyxel-bootconfig /dev/mtd10 get-status
 $ zyxel-bootconfig /dev/mtd10 set-image-status 0 valid
 $ zyxel-bootconfig /dev/mtd10 set-active-image 0

Copy the OpenWrt ramboot-factory image to the device using scp.
Write the factory image to NAND and reboot the device.

 $ mtd write ramboot-factory.bin firmware
 $ reboot

Signed-off-by: David Bauer <mail@david-bauer.net>
21 months agobcm4908: prepare for Asus GT-AX6000 support
Rafał Miłecki [Wed, 20 Jul 2022 18:03:56 +0000 (20:03 +0200)]
bcm4908: prepare for Asus GT-AX6000 support

It isn't tested & Linux DT will surely need more work.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
21 months agobcm4908: backport bcmbca DT patches queued for 5.20
Rafał Miłecki [Wed, 20 Jul 2022 16:12:31 +0000 (18:12 +0200)]
bcm4908: backport bcmbca DT patches queued for 5.20

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
21 months agowolfssl: Do not activate HW acceleration on armvirt by default
Hauke Mehrtens [Mon, 18 Jul 2022 21:06:00 +0000 (23:06 +0200)]
wolfssl: Do not activate HW acceleration on armvirt by default

The armvirt target is also used to run OpenWrt in lxc on other targets
like a Raspberry Pi. If we set WOLFSSL_HAS_CPU_CRYPTO by default the
wolfssl binray is only working when the CPU supports the hardware crypto
extension.

Some targets like the Raspberry Pi do not support the ARM CPU crypto
extension, compile wolfssl without it by default. It is still possible
to activate it in custom builds.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
21 months agotools/libressl: bump to v3.5.3
Andre Heider [Tue, 19 Jul 2022 11:31:31 +0000 (13:31 +0200)]
tools/libressl: bump to v3.5.3

This includes API additions required for u-boot v2022.07 and Python 3.10.

https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.5.0-relnotes.txt
https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.5.1-relnotes.txt
https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.5.2-relnotes.txt
https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.5.3-relnotes.txt

Signed-off-by: Andre Heider <a.heider@gmail.com>
21 months agouencrypt: add package to decrypt WG4хх223 config
Eneas U de Queiroz [Fri, 8 Jul 2022 14:08:21 +0000 (11:08 -0300)]
uencrypt: add package to decrypt WG4хх223 config

This adds a simple AES-128-CBC encryption/decryption program using
either wolfSSL or OpenSSL as backend to decrypt Arcadyan WG4xx223
configuration partitions.  The ipk size is 3,355 bytes.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
21 months agoramips: add support for Netgear WAX202
Wenli Looi [Sat, 2 Jul 2022 20:18:59 +0000 (20:18 +0000)]
ramips: add support for Netgear WAX202

Netgear WAX202 is an 802.11ax (Wi-Fi 6) router.

Specifications:
* SoC: MT7621A
* RAM: 512 MiB NT5CC256M16ER-EK
* Flash: NAND 128 MiB F59L1G81MB-25T
* Wi-Fi:
  * MT7915D: 2.4/5 GHz (DBDC)
* Ethernet: 4x 1GbE
  * Switch: SoC built-in
* USB: None
* UART: 115200 baud (labeled on board)

Load addresses (same as ipTIME AX2004M):
* stock
  * 0x80010000: FIT image
  * 0x81001000: kernel image -> entry
* OpenWrt
  * 0x80010000: FIT image
  * 0x82000000: uncompressed kernel+relocate image
  * 0x80001000: relocated kernel image -> entry

Installation:
* Flash the factory image through the stock web interface, or TFTP to
  the bootloader. NMRP can be used to TFTP without opening the case.
* Note that the bootloader accepts both encrypted and unencrypted
  images, while the stock web interface only accepts encrypted ones.

Revert to stock firmware:
* Flash the stock firmware to the bootloader using TFTP/NMRP.

References in WAX202 GPL source:
https://www.downloads.netgear.com/files/GPL/WAX202_V1.0.5.1_Source.rar

* openwrt/target/linux/ramips/dts/mt7621-ax-nand-wax202.dts
  DTS file for this device.

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
21 months agoimage: add support for Netgear encrypted image
Wenli Looi [Sat, 2 Jul 2022 20:16:21 +0000 (20:16 +0000)]
image: add support for Netgear encrypted image

Netgear encrypted image is used in various devices including WAX202,
WAX206, and EX6400v3. This image format also requires a dummy squashfs4
image which is added here as well.

References in WAX202 GPL source:
https://www.downloads.netgear.com/files/GPL/WAX202_V1.0.5.1_Source.rar

* openwrt/bootloader/u-boot-mt7621-2018.09-gitb178829-20200526/board/ralink/common/dual_image.c
  Bootloader code that verifies the presence of a squashfs4 image, thus
  a dummy image is added here.

* openwrt/tools/imgencoder/src/gj_enc.c
  Contains code that generates the encrypted image. There is support for
  adding an RSA signature, but it does not look like the signature is
  verified by the stock firmware or bootloader.

* openwrt/tools/imgencoder/src/imagekey.h
  Contains the encryption key and IV. It appears the same key/IV is used
  for other Netgear devices including WAX206 and EX6400v3.

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
21 months agoramips: Add support command fw_setsys for Xiaomi routers
Oleg S [Tue, 19 Jul 2022 12:06:50 +0000 (15:06 +0300)]
ramips: Add support command fw_setsys for Xiaomi routers

The system parameters are contained in the Bdata partition.
To use the fw_setsys command, you need to create a file
fw_sys.config.
This file is created after calling the functions
ubootenv_add_uci_sys_config and ubootenv_add_app_config.

Signed-off-by: Oleg S <remittor@gmail.com>
[ wrapped commit description to 72 char ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agomt7622: remove 300 MHz from dts
John Audia [Wed, 6 Jul 2022 15:49:50 +0000 (11:49 -0400)]
mt7622: remove 300 MHz from dts

Due to the bug described here[1], remove the 300 MHz clock to avoid a low
voltage condition that can cause a hang when rebooting the RT3200/E8450.

This solution is probably better than the script-based work-around[2].

1. https://forum.openwrt.org/t/belkin-rt3200-linksys-e8450-wifi-ax-discussion/94302/1490
2. https://github.com/openwrt/openwrt/pull/5025

Signed-off-by: John Audia <therealgraysky@proton.me>
Tested-by: Rui Salvaterra <rsalvaterra@gmail.com>
Tested-by: John Audia <therealgraysky@proton.me>
21 months agokernel: switch back 5.15 to fw_devlink=permissive
Rafał Miłecki [Tue, 19 Jul 2022 04:22:31 +0000 (06:22 +0200)]
kernel: switch back 5.15 to fw_devlink=permissive

Kernel switching to fw_devlink=on as default broke probing some devices.
Revert it until we get a proper fix.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
21 months agokernel: bump 5.10 to 5.10.131
John Audia [Fri, 15 Jul 2022 21:56:32 +0000 (17:56 -0400)]
kernel: bump 5.10 to 5.10.131

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
21 months agokernel: bump 5.10 to 5.10.130
John Audia [Tue, 12 Jul 2022 15:51:28 +0000 (11:51 -0400)]
kernel: bump 5.10 to 5.10.130

All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
21 months agokernel: bump 5.10 to 5.10.129
John Audia [Mon, 11 Jul 2022 15:04:30 +0000 (11:04 -0400)]
kernel: bump 5.10 to 5.10.129

All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
21 months agokernel: bump 5.10 to 5.10.128
John Audia [Mon, 11 Jul 2022 13:23:19 +0000 (09:23 -0400)]
kernel: bump 5.10 to 5.10.128

No patches needed to be rebased, just updated checksums

Signed-off-by: John Audia <therealgraysky@proton.me>
21 months agobcm4908: use upstream-accepted watchdog patches
Rafał Miłecki [Mon, 18 Jul 2022 13:44:32 +0000 (15:44 +0200)]
bcm4908: use upstream-accepted watchdog patches

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
21 months agobcm4908: backport latest DT patches
Rafał Miłecki [Mon, 18 Jul 2022 13:11:02 +0000 (15:11 +0200)]
bcm4908: backport latest DT patches

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
21 months agokernel: update leds-bcm63138 driver
Rafał Miłecki [Mon, 18 Jul 2022 13:06:11 +0000 (15:06 +0200)]
kernel: update leds-bcm63138 driver

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
21 months agokernel: backport mtk wlan flow offloading fix
Felix Fietkau [Mon, 18 Jul 2022 13:13:56 +0000 (15:13 +0200)]
kernel: backport mtk wlan flow offloading fix

Signed-off-by: Felix Fietkau <nbd@nbd.name>
21 months agoipq40xx: add MikroTik wAP ac (RBwAPG-5HacD2HnD) support
Mark Mentovai [Mon, 4 Oct 2021 14:48:29 +0000 (10:48 -0400)]
ipq40xx: add MikroTik wAP ac (RBwAPG-5HacD2HnD) support

The MikroTik wAP ac (RBwAPG-5HacD2HnD) is a dual-band dual-radio
802.11ac wireless access point with integrated antenna and two Ethernet
ports in a weatherproof enclosure. See
https://mikrotik.com/product/wap_ac for more information.

Important: this is the new ipq40xx-based wAP ac, not the older
ath79-based wAP ac (RBwAPG-5HacT2HnD), already supported in OpenWrt.

Specifications:
 - SoC: Qualcomm Atheros IPQ4018
 - CPU: 4x ARM Cortex A7
 - RAM: 128MB
 - Storage: 16MB NOR flash
 - Wireless
    - 2.4GHz: Built-in IPQ4018 (SoC) 802.11b/g/n 2x2:2, 2.5 dBi antennae
    - 5GHz: Built-in IPQ4018 (SoC) 802.11a/n/ac 2x2:2, 2.5 dBi antennae
 - Ethernet: Built-in IPQ4018 (SoC, QCA8075), 2x 1000/100/10Mb/s ports,
   one with 802.3af/at PoE in

Installation:
Boot the initramfs image via TFTP, then flash the sysupgrade image using
sysupgrade. Details at https://openwrt.org/toh/mikrotik/common.

Notes:
This preserves the MAC addresses of the physical Ethernet ports:
 - eth0 corresponds to the physical port labeled ETH1 and has the base
   MAC address. This port can be used to power the device.
 - eth1 corresponds to the physical port labeled ETH2 and has a MAC
   address one greater than the base.

MAC addresses are set from /lib/preinit/05_set_iface_mac_ipq40xx.sh
rather than /etc/board.d/02_network so that they are in effect for
preinit. This should likely be done for other MikroTik devices and
possibly other non-MikroTik devices as well.

As this device has 2 physical ports, they are each connected to their
respective PHYs, allowing the link status to be visible to software.
Since they are not marked on the case with any role (such as LAN or
WAN), both are bridged to the lan network by default, although this can
easily be changed if needed.

Signed-off-by: Mark Mentovai <mark@mentovai.com>
21 months agokernel: backport LEDs driver for BCMBCA devices
Rafał Miłecki [Sun, 17 Jul 2022 13:10:01 +0000 (15:10 +0200)]
kernel: backport LEDs driver for BCMBCA devices

This includes BCM63xx and BCM4908 families.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
21 months agolibiconv-full: add host build
Rosen Penev [Thu, 21 Oct 2021 23:09:59 +0000 (16:09 -0700)]
libiconv-full: add host build

Now that libiconv-stub is gone, a replacement for its host build is
needed.

Fixes: c0ba4201f837 ("libiconv-stub: remove")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
21 months agosdk: add spidev-test to the bundle of userspace sources
Christian Lamparter [Fri, 15 Jul 2022 23:34:44 +0000 (01:34 +0200)]
sdk: add spidev-test to the bundle of userspace sources

moves and extends the current facilities, which have been
added some time ago for the the usbip utility, to support
more utilites that are shipped with the Linux kernel tree
to the SDK.

this allows to drop all the hand-waving and code for
failed previous attempts to mitigate the SDK build failures.

Fixes: bdaaf66e28bd ("utils/spidev_test: build package directly from Linux")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
21 months agokernel: netconsole: add network console logging support
Catalin Toda [Fri, 15 Jul 2022 17:18:23 +0000 (10:18 -0700)]
kernel: netconsole: add network console logging support

Accessing the console on many devices is difficult.
netconsole eases debugging on devices that crash
after the network is up.

Reference to the netconsole documentation in upstream Linux:
<https://www.kernel.org/doc/html/latest/networking/netconsole.html>
|
|netconsole=[+][src-port]@[src-ip]/[<dev>],[tgt-port]@<tgt-ip>/[tgt-macaddr]
|
| where
|  +            if present, enable extended console support
|  src-port     source for UDP packets (defaults to 6665)
|  src-ip       source IP to use (interface address)
|  dev          network interface (eth0)
|  tgt-port     port for logging agent (6666)
|  tgt-ip       IP address for logging agent
|  tgt-macaddr  ethernet MAC address for logging agent (broadcast)

OpenWrt specific notes:

OpenWrt's device userspace scripts are attaching the network
interface (i.e. eth0) to a (virtual) bridge (br-lan) device.
This will cause netconsole to report:
|network logging stopped on interface eth0 as it is joining a master device
(and unfortunately the traffic/logs to stop at this point)

As a workaround, the netconsole module can be manually loaded
again after the bridge has been setup with:

 insmod netconsole netconsole=@/br-lan,@192.168.1.x/MA:C...

One way of catching errors before the handoff, try to
append the /etc/modules.conf file with the following extra line:
 options netconsole netconsole=@/eth0,@192.168.1.x/MA:C...

and install the kmod-netconsole (=y) into the base image.

Signed-off-by: Catalin Toda <catalinii@yahoo.com>
(Added commit message from PR, added links to documentation)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
21 months agouboot-layerscape: update PKG_HASH
Christian Lamparter [Fri, 15 Jul 2022 19:07:42 +0000 (21:07 +0200)]
uboot-layerscape: update PKG_HASH

The change of the PKG_VERSION caused the hash of the package to
change. This is because the PKG_VERSION is present in the
internal directory structure of the uboot-layerscape-21.08.tar.xz
archive.

i.e:
 # tar tf uboot-layerscape-21.08.tar.xz:

uboot-layerscape-21.08/
uboot-layerscape-21.08/.azure-pipelines.yml
uboot-layerscape-21.08/.checkpatch.conf
uboot-layerscape-21.08/.gitattributes
uboot-layerscape-21.08/.github/
[...]

vs.

 # tar tf uboot-layerscape-LSDK-21.08.tar.xz
uboot-layerscape-LSDK-21.08/
uboot-layerscape-LSDK-21.08/.azure-pipelines.yml
uboot-layerscape-LSDK-21.08/.checkpatch.conf
uboot-layerscape-LSDK-21.08/.gitattributes
uboot-layerscape-LSDK-21.08/.github/
[...]

the (file) content of both archives are otherwise the same.

The PKG_HASH was taken from the builder log:
| Hash of the local file uboot-layerscape-21.08.tar.xz does not match
|(file: 54909a98bdcc26c7f9b35b35fcae09b977ecbf044be7bffa6dad9306c47cccf6,
|requested: 874e871755ef84ebbf3[...]) - deleting download.

without this update, the uboot-layerscape-21.08 package would
always try to download (from git), repacked the archive and
reupload to sources.openwrt.org (~14 MiB saved).

Fixes: 038d5bdab117 ("layerscape: use semantic versions for LSDK")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
21 months agombedtls: build with PIC
Rosen Penev [Sat, 9 Jul 2022 03:50:44 +0000 (20:50 -0700)]
mbedtls: build with PIC

Fixes compilation with GCC12 and dependent packages for some reason.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
21 months agoipq-wifi: remove dangling GL.iNet GL-B2200 boardfiles
Christian Lamparter [Fri, 15 Jul 2022 22:45:45 +0000 (00:45 +0200)]
ipq-wifi: remove dangling GL.iNet GL-B2200 boardfiles

those board files can/should be dropped now too.

Fixes: 50c232d6f446 ("ipq-wifi: drop upstreamed board-2.bin")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
21 months agonu801: fix DEPENDS on bcm53xx
Christian Lamparter [Fri, 15 Jul 2022 23:56:53 +0000 (01:56 +0200)]
nu801: fix DEPENDS on bcm53xx

the tacked on @TARGET_bcm53xx causes warnings:
tmp/.config-package.in:14027:warning: ignoring unsupported character '@'
tmp/.config-package.in:26028:warning: ignoring unsupported character '@'

this was wrong.

Fixes: be1761fa1488 ("nu801: add MR26 to the table")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
21 months agoprocd: update to git HEAD
Christian Marangi [Sun, 17 Jul 2022 11:20:16 +0000 (13:20 +0200)]
procd: update to git HEAD

ef5d3e3 jail: fix various ignoring return value compilation warning
8e4a956 jail: add WARNING macro to log non critical warning message

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agofstools: update to git HEAD
Christian Marangi [Sun, 17 Jul 2022 11:18:42 +0000 (13:18 +0200)]
fstools: update to git HEAD

ebf7e90 libfstools: handle gzip return value in block_volume_format

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
21 months agorealtek: correct egress frame port verification
Sander Vanheule [Sun, 19 Jun 2022 08:29:35 +0000 (10:29 +0200)]
realtek: correct egress frame port verification

Destination switch ports for outgoing frame can range from 0 to
CPU_PORT-1.

Refactor the code to only generate egress frame CPU headers when a valid
destination port number is available, and make the code a bit more
consistent between different switch generations. Change the dest_port
argument's type to 'unsigned int', since only positive values are valid.

This fixes the issue where egress frames on switch port 0 did not
receive a VLAN tag, because they are sent out without a CPU header.
Also fixes a potential issue with invalid (negative) egress port numbers
on RTL93xx switches.

Reported-by: Arınç ÜNAL <arinc.unal@xeront.com>
Suggested-by: Birger Koblitz <mail@birger-koblitz.de>
Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>