Commit graph

64747 commits

Author SHA1 Message Date
Paweł Owoc
40e4dd5d31 uboot-tools: update ubootenv_add_* functions
Add posibility to specify:
- ROOTDEV (mmc)
- number of blocks (mtd)

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18818
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-26 23:12:20 +02:00
Paweł Owoc
68527d87cc uboot-tools: move ubootenv_add_* functions to common functions
Functions ubootenv_add_mtd, ubootenv_add_sys_mtd and ubootenv_add_mmc
can be shared so make them common.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18818
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-26 23:12:20 +02:00
Felix Fietkau
35a4608a30 wifi-scripts: iwinfo(ucode): add missing null checks
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-06-26 19:44:43 +02:00
Felix Fietkau
fdcb0e0b24 wifi-scripts: fix validation of require_mode
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-06-26 19:18:49 +02:00
Felix Fietkau
945d168dbe wifi-scripts: fix missing variables for setting frag/rts
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-06-26 19:16:42 +02:00
Eric Fahlgren
e56845fae3 scripts: getver.sh: approximate version from date
When doing package support and management it is often the case that
knowing the corresponding openwrt repo's release version is useful.

For example, when adding package changes to the ASU server, the
openwrt revision is used as the cutoff for applying those changes.
Knowing a package change's hash in its remote feed repo allows us
to look up its change date, which we can now use with getver.sh
to approximate the revision in openwrt at which it was made.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17817
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-26 10:29:50 +02:00
Daniel Golle
e310d7187e mediatek: mt7988a: 6.12: move SoC dtsi changes to dedicated patch
Move changes to mt7988a.dtsi from patch adding the support for the
MT7988A Reference Board to a dedicated patch to ease maintainance.

Fixes: f9206d1111 ("kernel/mediatek: 6.12: replace downstream files by patches")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-06-26 01:10:34 +01:00
Daniel Golle
e46eeb89d7 mediatek: 6.12: mt7988a-rfb: complete conversion to all-UBI fitblk
Restore the conversion to an all-UBI NAND layout and use of fitblk on
SPI-NAND connected via the mt65xx SPI controller.
Apply the same also for SPI-NAND connected via the SNFI controller, and
use fitblk also for boot from SPI-NOR, eMMC and SD.

Fixes: f9206d1111 ("kernel/mediatek: 6.12: replace downstream files by patches")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-06-26 01:10:18 +01:00
Daniel Golle
5d266b49ac mediatek: 6.12: fix wrong SoC compatible of MT7988A RFB
The MediaTek MT7988A RFB currently hangs on boot as CCI fails to probe.
This is due to the wrong SoC compatible string "mediatek,mt7988" instead of
"mediatek,mt7988a". Fix that.

Fixes: f9206d1111 ("kernel/mediatek: 6.12: replace downstream files by patches")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-06-26 01:10:18 +01:00
Mario Andrés Pérez
dc80e69801 uboot-envtools: set nonshared flag correctly per-subpackage
Currently, uboot-envtools is being built for a (shared) instruction
set (phase2 in buildbots) instead of target-specific (phase1 in builbots).
So the package does not contain the uci-defaults file specific for each
target_subtarget. (Only the fortunate target with coincidentally the same
instruction set and target as the SDK chosen by the buildbot will have the
uci-defaults file.)

This commit sets the nonshared flag correctly in the Makefile so that
uboot-envtools is built for the target-specific (phase 1).

This is done by using the PKGFLAGS variable which is intended for
per-binary flags (instead of PKG_FLAGS which has a global scope), as
stated in some old commits 349e7b635e[1], 2d7eaf2e15[2], 064e7c8f00[3] and
2cb75cd8b9[4].

While at here, use PKG_URL, instead of URL, which is intended for global
scope. As stated in commit e32edf712b[5].

[1] 349e7b635e
[2] 2d7eaf2e15
[3] 064e7c8f00
[4] 2cb75cd8b9
[5] e32edf712b

Fixes: #19040
Fixes: 46e376c ("uboot-tools: migrate uboot-envtools to uboot-tools")

Signed-off-by: Mario Andrés Pérez <mapb_@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19180
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-25 20:51:47 +02:00
Markus Stockhausen
6a1d7bf52b realtek: overwrite c22 polling unconditionally on RTL930x
During setup the mdio driver decides the polling mode of the 4 smi
busses depending on the DTS phy settings. This works as follows:

- set polling to c45 if at least one phy is ethernet-phy-ieee802.3-c45
- set polling to c22 if all phys are ethernet-phy-ieee802.3-c22

On RTL930x it is not possible to switch to c22 if uboot has set c45
before. Fix this by overwriting the bitfield properly. While we are
here:

- Sort variables according to kernel style (inverse christmas tree)
- Initialize fields properly with  = { 0 }
- Use GENMASK() for better readability
- Make use of RTMDIO_MAX_SMI_BUS

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19161
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-25 13:29:00 +02:00
Felix Fietkau
126dc7ddb9 wifi-scripts: fix another regression in the ucode auth_type changes
Clear the right variable
Handle psk2 explicitly

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-06-25 13:26:59 +02:00
Felix Fietkau
8ad5416d99 wifi-scripts: fix corner case in RSN override support
When used, all relevant parameters need to be set

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-06-25 10:49:05 +02:00
Mantas Pucka
d324d6f07e qualcommbe: ipq95xx: add 8devices Kiwi-DVK support
Specifications:
  SoC:     Qualcomm IPQ9570
  RAM:     1 GiB DDR4
  Flash:   4 GiB eMMC
  ETH1:    2.5G Maxlinear GPY211C (48V POE-in)
  ETH2:    10G Realtek RTL8261N
  SFP:     10G SFP+ cage
  WLAN1:   QCN9274 2.4GHz 802.11b/g/n/ax/be 2x2
  WLAN2:   QCN9274 5-6GHz 802.11a/n/ac/ax/be 2x2
  PCIE0:   Gen3x1 mPCIe or M.2(B+M)
  PCIE1:   Gen3x1 M.2(A+E) or M.2(B+M)
  PCIE2:   Gen3x2 M.2(A+E)
  USB:     1x 3.0
  Console: USB-C via FTDI
  Button:  Reset

Install using sysupgrade:

  sysupgrade openwrt-qualcommbe-ipq95xx-8devices_kiwi-dvk-squashfs-sysupgrade.bin

Install using U-Boot:

 * Put factory.bin at TFTP server(192.168.2.254) as fwupdate.bin
 * Run 'run do_recovery' in U-Boot shell

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18435
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-25 10:20:38 +02:00
Mantas Pucka
10055976ec qualcommbe: package PPE and PCS drivers as kmods
This will allow more flexibility in using PHY drivers as kmods.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18435
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-25 10:20:37 +02:00
Alexandru Gagniuc
597fc65a04 kernel: modules: support Maxlinear GPHY
Add support for Maxlinear GPHY module. Also add support for
kmod-polynomial, which is a dependency for this module.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18435
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-25 10:20:37 +02:00
Mantas Pucka
c88c2d40d0 qualcommbe: add PCS driver fixes
After update to v6.12 some PCS driver fixes were dropped and additional
are needed due to updated driver.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18435
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-25 10:20:37 +02:00
Alexandru Gagniuc
8c14f33bb4 qualcommbe: v6.12: update PCS patches to use .pcs_validate()
The original PCS driver did not use the .pcs_validate() in
phylink_pcs_ops. The patches for 1000/2500base-x and 10g modes were
taken from this old driver, and thus did not bother with
.pcs_validate(). Thus, even though these modes are supported, phylink
would not enable them.

To fix these, list these modes in .pcs_validate(). Also list them in
ipq_pcs_clk_rate_get(). While the latter does not appear to change
behavior, it does change the clock rates listed under
/sys/kernel/debug/clk

Co-developed-by: Mantas Pucka <mantas@8devices.com>
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18435
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-25 10:20:37 +02:00
Mantas Pucka
2c6a830c3d qualcommbe: v6.12: drop upstreamed patch
0102-arm64-dts-qcom-ipq9574-Fix-USB-vdd-info.patch was merged in 6.12.34
Other patches automatically refreshed.

Fixes: cb1b656027 ("kernel: bump 6.12 to 6.12.34")
Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/19232
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-25 10:18:23 +02:00
Daniel Golle
3fb1605931 ipq806x: add support for IgniteNet SunSpot AC Wave2
The IgniteNet SS-W2-AC2600 is an 802.11ac outdoor (IP-55) access point.
FCC ID: HEDSSW2AC2600

Specification:
 - Qualcomm dual-core IPQ8068 @ 1.4 GHz
 - 256 MB of DDR3L RAM (2x Winbond W631GU6KB-12)
 - 16 MB of SPI NOR (Winbond W25Q128FW)
 - 128 MB of NAND (Macronix MX30UF1G18AC)
 - Qualcomm QCA9994 2.4GHz 802.11bgn
 - Qualcomm QCA9994 5GHz 802.11ac
 - 2 x 10/100/1000 Mbit/s Ethernet
 - 115200, 8N1 RS-232 console (unpopulated RJ-45)
 - Reset button
 - Power and WLAN LEDs
 - Powered via 802.3at PoE or 12V 2A barrel connector

Tested-by: Elektra Wagenrad <onelektra@gmx.net>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-06-25 02:07:02 +01:00
Daniel Golle
72b895b631 uboot-tools: envtools: ipq806x: add env for IgniteNet SS-W2-AC2600
The IgniteNet SunSpot AC Wave2 uses the standard smem-assigned partition
for its bootloader environment.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-06-25 02:06:57 +01:00
Daniel Golle
2ce1ca11b0 uboot-tools: envtools: ipq806x: ignore case of partition name
The qcomsmem MTD partition parser converts all partition names to
lower case while the vendor solution uses upper case names, which
often made their way into OpenWrt as labels in 'fixed-partitions'
(probably due to contributors and reviewers being unaware of the
qcomsmem parsers).

Use case-insensitive matching of the 'APPSBLENV' name to make
ubootenv_mtdinfo() work in both cases.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-06-25 02:06:57 +01:00
Daniel Golle
d8303b4721 ipq-wifi: add BDF for IgniteNet SS-W2-AC2600
The IgniteNet SunSpot AC Wave2 comes with 2x QCA9994 ath10k chips
connected to the IPQ8068 SoC via PCIe.
Add board-2.bin for both radios on this board.

 3ac4a64 qca9984: add BDFs for IgniteNet SS-W2-AC2600

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-06-25 02:06:57 +01:00
Eric Fahlgren
0c7d564b1d scripts: make-index-json: rework for old Python versions
The current code uses functions and features only found in newer
versions of Python, so rework to allow use on systems only supporting
older Python.  Tested on Python 3.8 (released Oct 2019), but should
work on 3.7 also.

Suggested-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
2025-06-24 23:59:06 +02:00
Paul Spooren
d3324aa208 ci: add missing permission to add comments
While this worked during testing, the repository of a organization requires
extra permissions. Add write access to pull requests, like we do over at
packages.git.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2025-06-24 16:29:05 +02:00
Paul Spooren
8186e5e5a4 ci: add bot to build on comment
This has been requested many times, so let's add this to speed up reviews. When
a member of the "reviewers" group comments the magic word written below, that
specific firmware is created and attached by a bot.

    build <target>/<subtarget>/<profile>

Members of the "reviewers" group have no extra privileges, they can not commit
to the repository nor perform any action outside the `build-on-comment` action.

Motivation is to speedup reviews and have a better source for sharing compiled
firmware.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2025-06-24 16:16:43 +02:00
Felix Fietkau
b48925fd9c wifi-scripts: add support for RSN overide and use it for improved WPA3 compat
Override via RSNE is a relatively new feature, which can be used to enable
WPA3 features in a way that is invisible to older clients.
Use it by default to mask the GCMP-256 cipher from older clients, since
there are compatibility issues with existing devices.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-06-24 15:07:23 +02:00
Erik Servili
9df3d6b21c qualcommax: ipq60xx: WAX610 remove unmountable oem partitions on upgrade
When using TFTP install method on a fresh unit, wifi_fw and ubi_rootfs UBI volumes must be removed or will hang when mounting.

Signed-off-by: Erik Servili <serverror@serverror.com>
Link: https://github.com/openwrt/openwrt/pull/19215
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-24 13:51:15 +02:00
Ondrej Cierny
1ce0eb5bf2 toolchain/wrapper: add missing qstrip to info.mk export
When using an external toolchain, the SetToolchainInfo function
is missing a qstrip call on GCC_VERSION, which results in quotes
making it to the toolchain info.mk file.

This leads to a failure to build the libgcc ipk package because
the quotes make it to its version and filename. For some reason,
it only fails on the first make invocation, but succeeds on
subsequent ones on my setup.

Fix this issue by adding the qstrip, making it consistent with
the internal toolchain approach.

Signed-off-by: Ondrej Cierny <o.cierny@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19192
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-23 13:30:15 +02:00
Tim Harvey
2b0b353104 imx: venice: disable PCI AER
As a workaround to an issue causing hang during PCI enumeration on
imx8mp with a specific PCIe switch, disable PCI AER.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/19189
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-23 11:49:12 +02:00
Tim Harvey
6bb42ddf0e imx: venice: add dt overlay support
Enable DT overlay support:
 - add dt-overlay to board features
 - add DEVICE_DTS_OVERLAYS
 - update the boot script to resize before applying each overlay

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/19189
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-23 11:49:12 +02:00
Tim Harvey
5c9460a4da imx: 6-12: add additional patches
Backport some additional upstream patches:
 - 6.13-arm64-dts-imx8mm-venice-gw73xx-remove-compatible-in-overlay-files.patch
   (this resolves some issues when using dt overlays on gw73xx-0x)
 - 6.16-PCI-imx6-Skip-link-up-workaround-for-newer-platforms.patch
 - pending-PCI-imx6-Remove-apps_reset-toggle-in-_core_reset-function
   (these resolve enumeration issues on imx8mm/imx8mp with a pcie switch)

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/19189
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-23 11:49:12 +02:00
Felix Fietkau
f940f7c1ac hostapd: preserve vif radio mask for extra bss interfaces
Fixes status information and scanning on extra BSS interfaces when operating
on multi-radio devices.

Reported-by: Chad Monroe <chad.monroe@adtran.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-06-23 11:23:12 +02:00
Konstantin Demin
e3cf7088f1 libcrypt-compat: introduce package
glibc 2.39 has removed libcrypt completely.
solution: build libxcrypt with glibc compatibility.

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19160
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-23 11:19:08 +02:00
Mario Andrés Pérez
47b6b9de1a base-files: handle packages alternatives when apk removes packages
On commit 3010ab8 ("base-files: add update_alternatives function") was
implemented the function to handle ALTERNATIVES when using APK (OPKG
handle it internally) but in commit bcc6415 ("base-files: add
compatibility for APK and OPKG") was only called when adding a package,
so call it also when removing packages.

While we are here, check for a more specific *.alternatives files instead
of *.list, and remove redundant "filelist" variable definition.

Fixes: bcc6415 ("base-files: add compatibility for APK and OPKG")
Fixes: https://github.com/openwrt/openwrt/issues/19090
Fixes: https://github.com/openwrt/openwrt/issues/16991
Reported-and-tested-by: Eric Fahlgren <ericfahlgren@gmail.com>
Signed-off-by: Mario Andrés Pérez <mapb_@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19093
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-23 09:39:12 +02:00
Eric Fahlgren
fccd1dd0ae rpcd: update to Git HEAD (2025-06-22)
9389775ceb47 rpc-sys: update packagelist call to handle apk abiversion tag
ed0d01e4360b file: linkstat to get link stat info

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19211
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-23 09:36:32 +02:00
Anton Yu. Ivanusev
7aecbefb52 ramips: mt76x8: add support for Keenetic 4G (KN-1212)
Specification:
SoC: MediaTek MT7628NN
RAM: 128 MB, EtronTech EM68C16CWQG-25H (DDR2)
Flash: 32MB, Winbond 25Q256JVFQ (Dual Boot, SPI)
Switch: MediaTek MT7628AN, 4 ports 100 Mbps
WiFi: MediaTek MT7603 2T2R/2.4GHz 802.11n
GPIO: 3 buttons (Wi-Fi, Reset, FN), 3 LEDs (Power, Internet, Wi-Fi), 1 port USB 2.0

Disassembly:
At the bottom, under the LEDs, there are 2 screws hidden by rubber feet. After removing the screws, pry the gray plastic part around (it is secured with latches) and remove it.

Serial Interface:
The serial interface can be connected to the 5 pin dots located on the right between the operating mode switch and the antenna.
Pins (from antenna to operating mode switch):
VCC
TX
RX
NC
GND
Settings: 115200, 8N1

Flashing via OEM recovery software:
1. Download the OEM recovery software from the manufacturer's website
2. Download the firmware image (for OpenWRT it is *-squashfs-factory.bin), rename it to KN-1212_recovery.bin
3. Replace the file in the fw folder OEM recovery software with the file from step 2.
4. Run the OEM recovery software and follow the instructions.

Flashing via TFTP:
1. Connect your PC and router to port 1-3, configure PC interface using IP 192.168.1.2, mask 255.255.255.252
2. Serve the firmware image (for OpenWRT it is *-squashfs-factory.bin) renamed to KN-1212_recovery.bin via TFTP
3. Power up the router while pressing Reset button on the back
4. Release Restart button when Power LED starts blinking

To revert back to OEM firmware:
The return to the OEM firmware is carried out by using the methods described above with the help of the appropriate firmware image.

When using OEM bootloader, the firmware image size cannot exceed the size of one OEM «Firmware_x» partition or Kernel + rootFS size.

Signed-off-by: Anton Yu. Ivanusev <ivanusevanton@yandex.ru>
Link: https://github.com/openwrt/openwrt/pull/19157
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 23:13:27 +02:00
Markus Stockhausen
83880cd01e realtek: Use Otto timer on RTL931x
Until now the timer management on the RTL931x devices depends
on the MIPS default timer. Looking at the clock progress on
these devices one can see that it is totally off. It is running
at half the required speed (e.g. if 1 minute passes the date
command shows that according to the timers only 30 seconds have
elapsed). This is a mix from wrong DTS and bad startup code.

This is not only a cosmetic issue but has effects on every
delay operation inside the kernel. Switch RTL931x to the proven
Otto timer.

Tested on LGS352C based on RTL9311.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19205
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 23:12:02 +02:00
Markus Stockhausen
ee46517a63 realtek: build Otto timer for RTL931x
The Otto timer is very helpful on the RTL931x devices.
Include it into the builds.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19205
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 23:12:02 +02:00
Markus Stockhausen
f1257b1ca3 realtek: backport MIPS GIC patch
Upstream has gained support for forced affinity settings in the MIPS
GIC interrupt controller. This is needed to enable the Otto timer on
the RTL931x platform. See

https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/
commit/?id=2250db8628a0d8293ad2e0671138b848a185fba1

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19205
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 23:12:02 +02:00
Mieczyslaw Nalewaj
dc95180540 mt76: Change CRLF to LF in patch 002
Change CRLF to LF in patch 002-wifi-mt76-replace-strlcpy-with-strscpy.patch

Fixes: 225622e0f9 ("mt76: replace strlcpy with strscpy")
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/19185
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 22:57:34 +02:00
INAGAKI Hiroshi
97af506edf mvebu: add support for Check Point V-81
Check Point V-80 (Quantum Spark 1590 Appliance) is an Appliance, based
on Armada 8040 (88F8040).

Specification:

- SoC             : Marvell Armada 8040 (88F8040)
- RAM             : DDR4 2 GiB (4x 512 MiB chip)
- Flash           : eMMC 4 GiB
- Ethernet        : 10x 10/100/1000 Mbps
  - LAN 1-8       : Marvell 88E6393X
  - WAN           : Marvell 88E1512
  - DMZ           : Marvell 88E1512 (RJ-45/SFP combo)
- LEDs/Keys (GPIO): 11x/1x
- UART            : "CONSOLE" port (USB 1.1 Type-C)
  - chip          : Silicon Labs CP2102N
  - port          : ttyS0
  - settings      : 115200bps 8n1
- HW Monitoring   : 2x nuvoTon NCT7802Y
- USB             : USB 3.0 Type-A
- Power           : 12 VDC, 3.3 A
  - plug          : DC Plug 2.5/5.5 mm (inner/outer)

Flash instruction (common):

1. Boot V-81 normally
2. Login to the vendor CLI (default: admin/admin) and login to the Linux
   CLI by `expert` command
3. Update U-Boot environment variables by the following commands

   fw_setenv bootcmd_ow_usb 'usb start; load usb 0:1 ${loadaddr} boot.scr && source ${loadaddr}'
   fw_setenv bootcmd_ow_sd 'load mmc 0:1 ${loadaddr} boot.scr && source ${loadaddr}'
   fw_setenv bootcmd_ow_emmc 'run set_mmc_internal; mmc read ${loadaddr} ${prim_header_mmc_blk} 4 && source ${loadaddr}'
   fw_setenv bootcmd 'run bootcmd_ow_usb; run bootcmd_ow_sd; run bootcmd_ow_emmc; run bootcmd_part${activePartition};'

   Attention: don't forget single quatations of values to prevent
              expansion of variables

4. Turn off the device

Flash instruction (USB-boot/SD-boot):

1. Extract and burn (squashfs|ext4)-sdcard.img.gz to USB storage or
   MicroSD card
2. Connect that storage to V-81
3. Turn on V-81 and it will be booted with OpenWrt in that USB storage

Flash instruction (eMMC-boot):

1. Copy initramfs image, dtb and bootsctipt to the USB storage with
   renaming

   initramfs.bin -------> Image
   dtb -----------------> armada-8040-v-81.dtb
   bootscript (.scr) ---> boot.scr

2. Connect that storage to the USB 3.0 port on V-81
3. Turn on V-81 and it will be booted with OpenWrt initramfs image in
   that USB storage
4. Upload (squashfs|ext4)-sysupgrade.gz to V-81
5. Perform sysupgrade with the uploaded image
6. Wait ~100 seconds to complete flashing

Reverting to stock firmware:

1. Turn on V-81 and interrupt booting by Ctrl + C
2. Select "4. Restore to Factory Defaults (local)"
3. Wait ~180 seconds to complete restoring and rebooting

Notes:

- The partition table in the internal eMMC has single partition, but
  "blkdevparts=" parameter will be passed from the bootloader and that
  definition will be used instead.

- The port-side LED pairs of RJ-45/SFP ports on V-81 are switched by a
  GPIO pin of pin7 on &cp0_gpio2. (High(1): RJ-45, Low(0): SFP)
  This needs to be switched manually.

- The MicroSD card slot is too unstable and the following messages are
  printed without "marvell,xenon-phy-slow-mode;" property.

  [   97.060851] mmc0: error -84 whilst initialising SD card
  [   97.137049] mmc0: error -84 whilst initialising SD card
  [   97.214315] mmc0: error -84 whilst initialising SD card
  ...

- There are no detailed information about maximum power consumption
  limit of the SFP port or optional DSL-SFP modules sold officially.
  But the power requirement of almost DSL-SFP modules are 3.3V/700mA, so
  set the maximum value of the SFP port to 2000 mW (Power Level III).

- Do not insert a MicroSD card before turning of the device when OpenWrt
  installation. The stock firmware deletes all files in the first
  partition automatically, to use it as a storage for logs.

MAC addresses:

LAN: 00:1C:7F:xx:xx:FA (mmcblk1boot0, ethaddr  (text))
WAN: 00:1C:7F:xx:xx:F9 (mmcblk1boot0, eth2addr (text))
DMZ: 00:1C:7F:xx:xx:FB (mmcblk1boot0, eth1addr (text))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 22:17:20 +02:00
INAGAKI Hiroshi
2a3cb0e32d uboot-envtools: add support for Check Point V-81
Add support for Check Point V-81 to add/edit bootcmd variables for
booting OpenWrt.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 22:17:20 +02:00
INAGAKI Hiroshi
35c851b813 mvebu: add support for Check Point V-80
Check Point V-80 (Quantum Spark 1550 Appliance) is an Appliance, based
on Armada 7040 (88F7040).

Specification:

- SoC             : Marvell Armada 7040 (88F7040)
- RAM             : DDR4 2 GiB (4x Nanya NT5AD512M8D3-HR)
- Flash           : eMMC 4 GiB (Toshiba THGBMNG5D1LBAIL)
- Ethernet        : 6x 10/100/1000 Mbps
  - LAN 1-5       : Marvell 88E6352
  - WAN           : Marvell 88E1512
- LEDs/Keys (GPIO): 6x/1x
- UART            : "CONSOLE" port (USB 1.1 Type-C)
  - chip          : Silicon Labs CP2102N
  - port          : ttyS0
  - settings      : 115200bps 8n1
- HW Monitoring   : 2x nuvoTon NCT7802Y
- USB             : USB 3.0 Type-A
- Power           : 12 VDC, 3.3 A
  - plug          : DC Plug 2.5/5.5 mm (inner/outer)

Flash instruction (common):

1. Boot V-80 normally
2. Login to the vendor CLI (default: admin/admin) and login to the Linux
   CLI by `expert` command
3. Update U-Boot environment variables by the following commands

   fw_setenv bootcmd_ow_usb 'usb start; load usb 0:1 ${loadaddr} boot.scr && source ${loadaddr}'
   fw_setenv bootcmd_ow_emmc 'run set_mmc_internal; mmc read ${loadaddr} ${prim_header_mmc_blk} 4 && source ${loadaddr}'
   fw_setenv bootcmd 'run bootcmd_ow_usb; run bootcmd_ow_emmc; run bootcmd_part${activePartition};'

   Attention: don't forget single quatations of values to prevent
              expansion of each variables

4. Turn off the device

Flash instruction (USB-boot):

1. Burn (squashfs|ext4)-sdcard.img.gz to USB storage
2. Connect that storage to the USB 3.0 port on V-80
3. Turn on V-80 and it will be booted with OpenWrt in that USB storage

Flash instruction (eMMC-boot):

1. Copy initramfs image, dtb and bootsctipt to the USB storage with
   renaming

   initramfs.bin -------> Image
   dtb -----------------> armada-7040-v-80.dtb
   bootscript (.scr) ---> boot.scr

2. Connect that storage to the USB 3.0 port on V-80
3. Turn on V-80 and it will be booted with OpenWrt initramfs image in
   that USB storage
4. Upload (squashfs|ext4)-sysupgrade.gz to V-80
5. Perform sysupgrade with the uploaded image
6. Wait ~100 seconds to complete flashing

Reverting to stock firmware:

1. Turn on V-80 and interrupt booting by Ctrl + C
2. Select "4. Restore to Factory Defaults (local)"
3. Wait ~180 seconds to complete restoring and rebooting

Notes:

- V-80 has some HW versions. Internal MicroSD card slot and mPCIe slot
  is available on some HW versions, but not on the other HW versions.

  confirmed (MicroSD/mPCIe slots):

  - 1.0.1: unavailable
  - 1.0.3: available

- The partition table in the internal eMMC has single partition, but
  "blkdevparts=" parameter will be passed from the bootloader and that
  definition will be used instead.

MAC addresses:

LAN: 00:1C:7F:xx:xx:4B (mmcblk1boot0, ethaddr (text))
WAN: 00:1C:7F:xx:xx:4A (mmcblk1boot0, eth1addr (text))

Tested-by: Yanase Yuki <dev@zpc.st>
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 22:17:20 +02:00
INAGAKI Hiroshi
92a5a4935e uboot-envtools: add support for Check Point V-80
Add support for Check Point V-80 to add/edit bootcmd variables for
booting OpenWrt.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 22:17:20 +02:00
INAGAKI Hiroshi
2c379af543 mvebu: add specific signature support to Build/boot-scr
Add image-specific signature support to Build/boot-scr.
This is required to switch root devices passed to the kernel on Check
Point V-80 and V-81.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 22:17:20 +02:00
INAGAKI Hiroshi
61f3e2d132 mvebu: cortexa72: enable emmc feature
Enable "emmc" feature to use the emmc helpers on sysupgrade.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 22:17:20 +02:00
INAGAKI Hiroshi
e10a811408 mvebu: cortexa72: enable CONFIG_CMDLINE_PARTITION for blkdevparts
Enable CONFIG_CMDLINE_PARTITION symbol to use "blkdevparts=" parameter
support on Check Point V-80.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 22:17:20 +02:00
INAGAKI Hiroshi
4392d1a92b build: add dtb support for sysupgrade-tar
Add dtb support for Build/sysupgrade-tar definition and
sysupgrade-tar.sh script.
This changes are required for updating dtb separately.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 22:17:20 +02:00
INAGAKI Hiroshi
f9743c5190 base-files: add dtb support to emmc_upgrade_tar()
Add dtb support for emmc_upgrade_tar() to update dtb separately.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 22:17:20 +02:00