Commit Graph

29916 Commits

Author SHA1 Message Date
Christian Marangi
449b5701d7
generic: backport at803x kernel panic fix
Backport at803x kernel panic fix merged upstream for kernel 6.1 and 6.6.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-07 16:57:22 +02:00
Robert Marko
153c9f3482 generic: 6.6: backport arm64 swiotlb default size reduction
Kernel 6.6 added dynamic SWIOTLB allocation, but with it also started
allocating 64MB of the SWIOTLB bounce buffer by default which is quite a
lot of memory on most OpenWrt devices.

Luckily in kernel 6.7 arm64 received an optimization that reduces that
default size to 1MB per 1GB of RAM if certain criteria was met.

So in order to reclaim back 63MB of RAM which brought some ipq807x devices
close to OOM under load lets backport the upstream commit.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-04-07 14:28:53 +02:00
Mieczyslaw Nalewaj
2b6fb2dfba x86: geode: 6.6: add missing kernel options
Add options removed by `make kernel_oldconfig CONFIG_TARGET=subtarget', missing which causes compilation to stop and cause an error.

Fixes: 2a86425de1 ("x86: 6.6: refresh kernel config")
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-07 11:29:30 +02:00
John Audia
5c2eca676a kernel: bump 6.6 to 6.6.24
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.24

Removed upstreamed:
	generic/backport-6.6/838-v6.9-leds-trigger-netdev-Fix-kernel-panic-on-interface-re.patch[1]
	generic/backport-6.6/981-mtd-spinand-Add-support-for-5-byte-IDs.patch[2]
	mediatek/patches-6.6/831-thermal-drivers-mediatek-Fix-control-buffer-enablement-on-MT7896.patch[3]

Removed:
	ipq40xx/patches-6.6/110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch[4]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.24&id=10f2af1af8ab8a7064f193446abd5579d3def7e3
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.24&id=9c74507e6c4382d12a5e418742b81fd441f03313
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.24&id=fe750e2744428be6aec7395b13df3b34381ce6b6
4. Acknowledgment to @DragonBlurp for pointing out the redundancy of this patch. dd78a59cd7

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>
2024-04-05 14:43:44 -04:00
Mieczyslaw Nalewaj
4d3f41130e ipq806x: 6.6: refresh patches
Refresh patches for kernel 6.6.23 with make target/linux/refresh.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-05 17:32:21 +02:00
Zoltan HERPAI
5713032fd4 pistachio: add 6.1 testing kernel
Configure 6.1 as testing kernel.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-04-05 15:37:38 +02:00
Zoltan HERPAI
91ce93a893 pistachio: refresh 6.1 config
Kernel config needs to be refreshed after copy from 5.15.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-04-05 15:37:37 +02:00
Zoltan HERPAI
47dee7be55 pistachio: update and extend 6.1 patches
Add:
110-pwm-img-fix-clock-lookup.patch
 - patch to fix a clock lookup issue from upstream
Update:
401-mtd-nor-support-mtd-name-from-device-tree.patch
 - mtd-name lookup hack to reflect the updated spi_nor_scan function

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-04-05 15:37:36 +02:00
Zoltan HERPAI
05fe149486 pistachio: copy config and patches of 5.15 to 6.1
Simple copy of config and patches.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-04-05 15:37:34 +02:00
Mieczyslaw Nalewaj
46efc77502 ipq40xx: 6.6: remove redundant patch
Remove file 110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch redundand after adding 440-mtd-don-t-look-for-OTP-legacy-NVMEM-cells-if-proper-.patch in dd78a59

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-05 09:28:00 +02:00
Mieczyslaw Nalewaj
c72c35d664 kirkwood: 6.6: refresh patches
Refresh patches for kernel 6.6.23 with make target/linux/refresh.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-05 09:27:45 +02:00
Christian Lamparter
bc014392a4 apm821xx: restore 6.1 config+patches
simply attached previous versions of the
config-6.1 and patches-6.1 directory.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2024-04-05 09:26:26 +02:00
Christian Lamparter
56db0210a2 apm821xx: add 6.6 testing kernel
refreshed kernel config + patches

otherwise same as 6.1/5.15.

Tested on: WNDAP620, WNDAP660, MyBook Live Single, MR24, MX60, WNDR4700
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2024-04-05 09:26:26 +02:00
Christian Lamparter
82c8c38a5c apm821xx: prepare WNDR4700 for 6.6 - add preliminary u-boot-env access
With the default BUILD_BOT configuration on a linux 6.6 kernel,
the WNDR4700's kernel no longer fits into the alloted ~3.5MiB,
even with LZMA compression.

Bigger kernels are possible, but there's a problem with Netgear's
"bootcmd":

> if loadn_dniimg 0 0x180000 0x4e0000 && chk_dniimg 0x4e0000; then nand read 0x800000 0x180000 0x20000;bootm 0x500000 - 0x800040;else fw_recovery; fi"

This loads the dni-image starting offset 0x180000 from the NAND
flash (which is the DTB partition) to 0x4e0000 in the RAM. It then
checks whenever the provided image is "valid". If it is then it
reads the DTB again to 0x800000 in the RAM and starts the extraction
and boot process. (If the image wasn't valid then it starts the
automated firmware recovery).

The issues here are that first: the kernel image gets "squeezed"
between 0x500040 and 0x7fffff... And second, the decompressor
only has area 0x0 - 0x500000 for decompression.

Hence the image now requires to update the bootcmd by providing
new values (which have been successfully tested with the original
Netgear WNDR4700 v1.0.0.56 firmware) for the RAM locations and
make full use of the fact that loadn_dniimg loads the DTB as well.

This needs to be done only once. Just connect a serial adapter to
interface with uboot and overwrite (and save) the new bootcmd.

WARNING: The serial port needs a TTL/RS-232 3.3v level converter!

Steps:
 0. Power-off the WNDR4700
 1. Connect the serial interface (you need to open the WNDR4700)
 2. Power-up the WNDR4700
 3. Monitor the boot-sequence and hit "Enter"-key when it says:

  "Hit any key to stop autoboot" (Be quick, you have a ~2 second window)

 4. in the Prompt enter the following commands (copy & paste)

 setenv bootcmd "if loadn_dniimg 0 0x180000 0xce0000 && chk_dniimg 0xce0000; then bootm 0xd00000 - 0xce0040;else fw_recovery; fi"
 saveenv
 run bootcmd

Note: This new bootcmd will also unbrick devices that were bricked
by the bigger 4.19-6.1 kernels.

Note2: This method was tested with a WNDR4700. A big kernel with most
debug features enabled on v6.6.22 measured 4.30 MiB when compressed
with lzma. The uncompressed kernel is 12.34 MiB. This is over the 3 MiB,
the device reserves for the kernel... But it booted! For bigger kernels,
the device needs repartitioning of the the ubi partition due to the
kernel+dtb not fitting into the partition.

Note3: For initramfs development. I would advice to load the initramfs
images to 0x800000 (or higher). i.e.: tftp 800000 wndr4700.bin

Note4: the fw_recovery uboot command to transfer the factory image to
the flash still works.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2024-04-05 09:26:26 +02:00
Mieczyslaw Nalewaj
b7a9007828 ramips: 6.6: set testing kernel
Allow selecting 6.6 as testing kernel on ramips.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-05 07:58:15 +02:00
Mieczyslaw Nalewaj
093a5aab40 ramips: 6.6: refresh kernel config
Refresh kernel config.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-05 07:58:15 +02:00
Mieczyslaw Nalewaj
359a9295f2 ramips: adjusted pinctrl-aw9523 for kernel 6.6
Compatiblity with kernel 6.6 for Awinic AW9523B i2c pin controller driver.
It follows the kernel patch: i2c: Drop legacy callback .probe_new() (5eb1e6e459)
and kernel patch: gpiolib: Get rid of not used of_node member (70d0fc4288)

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-05 07:58:15 +02:00
Mieczyslaw Nalewaj
fddadcae43 ramips: mt7620: alignment with updated snd_soc_dai_driver structure
Fix error: 'struct snd_soc_dai_driver' has no member named 'remove'
It follows the kernel patch: ASoC: soc-dai.h: remove unused call back functions (446b31e894)

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-05 07:58:15 +02:00
Shiji Yang
c5dee97d87 generic: fix detect_memory_region() function
This patch fixes the broken detect_memory_region() function on
6.6 kernel.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-04-05 07:58:15 +02:00
Mieczyslaw Nalewaj
7753b143cd ramips: 6.6: fix net drivers compatibility
Fix compatibility of ralink net drivers with kernel 6.6.
It follows the kernel patch: u64_stats: Streamline the implementation (https://github.com/torvalds/linux/commit/44b0c2957adc62b86fcd51adeaf8e993171b)

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-05 07:58:15 +02:00
Mieczyslaw Nalewaj
0e5fb421a9 ramips: 6.6: refresh patches
Refresh kernel patches.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-05 07:58:15 +02:00
Mieczyslaw Nalewaj
4b8b7438f7 ramips: 6.6: remove old patches
Remove patches for old kernel.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-05 07:58:15 +02:00
Mieczyslaw Nalewaj
662e8581ec kernel/ramips: 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: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-05 07:58:15 +02:00
Mieczyslaw Nalewaj
7bd44e0a30 kernel/ramips: 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: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-05 07:58:15 +02:00
Mieczyslaw Nalewaj
ed57a9f6a8 kernel/ramips: Restore kernel patches 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: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-05 07:58:15 +02:00
Mieczyslaw Nalewaj
f19f8a886b kernel/ramips: Create kernel patches 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: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-05 07:58:15 +02:00
Pawel Dembicki
c7d83d4379 kirkwood: add 6.6 kernel as testing version
This patch introduce kernel 6.6 for kirkwood target as testing version.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-04-04 18:31:21 +02:00
Pawel Dembicki
3b5b3d89ed kirkwood: split files into 6.1 and 6.6 version
Upstream change location of kirkwood dts files.
Split downstream files location for better upstream follow.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-04-04 18:31:21 +02:00
Pawel Dembicki
4e3093d90a kirkwood: kernel: refresh 6.6 config
Done by 'make kernel_oldconfig'.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-04-04 18:31:21 +02:00
Pawel Dembicki
70dd237ebd kirkwood: refresh 6.6 patches
Removed upstream merged:
002-6.2-ARM-dts-kirkwood-Add-Zyxel-NSA310S-board.patch
003-6.5-ARM-dts-kirkwood-Add-Endian-4i-Edge-200-board.patch
004-6.4-ARM-dts-kirkwood-Add-missing-phy-mode-and-fixed-link.patch
005-6.7-net-dsa-mv88e6xxx-fix-marvell-6350-switch-probing.patch

Manually refreshed:
100-ib62x0.patch
101-iconnect.patch
102-dockstar.patch
103-iomega-ix2-200.patch
105-linksys-viper-dts.patch
106-goflexnet.patch
107-01-zyxel-nsa3x0-common-nand-partitions.patch
107-03-nsa325.patch
109-pogoplug_v4.patch
110-pogo_e02.patch
111-l-50.patch
112-sheevaplug.patch
113-readynas_duo_v2.patch
114-ctera-c-200-v1.patch
115-nsa310s.patch
116-4i-edge-200.patch
117-netgear_stora.patch
203-blackarmor-nas220.patch

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-04-04 18:31:21 +02:00
Pawel Dembicki
398fa87ef0 kernel/kirkwood: 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>
2024-04-04 18:31:21 +02:00
Pawel Dembicki
a1201f9144 kernel/kirkwood: 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>
2024-04-04 18:31:21 +02:00
Isaev Ruslan
9ef4f7f919 qualcommax: ipq60xx: add yuncore fap650 support
This commit adds support for the Yuncore FAP650 device.

Specifications:
- Qualcomm IPQ6018+QCA8075+QCN5022+QCN5052
- 512 MB of RAM (DDR3)
- 8 MB of serial flash (SPI NOR)
- 128 MB of parallel flash (NAND)
- 2x2 2.4 GHz WiFi (IPQ6010)
- 2x2 5 GHz WiFi (IPQ6010)
- 2x 2dBi 2.4G MIMO antenna
- 2x 3dBi 5.8G MIMO antenna
- 5x 1 Gbps Ethernet (QCA8075)
- POE: 48V (IEEE 802.3af)
- power: 12V (~1.5A)
- 1x passthru port (rj45 - rj45)
- 1x cisco rj45 console port
- size: 160mm*86mm*29mm

BACKUP YOUR STOCK FIRMWARE:
```
export device=fap650
mkdir -p /tmp/fw_dump_$device
cd /tmp/fw_dump_$device
dmesg > dmesg_$device.log
dtc -I fs /sys/firmware/devicetree/base > $device.dts
cat /proc/device-tree/model > model
cat /proc/mtd > proc_mtd
while read p; do
mtd_dev=$(echo $p | cut -d: -f1)
echo $mtd_dev
dd if=/dev/$mtd_dev of=$mtd_dev
done < proc_mtd
md5sum * > md5sum.log
tar -cvzf ../$device.tar.gz .
export sum=$(md5sum /tmp/$device.tar.gz | cut -d' ' -f1)
mv ../$device.tar.gz /tmp/${device}_${sum}.tar.gz
echo fw backup saved to: /tmp/${device}_${sum}.tar.gz
```
Upload your backup via tftp to the safe place.

INSTALLATION:
1. stock firmware web ui
Rename factory.bin fw image file to factory.ubin. Flash this image
like ordinary stock fw upgrade.

2. stock firmware telnet method
Enter telnet cli (login: root, password: 476t*_f0%g09y) and upload
 factory.bin fw image and rename it to factory.ubin
`cd /tmp && wget <your_web_server_ip>/factory.ubin`
`sysupgrade factory.ubin

3. initramfs method
    Put imitramfs image to your TFTP server and rename it for example to fap650.initram
    Enable serial console and enter to the u-boot cli.
    Exec these commands:
    `tftpboot <your_tftp_server_ip>:fap650.initram`
    `dhcp`

    When downloading is finished:
    `bootm`
    After booting the device, you need to upload to the device factory.ubi fw image.
    ```
    cd /tmp && wget <your_web_server_ip>/factory.ubi`
    export rootfs=$(cat /proc/mtd | grep rootfs | cut -d: -f1)
    export rootfs_1=$(cat /proc/mtd | grep rootfs_1 | cut -d: -f1)
    ubiformat /dev/${rootfs} -y -f factory.ubi
    ubiformat /dev/${rootfs_1} -y -f factory.ubi
    reboot
    ```

4. u-boot factory.ubi image method
    Put factory.ubi to your TFTP server
    Enter u-boot cli and exec these commands:
    `tftpboot <your_tftp_server_ip>:factory.ubi`
    `dhcp`
    After downloading is finished:
    `flash rootfs`
    `flash rootfs_1`
    `reset`

STOCK FIRMWARE RECOVERY:
Boot initramfs image.
Upload your rootfs mtd partition to the device using scp or download
it from the device using wget.
Enter device ssh cli and exec:
```
cd /tmp && wget <your_web_server_ip>/rootfs_mtd`
export rootfs=$(cat /proc/mtd | grep rootfs | cut -d: -f1)
export rootfs_1=$(cat /proc/mtd | grep rootfs_1 | cut -d: -f1)
ubiformat /dev/${rootfs} -y -f /tmp/rootfs_mtd
ubiformat /dev/${rootfs_1} -y -f /tmp/rootfs_mtd
reboot
```

Signed-off-by: Isaev Ruslan <legale.legale@gmail.com>
2024-04-04 09:29:17 +02:00
Mieczyslaw Nalewaj
1e7033d188 x86: 6.6: set testing kernel
Allow selecting 6.6 as testing kernel on x86.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-04 08:56:10 +02:00
Mieczyslaw Nalewaj
2a86425de1 x86: 6.6: refresh kernel config
Refresh kernel config.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-04 08:56:10 +02:00
Mieczyslaw Nalewaj
69b145188f generic: 6.6: Removal of tools_portability.patch already included in kernel 6.6
Removal of tools_portability.patch already included in kernel 6.6

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-04 08:56:10 +02:00
Elliott Mitchell
01ff257dce kernel/x86: remove legacy 5.15 kernel config
Missed when removing the other 5.15 kernel configurations.

Fixes: b8ec063b38 ("x86: remove unused 5.15 kernel configs and patches")
Signed-off-by: Elliott Mitchell <ehem+openwrt@m5p.com>
2024-04-04 08:56:10 +02:00
Mieczyslaw Nalewaj
9e6fe7ddd2 x86: 6.6: refresh patches
Refresh kernel patches.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-04 08:56:10 +02:00
Mieczyslaw Nalewaj
391c5089be kernel/x86: Restore kernel patches 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: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-04 08:56:10 +02:00
Mieczyslaw Nalewaj
e893ccb2b3 kernel/x86: Create kernel patches 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: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-04 08:56:10 +02:00
Mieczyslaw Nalewaj
19910da69d kernel/x86: 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: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-04 08:56:10 +02:00
Mieczyslaw Nalewaj
6fce6e1560 kernel/x86: 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: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-04 08:56:10 +02:00
Robert Marko
7a78b22dc8 mvebu: 6.6: refresh patches
Well, it seems that we have a patch that was not refreshed and CI is
complaining, so refresh it.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-04-03 18:42:26 +02:00
Stijn Segers
ed893a3cc1 mvebu: add 6.6 testing kernel
Add 6.6 testing kernel for mvebu target.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2024-04-03 17:49:53 +02:00
Stijn Segers
ab2fe43163 mvebu: cortexa9: set DTS dir for 6.6
With 6.6, all DTSes were moved to their vendor subdirectories. ARM64
DTSes already used this scheme, but 32 bit Cortex A9 did not, prior
to 6.6. Introduce a kernel version check to keep backward compatibility
with 6.1.

Suggested-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2024-04-03 17:49:53 +02:00
Stijn Segers
2260ec4fb7 mvebu: 6.6: refresh patches
Manually refreshed:
 * 309-linksys-status-led.patch
 * 310-linksys-use-eth0-as-cpu-port.patch
 * 320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch
 * 701-mvpp2-read-mac-address-from-nvmem.patch
 * 902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch

All other patches automatically refreshed.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2024-04-03 17:49:53 +02:00
Stijn Segers
ad5e73fe0a mvebu: 6.6: remove upstreamed patches
000-cpufreq-armada-8k-add-ap807-support.patch was upstreamed.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2024-04-03 17:49:53 +02:00
Stijn Segers
20024ab7c3 mvebu: 6.6: adjust 32 bit ARM DTS path
As of 6.6, all upstream DTSes are moved to their respective vendor subdir.
OpenWrt already followed this practice for ARM64, but not yet for 32 bit
ARM (Armada 37x/38x).

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2024-04-03 17:49:53 +02:00
Stijn Segers
4671a92de3 mvebu: 6.6: copy files, patches & configs from 6.1
Copy all mvebu 6.1 specific files, patches and configs to 6.1.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2024-04-03 17:49:53 +02:00
Stijn Segers
9abfdc3ada mvebu: move files to files-6.1
DTS paths for 32 bit ARM devices changed with 6.6, move files/ to
files-6.1 to prep for kernel 6.6 introduction.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2024-04-03 17:49:53 +02:00
Mieczyslaw Nalewaj
0b10e5a5dc bcm27xx: refresh patches
Refresh patches for kernel 6.1.82 with make target/linux/refresh.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-03 11:47:18 +02:00
Christian Marangi
ac0e2194ab
ipq806x: add kernel 6.6 as a testing kernel version
Add and enable kernel 6.6 as a testing kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:46:02 +02:00
Christian Marangi
75acc621be
ipq806x: 6.6: update config file with missing symbol
Update config file with missing symbol added with kernel 6.6.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:46:01 +02:00
Christian Marangi
224f2fd567
ipq806x: 6.6: refresh kernel patches
Refresh kernel patches using make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:46:01 +02:00
Christian Marangi
4693100b3f
ipq806x: 6.6: add pending patch fixing nandc with new kernel
Add pending patch fixing nandc with new kerenel due to broken convertion
to new nand API. Patch has been sent upstream and will be backported to
stable kernel if accepted.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:46:01 +02:00
Christian Marangi
a0cbf7f5d5
ipq806x: 6.6: rework kernel patches for new kernel
Rework kernel patches for new kernel. Mainly adaptation for patch
related to DTS and changes for the downstream div generalize patch that
now use determine_rate.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:46:01 +02:00
Christian Marangi
a705c8c681
ipq806x: 6.6: drop upstream kernel patches
Drop upstream kernel patches that were straight backport.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:46:00 +02:00
Christian Marangi
d840d1fdf9
ipq806x: split files in 6.1 and 6.6 dedicated directory
Since with recent kernel version DTS moved to a dedicated directory,
it's required to split files to per kernel version to follow kernel
version directory structure.

Also makes use of DEVICE_DTS_DIR to target the correct DTS directory
based on the kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:46:00 +02:00
Christian Marangi
3bf06ea9b3
kernel/ipq806x: 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: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:46:00 +02:00
Christian Marangi
a2bd0a7ef0
kernel/ipq806x: 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: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:59 +02:00
Christian Marangi
032dad8818
ipq40xx: add kernel 6.6 as a testing kernel version
Add and enable kernel 6.6 as a testing kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:21 +02:00
Christian Marangi
dbd0bc7cf9
generic: 6.6: add missing config symbol
Add missing config symbol while adding support for kernel 6.6 for target
ipq806x.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:21 +02:00
Christian Marangi
f632e92951
ipq40xx: 6.6: update config file with missing symbol
Update config file with missing symbol added with kernel 6.6.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:21 +02:00
Christian Marangi
61d1eedc2d
ipq40xx: 6.6: refresh kernel patches
Refresh kernel patches using make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:20 +02:00
Christian Marangi
8ec76705d4
ipq806x: 6.6: add pending patch fixing mtdcore with MTD OTP
Add pending patch fixing mtdcore with MTD OTP with a fragile detection
if Nand supports OTP. Patch has been sent upstream and will be backported
to stable kernel if accepted.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:20 +02:00
Christian Marangi
82531764fe
ipq40xx: 6.6: rework kernel patches for new kernel
Rework kernel patches for new kernel. Mainly adaptation for patch
related to DTS, OOB Tagger and SDHCI patch.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:20 +02:00
Christian Marangi
5323c45d78
ipq40xx: 6.6: drop upstream kernel patches
Drop upstream kernel patches that were straight backport.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:19 +02:00
Christian Marangi
6136ebabc5
ipq40xx: 6.6: fix DTS to use reference for usb node
Fix DTS to use reference for usb node instead of redefining
them since upstream usb node names changed from usb2/3 to usb.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:19 +02:00
Christian Marangi
68c4678871
ipq40xx: split files in 6.1 and 6.6 dedicated directory
Since with recent kernel version DTS moved to a dedicated directory,
it's required to split files to per kernel version to follow kernel
version directory structure.

Also makes use of DEVICE_DTS_DIR to target the correct DTS directory
based on the kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:19 +02:00
Christian Marangi
2265413bbf
kernel/ipq40xx: 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: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:19 +02:00
Christian Marangi
9309cfe37a
kernel/ipq40xx: 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: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:18 +02:00
Mieczyslaw Nalewaj
5aa63c2b85 generic: 6.1: refresh backport patches
Refresh backport patches for kernel 6.1.82 with make target/linux/refresh.

Fixes: 06cdc07f8c ("ath79: add support for Huawei AP5030DN")
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-04-01 13:37:52 +02:00
Tianling Shen
cc6c3a6ee8 mediatek: add support for OpenEmbed SOM7981
Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: 256 MiB SPI-NAND, 32 GB eMMC optional
  RAM: 0.5/1 GB DDR4
  Ethernet: 1x 1GbE, 1x 2.5GbE (RTL8221B)
  WiFi: MediaTek MT7976C
  USB: 1x USB 3.0
  GPIO: 26-Pin header
  UART: 6 GND, 8 TX, 10 RX (in Pin header)
  Button: Reset, WPS
  Power: Type-C PD

Installation:
The board comes with a third-party custom OpenWrt image, you can upload
sysupgrade image via LuCI directly WITHOUT keeping configurations.

Or power on the board with pressing reset button for 5 second, then visit
http://192.168.1.1 and upload -factory.bin firmware.

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
2024-03-31 20:20:59 +02:00
Radito Wahyu
5aca47bca1 ramips: add support for BOLT BL100
BL100 is a router made by Bolt by a provider in Indonesia
The original firmware created using Mediatek SDK and kernel 2.6.36

- Chipset: MediaTek MT7620A ver 2, eco 6
- RAM: 64 MB
- Bootloader: U Boot
- Flash: Winbond W25Q128BV (16 MB)
- Ports: 2x 10/100 Ethernet, 1x RJ-11 VoIP
- Modem: Qualcomm LTE B40 (2300 Mhz) VID:05c6 PID:9026
- Wireless: Internal MT7620A (2.4 Ghz) & Mediatek MT76x2E (5.8 Ghz)
- Switch: MediaTek MT7620A built-in 5-port 10/100M switch
- Voltage: DC 12V 1A
- Antenna Port: 2x External Antenna, 2 LTE U.FL, 2 WiFi U.FL
- Serial Port: Yes, 3.3 V TTL, Baud 57600 8N1
- Buttons: Reset and WPS
- LED: 15 Total
  - 4 blue lte, 2 red lte, 1 reset, 1 power.
  - 1 wps, 1 voip, 1 wlan2, 1 wlan5, 1 lan, 1 wan, 1 wlan.

Installation via stock firmware
1. Unlock Telnet access by downloading the backup .tar.gz file
2. Change the Telnet configuration to LAN_Telnet=1
3. Import backup configuration
4. Restart the router
5. Login to telnet with username and password = admin : db40
6. Download sysupgrade binary and mtd_write to the kernel partition
`mtd_write write openwrt-bolt_bl100-squashfs-sysupgrade.bin Kernel`

Signed-off-by: Radito Wahyu <arditogits@gmail.com>
2024-03-31 20:07:45 +02:00
Roland Reinl
29cca6cfee filogic: Add support for D-Link AQUILA PRO AI M30
Specification:
 - MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX)
 - MT7531 switch
 - 512MB RAM
 - 128MB NAND flash with two UBI partitions with identical size
 - 1 multi color LED (red, green, blue, white) connected via GCA230718
 - 3 buttons (WPS, reset, LED on/off)
 - 1 1Gbit WAN port
 - 4 1Gbit LAN ports

Disassembly:
 - There are four screws at the bottom: 2 under the rubber feets, 2 under the label.
 - After removing the screws, the white plastic part can be shifted out of the blue part.
 - Be careful because the antennas are mounted on the side and the top of the white part.

Serial Interface
 - The serial interface can be connected to the 4 pin holes on the side of the board.
 - Pins (from front to rear):
   - 3.3V
   - RX
   - TX
   - GND
 - Settings: 115200, 8N1

MAC addresses:
 - WAN MAC is stored in partition "Odm" at offset 0x81
 - LAN (as printed on the device) is WAN MAC + 1
 - WLAN MAC (2.4 GHz) is WAN MAC + 2
 - WLAN MAC (5GHz) is WAN MAC + 3

Flashing via Recovery Web Interface:
 - The recovery web interface always flashes to the currently active partition.
 - If OpenWrt is flahsed to the second partition, it will not boot.
 - Ensure that you have an OEM image available (encrypted and decrypted version). Decryption is described in the end.
 - Set your IP address to 192.168.200.10, subnetmask 255.255.255.0
 - Press the reset button while powering on the device
 - Keep the reset button pressed until the LED blinks red
 - Open a Chromium based and goto http://192.168.200.1 (recovery web interface)
 - Download openwrt-mediatek-filogic-dlink_aquila-pro-ai-m30-a1-squashfs-recovery.bin
 - The recovery web interface always reports successful flashing, even if it fails
 - After flashing, the recovery web interface will try to forward the browser to 192.168.0.1 (can be ignored)
 - If OpenWrt was flashed to the first partition, OpenWrt will boot (The status LED will start blinking white and stay white in the end). In this case you're done and can use OpenWrt.
 - If OpenWrt was flashed to the second partition, OpenWrt won't boot (The status LED will stay red forever). In this case, the following steps are reuqired:
   - Start the web recovery interface again and flash the **decrypted OEM image**. This will be flashed to the second partition as well. The OEM firmware web interface is afterwards accessible via http://192.168.200.1.
   - Now flash the **encrypted OEM image** via OEM firmware web interface. In this case, the new firmware is flashed to the first partition. After flashing and the following reboot, the OEM firmware web interface should still be accessible via http://192.168.200.1.
   - Start the web recovery interface again and flash the OpenWrt recovery image. Now it will be flashed to the first partition, OpenWrt will boot correctly afterwards and is accessible via 192.168.1.1.

Flashing via U-Boot:
 - Open the case, connect to the UART console
 - Set your IP address to 192.168.200.2, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router
 - Run a tftp server which provides openwrt-mediatek-filogic-dlink_aquila-pro-ai-m30-a1-initramfs-kernel.bin.
 - Power on the device and select "7. Load image" in the U-Boot menu
 - Enter image file, tftp server IP and device IP (if they differ from the default).
 - TFTP download to RAM will start. After a few seconds OpenWrt initramfs should start
 - The initramfs is accessible via 192.168.1.1, change your IP address accordingly (or use multiple IP addresses on your interface)
 - Perform a sysupgrade using openwrt-mediatek-filogic-dlink_aquila-pro-ai-m30-a1-squashfs-sysupgrade.bin
 - Reboot the device. OpenWrt should start from flash now

Revert back to stock using the Recovery Web Interface:
 - Set your IP address to 192.168.200.2, subnetmask 255.255.255.0
 - Press the reset button while powering on the device
 - Keep the reset button pressed until the LED blinks red
 - Open a Chromium based and goto http://192.168.200.1 (recovery web interface)
 - Flash a decrypted firmware image from D-Link. Decrypting an firmware image is described below.

Decrypting a D-Link firmware image:
 - Download https://github.com/RolandoMagico/firmware-utils/blob/M32/src/m32-firmware-util.c
 - Compile a binary from the downloaded file, e.g. gcc m32-firmware-util.c -lcrypto -o m32-firmware-util
 - Run ./m32-firmware-util M30 --DecryptFactoryImage <OriginalFirmware> <OutputFile>
 - Example for firmware M30A1_FW101B05: ./m32-firmware-util M30 --DecryptFactoryImage M30A1_FW101B05\(0725091522\).bin M30A1_FW101B05\(0725091522\)_decrypted.bin

Flashing via OEM web interface is not possible, as it will change the active partition and OpenWrt is only running on the first UBI partition.

Controlling the LEDs:
 - The LEDs are controlled by a chip called "GCA230718" which is connected to the main CPU via I2C (address 0x40)
 - I didn't find any documentation or driver for it, so the information below is purely based on my investigations
 - If there is already I driver for it, please tell me. Maybe I didn't search enough
 - I implemented a kernel module (leds-gca230718) to access the LEDs via DTS
 - The LED controller supports PWM for brightness control and ramp control for smooth blinking. This is not implemented in the driver
 - The LED controller supports toggling (on -> off -> on -> off) where the brightness of the LEDs can be set individually for each on cycle
 - Until now, only simple active/inactive control is implemented (like when the LEDs would have been connected via GPIO)
 - Controlling the LEDs requires three sequences sent to the chip. Each sequence consists of
   - A reset command (0x81 0xE4) written to register 0x00
   - A control command (for example 0x0C 0x02 0x01 0x00 0x00 0x00 0xFF 0x01 0x00 0x00 0x00 0xFF 0x87 written to register 0x03)
 - The reset command is always the same
 - In the control command
   - byte 0 is always the same
   - byte 1 (0x02 in the example above) must be changed in every sequence: 0x02 -> 0x01 -> 0x03)
   - byte 2 is set to 0x01 which disables toggling. 0x02 would be LED toggling without ramp control, 0x03 would be toggling with ramp control
   - byte 3 to 6 define the brightness values for the LEDs (R,G,B,W) for the first on cycle when toggling
   - byte 7 defines the toggling frequency (if toggling enabled)
   - byte 8 to 11 define the brightness values for the LEDs (R,G,B,W) for the second on cycle when toggling
   - byte 12 is constant 0x87

Comparison to M32/R32:
 - The algorithms for decrypting the OEM firmware are the same for M30/M32/R32, only the keys differ
 - The keys are available in the GPL sources for the M32
 - The M32/R32 contained raw data in the firmware images (kernel, rootfs), the R30 uses a sysupgrade tar instead
 - Creation of the recovery image is quite similar, only the header start string changes. So mostly takeover from M32/R32 for that.
 - Turned out that the bytes at offset 0x0E and 0x0F in the recovery image header are the checksum over the data area
 - This checksum was not checked in the recovery web interface of M32/R32 devices, but is now active in R30
 - I adapted the recovery image creation to also calculate the checksum over the data area
 - The recovery image header for M30 contains addresses which don't match the memory layout in the DTS. The same addresses are also present in the OEM images
 - The recovery web interface either calculates the correct addresses from it or has it's own logic to determine where which information must be written

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
2024-03-31 19:01:20 +02:00
Roland Reinl
0e2b7e3bd6 mediatek: Moved recovery image creation to include/image-commands.mk
The recovery image is reqired for D-Link M30 as well. So I moved it to include/image-commands.mk to be able to use it for MT7622 and filogic devices.

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
2024-03-31 19:01:20 +02:00
Hauke Mehrtens
fb2c6e9d4d kernel: bump 5.15 to 5.15.153
Removed because they are upstream:
generic/backport-5.15/704-15-v5.19-net-mtk_eth_soc-move-MAC_MCR-setting-to-mac_finish.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=c5c0760adc260d55265c086b9efb350ea6dda38b

generic/pending-5.15/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=448cc8b5f743985f6d1d98aa4efb386fef4c3bf2

generic/pending-5.15/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=9fcadd125044007351905d40c405fadc2d3bb6d6

Add new configuration symbols for tegra target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-03-31 18:34:04 +02:00
John Audia
b04f245c39 kernel: bump 6.6 to 6.6.23
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.23

Removed upstreamed:
  pending-6.6/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch[1]
  pending-6.6/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch[2]
  mediatek/patches-6.6/232-clk-mediatek-mt7981-topckgen-flag-SGM_REG_SEL-as-cri.patch[3]

Manually rebased:
  mediatek/patches-6.6/100-dts-update-mt7622-rfb1.patch

Added:
  generic/backports-6.6/981-mtd-spinand-Add-support-for-5-byte-IDs.patch[4]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.23&id=1f32abb474c1c9bdb21d9eda74c325a0b3a162e5
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.23&id=943c14ece95eb1cf98d477462aebcbfdfd714633
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.23&id=6ff01b314149d1cf59caebc29384f0beed21cba4
4. See comments in https://github.com/openwrt/openwrt/pull/14992 regarding broken flogic/xiaomi_redmi-router-ax6000-ubootmod

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, flogic/glinet_gl-mt6000
Run-tested: x86/64/AMD Cezannei, flogic/xiaomi_redmi-router-ax6000-ubootmod, flogic/glinet_gl-mt6000

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-03-31 18:19:33 +02:00
Marco von Rosenberg
06cdc07f8c ath79: add support for Huawei AP5030DN
Huawei AP5030DN is a dual-band, dual-radio 802.11ac Wave 1 3x3 MIMO
enterprise access point with two Gigabit Ethernet ports and PoE
support.

Hardware highlights:
- CPU: QCA9550 SoC at 720MHz
- RAM: 256MB DDR2
- Flash: 32MB SPI-NOR
- Wi-Fi 2.4GHz: QCA9550-internal radio
- Wi-Fi 5GHz: QCA9880 PCIe WLAN SoC
- Ethernet 1: 10/100/1000 Mbps Ethernet through Broadcom B50612E PHY
- Ethernet 2: 10/100/1000 Mbps Ethernet through Marvell 88E1510 PHY
- PoE: input through Ethernet 1 port
- Standalone 12V/2A power input
- Serial console externally available through RJ45 port
- External watchdog: SGM706 (1.6s timeout)

Serial console:
  9600n8 (9600 baud, no stop bits, no parity, 8 data bits)

MAC addresses:
  Each device has 32 consecutive MAC addresses allocated by
  the vendor, which don't overlap between devices.
  This was confirmed with multiple devices with consecutive
  serial numbers.
  The MAC address range starts with the address on the label.
  To be able to distinguish between the interfaces,
  the following MAC address scheme is used:
    - eth0 = label MAC
    - eth1 = label MAC + 1
    - radio0 (Wi-Fi 5GHz) = label MAC + 2
    - radio1 (Wi-Fi 2.4GHz) = label MAC + 3

Installation:
0. Connect some sort of RJ45-to-USB adapter to "Console" port of the AP

1. Power up the AP

2. At prompt "Press f or F  to stop Auto-Boot in 3 seconds",
   do what they say.
   Log in with default admin password "admin@huawei.com".

3. Boot the OpenWrt initramfs from TFTP using the hidden script
   "run ramboot". Replace IP address as needed:

   > setenv serverip 192.168.1.10
   > setenv ipaddr 192.168.1.1
   > setenv rambootfile
     openwrt-ath79-generic-huawei_ap5030dn-initramfs-kernel.bin
   > saveenv
   > run ramboot

4. Optional but recommended as the factory firmware cannot
   be downloaded publicly:
   Back up contents of "firmware" partition using the web interface or ssh:

   $ ssh root@192.168.1.1 cat /dev/mtd11 > huawei_ap5030dn_fw_backup.bin

5. Run sysupgrade using sysupgrade image. OpenWrt
   shall boot from flash afterwards.

Return to factory firmware (using firmware upgrade package downloaded from
non-public Huawei website):
1. Start a TFTP server in the directory where
   the firmware upgrade package is located

2. Boot to u-boot as described above

3. Install firmware upgrade package and format the config partitions:

   > update system FatAP5X30XN_SOMEVERSION.bin
   > format_fs

Return to factory firmware (from previously created backup):
1. Copy over the firmware partition backup to /tmp,
   for example using scp

2. Use sysupgrade with force to restore the backup:
   sysupgrade -F huawei_ap5030dn_fw_backup.bin

3. Boot AP to U-Boot as described above

Quirks and known issues
-----------------------

- On initial power-up, the Huawei-modified bootloader suspends both
ethernet PHYs (it sets the "Power Down" bit in the MII control
register). Unfortunately, at the time of the initial port, the kernel
driver for the B50612E/BCM54612E PHY behind eth0 doesn't have a resume
callback defined which would clear this bit. This makes the PHY unusable
since it remains suspended forever. This is why the backported kernel
patches in this commit are required which add this callback and for
completeness also a suspend callback.

- The stock firmware has a semi dual boot concept where the primary
kernel uses a squashfs as root partition and the secondary kernel uses
an initramfs. This dual boot concept is circumvented on purpose to gain
more flash space and since the stock firmware's flash layout isn't
compatible with mtdsplit.

- The external watchdog's timeout of 1.6s is very hard to satisfy
during bootup. This is why the GPIO15 pin connected to the watchdog input
is configured directly in the LZMA loader to output the CPU_CLK/4 signal
which keeps the watchdog happy until the wdt-gpio kernel driver takes
over. Because it would also take too long to read the whole kernel image
from flash, the uImage header only includes the loader which then reads
the kernel image from flash after GPIO15 is configured.

Signed-off-by: Marco von Rosenberg <marcovr@selfnet.de>
[fixed 6.6 backport patch naming]
Signed-off-by: David Bauer <mail@david-bauer.net>
2024-03-31 18:09:43 +02:00
Felix Fietkau
0cb3e86557 kernel: fix build issue on macOS
On x86, the build failed while trying to compile tools/lib/string.c because
of a clash with the system provided implementation for strlcpy
Add ifdefs to prevent the conflict.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-03-30 21:59:24 +01:00
Shiji Yang
085feb60ad ath79: move D-Link DAP-1720 A1 to tiny sub-target
This device only has 64 MiB RAM and ath10k wireless driver will
consume a lot of memory. Let's move it to the tiny sub-target to
get extra 7 MiB of free space. In this way, we can extend their
lifetime to receive support for the next OpenWrt LTS version. This
patch also trims the duplicate "recovery.bin" image as it's the
same as the "factory.bin".

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-03-30 01:04:17 +01:00
Shiji Yang
8201e402c5 ath79: move D-Link DIR-859 and DIR-869 series to tiny sub-target
These devices only have 64 MiB RAM and ath10k wireless driver will
consume a lot of memory. Let's move them to the tiny sub-target to
get extra 7 MiB of free space. In this way, we can extend their
lifetime to receive support for the next OpenWrt LTS version. This
patch also trims the USB package for the non-existent USB port.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-03-30 01:04:17 +01:00
Shiji Yang
9a6c1846bb ath79: tiny: enable NVMEM u-boot-env driver
The upcoming D-Link devices to the tiny sub-target require it to
parse the u-env MAC address. The kernel size will increase by
about 1 KiB.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-03-30 01:04:17 +01:00
Shiji Yang
82208eb527 ath79: move seama image recipe to the common Makefile
Move seama image recipe to the common Makefile in order for some
tiny sub-target D-Link devices can share it.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-03-30 01:04:17 +01:00
Shiji Yang
60061b5c26 ath79: disable building small Flash EnGenius devices
The buildbot has not successfully built them for a long time due
to small Flash size.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-03-30 01:04:17 +01:00
Chukun Pan
4ae474afbd mediatek: filogic: add Netcore N60 support
Hardware specification:
  SoC: MediaTek MT7986A 4x A53
  Flash: ESMT F50L1G41LB 128MB
  RAM: W632GU6NB DDR3 256MB
  Ethernet: 1x 2.5G + 4x 1G
  WiFi1: MT7975N 2.4GHz 4T4R
  WiFi2: MT7975PN 5GHz 4T4R
  Button: Reset, WPS
  Power: DC 12V 2A

Flash instructions:
  1. Connect to the router using ssh or telnet,
     username: useradmin, password is the web
     login password of the router.
  2. Use scp to upload bl31-uboot.fip and flash:
     "mtd write xxx-preloader.bin spi0.0"
     "mtd write xxx-bl31-uboot.fip FIP"
     "mtd erase ubi"
  3. Connect to the router via the Lan port,
     set a static ip of your PC.
     (ip 192.168.1.254, gateway 192.168.1.1)
  4. Download initramfs image, reboot router,
     waiting for tftp recovery to complete.
  5. After openwrt boots up, perform sysupgrade.

Note:
  1. Back up all mtd partitions before flashing.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-03-29 22:54:28 +01:00
Mieczyslaw Nalewaj
362e7103c6 ramips: mt7620a_tplink_archer-c5-v4: use LED_FUNCTION_WLAN_2GHZ and LED_FUNCTION_WLAN_5GHZ
Use LED_FUNCTION_WLAN_2GHZ and LED_FUNCTION_WLAN_5GHZ instead function-enumerator

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-03-29 20:10:42 +01:00
Florian Eckert
a998a12a2f imagebuilder: add check if target is sourced from feed
The image generation would fail, if the target is included from a feed.
To fix this, check if targets is found in the feed directory.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Tested-by: Thomas Richard <thomas.richard@bootlin.com>
2024-03-29 20:00:27 +01:00
Florian Eckert
27d227b682 imagebuilder: check if BOARD is located in the feeds sub directory
Fixes the regression so that targets that were installed via a feed can
also be build again with the Image Builder.

Fixes: 84ec8c4 ("imagebuilder: copy from buildroot only target/linux")
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Tested-by: Thomas Richard <thomas.richard@bootlin.com>
2024-03-29 20:00:27 +01:00
Tianling Shen
163c3d0bde rockchip: remove redundant 'console' parameter from boot script
ttyS2 is the default console used for all rockchip boards.
The redundant 'console=tty1' parameter now breaks the console due to
recent procd update.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-29 19:34:42 +01:00
Tianling Shen
50e6c8ae8d rockchip: remove 'swiotlb' parameter from boot script
We have hardware IOMMU support and this is totally unnecessary.
The given value is also unreasonable, it's too small and causes
kernel panic in some cases:

[ 5706.856473] sdhci-dwcmshc fe310000.mmc: swiotlb buffer is full (sz: 28672 bytes), total 512 (slots), used 498 (slots)
[ 5706.864451] sdhci-dwcmshc fe310000.mmc: swiotlb buffer is full (sz: 65536 bytes), total 512 (slots), used 464 (slots)

This parameter seems to be added by mistake, so remove it.

Fixes: e35c7ab51f ("rockchip: merge bootscript")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-29 19:34:42 +01:00
Robert Marko
5876b4afb9 qualcommax: default to kernel 6.6
6.6 has been in testing on qualcommax for a while so it should be in a
good shape, but lets default to it to get a wider audience.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-29 18:56:31 +01:00
Hauke Mehrtens
2ec025d554 kernel: bump 5.15 to 5.15.152
Removed because it is upstream:
generic/backport-5.15/081-v5.17-regmap-allow-to-define-reg_update_bits-for-no-bus.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=fbddd48f1456db32b675fad95a902de38345902a

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-03-29 13:44:41 +01:00
Hauke Mehrtens
0307571124 kernel: bump 5.15 to 5.15.151
No manual changes needed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-03-29 13:44:41 +01:00
Robert Marko
b1d579f174 archs38: remove 5.15 support
Since 6.1 is now default, drop 5.15 support.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-29 09:58:45 +01:00
Robert Marko
00c26f4728 archs38: default to kernel 6.1
Default to kernel 6.1 on archs38.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-29 09:58:45 +01:00
Mieczyslaw Nalewaj
de8a6ce5ea generic: 6.6: add kernel missing symbol
Add missing symbol CONFIG_SSIF_IPMI_BMC causing bcm53xx compilation errors.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-03-29 09:58:18 +01:00
Rafał Miłecki
eb370ebc5f bcm47xx: refresh kernel 6.1 config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-03-29 00:12:50 +01:00
Rafał Miłecki
8583a97c06 bcm47xx: add testing support for kernel 6.1
Tested on Luxul XWR-1750 (BCM4706). Working: switch (LAN, WAN), LEDs,
sysupgrade.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-03-29 00:11:04 +01:00
Rafał Miłecki
d4a40827ba bcm4908: refresh kernel 6.6 config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-03-28 13:29:52 +01:00