1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-18 13:29:16 +02:00
Commit Graph

61281 Commits

Author SHA1 Message Date
Hauke Mehrtens
6cfa186544 kernel: bump 5.15 to 5.15.159
Removed because they are upstream:
   generic/pending-5.15/778-net-l2tp-drop-flow-hash-on-forward.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=e97e0051056b6dbcc43ae1862dcfcb05d06517c3

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-01 00:22:09 +02:00
David Bauer
89d7051485 hostapd: bump PKG_RELEASE
Signed-off-by: David Bauer <mail@david-bauer.net>
2024-06-30 22:23:11 +02:00
David Bauer
68e4cc9be5 hostapd: don't ignore probe-requests with invalid DSSS params
Don't ignore probe requests which contain an invalid DS parameter for the
current operating channel.

As the comment outlines, the drop shall only apply if
dot11RadioMeasurementActivated is set to 1.

However, it was observed Linux clients (Debian 12 / NixOS 23.11)
with an Intel 8265 NIC may generate a probe request frame with
dot11RadioMeasurementActivated set to false and an invalid DSSS
parameter.

These were also dropped even though they should not have been. They
however should not have contained this parameter in the first place.

Don't drop Probe Requests which contain such an invalid field. This may
lead to more probe responses being sent, however it does fix very
frequent connection issues for these clients on 2.4 GHz.

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-06-30 22:23:11 +02:00
Paul Spooren
67e0c5922c
malta: enable VM targets again
These targets are interesting for automated testing. The currently
available targets are from 2017 and either we should enable them again
or delete the remaining files on the download servers.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Link: https://github.com/openwrt/openwrt/pull/15740
Link: https://github.com/openwrt/openwrt/pull/15740
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-30 22:00:03 +02:00
Rosen Penev
55bda9863d tools/e2fsprogs: fix shell scripts under SDK
7c32295b0036be425ba0cd527eb06316a87d0ec0 exposed a problem where the SDK
builds these shell scripts with a nonsensical absolute path for the DIR
variable. Use sed to patch in $STAGING_DIR_HOST.

Also remove PKG_RELEASE as that is nonsensical for tools.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15841
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-30 19:05:21 +02:00
Robert Marko
b4069fad02 ipq40xx: habanero-dvk: fix LAN MAC adresses
Currently, only the WAN MAC is being populated on Habanero DVK, and that is
happening via the ethernet1 alias so U-Boot does it, previously ethernet0
was implicitly added in the SoC DTSI so it would populate the LAN MAC-s but
it was dropped(rightly so) so now LAN MAC-s and the GMAC one are random.

So, lets simply switch to using NVMEM to assign the proper MAC adresses.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-30 11:26:23 +02:00
John Thomson
515ad3ce8a ipq40xx: ipqess: do not free ipqess_init
If this function is marked as __init, kernel will splat when driver is
(re)bind
echo "c080000.ethernet">/sys/bus/platform/drivers/ipqess-edma/unbind
echo "c080000.ethernet">/sys/bus/platform/drivers/ipqess-edma/bind

Example with additional print messages, functions at boot:
[    2.039468] ipqess-edma c080000.ethernet: ipqess_axi_probe pre register_netdev
[    2.039530] ipqess-edma c080000.ethernet: *netdev: c27d2000
[    2.045609] ipqess-edma c080000.ethernet: &ipqess_init: c0d1e28c
[    2.051122] ipqess_init
[    2.057338] netdev: c27d2000
[    2.059492] ess = netdev_priv: c27d2500
[    2.062615] ess->pdev: c2138c00
[    2.066174] ess->pdev->dev: c2138c10
[    2.069314] ess->pdev->dev.of_node: ef6f6368
[    2.073120] ess->pdev->dev.of_node: /soc/ethernet@c080000

fails (bind) after unbind:
[   34.987948] ipqess-edma c080000.ethernet: ipqess_axi_probe pre register_netdev
[   34.988012] ipqess-edma c080000.ethernet: *netdev: c27d6000
[   34.994088] ipqess-edma c080000.ethernet: &ipqess_init: c0d1e28c
[   34.999652] 8<--- cut here ---
[   35.005802] Unable to handle kernel paging request at virtual address c0d1e28c when execute
[   35.008676] [c0d1e28c] *pgd=80c1941e(bad)
[   35.016918] Internal error: Oops: 8000000d [#1] SMP ARM

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
Link: https://github.com/openwrt/openwrt/pull/15831
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-30 11:07:02 +02:00
John Thomson
69d0ff5803 ipq40xx: ipqess: pass up ethdev_addr probe defer
Notify via dev_info when a random MAC address is set.
of_get_ethdev_address can return -EPROBE_DEFER for NVMEM devices,
return this up, so that ipqess can defer as well.
Also move this MAC assignment from _init into _probe, so that this defer
can happen earlier.

Before change, with MAC address allocated from a built-in NVMEM layout
driver (mikrotik,routerboot-nvmem) with extra of_get_ethdev_address
result and random MAC printfs:
[    1.197571] ipqess-edma c080000.ethernet: ipqess_init of_get_ethdev_address ret:-517, of_node: /soc/ethernet@c080000
[    1.197690] ipqess-edma c080000.ethernet: generated random MAC address 22:e7:36:e0:e4:a3
[    1.614444] ipqess-edma c080000.ethernet eth0: entered promiscuous mode
[    5.055929] ipqess-edma c080000.ethernet eth0: configuring for fixed/internal link mode

after change:
[    1.173776] ipqess-edma c080000.ethernet: of_get_ethdev_address: -517
[    1.614607] ipqess-edma c080000.ethernet eth0: entered promiscuous mode
[    5.246105] ipqess-edma c080000.ethernet eth0: configuring for fixed/internal link mode
[    5.260754] ipqess-edma c080000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx

with extra __func__ printf to show _probe and _init:
[    1.173685] ipqess-edma c080000.ethernet: ipqess_axi_probe
[    1.173784] ipqess-edma c080000.ethernet: of_get_ethdev_address: -517
[    1.280347] ipqess-edma c080000.ethernet: ipqess_axi_probe
[    1.304844] ipqess-edma c080000.ethernet: ipqess_init
[    1.614664] ipqess-edma c080000.ethernet eth0: entered promiscuous mode

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
Link: https://github.com/openwrt/openwrt/pull/15831
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-30 11:07:02 +02:00
Daniel Golle
75081235b8 generic: 6.6: (re-)add support multiple PPE to mtk_eth_soc
Now that the issue with WED has been sorted out, re-add support for
multiple PPE to the mtk_eth_soc driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-28 20:55:11 +01:00
Shiji Yang
007437c225 kernel: mtd: ubi: avoid attaching "linux,ubi" mtd again
"linux,ubi" compatible MTD device can be automatically attached early
since commit fc153aa8d94f. Therefore, there is no need to attach MTD
devices named "ubi" or "data" again.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-06-28 20:55:11 +01:00
Rosen Penev
7c32295b00 e2fsprogs: remove HostBuild
These things already get built and installed by tools/e2fsprogs. No need
to duplicate.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15822
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-28 11:25:58 +02:00
Christian Marangi
7c9644a7b5 bmips: backport upstreamed RAC patches
Replace downstream bmips RAC fixes with upstream patches.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
[backport upstream patches]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-06-27 17:59:31 +02:00
Bryan Berg
173d59e7dc
ipq806x: 6.6: enable at803x driver
Used by ethernet interfaces on AP3935i.

Signed-off-by: Bryan Berg <bdb@north-eastham.org>
Link: https://github.com/openwrt/openwrt/pull/13629
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-27 17:11:40 +02:00
Bryan Berg
bf0602f9c8
ipq806x: ap3935: Use rgmii-id mode for LAN1
Fix issue with LAN1 interface on ap3935 devices, where the LAN
1interface won't come up after boot unless the bootloader has
initialized the network stack. Use of `fixed-link` in the prior code
kept the driver from clobbering PHY settings, but now that the driver
supports rgmii-id phy-mode, we can just use that.

Signed-off-by: Bryan Berg <bdb@north-eastham.org>
Link: https://github.com/openwrt/openwrt/pull/13629
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-27 17:11:39 +02:00
Bryan Berg
e27c7e4b9b
ipq806x: ap3935: Use gmac0 mdio controller
Updates ap3935 target to use the mdio controller built-in to gmac0,
rather than having the SoC bit-bang mdio from gpio pins

Signed-off-by: Bryan Berg <bdb@north-eastham.org>
Link: https://github.com/openwrt/openwrt/pull/13629
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-27 17:11:39 +02:00
Robert Marko
b43c0a915f tools: util-linux: mark hexdump patch as backport
The hexdump fix for --disable-all-programs has been merged upstream, so
mark it so.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-27 12:22:53 +02:00
Michael Pratt
4710134f12 tools/coreutils: remove 64-bit time disable flag
This was added to support building coreutils on host systems
that still only have 32-bit time support.

Because other tools now also require the flag for building
with 32-bit time when support for 64-bit time is not present,
this flag is now added to all host builds
on a variable basis using the same test before building,
so it can now be removed from specific tools.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15799
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-27 09:31:53 +02:00
Michael Pratt
39e8ef33bf build: add test for 64-bit time support
Several GNU tools such as tar, coreutils, and findutils
now build with support for 64-bit time by default
and otherwise require reconfiguring with a flag
--disable-year2038 in order to build without 64-bit time.

Some standard C libraries, for example,
certain older versions of glibc such as 2.31
have large file support but not long time bits support:

  checking for ... option to enable large file support... -D_FILE_OFFSET_BITS=64
  checking for ... option for timestamps after 2038... support not detected

This test using C code taken from largefile.m4 in gnulib
uses math and casting to check for overflow
with a macro and array pair that can only be defined
when 64-bit time support is present, and otherwise errors.
It is the exact same code used to test for 64-bit time
during the configure stage of building these tools,
so the results of this test before configure takes place
will always be in concordance with the results of
the test that takes place during the configure script.

Based on the test, the configure flag --disable-year2038
is added to every host tool build depending on the host system.

When the year 2038 problem finally comes around,
the effect of the test can be converted
from the toggling of a configure option into a build prerequisite,
requiring it to pass in order to continue building.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15799
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-27 09:31:53 +02:00
Hang Zhou
f637cf5ef7 bmips: add support for Sagem F@ST3864OP
Specifications:
* SoC: BCM63168
* RAM: NT5CC64M16GP-DI, DDR3 128MiB
* NAND: W29N01HVSINA, 128MiB
* Ethernet: 4x1000M LAN, 1x 1000M WAN
* Serial interface: on board but not populated, 3.3V, 115200, 8N1

Notes:
* Use DSA for VLAN and switches
* Ethernet ports and USB works
* gpio-leds are not working
* WLAN, xDSL, and FXS are not going to work

Signed-off-by: Hang Zhou <929513338@qq.com>
[refactor, reorder, drop unneeded or not working stuff]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-06-26 19:28:13 +02:00
Álvaro Fernández Rojas
e04533ae7b bcm63xx-cfe: update to latest version
sagem: fast-3864-op:add cferam.000 file
tp-link: archer vr400 v1: add cfe file

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-06-26 19:26:34 +02:00
Robert Marko
843b51b26d tools: mtd-utils: use libuuid provided by util-linux
Now that util-linux is building libuuid we can simply use that instead
of manually pointing to e2fsprogs libuuid so we can disable building
libuuid in e2fsprogs.

Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-26 11:21:04 +02:00
Robert Marko
215d5bbe4e tools: e2fsprogs: use standard make uninstall
There is no need to manually only remove 2 binaries during cleanup and
leave rest of the e2fsprogs installed stuff untouched, so instead use
make uninstall to do the cleanup.

Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-26 11:21:04 +02:00
Robert Marko
bd48ca1245 tools: e2fsprogs: use libuuid provided by util-linux
We are now using util-linux to provide libuuid so disable building it
in e2fsprogs and simply use the util-linux provided one.

Disabling libuuid removes the need for custom install recipe.

Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-26 11:21:04 +02:00
Robert Marko
8b0f892b31 tools: util-linux: build libuuid
util-linux usually provides libuuid, and is preffered by mtd-utils so lets
enable building libuuid so we can disable it later in e2fsprogs.

Only the static version of library is intentionally built.

Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-26 11:21:04 +02:00
Robert Marko
fb99a8d2e6 tools: util-linux: use standard make install/uninstall
Instead of manually installing the binaries and removing them, we can now
simply rely on standard make install/uninstall as we are only building
tools we want to use.

This will be especially important when we start building libraries in
util-linux.

Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-26 11:21:03 +02:00
Robert Marko
54115ec22d tools: util-linux: use --disable-all-programs
util-linux supports passing --disable-all-programs configure flag to
disable building anything that isnt then manually enabled.

So, lets switch to using that instead of manually having to disable all
tools we dont need.

However, current drawback is that there is no upstream support for enabling
building hexdump so I included a patch that is pending upstream[0].

[0] https://github.com/util-linux/util-linux/pull/3101

Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-26 11:21:03 +02:00
Robert Marko
2b666bb827 utils: mtd-utils: update to 2.2.0
Release notes:
https://lists.infradead.org/pipermail/linux-mtd/2024-March/104058.html

mtd-utils are currently depending on zlib, however it is not expressed
as a dependency and it is somehow being only pulled-in by lincurses-devel
so mtd-utils were able to compile.

Since 2.2.0 zlib is optional so lets disable support for it like for other
compressors since we dont package the mkfs.ubifs or mkfs.jffs2 that
are only users of compressors anyway.

Link: https://github.com/openwrt/openwrt/pull/15802
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-26 09:23:27 +02:00
Robert Marko
116903082b utils: mtd-utils: drop autoreconf
Now that we are not patching mtd-utils with JFFS2 LZMA support there
is no need for autoreconf to be run.

Link: https://github.com/openwrt/openwrt/pull/15802
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-26 09:23:26 +02:00
Daniel Golle
646ebbd32c ramips: yuncore_g720: fix buttons
Turns out the device got two buttons, while the currently listed on is
actually WPS, and the other (will hidden) button is intended as RESET.
Update DT accordingly.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-25 20:42:54 +01:00
Robert Marko
1029340353 tools: mtd-utils: fix disabling tests
Passing --disable-tests does not do anything since upstream commit [0]
("Fix test binary installation") as that commit removed it since there is
already and existing --without-tests compile option to not compile
the tests at all as --disable-tests was just disabling their installation.

So, lets just pass --without-tests instead to disable test compilation.

[0] https://git.infraroot.at/mtd-utils.git/commit/?id=7170a28d46d5db1e7a9da24a5555a194a233ef0b

Fixes: 67efb6a66146 ("tools: mtd-utils: Update to version 2.1.4")
Link: https://github.com/openwrt/openwrt/pull/15791
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-25 17:57:07 +02:00
Robert Marko
e07cc3237e tools: mtd-utils: update to 2.2.0
Release notes:
https://lists.infradead.org/pipermail/linux-mtd/2024-March/104058.html

Manually refresh the portability and JFFS2 LZMA patches.

Since mtd-utils have converted most of the JFFS2 compressors to be compile
time configurable and manual refreshing of JFFS2 LZMA was needed I also
converted it to a compile time option and enabled the new --with-lzma
option.

Link: https://github.com/openwrt/openwrt/pull/15791
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-25 17:57:07 +02:00
Álvaro Fernández Rojas
713319f779 bmips: sercomm,ad1018: remove unneeded LED default-state
Remove unneeded default-state from led_power_green (led@8) to be in line with
other bmips devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-06-25 17:43:40 +02:00
Álvaro Fernández Rojas
dc71b91c12 bmips: innacomm,w3400v6: remove unneeded LED default-state
Remove unneeded default-state from led_power_green (led@4) to be in line with
other bmips devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-06-25 17:43:32 +02:00
Christian Marangi
69f8647608
generic: 6.6: replace Aquantia pending LEDs patch with upstream version
Replace Aquantia pending LEDs patch with upstream version.
Sadly net maintainers didn't like integrated solution hence we still
need to handle LED restore on reset with custom solution.

Link: https://github.com/openwrt/openwrt/pull/15797
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-25 14:20:17 +02:00
Robert Marko
fb2fa8f7c2 utils: mtd-utils: drop patches
We have been carrying the 100-fix_includes.patch and 130-lzma_jffs2.patch
for a long time but the reason is lost to history.

We dont need to carry the JFFS2 LZMA support patch as mkfs.jffs2 is not
even being packaged so its not even being used.

As for the 100-fix_includes.patch that also seems like a relic of history
as mtd-utils compiles fine without it.

So, lets drop both patches.

Link: https://github.com/openwrt/openwrt/pull/15790
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-25 13:01:45 +02:00
Christian Marangi
f8cb39183d
qualcommax: fix RAX120v2 PWM Fan controller wrong definition
Fix RAX120v2 PWM Fan controller wrong definition by using a non-existant
kmod and using the wrong compatible for it enabling an external clock
while actually the device use an internal one.

Link: https://github.com/openwrt/openwrt/pull/15796
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-25 12:52:44 +02:00
Christian Marangi
be26643e91
generic: 6.6: backport patch for G671 PWM Fan controller support
Backport patch for G761 PWM Fan controller support. This is used by
an ipq807x RAX120v2 and have an internal clock that was currently
unconfigured making the device not working.

Link: https://github.com/openwrt/openwrt/pull/15796
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-25 12:52:43 +02:00
Christian Marangi
18e2c65aa9
ipq806x: fix broken line break with Linksys e8350-v1
Fix broken line break for Linksys e8350-v1 pushed with CRLF instead of
LF.

Fixes: 45b3c620e597 ("ipq806x: add support for Linksys e8350-v1")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-25 12:20:14 +02:00
Sergey Filippov
45b3c620e5
ipq806x: add support for Linksys e8350-v1
AC2400 Dual-Band Gigabit Wi-Fi Router base on ipq8064.
https://www.linksys.com/support-product?sku=E8350

Specification:
 - Qualcomm dual-core IPQ8064 @ 1.4 GHz
 - 512 MB of RAM
 - 4 MB of SPI NOR MX25U3235F
 - 128 MB of NAND S34MS01G2
 - Qualcomm QCA9880 2.4GHz 802.11bgn
 - Quantenna QSR1000 5GHz 802.11ac (no support)
 - 4 x 10/100/1000 Mbit/s w/ vlan support Ethernet
 - Qualcomm Atheros QCA8337 switch
 - 1 x 3.0 + 1 x 2.0 (combo with eSata port)
 - 115200, 8N1 internal serial console
 - Power, Reset, WPS and WLAN buttons
 - Power, WPS and WLAN leds
 - 12 VDC, 3 A power

Installation:
The installation must be done using web interface of the router.
To achive this new firmware-utils tool was added to set correct
magic headers for the factory images.

Installation from vendor firmware:
 1. Flash over the native Linksys WEB interface using factory image.

Installation using recovery mode:
 1. Power off the device and disconnect the WAN port.
    (Only LAN port to be connected)
 2. Press & hold the "Reset" button
 3. Power on the device & wait 10 seconds with pressed "Reset" button
 4. Set IP Internet Protocol on your PC from
    192.168.1.0/24 network (Router is on IP 192.168.1.1)
 5. Open the Firmware Recovery page in your browser:
    http://192.168.1.1/index.shtml
    Firmware Recovery -> File Name -> Recovery & Reboot

The device page in inbox:
https://openwrt.org/inbox/toh/linksys/linksys_ea8350_1

Signed-off-by: Sergey Filippov <sergey.filippov@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/15798
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-25 11:57:14 +02:00
Álvaro Fernández Rojas
d514213336 bmips: drop kernel 6.1 support
kernel 6.1 can be dropped since 6.6 is the default kernel.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-06-25 09:43:07 +02:00
Álvaro Fernández Rojas
e340d4be4b bmips: switch default kernel to 6.6
Update default kernel version to 6.6 for the bmips devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-06-25 09:40:49 +02:00
Goetz Goerisch
166d28ffea bmips: add 6.6 kernel as testing
enable testing kernel version 6.6 for bmips

Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
2024-06-25 09:36:33 +02:00
Álvaro Fernández Rojas
7a14fe0981 bmips: refresh 6.6 kernel config files
Refresh config for kernel 6.6.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-06-25 09:36:29 +02:00
Goetz Goerisch
57af1abbb6 bmips: 6.6: refresh kernel patches
refresh 6.6. kernel patches via 'make target/linux/refresh'

Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
[refresh patches]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-06-24 22:12:46 +02:00
Goetz Goerisch
9b62791a10 bmips: 6.6: copy patches, config from 6.1
copy the 6.1 config to 6.6

Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
2024-06-24 22:12:46 +02:00
Álvaro Fernández Rojas
8e1316f3f6 generic: 6.6: backport mips kexec dependency fix
Backport upstream fix for incorrect ifdeffery and dependency of CONFIG_KEXEC,
which causes compilation errors with the following symbols:
CONFIG_CRASH_CORE=y
CONFIG_KEXEC_CORE=y
CONFIG_CRASH_DUMP=y

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-06-24 19:37:37 +02:00
Konstantin Demin
6988fe3d98 tools/llvm: update to 18.1.7
- release notes:
  - https://discourse.llvm.org/t/llvm-16-0-0-release/69326
  - https://discourse.llvm.org/t/llvm-17-0-1-released/73549
  - https://discourse.llvm.org/t/llvm-18-1-0-released/77448
  - https://discourse.llvm.org/t/llvm-18-1-1-released/77540
  - https://discourse.llvm.org/t/18-1-2-released/77821
  - https://discourse.llvm.org/t/18-1-3-released/78136
  - https://discourse.llvm.org/t/18-1-4-released/78430
  - https://discourse.llvm.org/t/18-1-5-released/78740
  - https://discourse.llvm.org/t/18-1-6-released/79068
  - https://discourse.llvm.org/t/18-1-7-released/79433
- remove PKG_RELEASE (irrelevant to tools)
- set default target/triplet to "bpf"
- rearrange configuration options
- better control feature support and improve build reproducibility:
  disable auxiliary features that are enabled implicitly - their
  support is detected at build-time

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15704
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-24 13:56:14 +02:00
Robert Marko
85d9fd6f0e mvebu: add support for RB5009UG+S+IN
This patch adds support for Mikrotik RB5009UG+S+IN.

Specifications:
  - SoC: Marvell Armada 7040 (88F7040) - 4 cores, ARMv8 Cortex-A72, 1.4GHz, 64bit
  - RAM: 1024MB DDR4
  - Flash: 16MB SPI NOR flash, 1024MB NAND
  - Ethernet:
  	* Marvell 88E6393X - Amethyst:
  	* one 2.5G RJ45 port via Qualcomm QCA8081 PHY
  	* seven 1G RJ45 ports via built-in PHY-s
  	* one 10G SFP+ cage
  	* All ports share the same 10G switch uplink to the CPU
  - LED: User, SFP, Hdr1, Hdr2
  - Buttons: Reset
  - UART: 115200 8n1 on the MikroTik 16 pin header
  - USB: One USB3 port
  - Power: 24-57 V via
  	* DC jack
  	* 802.3af/at PoE on Ethernet 1
  	* 2-pin terminal on the side

16 Pin header pinout:
1   GND Vcc  RX  ?  GND
   #--------------------#
   |.-. .-. .-. .-. .-. |
   |'-' '-' '-' '-' '-' |
   |.-. .-. .-. .-. .-. |
   |'-' '-' '-' '-' '-' |
   #--------------------#
2   CLK  DO /CS  TX  DI

Do note that the default RouterBoot has disabled UART even when the
required hard-config bit is set to indicate UART support.
Patched RouterBoot must be used if UART is desired.

Also, since ARM64 Linux support does not support in any way appending the
DTB to the kernel image we use mainline U-Boot with added RB5009 support
in order to boot OpenWrt.
MikroTik uses YAFFS to store the boot kernel and we use YAFUT to put U-Boot
as the kernel which RouterBoot then simply boots as an ELF.

Install instructions:

NOTE: In case you are using an existing out of tree version of OpenWrt make
sure to reinstall RouterOS via Netinstall to return the expected partition
layout.

1. Prepare FAT or EXT4 formatted USB drive with OpenWrt initramfs:
* Copy bin/targets/mvebu/cortexa72/openwrt-mvebu-cortexa72-mikrotik_rb5009-initramfs-uImage.itb
to the root of FAT or EXT4 formatted USB drive.
* Plug in the drive to the RB5009 USB port

2. Boot the modified OpenWrt built U-Boot ELF:
u-boot.elf from bin/targets/mvebu/cortexa72/u-boot-rb5009/u-boot.elf

Consult OpenWrt wiki for common instructions on switching to boot from
Ethernet once as well as serving the file:
https://openwrt.org/toh/mikrotik/common

Once U-Boot is booted it will attempt to boot in the following order:
1. NAND
2. USB
3. Network

NAND is expected to fail but USB or Networking need to serve the OpenWrt
initramfs image and after booting it will be accessible from LAN ports
on the default 192.168.1.1 IP with default credentials.

3. Flash modified RouterBoot that enables UART (Optional but recommended):
https://public.robimarko.eu/RB5009/70x0-7.15-uart.fwf

* Copy the file over to the booted OpenWrt initramfs to /tmp
* Run: mtd erase RouterBOOT-primary
* Run: mtd write /tmp/70x0-7.15-uart.fwf RouterBOOT-primary

4. Install U-Boot to boot OpenWrt:
* Copy the u-boot.elf from bin/targets/mvebu/cortexa72/u-boot-rb5009/u-boot.elf
to OpenWrt initramfs to /tmp.
* Run: . /lib/functions.sh
* Run: yafut -d /dev/mtd$(find_mtd_index "YAFFS") -w -i /tmp/u-boot.elf -o kernel -T
This will use yafut to copy the U-Boot as kernel in YAFFS so that RouterBoot boots it.

5. Wipe the NAND UBI partition:
* Run: ubiformat /dev/mtd$(find_mtd_index "ubi") -y
This will prepare the existing RouterOS rootfs partition for OpenWrt.

6. Flash OpenWrt:
* Copy the bin/targets/mvebu/cortexa72/openwrt-mvebu-cortexa72-mikrotik_rb5009-squashfs-sysupgrade.bin
to OpenWrt initramfs to /tmp.
* Run: sysupgrade /tmp/openwrt-mvebu-cortexa72-mikrotik_rb5009-squashfs-sysupgrade.bin

Device will reboot, boot U-Boot and then OpenWrt.

Recovery:

In case you need to reinstall OpenWrt if it crashes after U-Boot, there is
a recovery mechanism in OpenWrt to boot the OpenWrt initramfs.
You need to hold the reset button while U-Boot is booting and then it will
boot the OpenWrt initramfs from:
1. USB
2. Networking

In recovery mode U-Boot will light all of the LED-s except for the switch
ones.

In case you want to return to RouterOS, you can simply do that via
Netinstall like on any other MikroTik board.

Credits also go to Serhii Serhieiev <adron@mstnt.com> who origininally
figured out the RouterBoot modification for UART, the missing 10G MVPP2
support in U-Boot as well as the custom aux loader to boot directly via
RouterBoot.

Link: https://github.com/openwrt/openwrt/pull/15765
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-24 09:46:19 +02:00
Robert Marko
14bf60deb8 uboot-mvebu: add support for MikroTik RB5009
MikroTik RB5009 uses RouterBoot as its bootloader like all MikroTik devices
running RouterOS, meaning that its not FIT compatible and can only boot
ELF images.

Now this is not so much of an issue on ARM or MIPS since kernel supports
appending DTB-s to it (Or we patch the kernel to embed it), but on ARM64
there is intentionally no such support.

RouterBoot will pass a DTB, but its the broken MikroTik one which is a
modified reference DTB and incorrect in more places than its valid so we
cannot use it to boot our kernel.

Thus, the solution is to use an intermediary loader and luckily for us
Armada 7040 is well supported in U-Boot which makes it a great option since
it supports anything that we will ever need to boot.

Upstream U-Boot currently requires the Armada boards to be converted to
OF_UPSTREAM before adding anything new and this requires updating all of
the drivers to accomodate the Linux DTS, while I plan to do this eventually
we will need to keep this board downstream for now.

Most stuff is supported in U-Boot, including networking since the switch
is preconfigured by RouterBoot.

A custom environment is used to try and boot from the following devices:
1. NAND (UBI)
2. USB
3. Networking

If NAND boot fails then U-Boot will attempt to boot OpenWrt initramfs from
USB or via networking.

There is a manual recovery mechanism implemented where if the reset button
is held when U-Boot is booting it will try to boot OpenWrt initramfs from:
1. USB
2. Networking

When U-Boot is in recovery mode it will light all of the LED-s except the
switch ones.

Link: https://github.com/openwrt/openwrt/pull/15765
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-24 09:46:19 +02:00
Robert Marko
b5004bac84 mvebu: cortex-a72: enable MikroTik NVMEM layout driver
RB5009 will take advantage of the driver to get MAC adress.

Link: https://github.com/openwrt/openwrt/pull/15765
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-24 09:46:19 +02:00