Commit Graph

28725 Commits

Author SHA1 Message Date
Shiji Yang
7189b45784 ath79: fix ethernet driver build errors on kernel 6.1
Some net APIs have changed on the new kernel. Update them to fix
compile errors.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-09-08 18:06:30 +02:00
Shiji Yang
5f59d28bc3 ath79: refresh patches and configs to introduce kernel 6.1 support
All kernel configs are refreshed by
'make kernel_oldconfig CONFIG_TARGET=target' and
'make kernel_oldconfig CONFIG_TARGET=subtarget'.

upstreamed patches:
010-v5.17-spi-ar934x-fix-transfer-and-word-delays.patch
011-v5.17-spi-ar934x-fix-transfer-size.patch
020-v5.18-spi-ath79-Implement-the-spi_mem-interface.patch
030-v5.18-ath79-add-support-for-booting-QCN550x.patch

build and run tested on:
ath79/generic/ar7241
ath79/generic/qca9563
ath79/nand/ar9344

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-09-08 18:06:30 +02:00
Shiji Yang
d9a9caf352 ath79: copy patches and kernel config from 5.15 to 6.1
This is preparation for kernel 6.1 support.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-09-08 18:06:30 +02:00
Shiji Yang
c60dd7bef9 ath79: rename and sort patches by OpenWrt naming rules
The patches in the ath79 target have not been sorted for a long time
and they are very chaotic now. This patch sorts them again according
to the OpenWrt naming rules[1], so that we can better manage them.

[1] https://openwrt.org/docs/guide-developer/toolchain/use-patches-with-buildsystem#naming_patches

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-09-08 18:06:30 +02:00
Shiji Yang
496280ef4e ath79: add missing symbols by refreshing kernel configs
Some symbols are outdated or missing due to daily kernel bumps. It's
better to re-add them. All configs are automatically refreshed by
'make kernel_oldconfig CONFIG_TARGET=taget' and
'make kernel_oldconfig CONFIG_TARGET=subtarget'

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-09-08 18:06:30 +02:00
Rafał Miłecki
703d667a0c kernel: switch back to fw_devlink=permissive
This reverts commit 5356462ce5.

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

It seemed that mtd OF_POPULATED hack resolved probing issues but
apparently not all of them. We got reports about reading MAC using NVMEM
not working and USB controllers not working.

Ref: #10232
Fixes: #13412
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-09-05 16:05:32 +02:00
Chen Minqiang
36746893ac mediatek: fix the name of buswidth to bus-width
Fix the issue of dts buswidth cannot be applied properly with spi driver.
Fix the name of buswidth to bus-width in dts in order to fit the format
in linux spi kernel[1] so that spi-tx-bus-width & spi-rx-bus-width can be
parsed properly.

[1] Documentation/devicetree/bindings/spi/spi-controller.yaml

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2023-09-05 15:40:43 +08:00
Jayantajit Gogoi
1b15cb21db rockchip: add support for Radxa ROCK Pi E
This adds support for Radxa ROCK Pi E, rockchip rk3328 board.

Specification:

- CPU: Rockchip RK3328 64-bit Quad-core
- RAM: DDR3 256MB ~ 2GB
- Network:
    1 x 10/100/1000M Ethernet
    1 x 10/100M Ethernet
- Storage:
    1 x MicroSD Slot
    1 x eMMC Module Slot
- USB Host/OTG:
    1 x USB3.0 Type A HOST
    1 x USB2.0 HOST (40-pin pin-header)
- Wireless
    RTL8723DU/RTL8821CU
- Debug Serial:
    1500000 baud at UART2 ( 40-pin pin-header)
- Power Supply:
    Type-C 5V
    Optionally PoE

Installation:
- Write image to SD Card or EMMC with dd
- Boot ROCK Pi E from the SD Card

Signed-off-by: Jayantajit Gogoi <jayanta.gogoi525@gmail.com>
2023-09-05 00:20:51 +05:30
Felix Fietkau
77c45ddd86 kernel: backport support for renaming netdevs while up
Will be used in upcoming hostapd changes

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-09-04 15:29:35 +02:00
Thomas Bong
8554a4a7e3 ipq40xx: compress kernel for Magic 2 WiFi next
The bootcmd limits the kernel to 4 MiB which is
exceeded when using Device/FitImage. Device/FitzImage
reduces the size to around 3 MiB.

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Thomas Bong <thomas.bong@devolo.de>
2023-09-03 23:11:51 +02:00
Thomas Bong
838bb0c03f ipq40xx: convert devolo Magic 2 WiFi next to DSA
Renamed the interfaces to match the other devices.
Name the interface connected to the builtin G.hn chip 'ghn'.
This might toggle at runtime while the G.hn chip is in the
bootloader.

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Thomas Bong <thomas.bong@devolo.de>
2023-09-03 23:11:40 +02:00
INAGAKI Hiroshi
5c65224d8f mvebu: add reset delays of PHYs for Fortinet FortiGate 50E
Add reset-(de)assert-us to ethernet PHYs on Fortinet FortiGate 50E to
solve instability after HW resetting of PHYs. (ex.: restarting "network"
service, etc...)

Fixes: #13391
Fixes: 102dc5a625 ("mvebu: add support for Fortinet FortiGate 50E")
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2023-09-03 22:59:39 +02:00
Hank Moretti
02214ab8dc mediatek: fix sysupgrade error for WR30U
The NMBM-Enabled layout did not use fit image,
it just need default process. So it was been removed in platform.sh.

It will fix sysupgrade error for xiaomi,mi-router-wr30u-112m-nmbm.

Signed-off-by: Hank Moretti <mchank9999@gmail.com>
2023-09-01 23:45:47 +02:00
John Audia
d1ac7230d0 kernel: bump 6.1 to 6.1.50
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.50

All patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod, ipq806x/R7800
Run-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod, ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-09-01 21:01:08 +02:00
John Audia
1db566b692 kernel: bump 5.15 to 5.15.129
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.129

All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-09-01 20:34:16 +02:00
Felix Fietkau
c5b7be8316 kernel: allow adding devices without hw offload to a hw flowtable
This allows supporting a mix of devices with or without hw offloading support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-09-01 12:43:10 +02:00
Rafał Miłecki
bcd76dc7d8 bcm53xx: store a copy of NVRAM content in NVMEM driver
This stops NVMEM driver from using MMIO access past booting and messing
with NAND controller state.

Link: https://forum.openwrt.org/t/asus-rt-ac88u-hw-a6-broken-in-22-03-3/147882
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-09-01 11:37:16 +02:00
Daniel Golle
a8cbee8e2d mediatek: mt7622: set DEVICE_DTC_ADDR for BPi-R64
Relocating the device tree is required for being apply to apply
device tree overylay at boot.

Fixes: 34bb33094a ("mediatek: use updated device tree overlay mechanism for BPi-R64")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-08-31 19:22:15 +01:00
Rafał Miłecki
79283e8fb5 kernel: add unset CONFIG_INPUT_IBM_PANEL symbol to config-6.1
This symbol was added by commit 2e6f34faa7e0 ("Input: Add IBM Operation
Panel driver") to v6.1. It depends on I2C so it's available to limited
amount of targets. It needs to be specified thought to allow kernel
configuration.

For bcm53xx this fixes:
IBM Operation Panel driver (INPUT_IBM_PANEL) [N/m/?] (NEW)

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2023-08-31 09:13:00 +02:00
Rafał Miłecki
52c365f055 kernel: backport v6.6 nvmem changes
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-08-31 00:49:29 +02:00
Mathew McBride
abc536f547 kernel: ensure VFIO related suboptions are disabled
These suboptions (PLATFORM, FSL_MC and MLX5_VFIO_PCI)
may be prompted for when VFIO is enabled, regardless of
architecture.

These are not related to the main vfio use case
(passthrough of PCIe devices)

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-08-29 23:41:05 +02:00
Daniel Golle
8f5986355c mediatek: filogic: remove stray quote
When adapting the network configuration for MT7988 RFB a stray quote
was left in a script. Remove it to fix generating the default network
configuration.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-08-28 21:54:02 +01:00
Daniel Golle
f631c7bbb1 generic: sync MediaTek Ethernet driver with upstream
Import commits from upstream Linux replacing some downstream patches.
Move accepted patches from pending-{5.15,6.1} to backport-{5.15,6.1}.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-08-28 16:35:22 +01:00
Daniel Golle
a0f4eadf6a mediatek: add support for Ubiquiti UniFi 6 LR v3
Some recent models of the Ubiquiti Networks UniFi 6 LR access point
come with a RealTek RTL8211FS 1000M/100M/10M PHY instead of the
Aquantia AQR112 2500M/1000M/100M/10M PHY used in both v1 and v2. Add
build for this variant so we can support Ethernet with the PHY.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-08-28 16:35:22 +01:00
Daniel Golle
035a88ae55 mediatek: generate bootloader artifacts for mt7988_rfb
Switch to OpenWrt uImage.FIT bootmethod and include various bootloader
artifacts with the generated binaries.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-08-28 16:35:22 +01:00
Daniel Golle
3ef8760e87 mediatek: improve mt7981.dtsi
* re-factor WED components to boot fine also on limited loaders
 * add LEDs of integrated GE PHY

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-08-28 13:55:38 +01:00
Daniel Golle
9f8fde216d mediatek: filogic: improve pinctrl drivers
Set correct pull-type data and add additional uart groups for MT7981.
Assign functions to configure pin bias for MT7986.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-08-28 13:55:38 +01:00
Daniel Golle
2544dc34f2 mediatek: i2c: mt65xx: allow optional pmic clock
Using the I2C host controller on the MT7981 SoC requires 4 clocks to
be enabled. One of them, the pmic clk, is only enabled in case
'mediatek,have-pmic' is also set which has other consequences which
are not desired in this case.

Allow defining a pmic clk even in case the 'mediatek,have-pmic' propterty
is not present and the bus is not used to connect to a pmic, but may
still require to enable the pmic clock.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-08-28 13:55:38 +01:00
Daniel Golle
69a498f953 mediatek: re-add missing patch for Linux 6.1
The patch was wrongly tagged as being part of Linux 6.0 even though it
was only committed with Linux 6.2 and hence needs to be backported for
Linux 6.1.

Fixes: fa79baf4a6 ("generic: copy backport, hack, pending patch and config from 5.15 to 6.1")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-08-28 13:55:38 +01:00
Daniel Golle
06a150aed7 mediatek: re-add dropped properties on BPi-R3
Unfortunately some device tree properties have slipped under the table
when switching from our downstream device tree.

Bring back 3W power for SFP cages and restore thermal trip points to
make sense again.

Fixes: 7a0ec001ff ("mediatek: sync MT7986 device trees with upstream")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-08-28 13:55:38 +01:00
Linus Walleij
ef76b6ff3e bcm53xx: Add support for D-Link DIR-890L
The DIR-890L is very similar to DIR-885L, but has both USB2
and USB3. The signature for the wrgac36 board was copied from
DD-Wrt.

The DIR-890L bootstrap will only load the first 2 MB after
the SEAMA header in the NAND flash, uncompress it with LZMA
and execute it. Since the compressed kernel will not fit in
2 MB we have a problem. Solve this by putting a LZMA
compressed U-Boot into the first 128 KB of the flash
followed by the kernel. The bootstrap will then uncompress
and execute U-Boot and then we let U-Boot read the kernel
from flash and execute it.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2023-08-28 08:13:39 +02:00
Brian Norris
1611c21ac6 ipq806x: onhub: Enable adm_dma node
One of our SPI devices references this node, but we never enabled it.
This clutters up probe deferral logs.

(NB: this SPI device still doesn't have a real driver, so it's just here
for documentation and/or tinkering.)

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2023-08-27 22:47:02 +02:00
Brian Norris
9ea5487ea5 ipq806x: chromium: Disable kernel's CONFIG_QCOM_SPM
The qcom spm driver is currently broken for IPQ8064 OnHub devices on
kernel 6.1, such that it hangs the system when booting, much to the
consternation of users. This is especially bad as these devices don't
yet have a fully-supported release branch, and are still sometimes
landing on snapshot builds.

OnHub devices have their own kernel config, so it's not that wide of an
impact to disable this.

I haven't fully gotten to the bottom of this, but:

(a) The vendor kernel didn't have any SPM driver at all, and didn't
    utilize cpuidle.
(b) The device tree has never included any (non-disabled) cpuidle
    states, so even when this driver was present on 5.15 (last
    known-working kernel), it didn't actually do anything -- it bailed
    early, before ever doing any SPM initialization.
(c) Refactoring in Linux 5.16 [1] caused the SPM driver to be activated
    unconditionally, including setting us into standby mode
    (PM_SLEEP_MODE_STBY) by default.

Removing the one PM_SLEEP_MODE_STBY line from drivers/soc/qcom/spm.c
seems to fix the problem, but that isn't much different than simply
disabling the driver, so I go with that for now.

I also disable CONFIG_ARM_QCOM_SPM_CPUIDLE, becuase it 'select's
QCOM_SPM.

NB: it's possible there's some other deeper root cause involved in here.
For one, I notice that CPU hotplug (e.g., echo 0 >
/sys/devices/system/cpu/cpu1/online, echo 1 > ...) doesn't work right
either. Perhaps there's some mismatch on upstream Linux qcom-scm
behavior and the old boot firmware used for these systems? It wouldn't
be the first time, as we've had some similar incompatibilities on the
next generation of these devices, Google WiFi [2].

[1] Commit 60f3692b5f0b ("cpuidle: qcom_spm: Detach state machine from
    main SPM handling")
[2] [RFC] qcom_scm: IPQ4019 firmware does not support atomic API?
    https://lore.kernel.org/linux-arm-kernel/20200913201608.GA3162100@bDebian/

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2023-08-27 22:47:02 +02:00
Antonio Flores
f0138de3e5 rockchip: add support for PINE64 ROCK64
This add support for PINE64 ROCK64, rockchip rk3328 board.

Specifications:

 4 x ARM Cortex A53 cores @ 1.5 GHz
 ARM Mali 450 MP2 GPU
 LPDDR3 RAM (up to 4GB)
 Gigabit Ethernet
 Micro SD Slot
 eMMC module slot
 SPI Flash 128Mbit
 4K digital video out
 2x USB 2.0 Host
 1x USB 3.0 Host
 PI-2 bus
 PI-P5+ bus
 IR R/X port
 Real Time Clock (RTC) port
 Power Over Ethernet (POE) (when using optional HAT module)
 A/V jack
 Power, Reset and Recovery buttons
 3.5mm barrel power (5V 3A) port

To install write image to the sd using dd (dd if=*.img of=/*)

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2023-08-27 19:20:11 +02:00
Rani Hod
a4eb1ea331 ramips: add support for D-Link DRA-1360
The DRA-1360 rev A is a wall-plug AC1300 repeater.
Hardware is identical (same FCC ID, black case instead of white)
to D-Link DAP-1620 rev B, which is already supported, but a
different model name, revision, and hardware ID are needed.
Thus, the bulk of the DAP-1620 device tree is extracted to a
common dtsi included by the two models' device trees.

Repeating specs and installation instructions from e4c7703:
(note that the RAM size mentioned there was incorrect, oops)

Specs:
- SoC: MT7621AT (880MHz dual-core MIPS1004Kc)
- Memory: 128 MiB RAM, 16 MiB NOR SPI
- WiFi: MT7615DN 2x2 802.11n + 2x2 802.11ac (DBDC)
- Ethernet: 1 RJ45 port 10/100/1000
- Power/status LED: red+green
- LED RSSI bargraph: 2x green, 1x red+green

Installation:
- Keep reset button pressed during plug-in
- Web Recovery Updater is at 192.168.0.50
  (pings are ignored, it listens only for http)
- Upload factory.bin, confirm flashing
  (seems to work best with Chromium-based browsers)

Revert to OEM firmware:
- tail -c+117 DRA1360A1_FW112B03.bin | \
  openssl aes-256-cbc -d -md md5 -out decrypted.bin \
  -k c471706398cb147c6619f8a04a18d53e9c17ede8
- flash decrypted.bin via D-Link Web Recovery

Signed-off-by: Rani Hod <rani.hod@gmail.com>
2023-08-27 19:13:36 +02:00
John Audia
e80a387517 kernel: bump 5.15 to 5.15.128
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.128

All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-08-27 16:15:22 +02:00
Fabian Bläse
b22d382ae4 ipq40xx: re-add label MAC address for FritzBox 4040
The MAC address of the GMAC is contained inside the CWMP-Account
number on the label.

The label MAC address alias was defined previously, but it has been
removed with the switch to IPQESS / DSA.

Restore the label MAC address alias.

Fixes: 27b441cbaf ("ipq40xx: drop ESSEDMA + AR40xx DTS nodes")
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2023-08-27 16:09:11 +02:00
Mathew McBride
8b1cc1582a x86: remove built-in vhost-net driver
This is now available as a kmod package (kmod-vhost-net).

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-08-26 14:08:10 +02:00
John Audia
4b3e3c3fd7 kernel: bump 6.1 to 6.1.47
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.47

All patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-08-26 00:07:16 +02:00
David Bauer
6dc0675e5b mediatek: enable NMBM remapping for NWA50AX Pro UBI
Don't skip remapping of the UBI area for the ZyXEL NWA50AX Pro. This is
due to the kernel being loaded from the UBI partition by U-Boot.

Link: https://github.com/openwrt/openwrt/pull/13335

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-08-25 21:42:31 +02:00
Zoltan HERPAI
f01982ec0b sunxi: add testing kernel 6.1
Compile-tested: all targets
Runtime-tested:
 - Cortex-A53: Pine64+
 - Cortex-A7:  Bananapro, Orange Pi 2
 - Cortex-A8:  pcDuino v2

Patches refreshed.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-08-24 18:52:06 +02:00
Zoltan HERPAI
939d4d0b70 sunxi: copy patches from 5.15 to 6.1
To start the migration, we copy the patches from 5.15 to 6.1.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-08-24 18:51:51 +02:00
Shiji Yang
12f53724c6 ath79: fix first reboot issue on Netgear WNDR4300 v2 and WNDR4500 v3
From the Netgear u-boot GPL code[1]. Bootloader always unconditionally
marks block 768, 1020 - 1023 as bad blocks on each boot. This may lead
to conflicts with the OpenWrt nand driver since these blocks may be good
blocks. In this case, U-boot will override the oob of these blocks so
that break the ubi volume. The system will be damaged after first reboot.
To avoid this issue, manually skip these blocks by using "mtd-concat".

[1] https://www.downloads.netgear.com/files/GPL/EX7300v2series-V1.0.0.146_gpl_src.tar.bz2.zip

Fixes: https://github.com/openwrt/openwrt/issues/8878
Tested-by: Yousaf <yousaf465@gmail.com>
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-08-24 00:04:38 +02:00
Shiji Yang
0f9b8aa3f5 ath79: rework Netgear nand devices image recipe
In Netgear u-boot GPL code, nand devices uses this formula to locate the
rootfs offset.

offset = (((128 + KERNEL_SIZE) / BLOCK_SIZE) + 1) * BLOCK_SIZE;

Howerver, WNDR4500 source code incorrectly define the nand block size to
64k. In some cases, it causes u-boot can't get the correct rootfs offset,
which result in boot failure. This patch workaround it by padding kernel
size to (128k * n - 128 - 1). The additional char '\0' is used to ensure
the (128 + KERNEL_SIZE) can't be divided by the BLOCK_SIZE.

Fixes: https://github.com/openwrt/openwrt/issues/13050
Fixes: 3c1512a25d ("ath79: optimize the firmware recipe for Netgear NAND devices")
Tested-by: Yousaf <yousaf465@gmail.com>
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-08-24 00:04:38 +02:00
David Bauer
4c0fdad7ea mediatek: enable NWA50AX Pro eth LEDs
Enable the ethernet LED's on the ZyXEL NWA50AX Pro to show link-state as
well as activity.

Both LED's are configured pulsing.

AMBER | 10/100
GREEN | 1000
A+G   | 2500

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-08-22 13:37:27 +02:00
Stefan Agner
4af06aaf33 mediatek: filogic: wax220: cleanup device tree
Fix compatible string to match what is supported upstream, fix alignment
and order MTD partitions according to offset.

Signed-off-by: Stefan Agner <stefan@agner.ch>
2023-08-22 13:37:27 +02:00
Stefan Agner
fa9d977f97 mediatek: filogic: wax220: support factory image
Enable building a factory image which can be flashed through the OEM
firmware's web interface. It seems that the web interface requires a
minimum file size of 10MiB, otherwise it will not accept the image.

The update image is a regular sysupgrade tarball packed in a Netgear
encrypted image. The Netgear encrypted image is the same as used in
WAX202 or WAX206, including the encryption keys and IV.

This adds a script which creates the rootfs_data volume on first
startup. This is required since the OEM firmware's sysupgrade scripts
do not create such a paritition. Note that any script ordered after
70_initramfs_test will not get executed on initramfs. Hence this new
script 75_rootfs_prepare won't create the rootfs_data volume when
using the recovery initramfs.

Also, this deletes the kernel_backup and rootfs_backup volumes in case
we have to create the rootfs_data volumes. This makes sure that
OpenWrt is the actual backup firmware instead of the stock firmware.

References in WAX220 GPL source:
https://www.downloads.netgear.com/files/GPL/WAX220-V1.0.2.8-gpl-src.tar.gz

* package/base-files/files/lib/upgrade/nand.sh:186
  Creation of rootfs_data is disabled

* Uboot-upstream/board/mediatek/common/ubi_helper.c
  Automatic creation of UBI backup volumes

Signed-off-by: Stefan Agner <stefan@agner.ch>
2023-08-22 13:37:27 +02:00
David Bauer
c35ff41ccc mediatek: add missing packages for Acer Predator W6
Add missing packages for creating the overlay filesystem.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-08-22 12:24:34 +02:00
INAGAKI Hiroshi
ac68fbf526 ramips: add support for I-O DATA WN-DEAX1800GR
I-O DATA WN-DEAX1800GR is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based
on MT7621A.

Specification:

- SoC         : MediaTek MT7621A
- RAM         : DDR3 256 MiB (Nanya NT5CC128M16JR-EK)
- Flash       : RAW NAND 128 MiB (Winbond W29N01HVSINF)
- WLAN        : 2.4/5 GHz (MediaTek MT7915)
- Ethernet    : 5x 10/100/1000 Mbps
  - Switch    : MT7530 (SoC)
- LEDs/Keys   : 6x/3x
- UART        : through-hole on PCB (J2)
  - assignment: 3.3V, GND, TX, RX from "1" marking
  - settings  : 115200n8
- Power       : 12 VDC, 1 A

Flash instruction using initramfs-factory image:

1. Boot WN-DEAX1800GR normally
2. Access to "http://192.168.0.1/" and open firmware update page
   ("ファームウェア")
3. Select the OpenWrt initramfs-factory.bin image and click update
   ("更新") button to perform firmware update
4. On the initramfs image, perform sysupgrade with the
   squashfs-sysupgrade.bin image
5. Wait ~120 seconds to complete flashing

Note:

- This device has 2x OS images on the flash storage. In this support,
  the first one will be used.

Warning:

- Do not use "saveenv" command on U-Boot CLI.
  This device has wrong u-boot-env data. The actual length of individual
  env data installed to the device is 0x1000 (4 KiB), but installed
  U-Boot requires 0x20000 (128 KiB). So U-Boot determines the data is
  invalid. Then, if you perform saving environment data with saveenv on
  U-Boot CLI, installed env data will be overwritten with too few
  default values without individual values (SSID, password, MAC
  addresses, etc...).

MAC addresses:

LAN    : 50:41:B9:xx:xx:F4 (Config, ethaddr (text))
WAN    : 50:41:B9:xx:xx:F6 (Config, wanaddr (text))
2.4 GHz: 50:41:B9:xx:xx:F4 (Config, rmac (text) / Factory, 0x4 (hex))
5 GHz  : 50:41:B9:xx:xx:F5 (none)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2023-08-20 01:26:15 +02:00
INAGAKI Hiroshi
9088b5445f ramips: improve sysupgrade helpers for I-O DATA devices
I-O DATA devices manufactured by MSTC (MitraStar Technology Corp.)
have some important flags for booting, "bootnum" and "debugflag".
The almost devices have both flags but some devices have only
"bootnum" flag.
So optimize helper functions in iodata.sh to set each flags.

- both:
  - WN-AX1167GR2
  - WN-AX2033GR
  - WN-DX1167R
  - WN-DX1200GR
  - WN-DX2033GR

- "bootnum" only
  - WN-DEAX1800GR

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2023-08-20 01:26:15 +02:00