1
0
Fork 0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-05-10 01:26:24 +02:00
Commit Graph

57516 Commits

Author SHA1 Message Date
Petr Štetiar 11bb5337b8 Revert "feeds: use git-src-full to allow Git versioning"
This partially reverts commit 7fae1e5677
as it should be no longer necessary to do a full clone since commit
48ed07bc0b ("treewide: replace AUTORELEASE with real PKG_RELEASE").

Suggested-by: Thibaut VARÈNE <hacks@slashdirt.org>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-05-23 14:38:55 +02:00
Aleksander Jan Bajkowski cec0a38ade
kernel: add disabled symbol CONFIG_CPU_LITTLE_ENDIAN on 6.1
The identical change was previously added to the 5.15 kernel in the commit
9226f1e419 ("kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config").

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2023-05-23 14:26:56 +02:00
Aleksander Jan Bajkowski 4f197f9134
kernel: sort generic configuration
This was done by executing these commands:

$ ./scripts/kconfig.pl '+' target/linux/generic/config-5.15 /dev/null > target/linux/generic/config-5.15-new
$ mv target/linux/generic/config-5.15-new target/linux/generic/config-5.15

$ ./scripts/kconfig.pl '+' target/linux/generic/config-6.1 /dev/null > target/linux/generic/config-6.1-new
$ mv target/linux/generic/config-6.1-new target/linux/generic/config-6.1

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2023-05-23 14:26:07 +02:00
Robert Marko bc4ba54a09 mac80211: backport merged version of A-MSDU mesh patch
Kernel 6.1 now has fortify_memcpy_chk() and it is causing the following
warning while trying to compile backports:
  CC [M]  /home/robimarko/Building/AX3600/ipq807x-5.15/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-6.1.24/net/wireless/util.o
In file included from ./include/linux/string.h:253,
                 from /home/robimarko/Building/AX3600/ipq807x-5.15/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-6.1.24/backport-include/linux/string.h:3,
                 from ./include/linux/bitmap.h:11,
                 from ./include/linux/cpumask.h:12,
                 from ./include/linux/smp.h:13,
                 from ./arch/arm64/include/asm/arch_timer.h:18,
                 from ./arch/arm64/include/asm/timex.h:8,
                 from ./include/linux/timex.h:67,
                 from ./include/linux/time32.h:13,
                 from ./include/linux/time.h:60,
                 from /home/robimarko/Building/AX3600/ipq807x-5.15/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-6.1.24/backport-include/linux/time.h:3,
                 from ./include/linux/skbuff.h:15,
                 from /home/robimarko/Building/AX3600/ipq807x-5.15/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-6.1.24/backport-include/linux/skbuff.h:3,
                 from ./include/linux/if_ether.h:19,
                 from /home/robimarko/Building/AX3600/ipq807x-5.15/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-6.1.24/backport-include/linux/if_ether.h:3,
                 from ./include/linux/etherdevice.h:20,
                 from /home/robimarko/Building/AX3600/ipq807x-5.15/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-6.1.24/backport-include/linux/etherdevice.h:3,
                 from /home/robimarko/Building/AX3600/ipq807x-5.15/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-6.1.24/net/wireless/util.c:12:
In function 'fortify_memcpy_chk',
    inlined from 'ieee80211_strip_8023_mesh_hdr' at /home/robimarko/Building/AX3600/ipq807x-5.15/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-6.1.24/net/wireless/util.c:590:3:
./include/linux/fortify-string.h:404:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
  404 |                         __write_overflow_field(p_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

This issue was fixed in the final version of
("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces") that was
merged upstream but we have a older version that is using:
memcpy(&payload.eth.h_dest, mesh_addr, 2 * ETH_ALEN);
instead of:
memcpy(&payload.eth, mesh_addr, 2 * ETH_ALEN);

So, lets just backport the merged version of patch to fix the issue.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-23 13:37:28 +02:00
Daniel Golle d6fef27f2d mediatek: mt7623: build SD card without all filesystems
Allow building SD card images without having both initramfs and squashfs
present on the card, just like it has already been done for the mt7622
and filogic subtargets.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-22 23:04:09 +01:00
Christian Marangi 4c4ba37896
ipq806x: enable testing kernel version with 6.1 version
Enable testing kernel version with 6.1 kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:23 +02:00
Christian Marangi b2d3131edf
ipq806x: 6.1: refresh config and add missing symbols
Refresh config for kernel 6.1 and add missing symbols
Then sorted using:
$ ./scripts/kconfig.pl '+' target/linux/ipq806x/config-6.1 /dev/null > target/linux/ipq806x/config-6.1-new
$ mv target/linux/ipq806x/config-6.1-new target/linux/ipq806x/config-6.1

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:23 +02:00
Christian Marangi 33a9bce278
ipq806x: 6.1: refresh dts
Refresh dts for kernel 6.1 support.
Changes:
- nbg6817 drop amba node and reference directly sdcc1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:23 +02:00
Christian Marangi 64c204c586
ipq806x: 6.1: refresh kernel patches
Refresh ipq806x kernel patches with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:22 +02:00
Christian Marangi eb69d7a4ff
ipq806x: 6.1: manually refresh kernel patches
Refresh kernel patches for version 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:22 +02:00
Christian Marangi f92bf3ffbc
ipq806x: 6.1: replace ZRELADDR HACK patch with new version
With 6.1 lots have changed and the platform for Makefile.boot got
dropped. Replace the patch with a new version that is alligned to the
new implementation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:22 +02:00
Christian Marangi d06b859ada
ipq806x: 6.1: drop upstream patch
Drop patch that got merged upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:21 +02:00
Christian Marangi dbac8e8819
ipq806x: 6.1: copy patches, files and config from 5.15
Copy patches, files and config from 5.15 kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:21 +02:00
Robert Marko 6dce5a7b58
kernel: modules: fs: adapt for kernel 6.1
Adapt filesystem kmods for building under kernel 6.1:
* Depend on kernel not being 5.10 rather than only 5.15
* kmod-fs-9p depends on kmod-fs-netfs from 5.17 as they started using
netfs helpers
* Set new KConfig options to N

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-22 22:28:20 +02:00
Robert Marko 4a02c5954f
kernel: modules: wwan: adapt for kernel 6.1
Update the WWAN kmods for compilation under kernel 6.1:
* Depend on kernel not being 5.10 rather than only 5.15
* Enable CONFIG_WWAN_DEBUGFS as its now optional from 5.17
* Add missing symbols for new WWAN drivers to generic config

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-22 22:28:20 +02:00
Christian Marangi a511887644
kernel: modules: adapt for kernel 6.1
Adapt kernel modules to support kernel 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:20 +02:00
Pawel Dembicki 47e43c86e4
generic: kernel: add missing symbol
Add missing symbol while adding layerscape support

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[ add commit description ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:19 +02:00
Robert Marko 178278bcd3
generic: 6.1: add missing symbols
These symbols got exposed once building for ipq807x.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-22 22:28:19 +02:00
Christian Marangi 6bdc6bb173
generic: 6.1: refresh config and add missing symbols
Refresh generic config for 6.1 and add missing symbols.
Then sorted using:
$ ./scripts/kconfig.pl '+' target/linux/generic/config-6.1 /dev/null > target/linux/generic/config-6.1-new
$ mv target/linux/generic/config-6.1-new target/linux/generic/config-6.1

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:19 +02:00
Christian Marangi 7612f8d6eb
kernel: add CONFIG_INITRAMFS_PRESERVE_MTIME config to Initramfs function
New kernel version 6.1 introduced new INITRAMFS option. Add them to the
Initramfs functions to correctly compile initramfs images.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:18 +02:00
Christian Marangi 9273487930
kernel: use eth_random_addr instead of random_ether_addr
random_ether_addr is just a reference to eth_random_addr, that was later
dropped in more recent kernel version.

Drop random_ether_addr and use eth_random_addr directly to fix
compilation error in 6.1

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:18 +02:00
Christian Marangi 0605fa693e
kernek: use struct_group to wipe ar8216 volatile priv data
Instead of reference vlan and do strange subtraction, use the handy
struct_group() to create a virtual struct of the same size of the
members. This permits to have a more secure memset and fix compilation
warning in 6.1 where additional checks are done.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:18 +02:00
Christian Marangi fb6de77a82
kernel: refresh swconfig_leds to handle new trigger locking
Refresh swconfig_leds source to handle new trigger locking that is now a
spinlock.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:17 +02:00
Christian Marangi 5f987b84ef
kernel: refresh IFF_NO_IP_ALIGN ifdef for kernel >= 6.1
Kernel 6.1 expanded the priv_flags to long bitmap so update and restore
it to priv_flags.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:17 +02:00
Christian Marangi 4ed347aaad
generic: 6.1: refresh pending patches
Refresh pending patches with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:17 +02:00
Christian Marangi aa56d00aa6
generic: 6.1: refresh hack patches
Refresh hack patches with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:16 +02:00
Christian Marangi f79af59383
generic: 6.1: refresh backport patches
Refresh backport patches with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:16 +02:00
Christian Marangi ce345dd0df
generic: 6.1: add pending OPP set opp improvement patch
Add pending OPP set opp improvement patch to better handle _set_opp
function in clock scaling.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:16 +02:00
Christian Marangi 7f7ee27d5f
generic: 6.1: add patch to compile ieee8211 headers
With kernel 6.1 ieee2111_ptr is not compiled by default. Add pending
patch to restore this to make backports project compatible.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:15 +02:00
Christian Marangi e41466edab
generic: 6.1: manually refresh mglru patch with new kernel version
Refresh mglru patch for new kernel version due to very fun backport
changing name from folio to pages.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:15 +02:00
Christian Marangi 19a246bb65
generic: 6.1: manually refresh hack patches
Refresh hack patches for kernel 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:15 +02:00
Christian Marangi 92a0cc7c61
generic: 6.1: drop pending patch backported as fixes
Drop pending patch backported as fixes in later kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:14 +02:00
Christian Marangi fcab78c09f
generic: 6.1: manually refresh pending patches
Refresh pending patches for kernel 6.1.

Changes:
- Refresh mtd patches with new implementation.
- Change 191-rtc-rs5c372-let_the_alarm_to_be_used_as_wakeup_source as
  uie_unsupported got dropped and we now set the bit directly.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:14 +02:00
Christian Marangi 9aee67efbb
generic: 6.1: manually refresh backport patches
Refresh backport patches that still needs to be merged for kernel 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:14 +02:00
Christian Marangi 3be6f3592e
generic: 6.1: drop backport patches
Drop all backport patches that are now included in kernel 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:14 +02:00
Christian Marangi fa79baf4a6
generic: copy backport, hack, pending patch and config from 5.15 to 6.1
Copy backport, hack, pending patch and config from 5.15 to 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:13 +02:00
Christian Marangi 8fb9bbcf65
kernel: add define for kernel 6.1
Add define for kernel 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 22:28:10 +02:00
Nick Hainke 3b76f6eee4 busybox: update to 1.36.1
Release Notes:
http://lists.busybox.net/pipermail/busybox-cvs/2023-May/041510.html

Refresh commands, run after busybox is first built once (nothing changed
compared to 1.36.0):

  cd package/utils/busybox/config/
  ../convert_menuconfig.pl ../../../../build_dir/target-mipsel_24kc_musl/busybox-default/busybox-1.36.1
  cd ..
  ./convert_defaults.pl ../../../build_dir/target-mipsel_24kc_musl/busybox-default/busybox-1.36.1/.config > Config-defaults.in

Manual edits needed afterward:

* Config-defaults.in: OpenWrt config symbol IPV6 logic applied to
  BUSYBOX_DEFAULT_FEATURE_IPV6

* Config-defaults.in: OpenWrt config TARGET_bcm53xx logic applied to
  BUSYBOX_DEFAULT_TRUNCATE (commit 547f1ec)

* Config-defaults.in: OpenWrt logic applied to
  BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD (commit dc92917)

* Config-defaults.in: correct the default ports that get reset
  BUSYBOX_DEFAULT_FEATURE_HTTPD_PORT_DEFAULT    80
  BUSYBOX_DEFAULT_FEATURE_TELNETD_PORT_DEFAULT  23

* config/editors/Config.in: Add USE_GLIBC dependency to
  BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH (commit f141090)

* config/shell/Config.in: change at "Options common to all shells" the conditional symbol
  SHELL_ASH --> BUSYBOX_CONFIG_SHELL_ASH
  (discussion in http://lists.openwrt.org/pipermail/openwrt-devel/2021-January/033140.html
  Apparently our script does not see the hidden option while
  prepending config options with "BUSYBOX_CONFIG_" which leads to a
  missed dependency when the options are later evaluated.)

* Edit a few Config.in files by adding quotes to sourced items in
  config/Config.in, config/networking/Config.in and config/util-linux/Config.in (commit 1da014f)

Tested-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-22 20:55:33 +02:00
Nick Hainke c520d682f0 libxml2: update to 2.11.4
Release Notes:
https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.11.4

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-22 18:52:59 +02:00
Nick Hainke 78c45c1e59 libcap: update to 2.69
Release Notes:
https://sites.google.com/site/fullycapable/release-notes-for-libcap#h.iuvg7sbjg8pe

Fixes: CVE-2023-2602 CVE-2023-2603
Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-22 18:51:31 +02:00
Nick Hainke 17fbbafdcb lldpd: update to 1.0.17
Release Notes:
https://github.com/lldpd/lldpd/releases/tag/1.0.17

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-22 18:48:36 +02:00
Pietro Ameruoso 1c05388ab0 mediatek: add support for Zyxel EX5601-T0 router
Zyxel EX5601-T0 specifics
--------------
The operator specific firmware running on the Zyxel branded
EX5601-T0 includes  U-Boot modifications affecting the OpenWrt
installation.

Partition Table
| dev  | size     | erasesize | name          |
| ---- | -------- | --------- | ------------- |
| mtd0 | 20000000 | 00040000  | "spi0.1"      |
| mtd1 | 00100000 | 00040000  | "BL2"         |
| mtd2 | 00080000 | 00040000  | "u-boot-env"  |
| mtd3 | 00200000 | 00040000  | "Factory"     |
| mtd4 | 001c0000 | 00040000  | "FIP"         |
| mtd5 | 00040000 | 00040000  | "zloader"     |
| mtd6 | 04000000 | 00040000  | "ubi"         |
| mtd7 | 04000000 | 00040000  | "ubi2"        |
| mtd8 | 15a80000 | 00040000  | "zyubi"       |

The router boots BL2 which than loads FIP (u-boot).
U-boot has hardcoded a command to always launch Zloader "mtd read zloader 0x46000000" and than "bootm". Bootargs are deactivated.
Zloader is the zyxel booloader which allow to dual-boot ubi or ubi2, by default access to zloader is blocked.
Too zloader checks that the firmware contains a particolar file called zyfwinfo.
Additional details regarding Zloader can be found here:
https://hack-gpon.github.io/zyxel/
https://forum.openwrt.org/t/adding-openwrt-support-for-zyxel-ex5601-t0/155914

Hardware
--------
SOC: MediaTek MT7986a
CPU: 4 core cortex-a53 (2000MHz)
RAM: 1GB DDR4
FLASH: 512MB SPI-NAND (Micron xxx)
WIFI: Wifi6 Mediatek MT7976 802.11ax 5 GHz 4x4 + 2.4GHZ 4x4
ETH: MediaTek MT7531 Switch + SoC
3 x builtin 1G phy (lan1, lan2, lan3)
1 x MaxLinear GPY211B 2.5 N-Base-T phy5 (lan4)
1 x MaxLinear GPY211B 2.5Gbit xor SFP/N-Base-T phy6 (wan)
USB: 1 x USB 3.2 Enhanced SuperSpeed port
UART: 3V3 115200 8N1 (Pinout: GND KEY RX TX VCC)
VOIP: 2 FXS ports for analog phones

MAC Address Table
-----------------
eth0/lan    Factory 0x002a
eth1/wan    Factory 0x0024
wifi 2.4Ghz Factory 0x0004
wifi 5Ghz   Factory 0x0004 + 1

Serial console (UART)
---------------------
+-------+-------+-------+-------+-------+
| +3.3V |  RX   |  TX   |  KEY  |  GND  |
+---+---+-------+-------+-------+-------+
    |
    +--- Don't connect

Installation
------------
Keep in mind that openwrt can only run on the UBI partition, the openwrt firmware is not able to understand the zloader bootargs.
The procedure allows restoring the UBI partition with the Zyxel firmware and retains all the OEM functionalities.

1. Unlock Zloader (this will allow to swap manually between partitions UBI and UBI2):
- Attach a usb-ttl adapter to your computer and boot the router.
- While the router is booting at some point you will read the following: `Please press Enter to activate this console.`
- As soon as you read that press enter, type root and than press enter again (just do it, don't care about the logs scrolling).
- Most likely the router is still printing the boot log, leave it boot until it stops.
- If everything went ok you should have full root access "root@EX5601-T0:/#".
- Type the following command and press enter: "fw_setenv EngDebugFlag 0x1".
- Reboot the router.
- As soon as you read `Hit any key to stop autoboot:` press Enter.
- If everything went ok you should have the following prompt: "ZHAL>".
- You have successfully unlocked zloader access, this procedure must be done only once.

2. Check the current active partition:
- Boot the router and repeat the steps above to gain root access.
- Type the following command to check the current active image: "cat /proc/cmdline".
- If `rootubi=ubi` it means that the active partition is `mtd6`
- If `rootubi=ubi2` it means that the active partition is `mtd7`
- As mentioned earlier we need to flash openwrt into ubi/mtd6 and never overwrite ubi2/mtd7 to be able to fully roll-back.
- To activate and boot from mtd7 (ubi2) enter into ZHAL> command prompt and type the following commands:
atbt 1  # unlock write
atsw    # swap boot partition
atsr    # reboot the router
- After rebooting check again with "cat /proc/cmdline" that you are correctly booting from mtd7/ubi2
- If yes proceed with the installation guide. If not probably you don't have a firmware into ubi2 or you did something wrong.

3. Flashing:
- Download the sysupgrade file for the router from openwrt, than we need to add the zyfwinfo file into the sysupgrade tar.
Zloader only checks for the magic (which is a fixed value 'EXYZ') and the crc of the file itself (256bytes).
I created a script to create a valid zyfwinfo file but you can use anything that does exactly the same:
https://raw.githubusercontent.com/pameruoso/OpenWRT-Zyxel-EX5601-T0/main/gen_zyfwinfo.sh
- Add the zyfwinfo file into the sysupgrade tar.
- Enter via telnet or ssh into the router with admin credentials
- Enter the following commands to disable the firmware and model checks
"zycli fwidcheck off" and "zycli modelcheck off"
- Open the router web interface and in the update firmware page select the "restore default settings option"
- Select the sysupgrade file and click on upload.
- The router will flash and reboot itself into openwrt from UBI

4. Restoring and going back to Zyxel firmware.
- Use the ZHAL> command line to manually swap the boot parition to UBI2 with the following:
atbt 1  # unlock write
atsw    # swap boot partition
atsr    # reboot the router
- You will boot again the Zyxel firmware you have into UBI2 and you can flash the zyxel firmware to overwrite the UBI partition and openwrt.

Working features
----------------
3 gbit lan ports
Wifi
Zyxel partitioning for coexistance with Zloader and dual boot.
WAN SFP port (only after exporting pins 57 and 10. gpiobase411)
leds
reset button
serial interface
usb port
lan ethernet 2.5 gbit port (autosense)
wan ethernet 2.5 gbit port (autosense)

Not working
----------------
voip (missing drivers or proper zyxel platform software)

Swapping the wan ethernet/sfp xor port
----------------
The way to swap the wan port between sfp and ethernet is the following:
export the pins 57 and 10.
Pin 57 is used to probe if an sfp is present.
If pin 57 value is 0 it means that an sfp is present into the cage (cat /sys/class/gpio/gpio468/value).
If pin 57 value is 1 it means that no sfp is inserted into the cage.
In conclusion by default both 57 an 10 pins are by default 1, which means that the active port is the ethernet one.
After inserting an SFP pin 57 will become 0 and you have to manually change the value of pin 10 to 0 too.
This is totally scriptable of course.

Leds description
------------
All the leds are working out of the box but the leds managed by the 2 maxlinear phy (phy 5 lan, phy6 wan).
To activate the phy5 led (rj45 ethernet port led on the back of the router) you have to use mdio-tools.
To activate the phy6 led (led on the front of the router for 2.5gbit link) you have to use mdio-tools.
Example:
Set lan5 led to fast blink on 2500/1000, slow blink on 10/100:
mdio mdio-bus mmd 5:30 raw 0x0001 0x33FC

Set wan 2.5gbit led to constant on when wan is 2.5gbit:
mdio mdio-bus mmd 6:30 raw 0x0001 0x0080

Signed-off-by: Pietro Ameruoso <p.ameruoso@live.it>
2023-05-22 17:58:59 +02:00
Christian Marangi eecc6e4811
CI: rework build workflow to have split target and subtarget directly
Instead of referring to a redundant job and ENV variables, rework build
workflow to accept and require split target and subtarget and use them
directly from inputs.

Rework each user and pass a JSON of tuple to matrix include with each
target/subtarget combination to test. Special notice this doesn't use
the github actions matrix combination feature but reference each
specific tuple of target and subtarget to test.

Just a cleanup no behaviour change intended.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 17:11:27 +02:00
Christian Marangi 6c80a578a4
CI: check-kernel-patches: use buildbot user on git diff check
Use buildbot user on git diff check instead of using git config
safe directory.

This should accomplish the same result but should be a better approach
following safe practice enforced by git.

Fixes: a7747e8670 ("ci: fix check kernel patches job")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-22 16:05:13 +02:00
Shiji Yang 0ffbef9317 ath79: add support for D-Link DIR-859 A3
Specifications:
  SOC:      QCA9563 775 MHz + QCA9880
  Switch:   QCA8337N-AL3C
  RAM:      Winbond W9751G6KB-25 64 MiB
  Flash:    Winbond W25Q128FVSG 16 MiB
  WLAN:     Wi-Fi4 2.4 GHz 3*3 + 5 GHz 3*3
  LAN:      LAN ports *4
  WAN:      WAN port *1
  Buttons:  reset *1 + wps *1
  LEDs: ethernet *5, power, wlan, wps

MAC Address:
  use      address               source1          source2
  label    40:9b:xx:xx:xx:3c     lan && wlan      u-boot,env@ethaddr
  lan      40:9b:xx:xx:xx:3c     devdata@0x3f     $label
  wan      40:9b:xx:xx:xx:3f     devdata@0x8f     $label + 3
  wlan2g   40:9b:xx:xx:xx:3c     devdata@0x5b     $label
  wlan5g   40:9b:xx:xx:xx:3e     devdata@0x76     $label + 2

Install via Web UI:
  Apply factory image in the stock firmware's Web UI.

Install via Emergency Room Mode:
  DIR-859 A1 will enter recovery mode when the system fails to boot
  or press reset button for about 10 seconds.

  First, set computer IP to 192.168.0.5 and Gateway to 192.168.0.1.
  Then we can open http://192.168.0.1 in the web browser to upload
  OpenWrt factory image or stock firmware. Some modern browsers may
  need to turn on compatibility mode.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-05-22 14:45:03 +02:00
Shiji Yang e5d8739aa8 ath79: improve support for D-Link DIR-8x9 A1 series
1. Remove unnecessary new lines in the dts.
2. Remove duplicate included file "gpio.h" in the device dts.
3. Add missing button labels "reset" and "wps".
4. Unify the format of the reg properties.
5. Add u-boot environment support.
6. Reduce spi clock frequency since the max value suggested by the
   chip datasheet is only 25 MHz.
7. Add seama header fixup for DIR-859 A1. Without this header fixup,
   u-boot checksum for kernel will fail after the first boot.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-05-22 14:45:03 +02:00
INAGAKI Hiroshi e8f7957450 ath79: enable NVMEM u-boot-env driver on generic subtarget
This patch enables NVMEM u-boot-env driver (COFNIG_NVMEM_U_BOOT_ENV) on
generic subtarget to use from devices, for MAC address and etc.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2023-05-22 14:45:03 +02:00
Shiji Yang 2fbb91d73f ramips: correct page read return value of the mt7621 nand driver
read_page() need to return maximum number of bitflips instead of the
accumulated number. Change takes from upstream mt7621 u-boot [1].

 * @read_page:  function to read a page according to the ECC generator
 *              requirements; returns maximum number of bitflips
 *              corrected in any single ECC step, -EIO hw error

[1] https://lore.kernel.org/all/cover.1653015383.git.weijie.gao@mediatek.com/

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-05-22 14:45:03 +02:00
Christian Lamparter 959563fb81 uml: exclude some /arch/x86 optimizations
The x86_64 UML target wants to include SSSE3 optimized
crypto code which lives under /arch/x86/crypto.

However, these are not built and this causes an error.
| ERROR: module '[...]/arch/x86/crypto/sha512-ssse3.ko' is missing.
| make[3]: *** [modules/crypto.mk:990: [...]/kmod-crypto-sha512_5.15.112-1_x86_64.ipk] Error 1

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-22 14:45:03 +02:00
Christian Lamparter aed2569d37 uml: fix build error due to frame size > 1024
the UML build fails during the kernel build:
| arch/um/drivers/net_kern.c: In function 'compute_hash':
| arch/um/drivers/net_kern.c:322:1: error: the frame size of 1072 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
|  322 | }
|      | ^
|cc1: all warnings being treated as errors

The compute_hash() function is added by our patch:
102-pseudo-random-mac.patch

Instead of allocating a 1024 byte buffer on the stack for the SHA1
digest input, let's allocate the data on the heap. We should be
able to do that since crypto_alloc_ahash and ahash_request_alloc
also need to allocate structures on the heap.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-22 14:45:03 +02:00