openwrt/openwrt.git
47 min agomvebu: disable polling delay for passive trip point for puzzle thermal main master
Christian Marangi [Tue, 21 May 2024 15:38:28 +0000 (17:38 +0200)]
mvebu: disable polling delay for passive trip point for puzzle thermal

We don't have any passive trip point hence we can set the polling delay
for passive trip to 0 effectively disabling this polling.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
47 min agomvebu: split thermal zone for puzzle chassis
Christian Marangi [Tue, 21 May 2024 15:33:02 +0000 (17:33 +0200)]
mvebu: split thermal zone for puzzle chassis

Split thermal zone for puzzle chassis. Thermal platform supports only
one sensor per thermal zone.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
47 min agomvebu: fix missing property in puzzle thermal
Christian Marangi [Tue, 21 May 2024 13:37:14 +0000 (15:37 +0200)]
mvebu: fix missing property in puzzle thermal

Fix missing property in puzzle thermal. The thing was never supposed to
work.

Property #thermal-sensor-cells was missing from the puzzle hwmon, making
the entire thermal platform referencing that fail to probe with -EINVAL.

The puzzle hwmon expose 2 termistor but they probably use an userspace
downstream utility to configure and handle thermal. For this reason we
really don't know what they use the sensor for or when it's attached.

We use them to sensor if the Chassis gets too hot due to ambient
temperature and generic components getting too warm.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
47 min agomvebu: improve thermal management of IEI Puzzle devices
Daniel Golle [Thu, 2 May 2024 12:21:09 +0000 (13:21 +0100)]
mvebu: improve thermal management of IEI Puzzle devices

 - Make step_wise thermal governor respect hysteresis
   This is done by importing a downstream patch, backporting the same feature
   now present in Linux v6.10+ would be too messy.
 - Introduce thermal zone for the WT61P803 uC (chassis and board sensors)
 - Introduce thermal zones for AQR NBase-T PHYs
 - No longer modify existing SoC thermal zones (which are now only in charge
   for emergency shutdown, and can be interrupt driven instead of polled)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
94 min agompc85xx: add label-mac for HP MSM460
David Bauer [Sat, 1 Jun 2024 14:52:20 +0000 (16:52 +0200)]
mpc85xx: add label-mac for HP MSM460

Signed-off-by: David Bauer <mail@david-bauer.net>
3 hours agompc85xx: add support for Hewlett Packard MSM460
David Bauer [Thu, 30 May 2024 00:27:50 +0000 (02:27 +0200)]
mpc85xx: add support for Hewlett Packard MSM460

Hardware
--------
CPU:  Freescale P1020 2xe500 PPC
RAM:  256M DDR3 (Micron MT41J64M16JT-15E:G "D9MNJ")
NAND: 128M (Micron 2CA1)
BTN:  1x Reset
LED:  Power - ETH - Radio1 - Radio2
UART: RJ-45 Cisco Pinout - 115200 8N1

Installation
------------
NOTE: You can find a repo with up-to-date instructions as well as
the required files here:

https://github.com/blocktrron/msm460-flashing

Required files
==============
You need a command-files as well as a U-Boot image.

The command-file has the following content (padded to 131072 bytes).

If you copy paste these, remove the newlines!

```
U-BOOT setenv ethaddr 02:03:04:05:06:07; setenv ipaddr 192.168.1.1;
setenv serverip 192.168.1.66; tftpboot 0x3000000 msm460-uboot.bin;
nand device; nand erase 0 0xC0000; nand write 0x3000000 0x0 0xC0000; reset
```

You can download the required U-Boot from this repository:

https://github.com/blocktrron/u-boot-msm/releases

Preparation
===========
Prepare a TFTP server serving two files:

 - U-Boot NAND image as `msm460-uboot.bin`.
 - OpenWrt factory image as `msm460-factory.bin`
 - Command-file names `commands.tftp`

You can start a TFTP server in the current directory using dnsmasq:

```bash
sudo dnsmasq --no-daemon --listen-address=0.0.0.0 \
    --port=0 --enable-tftp=enxd0 --tftp-root="$(pwd)" \
    --user=root --group=root
```
Replace `enxd0` with the name of your network interface.

Procedure
=========
1. Assign yourself the IP-Address 192.168.1.66/24.
3. Connect the Router to the PC while keeping the reset button
   pressed.
4. The LEDs will eventually begin to flash.
   They will start to flash faster after around 15 seconds.
5. Release the reset button.
6. Start a new shell
7. Make sure you are currently in the directory where the tftp server
   is located.
8. Run the following command:

```bash
tftp 192.168.1.1 -m binary -c put commands.tftp nflashd.cccc9999
```

You get the message "Transfer timed out."
To find out if you have been successful, please check the
blinking LED Pattern.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 hours agompc85xx: add compressed zImage for mpc85xx
David Bauer [Fri, 31 May 2024 16:47:25 +0000 (18:47 +0200)]
mpc85xx: add compressed zImage for mpc85xx

Add a universal zImage which can be loaded by mpc85xx boards at
load address 0x3000000. This allows boards to boot kernels larger than
16MB even if the image is loaded temporarily from NAND at offset
0x1000000 which some bootloaders do by default.

Signed-off-by: David Bauer <mail@david-bauer.net>
16 hours agokirkwood: add D-Link DNS-320L support
Zoltan HERPAI [Fri, 5 Jan 2024 17:42:53 +0000 (18:42 +0100)]
kirkwood: add D-Link DNS-320L support

Dual-slot NAS based on Marvell Kirkwood.

Specifications:
 - Marvell 88F6702 @1GHz
 - 256Mb RAM
 - 128Mb NAND
 - 1x GbE LAN (Marvell 88E1318R)
 - 1x USB 2.0
 - 2x SATA
 - Weltrend WT69P3 ("supervisor" MCU chip)
 - Serial on J2 (115200,8n1)
 - Newer bootROM so kwboot-ing via serial is possible

Notes:
 - The Weltrend MCU is controlled by the package added in utils/dns320l-mcu.
 - The original MAC address is stored in the "mini firmware" image's first
   17 bytes.
 - Compared to the original MTD layout, the uImage+rootfs are now stored in
   a common ubi partition.

Installation:
1. Serial console
 - Connect your levelshifter to the serial console
   on J2 (refer to the wiki page for pinout)
2. Update u-boot
 - Download the u-boot.kwb image for the device
 - Powercycle the NAS
 - Run "kwboot -b u-boot-dns320l/u-boot.kwb /dev/ttyUSB0 -p"
 - Connect to the serial console with minicom
 - tftp 0x0800000 u-boot-dns320l/u-boot.kwb
   (Please note that "PHY reset timed out" seems to be customary
    on kirkwood devices, the egiga0 interface works regardless.)
 - nand erase 0x0 100000
 - nand write 0x0800000 0x0 0x100000
 - reset
3. Install OpenWrt
 - Boot up the initramfs image
 - tftpboot 0x800000 openwrt-kirkwood-generic-dlink_dns320l-initramfs-uImage; bootm 0x800000
 - Download the sysupgrade image and perform sysupgrade

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Reviewed-by: Pawel Dembicki <paweldembicki@gmail.com>
18 hours agobuild: add option KERNEL_DEBUG_INFO_BTF_MODULES
Tony Ambardar [Fri, 31 May 2024 06:07:22 +0000 (23:07 -0700)]
build: add option KERNEL_DEBUG_INFO_BTF_MODULES

The recent kernel v6.6.31 update broke BTF-enabled builds since upstream
Linux added a prompt for config option DEBUG_INFO_BTF_MODULES in commit
2166cb2e21 ("bpf, kconfig: Fix DEBUG_INFO_BTF_MODULES Kconfig definition").

Fix by updating Config-kernel.in to add the option, cleaning up a related
dependency and whitespace also.

Fixes: 10d77b9bc3 ("kernel: bump 6.6 to 6.6.31")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
26 hours agotools/elfutils: pass -O2 in HOST_CXXFLAGS
Robert Marko [Fri, 31 May 2024 13:47:15 +0000 (15:47 +0200)]
tools/elfutils: pass -O2 in HOST_CXXFLAGS

Trying to compile elfutils on Fedora 40 with GCC 14.1.1 will fail with:
/home/robimarko/Building/AX3600/qualcommax/staging_dir/host/bin/g++ -std=c++11 -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"/home/robimarko/Building/AX3600/qualcommax/staging_dir/host/share/locale"'  -DDEBUGPRED=0 -DSRCDIR=\"/home/robimarko/Building/AX3600/qualcommax/build_dir/host/elfutils-0.191/src\" -DOBJDIR=\"/home/robimarko/Building/AX3600/qualcommax/build_dir/host/elfutils-0.191/src\" -I. -I..  -I../libgnu -I../libgnu -I. -I. -I../lib -I.. -I./../libelf -I./../libebl -I./../libdw -I./../libdwelf -I./../libdwfl -I./../libasm -I../debuginfod -I/home/robimarko/Building/AX3600/qualcommax/staging_dir/host/include  -std=c++11 -Wall -Wshadow -Wtrampolines -Wlogical-op -Wduplicated-cond -Wnull-dereference -Wimplicit-fallthrough=5 -Werror -Wunused -Wextra -Wstack-usage=262144   -D_FORTIFY_SOURCE=3  -c -o srcfiles.o srcfiles.cxx
In file included from /usr/include/c++/14/x86_64-redhat-linux/bits/os_defines.h:39,
                 from /usr/include/c++/14/x86_64-redhat-linux/bits/c++config.h:2521,
                 from /usr/include/c++/14/cstdlib:41,
                 from ../libgnu/gettext.h:56,
                 from ../libgnu/eu-config.h:62,
                 from ../config.h:2378,
                 from srcfiles.cxx:31:
/usr/include/features.h:414:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
  414 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
      |    ^~~~~~~
cc1plus: all warnings being treated as errors

So, lets do as the error says and pass -O2 in HOST_CXXFLAGS like we already
do by default in HOST_CFLAGS.

Link: https://github.com/openwrt/openwrt/pull/15368
Signed-off-by: Robert Marko <robimarko@gmail.com>
26 hours agotools/elfutils: do not directly link gnulib to libelf
Michael Pratt [Wed, 1 May 2024 21:47:26 +0000 (17:47 -0400)]
tools/elfutils: do not directly link gnulib to libelf

The compiled library resulting from importing gnulib has been
linked to libelf in order to easily cover other link dependencies.
However, this is not appropriate for linking libelf to other programs
as it bloats the resulting libelf library, and may result in
multiple defintions of symbols based on whether or not
certain modules from gnulib are included while elfutils
already has it's own definition of a function.

This is not a problem while building elfutils, because gnulib has
it's own way of creating function aliases and special declarations
that allow the linker to ignore the original function definitions,
however, when libelf is used to link to something else,
this results in an error at link time.

The gnulib manual recommended linking the libraries directly,
but those who have written it may not have considered how this
can affect the ability to link that library in other builds,
they likely assume the build targets would not be a dependency.

Fix this by removing the linking between gnulib and libelf
and instead overriding Make variables in order to add linking
between gnulib and each of the binaries provided by elfutils,
using Make functions to avoid applying it to other subdirectories.

The function tdestroy() would still be missing on macOS,
but the existence of the gnulib tsearch object having been built
is an indicator of whether or not it is needed
because it is only built conditionally by gnulib,
so include linking that object only when it exists.

Block the unnecessary replacement of some functions by gnulib
so that future linking with libelf doesn't require
the associated gnulib "rpl" prefixed functions.
These replacements are very strict in order to correct
minor bugs that don't have a real impact in almost all cases
or new standards requirements that are not yet in effect or used.

Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15368
Signed-off-by: Robert Marko <robimarko@gmail.com>
26 hours agotools/elfutils: install a subset of the elfutils binaries
Michael Pratt [Wed, 1 May 2024 19:21:38 +0000 (15:21 -0400)]
tools/elfutils: install a subset of the elfutils binaries

Install binaries that are not common with binutils
instead of none at all. This adds a negligible time to the build.

Building shared libraries is disabled, so the AM_LDFLAGS can be reset
without the rpath-link option which is unrecognized by clang.

Some of the binaries depend on functions that are defined
using a "strong alias" instead of a normal definition,
but this is disabled by our patches in order to work on macOS,
so use the identical function directly instead.

Add fnmatch from gnulib with GNU extensions
which is needed for usage of the FNM_EXTMATCH flag.

Handle a "Wunused-const-variable" error with the same
preprocessor conditional used to include the function
that the variable is used in.

Ref: f64bd4b6c ("tools/elfutils: only build required components")
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15368
Signed-off-by: Robert Marko <robimarko@gmail.com>
26 hours agotools/gnulib: unmangle fts header on macOS
Michael Pratt [Sun, 5 May 2024 07:42:44 +0000 (03:42 -0400)]
tools/gnulib: unmangle fts header on macOS

The gnulib fts header is meant to not be overwritten
in any way by the host system's copy of fts.h
and was therefore given a unique name instead.

This is fine if the built libgnu library is directly linked
with the target library, but if we want to keep them isolated
we end up having the definitions being mangled anyway
when the next object to link against included the fts.h header.

On some macOS platforms, the use of __DARWIN_INODE64
is messing with the link name for fts functions, resulting in:

Undefined symbols for architecture x86_64:
  "_rpl_fts_close$INODE64", referenced from:
...

Create a local fts header for gnulib
that completely blocks the macOS host fts header.

An alternative and more upstream friendly fix would be
to rename fts_.h to fts.h and add the macOS-only
include guard to that file within it's own include guard,
but that would be a massive patch, so do this for now.

Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15368
Signed-off-by: Robert Marko <robimarko@gmail.com>
26 hours agoimagebuilder: fix broken IB_STANDALONE option
Christian Marangi [Fri, 31 May 2024 11:08:02 +0000 (13:08 +0200)]
imagebuilder: fix broken IB_STANDALONE option

Fix broken IB_STANDALONE option for OPKG due to an error in ifdef logic
where we weren't adding the required entry to reference the local files
in repositories.conf

Rework the ifdef to more explicit and restore original functionality of
this option.

While at it also provide different README for APK or OPKG.

Fixes: d788ab376f85 ("build: add APK package build capabilities")
Link: https://github.com/openwrt/openwrt/pull/15599
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
27 hours agotegra: enable VDE driver
Tomasz Maciej Nowak [Wed, 29 May 2024 14:24:10 +0000 (16:24 +0200)]
tegra: enable VDE driver

Upstream commit 83b7f0b8aeab ("ARM: tegra: Add OPP tables and power
domains to Tegra20 device-trees") added power domains to all devices
supporting power management and one of them is Video Decoder Engine.
Because of lacking driver for VDE, its power gate couldn't be driven
which inhibited reboot of the whole device.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
27 hours agotegra: add testing 6.6 kernel
Tomasz Maciej Nowak [Wed, 29 May 2024 14:24:09 +0000 (16:24 +0200)]
tegra: add testing 6.6 kernel

Preliminary support.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
27 hours agotegra: 6.6: refresh config and patches
Tomasz Maciej Nowak [Wed, 29 May 2024 14:24:08 +0000 (16:24 +0200)]
tegra: 6.6: refresh config and patches

Simple refresh to get rid of any fuzz and drop serial patch. With few
bug fixes around tegra serial driver the spurious IRQ didn't appear any
more during test. Let's see how long that'll last.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
27 hours agokernel/tegra: Restore kernel files for v5.15
Tomasz Maciej Nowak [Wed, 29 May 2024 14:24:07 +0000 (16:24 +0200)]
kernel/tegra: Restore kernel files for v5.15

This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
27 hours agokernel/tegra: Create kernel files for v6.6 (from v5.15)
Tomasz Maciej Nowak [Wed, 29 May 2024 14:24:06 +0000 (16:24 +0200)]
kernel/tegra: Create kernel files for v6.6 (from v5.15)

This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
27 hours agotegra: refresh 5.15 config
Tomasz Maciej Nowak [Wed, 29 May 2024 14:24:05 +0000 (16:24 +0200)]
tegra: refresh 5.15 config

Reduce diffstat in kernel config on new version introduction.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
27 hours agokernel: video-dma: explicitly state packaged modules
Tomasz Maciej Nowak [Wed, 29 May 2024 14:24:04 +0000 (16:24 +0200)]
kernel: video-dma: explicitly state packaged modules

Because wildcard in variable stating packaged modules, the filtering for
built-in kernel modules didn't work and would cause a packaging failure.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
28 hours agoramips: get rid of downstream network device label patch
Daniel Golle [Thu, 30 May 2024 13:23:08 +0000 (14:23 +0100)]
ramips: get rid of downstream network device label patch

Use a simple Shell script like on filogic target to get rid of downstream
patch for the Ethernet driver which was rejected upstream long ago.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
28 hours agomediatek: filogic: avoid sub-shell invovation in netdev rename loop
Daniel Golle [Thu, 30 May 2024 13:38:56 +0000 (14:38 +0100)]
mediatek: filogic: avoid sub-shell invovation in netdev rename loop

Rename network devices to their label set in DT without invocation of
a sub-shell.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
30 hours agoply: add dynamic tracing package using BPF
Tony Ambardar [Tue, 7 May 2024 00:06:55 +0000 (17:06 -0700)]
ply: add dynamic tracing package using BPF

ply is a light-weight dynamic tracer for Linux that leverages the kernel's
BPF VM in concert with kprobes/tracepoints to attach probes to arbitrary
points in the kernel.

Most tracers that generate BPF bytecode are based on the LLVM-based BCC
toolchain; ply on the other hand has no external dependencies outside libc,
making it suitable for use on constrained embedded systems.

Currently ply supports x86_64, aarch64, arm, riscv64, riscv32, powerpc,
mips(el), and mips64(el) architectures.

Further documentation, examples and implementation details may be found at:
https://github.com/iovisor/ply.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
30 hours agopackages: refresh patches
Rosen Penev [Sat, 18 May 2024 20:45:34 +0000 (13:45 -0700)]
packages: refresh patches

CI is supposed to catch all of these. Some of these predate CI.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
31 hours agokernel: Add CONFIG_FB_DEVICE to kmod-fb
Hauke Mehrtens [Sun, 26 May 2024 21:53:10 +0000 (23:53 +0200)]
kernel: Add CONFIG_FB_DEVICE to kmod-fb

At least kmod-fb-tft depends on CONFIG_FB_DEVICE and can not be
activated without it.

This configuration option was added with kernel 6.6, before this featre
was always activated.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
31 hours agox86: Activate CONFIG_FB_DEVICE
Hauke Mehrtens [Sat, 25 May 2024 16:27:32 +0000 (18:27 +0200)]
x86: Activate CONFIG_FB_DEVICE

This adds the legacy /dev/fb* device file for kernel 6.6 again.
Linux upstream commit 701d2054fa31 ("fbdev: Make support for
userspace interfaces configurable") made this configurable and we
deactivated this option by default for kernel 6.6. On x86 we are not
space constrained and some users need this legacy interface.

Fixes: #15222
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
31 hours agoiproute2: update to 6.9.0
Rui Salvaterra [Sat, 25 May 2024 15:30:25 +0000 (15:30 +0000)]
iproute2: update to 6.9.0

Support for iptables action has been dropped. Remove tc-mod-iptables and related
patch (175-reduce-dynamic-syms.patch).

We also add the missing libbpf dependency for `ss` since iproute 8740ca9
("ss: add support for BPF socket-local storage") now means that `ss` requires
libbpf as well.

Fix 170-ip_tiny.patch, as the help text didn't match all the included functions.

Drop upstreamed patches 402-bpf-fix-warning-from-basename.patch
and 403-bpf-include-libgen.h-for-basename.patch.

All other patches automatically rebased.

Co-authored-by: Rany Hany <rany_hany@riseup.net>
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Rany Hany <rany_hany@riseup.net>
31 hours agoiproute2: fix build on GCC 14
Rany Hany [Mon, 13 May 2024 17:38:12 +0000 (20:38 +0300)]
iproute2: fix build on GCC 14

Upstream patches:

401-bridge-vlan.c-bridge-vlan.c-fix-build-with-gcc-14-on.patch
402-bpf-fix-warning-from-basename.patch
403-bpf-include-libgen.h-for-basename.patch

The patch (400-rdma-include-libgen.h-for-basename.patch) was not
submitted upstream but just adds a missing include for basename.

Signed-off-by: Rany Hany <rany_hany@riseup.net>
31 hours agombedtls: fix build on GCC 14
Rany Hany [Mon, 13 May 2024 17:09:44 +0000 (20:09 +0300)]
mbedtls: fix build on GCC 14

Without this patch, GCC 14 incorrectly complains about the following error:

In file included from /home/user/workspace/mbedtls/library/ctr_drbg.c:13:
In function ‘mbedtls_xor’,
    inlined from ‘ctr_drbg_update_internal’ at /home/user/workspace/mbedtls/library/ctr_drbg.c:372:5:
/home/user/workspace/mbedtls/library/common.h:235:17: error: array subscript 48 is outside array bounds of ‘unsigned char[48]’ [-Werror=array-bounds=]
  235 |         r[i] = a[i] ^ b[i];
      |                ~^~~
/home/user/workspace/mbedtls/library/ctr_drbg.c: In function ‘ctr_drbg_update_internal’:
/home/user/workspace/mbedtls/library/ctr_drbg.c:335:19: note: at offset 48 into object ‘tmp’ of size 48
  335 |     unsigned char tmp[MBEDTLS_CTR_DRBG_SEEDLEN];
      |                   ^~~
In function ‘mbedtls_xor’,
    inlined from ‘ctr_drbg_update_internal’ at /home/user/workspace/mbedtls/library/ctr_drbg.c:372:5:
/home/user/workspace/mbedtls/library/common.h:235:24: error: array subscript 48 is outside array bounds of ‘const unsigned char[48]’ [-Werror=array-bounds=]
  235 |         r[i] = a[i] ^ b[i];
      |                       ~^~~
/home/user/workspace/mbedtls/library/ctr_drbg.c: In function ‘ctr_drbg_update_internal’:
/home/user/workspace/mbedtls/library/ctr_drbg.c:333:57: note: at offset 48 into object ‘data’ of size [0, 48]
  333 |                                     const unsigned char data[MBEDTLS_CTR_DRBG_SEEDLEN])
      |                                     ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘mbedtls_xor’,
    inlined from ‘ctr_drbg_update_internal’ at /home/user/workspace/mbedtls/library/ctr_drbg.c:372:5:
/home/user/workspace/mbedtls/library/common.h:235:14: error: array subscript 48 is outside array bounds of ‘unsigned char[48]’ [-Werror=array-bounds=]
  235 |         r[i] = a[i] ^ b[i];
      |         ~~~~~^~~~~~~~~~~~~
/home/user/workspace/mbedtls/library/ctr_drbg.c: In function ‘ctr_drbg_update_internal’:
/home/user/workspace/mbedtls/library/ctr_drbg.c:335:19: note: at offset 48 into object ‘tmp’ of size 48
  335 |     unsigned char tmp[MBEDTLS_CTR_DRBG_SEEDLEN];
      |                   ^~~

This change adds a basic check to silence the warning until a solution is worked on upstream.
As this check is already used by another compiler, it shouldn't cause any issues for us.

Signed-off-by: Rany Hany <rany_hany@riseup.net>
43 hours agox86: drop 6.1 support
Mieczyslaw Nalewaj [Wed, 29 May 2024 23:05:55 +0000 (01:05 +0200)]
x86: drop 6.1 support

Drop configs, files and patches for Linux 6.1.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
43 hours agox86: use kernel 6.6 by default
Mieczyslaw Nalewaj [Wed, 29 May 2024 23:03:24 +0000 (01:03 +0200)]
x86: use kernel 6.6 by default

Switch to Linux kernel version 6.6.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
43 hours agoarmsr: Remove kernel 6.1 configuration
Hauke Mehrtens [Sun, 26 May 2024 22:00:19 +0000 (00:00 +0200)]
armsr: Remove kernel 6.1 configuration

Armsr is using kernel 6.6 by default now, remove configuration for
kernel 6.1.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
43 hours agoarmsr: Use kernel 6.6 by default
Hauke Mehrtens [Sun, 26 May 2024 21:59:39 +0000 (23:59 +0200)]
armsr: Use kernel 6.6 by default

All 2 subtargets are compiling fine and booting up in qemu.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 days agogeneric: 6.6: net: sfp-bus: fix SFP mode detect from bitrate
Daniel Golle [Thu, 30 May 2024 11:06:26 +0000 (12:06 +0100)]
generic: 6.6: net: sfp-bus: fix SFP mode detect from bitrate

Backport commit fixing detection of SFP modules which has been broken
since Linux 6.4 for some modules.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 days agogeneric: backport accepted and pending patches for mtk_eth_soc
Daniel Golle [Wed, 29 May 2024 01:41:30 +0000 (02:41 +0100)]
generic: backport accepted and pending patches for mtk_eth_soc

Backport a bunch of fixes and improvements for WED and PPE, mostly
for MT7988.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 days agogeneric: move accepted patches for mtk_eth_soc to backport-6.6
Daniel Golle [Tue, 28 May 2024 22:48:16 +0000 (23:48 +0100)]
generic: move accepted patches for mtk_eth_soc to backport-6.6

In preparation to update to upcoming Linux 6.6.33 move accepted patches
from mediatek target to backport folder, so moving to newer Linux 6.6
releases becomes easier and also other patches on top can be applied
more easily.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 days agokernel: add missing patch header
Daniel Golle [Tue, 28 May 2024 00:49:36 +0000 (01:49 +0100)]
kernel: add missing patch header

Make sure all patches can again be applied using 'git am' on the
corresponding linux-stable git tree.

Fixes: a7ae4ed0a3 ("kernel: fix tools build breakage on macos with x86")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 days agokernel: bump 6.6 to 6.6.32
John Audia [Sat, 25 May 2024 17:03:59 +0000 (13:03 -0400)]
kernel: bump 6.6 to 6.6.32

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.32

Only kernel checksum was updated/no patches needed a rebase.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2 days agokernel: bump 6.6 to 6.6.31
John Audia [Fri, 17 May 2024 11:43:59 +0000 (07:43 -0400)]
kernel: bump 6.6 to 6.6.31

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.31

Removed upstreamed:
backport-6.6/600-v6.9-01-net-gro-parse-ipv6-ext-headers-without-frag0-invalid.patch[1]
backport-6.6/600-v6.9-02-net-gro-fix-udp-bad-offset-in-socket-lookup-by-addin.patch[2]
backport-6.6/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch[3]
backport-6.6/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch[4]
pending-6.6/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch[5]
pending-6.6/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch[6]
pending-6.6/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch[7]
pending-6.6/778-net-l2tp-drop-flow-hash-on-forward.patch[8]
pending-6.6/440-mtd-don-t-look-for-OTP-legacy-NVMEM-cells-if-proper-.patch[9a,b]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=7f7b0ebb37afc5070d122318e3651d7cb8c4f01c
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=af276a5ac8e938c8b058e3e124073cc1e322d98b
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=78b6092d78341e423e5f6afae4d9f401b561aca7
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=26e2fe4cab10e67f116f4a2eecc393824bb294b8
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=65fbc7a11d063236e1f1dcebb38eeaa3ccbe2dbc
6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=cfe34d86ef9765c388f145039006bb79b6c81ac6
7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=1ce60741d7e17dcf707e3bdebed4442ae30bdd02
8. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=23e25d2fc777cd0cc77c2f857f93e9b13ee789b9
9a. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=cce311f8bbbf9d24eacc39af3228cd104e079396
9b. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/drivers/mtd/mtdcore.c?id=v6.6.31&id2=v6.6.30

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
3 days agod1: drop 6.1 support
Zoltan HERPAI [Wed, 29 May 2024 08:54:26 +0000 (10:54 +0200)]
d1: drop 6.1 support

Now that 6.6 is the default, remove the 6.1 config and patches.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 days agod1: switch default to 6.6
Zoltan HERPAI [Wed, 29 May 2024 08:53:55 +0000 (10:53 +0200)]
d1: switch default to 6.6

Switch the default kernel to 6.6.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 days agod1: 6.6: set testing kernel
Zoltan HERPAI [Sat, 25 May 2024 22:56:33 +0000 (00:56 +0200)]
d1: 6.6: set testing kernel

Allow selecting 6.6 as testing kernel on d1.

Runtime-tested: Nezha D1

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 days agod1: refresh kernel config
Zoltan HERPAI [Sat, 25 May 2024 22:54:24 +0000 (00:54 +0200)]
d1: refresh kernel config

Refresh kernel config, and enable thermal features.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 days agod1: remove upstreamed patches and add new patchset
Zoltan HERPAI [Sat, 25 May 2024 22:53:22 +0000 (00:53 +0200)]
d1: remove upstreamed patches and add new patchset

Remove patches that were upstreamed, and backport features from
later kernels.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 days agokernel/d1: Restore kernel files for v6.1
Zoltan HERPAI [Sat, 25 May 2024 22:51:10 +0000 (00:51 +0200)]
kernel/d1: Restore kernel files for v6.1

This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 days agokernel/d1: Create kernel files for v6.6 (from v6.1)
Zoltan HERPAI [Sat, 25 May 2024 22:51:10 +0000 (00:51 +0200)]
kernel/d1: Create kernel files for v6.6 (from v6.1)

This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 days agoscripts: Add GNU ftp mirror redirector for GNU and Savannah
Sahil Dhiman [Sat, 25 May 2024 09:57:12 +0000 (15:27 +0530)]
scripts: Add GNU ftp mirror redirector for GNU and Savannah

Add GNU's redirector which automatically redirect user to nearby online
mirror.

Signed-off-by: Sahil Dhiman <sahil@hopbox.in>
Link: https://github.com/openwrt/openwrt/pull/15557
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 days agotools/mkimage: update to v2024.04
Nick Hainke [Fri, 5 Apr 2024 10:18:41 +0000 (12:18 +0200)]
tools/mkimage: update to v2024.04

Update to latest version.

Refresh patches:
- 030-allow-to-use-different-magic.patch
- 095-tools-disable-TOOLS_FIT_FULL_CHECK.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
3 days agoramips: modules: remove symbol CONFIG_DW_DMAC_PCI
Shiji Yang [Mon, 27 May 2024 12:48:46 +0000 (12:48 +0000)]
ramips: modules: remove symbol CONFIG_DW_DMAC_PCI

The DW_DMAC_PCI symbol won't be automatically selected at all.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
3 days agoramips: gdma: remove slave_id field
Shiji Yang [Mon, 27 May 2024 12:41:48 +0000 (12:41 +0000)]
ramips: gdma: remove slave_id field

Fix compile error:
drivers/dma/ralink-gdma.c: In function 'gdma_dma_config':
drivers/dma/ralink-gdma.c:197:40: error: 'struct dma_slave_config' has no member named 'slave_id'
  197 |                 chan->slave_id = config->slave_id;
      |                                        ^~
drivers/dma/ralink-gdma.c:206:40: error: 'struct dma_slave_config' has no member named 'slave_id'
  206 |                 chan->slave_id = config->slave_id;
      |                                        ^~
make[8]: *** [scripts/Makefile.build:243: drivers/dma/ralink-gdma.o] Error 1

ref: https://lore.kernel.org/all/20211122222203.4103644-1-arnd@kernel.org/

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
3 days agoramips: add back the gdma driver
Shiji Yang [Mon, 27 May 2024 08:55:42 +0000 (08:55 +0000)]
ramips: add back the gdma driver

The gdma driver has been removed from the upstream. Let's move it
to the local files. This patch also removed unsupported compatible
string and sub-target.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
3 days agomediatek: add missing ';;' in shell switch case block
Daniel Golle [Tue, 28 May 2024 22:50:15 +0000 (23:50 +0100)]
mediatek: add missing ';;' in shell switch case block

Add missing ';;' to the end of shell switch case statement.

Fixes: c71b68acdd ("mediatek: filogic: add Adtran SmartRG Mount Stuart series")
Reported-by: @gl-dude
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 days agotoolchain: gcc: update to 13.3
Olcay Korkmaz [Tue, 28 May 2024 19:42:41 +0000 (22:42 +0300)]
toolchain: gcc: update to 13.3

Release Notes:
https://gcc.gnu.org/pipermail/gcc/2024-May/243980.html

Remove upstreamed patches:
- patches-13.x/020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch
- patches-13.x/021-libcc1-fix-vector-include.patch
- patches-13.x/400-LoongArch-Fix-MUSL_DYNAMIC_LINKER.patch
- patches-13.x/401-LoongArch-Modify-MUSL_DYNAMIC_LINKER.patch

Refresh patches:
- patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch
- patches-13.x/970-macos_arm64-building-fix.patch

Signed-off-by: Olcay Korkmaz <nuke_mania@hotmail.com>
3 days agomalta: Remove kernel 6.1 configuration
Hauke Mehrtens [Sun, 26 May 2024 18:04:33 +0000 (20:04 +0200)]
malta: Remove kernel 6.1 configuration

Malta is using kernel 6.6 by default now, remove configuration for
kernel 6.1.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agomalta: Use kernel 6.6 by default
Hauke Mehrtens [Sun, 26 May 2024 18:03:09 +0000 (20:03 +0200)]
malta: Use kernel 6.6 by default

All 4 subtargets are compiling fine and booting up in qemu.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agokernel: kmod-ipt-clusterip: Depend on kernel 5.15 and 6.1
Hauke Mehrtens [Sun, 26 May 2024 20:27:53 +0000 (22:27 +0200)]
kernel: kmod-ipt-clusterip: Depend on kernel 5.15 and 6.1

The kernel module was removed in kernel 6.3.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9db5d918e2c07fa09fab18bc7addf3408da0c76f

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agokernel: kmod-can-usb-esd: Fix build on kernel 6.6
Hauke Mehrtens [Sun, 26 May 2024 20:24:59 +0000 (22:24 +0200)]
kernel: kmod-can-usb-esd: Fix build on kernel 6.6

The kernel module and configuration option was renamed from esd_usb2.ko
to esd_usb.ko in kernel 6.0. Adapt the kernel package.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5e910bdedc84c1f196863cebdf27c1806449c27c

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agolinux-firmware: Update to version 20240513
Hauke Mehrtens [Sun, 26 May 2024 22:40:49 +0000 (00:40 +0200)]
linux-firmware: Update to version 20240513

This updates the following firmware files:
airoha-en8811h-firmware/lib/firmware/airoha/EthMD32.DSP.bin
airoha-en8811h-firmware/lib/firmware/airoha/EthMD32.dm.bin
amdgpu-firmware/ (Many files)
ibt-firmware/lib/firmware/intel/ibt-0040-0041.sfi
ibt-firmware/lib/firmware/intel/ibt-0040-1020.sfi
ibt-firmware/lib/firmware/intel/ibt-0040-1050.sfi
ibt-firmware/lib/firmware/intel/ibt-0040-2120.sfi
ibt-firmware/lib/firmware/intel/ibt-0040-4150.sfi
ibt-firmware/lib/firmware/intel/ibt-0041-0041.sfi
ibt-firmware/lib/firmware/intel/ibt-0180-0041.sfi
ibt-firmware/lib/firmware/intel/ibt-0180-1050.sfi
ibt-firmware/lib/firmware/intel/ibt-0180-4150.sfi
ibt-firmware/lib/firmware/intel/ibt-0291-0291.ddc
ibt-firmware/lib/firmware/intel/ibt-0291-0291.sfi
ibt-firmware/lib/firmware/intel/ibt-1040-0041.sfi
ibt-firmware/lib/firmware/intel/ibt-1040-1020.sfi
ibt-firmware/lib/firmware/intel/ibt-1040-1050.sfi
ibt-firmware/lib/firmware/intel/ibt-1040-2120.sfi
ibt-firmware/lib/firmware/intel/ibt-1040-4150.sfi
ibt-firmware/lib/firmware/intel/ibt-17-16-1.sfi
ibt-firmware/lib/firmware/intel/ibt-17-2.sfi
ibt-firmware/lib/firmware/intel/ibt-18-16-1.sfi
ibt-firmware/lib/firmware/intel/ibt-18-2.sfi
ibt-firmware/lib/firmware/intel/ibt-19-0-0.sfi
ibt-firmware/lib/firmware/intel/ibt-19-0-1.sfi
ibt-firmware/lib/firmware/intel/ibt-19-0-4.sfi
ibt-firmware/lib/firmware/intel/ibt-19-16-4.sfi
ibt-firmware/lib/firmware/intel/ibt-19-240-1.sfi
ibt-firmware/lib/firmware/intel/ibt-19-240-4.sfi
ibt-firmware/lib/firmware/intel/ibt-19-32-0.sfi
ibt-firmware/lib/firmware/intel/ibt-19-32-1.sfi
ibt-firmware/lib/firmware/intel/ibt-19-32-4.sfi
ibt-firmware/lib/firmware/intel/ibt-20-0-3.sfi
ibt-firmware/lib/firmware/intel/ibt-20-1-3.sfi
ibt-firmware/lib/firmware/intel/ibt-20-1-4.sfi
iwlwifi-firmware-ax200/lib/firmware/iwlwifi-cc-a0-77.ucode
iwlwifi-firmware-ax201/lib/firmware/iwlwifi-QuZ-a0-hr-b0-77.ucode
iwlwifi-firmware-ax210/lib/firmware/iwlwifi-ty-a0-gf-a0.pnvm
iwlwifi-firmware-be200/lib/firmware/iwlwifi-gl-c0-fm-c0.pnvm
iwlwifi-firmware-iwl9000/lib/firmware/iwlwifi-9000-pu-b0-jf-b0-46.ucode
iwlwifi-firmware-iwl9260/lib/firmware/iwlwifi-9260-th-b0-jf-b0-46.ucode
mt7921bt-firmware/lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin
mt7922bt-firmware/lib/firmware/mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin
rtl8852ce-firmware/lib/firmware/rtw89/rtw8852c_fw.bin

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 days agoebtables: fix compilation with GCC14
Georgi Valkov [Mon, 27 May 2024 20:23:20 +0000 (23:23 +0300)]
ebtables: fix compilation with GCC14

Remove 100-musl_fix.patch, which is no longer needed
and causes a build error with gcc-14.

Fixes:
useful_functions.c:63:41: error: passing argument 1 of 'ether_ntoa' from incompatible pointer type [-Wincompatible-pointer-types]
   63 |                 printf("%s", ether_ntoa((struct ether_addr *) mac));
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                         |
      |                                         struct ether_addr *
In file included from include/ebtables_u.h:28,
                 from useful_functions.c:25:
/Volumes/wrt3200/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-14.1.0_musl_eabi/include/netinet/ether.h:10:19: note: expected 'const struct ether_addr *' but argument is of type 'struct ether_addr *'
   10 | char *ether_ntoa (const struct ether_addr *);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15576
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agolantiq: disable building of ZyXEL P-2812HNU F1
Nick Hainke [Tue, 28 May 2024 06:06:10 +0000 (08:06 +0200)]
lantiq: disable building of ZyXEL P-2812HNU F1

Disable image building for the board, since the kernel of the main branch
is to big to fit into the kernel partition.

Signed-off-by: Nick Hainke <vincent@systemli.org>
5 days agolantiq: switch to kernel 6.1
Martin Schiller [Wed, 15 May 2024 08:34:18 +0000 (10:34 +0200)]
lantiq: switch to kernel 6.1

Let's switch the lantiq target to use kernel 6.1 by default.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
5 days agoath79: add support for Dell SonicPoint ACe APL26-0AE
Tomasz Maciej Nowak [Wed, 17 Apr 2024 15:01:55 +0000 (17:01 +0200)]
ath79: add support for Dell SonicPoint ACe APL26-0AE

Dell/SonicWall APL26-0AE (marketed as SonicPoint ACe) is a dual band
wireless access point. End of life as of 2022-07-31.

Specification
SoC: QualcommAtheros QCA9550
RAM: 256 MB DDR2
Flash: 32 MB SPI NOR
WIFI: 2.4 GHz 3T3R integrated
      5 GHz 3T3R QCA9890 oversized Mini PCIe card
Ethernet: 2x 10/100/1000 Mbps QCA8334
          port labeled lan1 is PoE capable (802.3at)
USB: 1x 2.0
LEDs: LEDs: 6x which 5 are GPIO controlled and two of them are dual color
Buttons: 2x GPIO controlled
Serial: RJ-45 port, SonicWall pinout
        baud: 115200, parity: none, flow control: none

Before flashing, be sure to have a copy of factory firmware, in case You
wish to revert to original firmware.
All described procedures were done in following environment:
ROM Version: SonicROM (U-Boot) 8.0.0.0-11o
SafeMode Firmware Version: SonicOS 8.0.0.0-14o
Firmware Version: SonicOS 9.0.1.0
In case of other versions, following installation instructions might be
ineffective.

Installation
1. Prepare TFTP server with OpenWrt sysupgrade image and rename that
   image to "sp_fw.bin".
2. Connect to one of LAN ports.
3. Connect to serial port.
4. Hold the reset button (small through hole on side of the unit),
   power on the device and when prompted to stop autoboot, hit any key.
   The held button can now be released.
5. Alter U-Boot environment with following commands:
    setenv bootcmd bootm 0x9F110000
    saveenv
6. Adjust "ipaddr" (access point, default is 192.168.1.1) and "serverip"
   (TFTP server, default is 192.168.1.10) addresses in U-Boot
   environment, then run following commands:
    tftp 0x80060000 sp_fw.bin
    erase 0x9F110000 +0x1EF0000
    cp.b 0x80060000 0x9F110000 $filesize
7. After successful flashing, execute:
    boot
8. The access point will boot to OpenWrt. Wait few minutes, until the
    wrench LED will stop blinking, then it's ready for configuration.

Known issues
Initramfs image can't be bigger than specified kernel size, otherwise
bootloader will throw LZMA decompressing error. Switching to lzma-loader
should workaround that.
This device has Winbond 25Q256FVFG and doesn't have reliable reset, which
causes hang on reboot, thus broken-flash-reset needs to be added. This
property addition causes dispaly of "scary" warning on each boot, take
this warnig into consideration.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
6 days agokernel/modules/other/mlxreg: add new package
Til Kaiser [Sun, 28 Apr 2024 13:30:54 +0000 (15:30 +0200)]
kernel/modules/other/mlxreg: add new package

This commit adds a new mlxreg package, which allows access
to Mellanox programmable device register space through sysfs
interface for thermal control and hardware management.

It also adds required Mellanox I²C drivers and packages
for the "special" MSN4800 series and SN2201 platform.

Signed-off-by: Til Kaiser <mail@tk154.de>
6 days agokernel/modules/other/mlx_wdt: add new package
Til Kaiser [Sun, 28 Apr 2024 13:16:57 +0000 (15:16 +0200)]
kernel/modules/other/mlx_wdt: add new package

This commit adds a new driver for the hardware watchdog
on Mellanox systems.

Signed-off-by: Til Kaiser <mail@tk154.de>
6 days agoramips: samknows whitebox v8: set wifi frequency
Mieczyslaw Nalewaj [Sun, 5 May 2024 21:45:36 +0000 (23:45 +0200)]
ramips: samknows whitebox v8: set wifi frequency

Set the 2.4GHz frequency for WiFi.

Fixes: #15391
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
6 days agolayerscape: add 6.6 testing kernel
Pawel Dembicki [Wed, 27 Mar 2024 12:12:11 +0000 (13:12 +0100)]
layerscape: add 6.6 testing kernel

Support is ready. Let's enable 6.6 as testing version.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 days agolayerscape: adjust dts path in image scripts
Pawel Dembicki [Wed, 27 Mar 2024 12:08:39 +0000 (13:08 +0100)]
layerscape: adjust dts path in image scripts

After the spliting dts folder of ARM architecture in upstream,
layerscape routines need to be adjusted for new solution.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 days agolayerscape: refresh 6.6 config
Pawel Dembicki [Tue, 26 Mar 2024 10:08:05 +0000 (11:08 +0100)]
layerscape: refresh 6.6 config

Mostly done by 'make kernel_oldconfig'.

armv8_64b has added one entry manually:
CONFIG_CRYPTO_CURVE25519=y

as workaround for error:
aarch64-openwrt-linux-musl-ld: crypto/crypto_engine.o: in function
`crypto_engine_register_kpp':
crypto_engine.c:687: undefined reference to `crypto_register_kpp'
crypto_engine.c:687:(.text+0x57c): relocation truncated to fit:
R_AARCH64_CALL26 against undefined symbol `crypto_register_kpp'
aarch64-openwrt-linux-musl-ld: crypto/crypto_engine.o: in function
`crypto_engine_unregister_kpp':
crypto/crypto_engine.c:693: undefined reference to `crypto_unregister_kpp'
crypto_engine.c:693:(.text+0x5a0): relocation truncated to fit:
R_AARCH64_CALL26 against undefined symbol `crypto_unregister_kpp'

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 days agogeneric: kernel add 6.6 missing symbols
Pawel Dembicki [Tue, 26 Mar 2024 10:07:09 +0000 (11:07 +0100)]
generic: kernel add 6.6 missing symbols

Found durring works on layerscape.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 days agolayerscape: kernel: refresh 6.6 patches
Pawel Dembicki [Mon, 18 Mar 2024 13:33:54 +0000 (14:33 +0100)]
layerscape: kernel: refresh 6.6 patches

Taken refreshed version from Layerscape 6.6 tree:
302-arm64-dts-ls1012a-update-with-ppfe-support.patch
304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch
400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
701-staging-add-fsl_ppfe-driver.patch
702-phy-Add-2.5G-SGMII-interface-mode.patch
704-net-phylink-treat-PHY_INTERFACE_MODE_2500SGMII-in-ph.patch

Removed:
704-net-phylink-treat-PHY_INTERFACE_MODE_2500SGMII-in-ph.patch (meld
into 702)

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 days agokernel/layerscape: Restore kernel files for v6.1
Pawel Dembicki [Mon, 18 Mar 2024 11:42:37 +0000 (12:42 +0100)]
kernel/layerscape: Restore kernel files for v6.1

This is an automatically generated commit which aids following Kernel patch history,
as git will see the move and copy as a rename thus defeating the purpose.

See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
for the original discussion.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 days agokernel/layerscape: Create kernel files for v6.6 (from v6.1)
Pawel Dembicki [Mon, 18 Mar 2024 11:42:37 +0000 (12:42 +0100)]
kernel/layerscape: Create kernel files for v6.6 (from v6.1)

This is an automatically generated commit.

During a `git bisect` session, `git bisect --skip` is recommended.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 days agotfa-layerscape: Bump to lf-6.6.3-1.0.0
Pawel Dembicki [Mon, 18 Mar 2024 11:29:08 +0000 (12:29 +0100)]
tfa-layerscape: Bump to lf-6.6.3-1.0.0

This commit bumps tfa-layerscape package to version lf-6.6.3-1.0.0

Manually rebased:
001-fiptool-hostbuild-fixes.patch
004-plat-nxp-restore-ls1012afrdm-support.patch

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 days agouboot-layerscape: bump to lf-6.6.3-1.0.0
Pawel Dembicki [Mon, 18 Mar 2024 10:42:42 +0000 (11:42 +0100)]
uboot-layerscape: bump to lf-6.6.3-1.0.0

This commit bumps u-boot layerscape package to lf-6.6.3-1.0.0 version.

Removed upstreamed:
0001-board-ls1046ardb-force-PCI-device-enumeration.patch
0002-board-ls1043ardb-force-PCI-device-enumeration.patch

Manually rebased:
0900-layerscape-adjust-LS1021A-IOT-config-for-OpenWrt.patch

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 days agoppfe-firmware: Bump to lf-6.6.3-1.0.0
Pawel Dembicki [Mon, 18 Mar 2024 09:49:55 +0000 (10:49 +0100)]
ppfe-firmware: Bump to lf-6.6.3-1.0.0

Bump ppfe-firmware package to lf-6.6.3-1.0.0

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 days agols-rcw: Bump to lf-6.6.3-1.0.0
Pawel Dembicki [Mon, 18 Mar 2024 09:47:48 +0000 (10:47 +0100)]
ls-rcw: Bump to lf-6.6.3-1.0.0

Bump ls-rcw package to lf-6.6.3-1.0.0.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 days agols-ddr-phy: bump to lf-6.6.3-1.0.0
Pawel Dembicki [Mon, 18 Mar 2024 09:44:47 +0000 (10:44 +0100)]
ls-ddr-phy: bump to lf-6.6.3-1.0.0

Bump ls-ddr-phy to version lf-6.6.3-1.0.0.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 days agofman-ucode: Bump to lf-6.6.3-1.0.0
Pawel Dembicki [Mon, 18 Mar 2024 09:42:15 +0000 (10:42 +0100)]
fman-ucode: Bump to lf-6.6.3-1.0.0

Bump fman-ucode to version lf-6.6.3-1.0.0.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 days agomvebu: add support for Fortinet FortiWiFi 51E
INAGAKI Hiroshi [Wed, 8 Mar 2023 12:54:14 +0000 (21:54 +0900)]
mvebu: add support for Fortinet FortiWiFi 51E

Fortinet FortiWiFi 51E (FWF-51E) is a UTM with 1x WLAN and 1x SSD, based
on Armada 385 (88F6820).

Specification:

- SoC          : Marvell Armada 385 88F6820
- RAM          : DDR3 2 GiB (4x Micron MT41K512M8DA-107, "D9SGQ")
- Flash        : SPI-NOR 128 MiB (Macronix MX66L1G45GMI-10G)
- SSD          : mSATA SSD 32 GB (A-DATA XM21E (AXM21ES3-32GM-B))
  - mode       : SATA III 6Gbps
  - power      : 3.3 VDC, 3.1 W (Max.)
- Ethernet     : 7x 10/100/1000 Mbps
  - LAN 1-5    : Marvell 88E6176
  - WAN 1, 2   : Marvell 88E1512 (2x)
- WLAN         : Fortinet EMP7618-FT (Atheros AR9382 (2T2R))
  - interface  : MiniPCIe
- LEDs/Keys    : 18x/1x
- UART         : "CONSOLE" port (RJ-45, RS-232C level)
  - port       : ttyS0
  - settings   : 9600bps 8n1
  - assignment : 1:NC , 2:NC , 3:TXD, 4:GND,
                 5:GND, 6:RXD, 7:NC , 8:NC
  - note       : compatible with Cisco console cable
- HW Monitoring: nuvoTon NCT7802Y
- Power        : 12 VDC, 2 A
  - plug       : Molex 5557-02R

Flash instruction using initramfs image:

 1. Power on FWF-51E and interrupt to show bootmenu
 2. Call "[I]: System information." -> "[S]: Set serial port baudrate."
    and set baudrate to 9600 bps
 3. Call "[R]: Review TFTP parameters.", check TFTP parameters and
    connect computer to "Image download port" in the parameters
 4. Prepare TFTP server with the parameters obtained above
 5. Rename OpenWrt initramfs image to "image.out" and put to TFTP
    directory
 6. Call "[T]: Initiate TFTP firmware transfer." to download initramfs
    image from TFTP server
 7. Type "R" key when the following message is showed, to boot initramfs
    image without flashing to spi-nor flash

    "Save as Default firmware/Backup firmware/Run image without saving:[D/B/R]?"

 8. On initramfs image, backup mtd if needed

    minimum:

    - "firmware-info"
    - "kernel"
    - "rootfs"

 9. On initramfs image, upload sysupgrade image to the device and perform
    sysupgrade
10. Wait ~200 seconds to complete flashing and rebooting.
    If the device is booted with stock firmware, login to bootmenu and
    call "[B]: Boot with backup firmware and set as default." to set the
    first OS image as default and boot it.

Notes:

- Both colors of Bi-color LEDs on the front panel cannot be turned on at
  the same time.

- "PWR" and "Logo" LEDs are connected to power source directly.

- The following partitions are added for OpenWrt.
  These partitions are contained in "uboot" partition (0x0-0x1fffff) on
  stock firmware.

  - "firmware-info"
  - "dtb"
  - "u-boot-env"
  - "board-info"

Image header for bootmenu tftp:

  0x0 - 0xf  : ?
 0x10 - 0x2f : Image Name
 0x30 - 0x17f: ?
0x180 - 0x183: Kernel Offset*
0x184 - 0x187: Kernel Length*
0x188 - 0x18b: RootFS Offset (ext2)*
0x18c - 0x18f: RootFS Length (ext2)*
0x190 - 0x193: DTB Offset
0x194 - 0x197: DTB Length
0x198 - 0x19b: Data Offset (jffs2)
0x19c - 0x19f: Data Length (jffs2)
0x1a0 - 0x1ff: ?

*: required for initramfs image

MAC addresses:

(eth0): 90:6C:AC:xx:xx:98 (board-info (OpenWrt), 0xd880 (hex))
WAN 1 : 90:6C:AC:xx:xx:99
WAN 2 : 90:6C:AC:xx:xx:9A
LAN 1 : 90:6C:AC:xx:xx:9B
LAN 2 : 90:6C:AC:xx:xx:9C
LAN 3 : 90:6C:AC:xx:xx:9D
LAN 4 : 90:6C:AC:xx:xx:9E
LAN 5 : 90:6C:AC:xx:xx:9F
WLAN  : 88:DC:96:xx:xx:xx (MiniPCIe Card)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Tested-by: Raylynn Knight <rayknight@me.com>
6 days agomvebu: add support for Fortinet FortiWiFi 50E-2R
INAGAKI Hiroshi [Wed, 8 Mar 2023 12:54:14 +0000 (21:54 +0900)]
mvebu: add support for Fortinet FortiWiFi 50E-2R

Fortinet FortiWiFi 50E-2R (FWF-50E-2R) is a UTM with 2x WLAN, based on
Armada 385 (88F6820).

Specification:

- SoC          : Marvell Armada 385 88F6820
- RAM          : DDR3 2 GiB (4x Nanya NT5CC512M8EN-EK)
- Flash        : SPI-NOR 128 MiB (Macronix MX66L1G45GMI-10G)
- Ethernet     : 7x 10/100/1000 Mbps
  - LAN 1-5    : Marvell 88E6176
  - WAN 1, 2   : Marvell 88E1512 (2x)
- WLAN         : Gemtek WMDQ-177ACN (Qualcomm Atheros QCA9892 (2T2R))
                 (2x)
  - interface  : MiniPCIe
- LEDs/Keys    : 18x/1x
- UART         : "CONSOLE" port (RJ-45, RS-232C level)
  - port       : ttyS0
  - settings   : 9600bps 8n1
  - assignment : 1:NC , 2:NC , 3:TXD, 4:GND,
                 5:GND, 6:RXD, 7:NC , 8:NC
  - note       : compatible with Cisco console cable
- HW Monitoring: nuvoTon NCT7802Y
- Power        : 12 VDC, 2.5 A
  - plug       : Molex 5557-02R

Flash instruction using initramfs image:

 1. Power on FWF-50E-2R and interrupt to show bootmenu
 2. Call "[I]: System information." -> "[S]: Set serial port baudrate."
    and set baudrate to 9600 bps
 3. Call "[R]: Review TFTP parameters.", check TFTP parameters and
    connect computer to "Image download port" in the parameters
 4. Prepare TFTP server with the parameters obtained above
 5. Rename OpenWrt initramfs image to "image.out" and put to TFTP
    directory
 6. Call "[T]: Initiate TFTP firmware transfer." to download initramfs
    image from TFTP server
 7. Type "R" key when the following message is showed, to boot initramfs
    image without flashing to spi-nor flash

    "Save as Default firmware/Backup firmware/Run image without saving:[D/B/R]?"

 8. On initramfs image, backup mtd if needed

    minimum:

    - "firmware-info"
    - "kernel"
    - "rootfs"

 9. On initramfs image, upload sysupgrade image to the device and perform
    sysupgrade
10. Wait ~200 seconds to complete flashing and rebooting.
    If the device is booted with stock firmware, login to bootmenu and
    call "[B]: Boot with backup firmware and set as default." to set the
    first OS image as default and boot it.

Notes:

- Both colors of Bi-color LEDs on the front panel cannot be turned on at
  the same time.

- "PWR" and "Logo" LEDs are connected to power source directly.

- The following partitions are added for OpenWrt.
  These partitions are contained in "uboot" partition (0x0-0x1fffff) on
  stock firmware.

  - "firmware-info"
  - "dtb"
  - "u-boot-env"
  - "board-info"

Image header for bootmenu tftp:

  0x0 - 0xf  : ?
 0x10 - 0x2f : Image Name
 0x30 - 0x17f: ?
0x180 - 0x183: Kernel Offset*
0x184 - 0x187: Kernel Length*
0x188 - 0x18b: RootFS Offset (ext2)*
0x18c - 0x18f: RootFS Length (ext2)*
0x190 - 0x193: DTB Offset
0x194 - 0x197: DTB Length
0x198 - 0x19b: Data Offset (jffs2)
0x19c - 0x19f: Data Length (jffs2)
0x1a0 - 0x1ff: ?

*: required for initramfs image

MAC addresses:

(eth0): 90:6C:AC:xx:xx:98 (board-info (OpenWrt), 0xd880 (hex))
WAN 1 : 90:6C:AC:xx:xx:99
WAN 2 : 90:6C:AC:xx:xx:9A
LAN 1 : 90:6C:AC:xx:xx:9B
LAN 2 : 90:6C:AC:xx:xx:9C
LAN 3 : 90:6C:AC:xx:xx:9D
LAN 4 : 90:6C:AC:xx:xx:9E
LAN 5 : 90:6C:AC:xx:xx:9F
WLAN 1: 1C:49:7B:xx:xx:xx (MiniPCIe Card)
WLAN 2: 1C:49:7B:xx:xx:xx (MiniPCIe Card)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Tested-by: Raylynn Knight <rayknight@me.com>
6 days agomvebu: add support for Fortinet FortiGate 52E
INAGAKI Hiroshi [Wed, 8 Mar 2023 12:54:14 +0000 (21:54 +0900)]
mvebu: add support for Fortinet FortiGate 52E

Fortinet FortiGate 52E (FG-52E) is a UTM, based on Armada 385 (88F6820).

Specification:

- SoC          : Marvell Armada 385 88F6820
- RAM          : DDR3 2 GiB (4x Micron MT41K512M8DA-107, "D9SGQ")
- Flash        : SPI-NOR 128 MiB (Macronix MX66L1G45GMI-10G)
- SSD          : mSATA SSD 64 GB (2x A-DATA XM21E (AXM21ES3-32GM-B))
  - mode       : SATA III 6Gbps
  - power      : 3.3 VDC, 3.1 W (Max.)
- Ethernet     : 7x 10/100/1000 Mbps
  - LAN 1-5    : Marvell 88E6176
  - WAN 1, 2   : Marvell 88E1512 (2x)
- LEDs/Keys    : 18x/1x
- UART         : "CONSOLE" port (RJ-45, RS-232C level)
  - port       : ttyS0
  - settings   : 9600bps 8n1
  - assignment : 1:NC , 2:NC , 3:TXD, 4:GND,
                 5:GND, 6:RXD, 7:NC , 8:NC
  - note       : compatible with Cisco console cable
- HW Monitoring: nuvoTon NCT7802Y
- Power        : 12 VDC, 2.5 A
  - plug       : Molex 5557-02R

Flash instruction using initramfs image:

 1. Power on FG-52E and interrupt to show bootmenu
 2. Call "[I]: System information." -> "[S]: Set serial port baudrate."
    and set baudrate to 9600 bps
 3. Call "[R]: Review TFTP parameters.", check TFTP parameters and
    connect computer to "Image download port" in the parameters
 4. Prepare TFTP server with the parameters obtained above
 5. Rename OpenWrt initramfs image to "image.out" and put to TFTP
    directory
 6. Call "[T]: Initiate TFTP firmware transfer." to download initramfs
    image from TFTP server
 7. Type "R" key when the following message is showed, to boot initramfs
    image without flashing to spi-nor flash

    "Save as Default firmware/Backup firmware/Run image without saving:[D/B/R]?"

 8. On initramfs image, backup mtd if needed

    minimum:

    - "firmware-info"
    - "kernel"
    - "rootfs"

 9. On initramfs image, upload sysupgrade image to the device and perform
    sysupgrade
10. Wait ~200 seconds to complete flashing and rebooting.
    If the device is booted with stock firmware, login to bootmenu and
    call "[B]: Boot with backup firmware and set as default." to set the
    first OS image as default and boot it.

Notes:

- Both colors of Bi-color LEDs on the front panel cannot be turned on at
  the same time.

- "PWR" and "Logo" LEDs are connected to power source directly.

- The following partitions are added for OpenWrt.
  These partitions are contained in "uboot" partition (0x0-0x1fffff) on
  stock firmware.

  - "firmware-info"
  - "dtb"
  - "u-boot-env"
  - "board-info"

Image header for bootmenu tftp:

  0x0 - 0xf  : ?
 0x10 - 0x2f : Image Name
 0x30 - 0x17f: ?
0x180 - 0x183: Kernel Offset*
0x184 - 0x187: Kernel Length*
0x188 - 0x18b: RootFS Offset (ext2)*
0x18c - 0x18f: RootFS Length (ext2)*
0x190 - 0x193: DTB Offset
0x194 - 0x197: DTB Length
0x198 - 0x19b: Data Offset (jffs2)
0x19c - 0x19f: Data Length (jffs2)
0x1a0 - 0x1ff: ?

*: required for initramfs image

MAC addresses:

(eth0): 90:6C:AC:xx:xx:98 (board-info (OpenWrt), 0xd880 (hex))
WAN 1 : 90:6C:AC:xx:xx:99
WAN 2 : 90:6C:AC:xx:xx:9A
LAN 1 : 90:6C:AC:xx:xx:9B
LAN 2 : 90:6C:AC:xx:xx:9C
LAN 3 : 90:6C:AC:xx:xx:9D
LAN 4 : 90:6C:AC:xx:xx:9E
LAN 5 : 90:6C:AC:xx:xx:9F

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 days agomvebu: add support for Fortinet FortiGate 51E
INAGAKI Hiroshi [Sat, 20 Jan 2024 06:34:41 +0000 (15:34 +0900)]
mvebu: add support for Fortinet FortiGate 51E

Fortinet FortiGate 51E (FG-51E) is a UTM, based on Armada 385 (88F6820).

Specification:

- SoC          : Marvell Armada 385 88F6820
- RAM          : DDR3 2 GiB (4x Micron MT41K512M8DA-107, "D9SGQ")
- Flash        : SPI-NOR 128 MiB (Macronix MX66L1G45GMI-10G)
- SSD          : mSATA SSD 32 GB (A-DATA XM21E (AXM21ES3-32GM-B))
  - mode       : SATA III 6Gbps
  - power      : 3.3 VDC, 3.1 W (Max.)
- Ethernet     : 7x 10/100/1000 Mbps
  - LAN 1-5    : Marvell 88E6176
  - WAN 1, 2   : Marvell 88E1512 (2x)
- LEDs/Keys    : 18x/1x
- UART         : "CONSOLE" port (RJ-45, RS-232C level)
  - port       : ttyS0
  - settings   : 9600bps 8n1
  - assignment : 1:NC , 2:NC , 3:TXD, 4:GND,
                 5:GND, 6:RXD, 7:NC , 8:NC
  - note       : compatible with Cisco console cable
- HW Monitoring: nuvoTon NCT7802Y
- Power        : 12 VDC, 2.5 A
  - plug       : Molex 5557-02R

Flash instruction using initramfs image:

 1. Power on FG-51E and interrupt to show bootmenu
 2. Call "[I]: System information." -> "[S]: Set serial port baudrate."
    and set baudrate to 9600 bps
 3. Call "[R]: Review TFTP parameters.", check TFTP parameters and
    connect computer to "Image download port" in the parameters
 4. Prepare TFTP server with the parameters obtained above
 5. Rename OpenWrt initramfs image to "image.out" and put to TFTP
    directory
 6. Call "[T]: Initiate TFTP firmware transfer." to download initramfs
    image from TFTP server
 7. Type "R" key when the following message is showed, to boot initramfs
    image without flashing to spi-nor flash

    "Save as Default firmware/Backup firmware/Run image without saving:[D/B/R]?"

 8. On initramfs image, backup mtd if needed

    minimum:

    - "firmware-info"
    - "kernel"
    - "rootfs"

 9. On initramfs image, upload sysupgrade image to the device and perform
    sysupgrade
10. Wait ~200 seconds to complete flashing and rebooting.
    If the device is booted with stock firmware, login to bootmenu and
    call "[B]: Boot with backup firmware and set as default." to set the
    first OS image as default and boot it.

Notes:

- Both colors of Bi-color LEDs on the front panel cannot be turned on at
  the same time.

- "PWR" and "Logo" LEDs are connected to power source directly.

- The following partitions are added for OpenWrt.
  These partitions are contained in "uboot" partition (0x0-0x1fffff) on
  stock firmware.

  - "firmware-info"
  - "dtb"
  - "u-boot-env"
  - "board-info"

Image header for bootmenu tftp:

  0x0 - 0xf  : ?
 0x10 - 0x2f : Image Name
 0x30 - 0x17f: ?
0x180 - 0x183: Kernel Offset*
0x184 - 0x187: Kernel Length*
0x188 - 0x18b: RootFS Offset (ext2)*
0x18c - 0x18f: RootFS Length (ext2)*
0x190 - 0x193: DTB Offset
0x194 - 0x197: DTB Length
0x198 - 0x19b: Data Offset (jffs2)
0x19c - 0x19f: Data Length (jffs2)
0x1a0 - 0x1ff: ?

*: required for initramfs image

MAC addresses:

(eth0): 70:4C:A5:xx:xx:98 (board-info (OpenWrt), 0xd880 (hex))
WAN 1 : 70:4C:A5:xx:xx:99
WAN 2 : 70:4C:A5:xx:xx:9A
LAN 1 : 70:4C:A5:xx:xx:9B
LAN 2 : 70:4C:A5:xx:xx:9C
LAN 3 : 70:4C:A5:xx:xx:9D
LAN 4 : 70:4C:A5:xx:xx:9E
LAN 5 : 70:4C:A5:xx:xx:9F

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Tested-by: Raylynn Knight <rayknight@me.com>
6 days agomvebu: separate common parts to new dtsi for FortiGate/FortiWiFi 5xE
INAGAKI Hiroshi [Tue, 5 Dec 2023 13:15:38 +0000 (22:15 +0900)]
mvebu: separate common parts to new dtsi for FortiGate/FortiWiFi 5xE

Add a new dtsi which contains the common parts of Fortinet
FortiGate/FortiWiFi 5xE series devices.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 days agomvebu: separate common parts to new dtsi for FortiGate/FortiWiFi 3xE
INAGAKI Hiroshi [Tue, 5 Dec 2023 13:15:38 +0000 (22:15 +0900)]
mvebu: separate common parts to new dtsi for FortiGate/FortiWiFi 3xE

Add a new dtsi which contains the common parts of Fortinet
FortiGate/FortiWiFi 3xE series devices.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 days agomvebu: rename common dtsi of FortiGate 30E/50E
INAGAKI Hiroshi [Tue, 5 Dec 2023 13:15:38 +0000 (22:15 +0900)]
mvebu: rename common dtsi of FortiGate 30E/50E

Rename the common dtsi of Fortinet FortiGate 30E/50E for the preparation
of adding support for the other FortiGate/FortiWiFi 3xE/5xE devices.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 days agomvebu: add common image definition for FortiGate devices
INAGAKI Hiroshi [Mon, 4 Dec 2023 12:02:13 +0000 (21:02 +0900)]
mvebu: add common image definition for FortiGate devices

Add a common definition of Fortinet FortiGate devices to
image/cortexa9.mk for a preparation of adding support for
other FortiGate 3xE/5xE devices.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 days agoath79: qca9563: add support for Amplifi Router HD
Kristian Skramstad [Wed, 17 Apr 2024 13:14:59 +0000 (15:14 +0200)]
ath79: qca9563: add support for Amplifi Router HD

Hardware:
    SoC: Qualcomm Atheros QCA956X ver 1 rev 0
    CPU clock: 775.000 MHz
    Memory: 128 MB DDR2
    Flash: 32 MB SPI NOR mx25l25635e
    Switch: Atheros AR8327 rev. 4
    Ethernet: 5x 10/100/1000 Mbps (1 WAN + 4 LAN)
    Buttons: 1x Reset
    Serial: TX, RX, GND, VCC
    Baudrate: 115200
    Wifi: Qualcomm Atheros qca988x 802.11ac/n - 3x3
          Qualcomm Atheros AR9561 802.11b/g/n - 3x3

Not working:
    Leds: 1x via a SPI controller
    Display: ST7789V or ILI9341V
    controlled by stm32f205.

Note:
    DSA changes are ready, but we have an issue with
    ports not working after 20-30 minutes. So for now
    we use swconfig.

Installation: serial connection only
There is a J11 four pin connector. You need to connect TX, RX and GND.
You can find very good information about the device here
https://github.com/alexanderhenne/AFi-R?tab=readme-ov-file#finding-j11

Upgrading via serial port:
1.  Download the kernel initramfs image. Copy the image to a TFTP server
2.  Connect to console on the AP, and connect the LAN1 port to your PC LAN
3.  Stop autoboot to get to U-boot shell
    Interrupt the autoboot process by pressing any key when prompted
4.  Transfer the kernel image with TFTP
    Set your ip address on your TFTP server to 192.168.1.254
    # tftpboot 0x81000000 amplifi-router-hd-initramfs-kernel.bin
5.  Load the image
    # bootm 0x81000000
6.  SCP sysupgrade image from your PC to the Amplifi HD
    (If you use a newer mac use scp -O)
    # scp openwrt-ath79-generic-ubnt_amplifi-router-hd-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/
7.  Write sysupgrade to the firmware partition
    # mtd write /tmp/openwrt-ath79-generic-ubnt_amplifi-router-hd-squashfs-sysupgrade.bin firmware
8.  Reboot your device
    # reboot

Credit to alexanderhenne for all the information.

Signed-off-by: Kristian Skramstad <kristian+github@83.no>
6 days agoramips: add support for ELECOM WRC-X1800GS
INAGAKI Hiroshi [Sat, 11 May 2024 06:35:50 +0000 (15:35 +0900)]
ramips: add support for ELECOM WRC-X1800GS

ELECOM WRC-X1800GS is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based on
MT7621A.

Specification:

- SoC               : MediaTek MT7621A
- RAM               : DDR3 256 MiB
- Flash             : RAW-NAND 128 MiB (Macronix MX30LF1G28AD-TI)
- WLAN              : 2.4/5 GHz 2T2R (MediaTek MT7915D)
- Ethernet          : 5x 10/100/1000 Mbps
  - switch          : MediaTek MT7530 (SoC)
- LEDs/Keys (GPIO)  : 7x/4x
- UART              : pin-header on PCB ("J5")
  - arrangement     : 3.3V, TX, RX, NC, GND from tri-angle marking
  - settings        : 115200n8
- Power             : 12 VDC, 1 A

Flash instruction using initramfs-factory image:

1. Boot WRC-X1800GS normally with "Router" mode
2. Access to "http://192.168.2.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt initramfs-factory image and click apply ("適用")
   button
4. After flashing initramfs-factory image and reboot, upload the
   sysupgrade image and perform sysupgrade with it
5. Wait ~120 seconds to complete flashing

Notes:

- WRC-X1800GS has 2x os images. Those are switched on every firmware
  updating on stock firmware, but dual-boot feature on this device
  cannot be handled on OpenWrt. So the 1st image is always used on
  OpenWrt.
  This is controlled by "bootnum" variable embedded in "persist"
  partition (addr: 0x4).

- WRC-X1800GS has 2x HW revisions. There are some small changes, but the
  same DeviceTree in stock firmware is used for both revisions.
  On this support of WRC-X1800GS, 2x green:wlan-2g-N LEDs are defined
  for each revision and the same default triggers are set.

MAC addresses:

LAN    : 38:97:A4:xx:xx:38 (Factory, 0x1fdfa (hex) / Ubootenv, ethaddr (text))
WAN    : 38:97:A4:xx:xx:3B (Factory, 0x1fdf4 (hex))
2.4 GHz: 38:97:A4:xx:xx:39
5 GHz  : 38:97:A4:xx:xx:3A

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 days agoramips: parameterize some values in Build/znet-header
INAGAKI Hiroshi [Sat, 11 May 2024 05:14:16 +0000 (14:14 +0900)]
ramips: parameterize some values in Build/znet-header

Parameterize magic number and header length to use the device-specific
values.

example:

On WRC-X1800GS, an additional ELECOM-specific header and a magic number
"COMC" are required.

Stock FW v1.18:

$ hexdump -n $((0x40080)) -C wrc-x1800gs_v1.18.bin
00000000  45 4c 45 43 4f 4d 00 00  57 52 43 2d 58 31 38 30  |ELECOM..WRC-X180|
00000010  30 47 53 00 00 00 00 00  00 00 00 00 00 00 00 00  |0GS.............|
00000020  00 00 00 00 00 00 00 00  31 2e 31 38 00 00 00 00  |........1.18....|
00000030  00 00 00 00 00 00 00 00  43 4f 4d 43 04 00 ac 00  |........COMC....|
00000040  40 f0 49 74 b1 e8 6a ca  e4 20 65 1f 34 2e 30 34  |@.It..j.. e.4.04|
00000050  28 58 56 46 2e 31 29 62  31 37 00 00 00 00 00 00  |(XVF.1)b17......|
00000060  00 00 00 00 00 00 00 00  ff ff ff ff ff ff ff ff  |................|
00000070  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00040000  d0 0d fe ed 00 36 9c c0  00 00 00 38 00 36 9a e0  |.....6.....8.6..|
00040010  00 00 00 28 00 00 00 11  00 00 00 10 00 00 00 00  |...(............|
00040020  00 00 00 6c 00 36 9a a8  00 00 00 00 00 00 00 00  |...l.6..........|
00040030  00 00 00 00 00 00 00 00  00 00 00 01 00 00 00 00  |................|
00040040  00 00 00 03 00 00 00 04  00 00 00 62 65 54 97 8f  |...........beT..|
00040050  00 00 00 03 00 00 00 28  00 00 00 00 4d 49 50 53  |.......(....MIPS|
00040060  20 4f 70 65 6e 57 72 74  20 46 49 54 20 28 46 6c  | OpenWrt FIT (Fl|
00040070  61 74 74 65 6e 65 64 20  49 6d 61 67 65 20 54 72  |attened Image Tr|
00040080

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 days agouboot-envtools: add support for ELECOM WRC-X1800GS
INAGAKI Hiroshi [Sat, 11 May 2024 08:05:10 +0000 (17:05 +0900)]
uboot-envtools: add support for ELECOM WRC-X1800GS

Add support for ELECOM WRC-X1800GS on uboot-envtools, to update
bootmenu_delay variable on sysupgrade.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 days agobuild: fix version info in cyclonedx sbom
Akshay Bhat [Fri, 19 Apr 2024 18:26:45 +0000 (11:26 -0700)]
build: fix version info in cyclonedx sbom

Prior e8725a932e16eaf6ec51add8c084d959cbe32ff2, version used to be
VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
After e8725a932e16eaf6ec51add8c084d959cbe32ff2, the version is:
VERSION:=$(PKG_VERSION)-r$(PKG_RELEASE)

Hence the gen_*_cyclonedxsbom functions need to be updated to remove
the trailing -r prefix in the version in order to generate correct
version info in the SBOM.

Signed-off-by: Akshay Bhat <nodeax@gmail.com>
6 days agoipq40xx: eap1300: add eap1300ext as alt model
Ryan Castellucci [Mon, 6 May 2024 14:12:10 +0000 (15:12 +0100)]
ipq40xx: eap1300: add eap1300ext as alt model

The EnGenius EAP1300 and EAP1300EXT use identical boards and firmware
(as flashed) from the vendor.

As with the EAP1300, the EAP1300EXT requires a specific firmware version
to flash OpenWRT. Unfortunately, the required firmware is truncated on
the vendor's website.

A working file can be created as follows:

```
curl \
https://www.engeniustech.com/wp_firmware/eap1300-all-v3.5.3.5_c1.9.04.bin \
| perl -pe 's/\x09EAP1300_A/\x0cEAP1300EXT_A/' \
> eap1300ext-all-v3.5.3.5_c1.9.04.bin
```

The file should have sha256:
`58a1197a426139a12b03fd432334e677124cbe3384349bd7337f2ee71f1dcfd4`.

Please see commit 2b4ac79 for further
details.

The vendor firmware must be decrypted before it can be flashed from
OpenWRT. A tool able to do that is available from:

https://github.com/ryancdotorg/enfringement/blob/main/decrypt.py

Signed-off-by: Ryan Castellucci <code@ryanc.org>
7 days agomediatek: filogic: prevent faulty mac address assignment
Leon M. Busch-George [Fri, 17 May 2024 18:10:25 +0000 (20:10 +0200)]
mediatek: filogic: prevent faulty mac address assignment

The vendor U-Boot on the Cudy M3000 and the Yuncore AX835 assign random
mac addresses on boot and set the 'local-mac-address' property which
prevents Openwrt from assigning the correct address from evmem.

This patch removes the alias for ethernet0 so that U-Boot doesn't add the
property, removes the workaround from 02_network, and adds back the nvmem
definition for the M3000.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
7 days agoixp4xx: Add back support for D-Link DSM G600 A
Linus Walleij [Tue, 21 May 2024 07:30:28 +0000 (09:30 +0200)]
ixp4xx: Add back support for D-Link DSM G600 A

OpenWrt supported the D-Link DSM G600 A in the past. It has
64 MB of RAM and 16 MB of flash so it will run just fine,
and should be quite usable with a rootfs on an external
harddrive.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 days agoixp4xx: Add back support for Freecom FSG-3
Linus Walleij [Mon, 20 May 2024 20:05:13 +0000 (22:05 +0200)]
ixp4xx: Add back support for Freecom FSG-3

OpenWrt supported the Freecom FSG-3 in the past. It has
64 MB of RAM so will run fine, but the bare 4 MB of flash
makes it a non-default target. The generated compressed
image is currently below 4MB (just 3.3 MB) though, so it
should be possible to flash just fine with a rootfs on
a harddrive or USB stick, which is what the FSG-3 used
in the past as well.

The device has a WAN port on eth0 and three LAN ports on
eth1. The LAN ports are probably a DSA switch but the
old OpenWrt base never activated that, instead it relies
on boot defaults.

Due to questionable usablity without tweaking and further
work this image is not built by default, but made available
for developers who know what they are doing.

The TAR+CRC image generation is a rewritten version of the
earlier support code.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 days agoixp4xx: Add back support for Iomega NAS100D
Linus Walleij [Mon, 20 May 2024 19:32:55 +0000 (21:32 +0200)]
ixp4xx: Add back support for Iomega NAS100D

OpenWrt supported the Iomega NAS100D in the past and it has
64 MB of RAM so if booted from a harddrive it will probably
work just fine. The APEX boot loader already has a build
variant for this machine that we can just pick up and use.

This device has a single ethernet port so bring this online
with DHCP as expected for a NAS device.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 days agoixp4xx: Add ext4 and rootfs-part to features
Linus Walleij [Tue, 21 May 2024 07:28:56 +0000 (09:28 +0200)]
ixp4xx: Add ext4 and rootfs-part to features

Several of the IXP4xx machines mount root on external harddrives
so add EXT4 and rootfs-part to the featureset so the right
features are always selected.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7 days agouboot-mediatek: fix white-space in package Makefile
Daniel Golle [Fri, 24 May 2024 21:38:34 +0000 (22:38 +0100)]
uboot-mediatek: fix white-space in package Makefile

Replace accidental spaces with tabs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 days agouboot-mediatek: refresh patches
Daniel Golle [Sat, 25 May 2024 02:52:41 +0000 (03:52 +0100)]
uboot-mediatek: refresh patches

Patch 290-mt7981-add-USB-nodes.patch needs a refresh.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>