1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-16 20:23:53 +02:00
Commit Graph

28346 Commits

Author SHA1 Message Date
Flole Systems
cd17d8df2a
filogic: add support for Netgear WAX220
Hardware
--------
SOC:   MediaTek MT7986
RAM:   1024MB DDR3
FLASH: 128MB SPI-NAND (Winbond)
WIFI:  Mediatek MT7986 DBDC 802.11ax 2.4/5 GHz
ETH:   Realtek RTL8221B-VB-CG 2.5 N-Base-T PHY with PoE
UART:  3V3 115200 8N1 (Pinout silkscreened / Do not connect VCC)

Installation
------------

1. Download the OpenWrt initramfs image. Copy the image to a TFTP server
2. Connect the TFTP server to the WAX220. Conect to the serial console,
   interrupt the autoboot process by pressing '0' when prompted.
3. Download & Boot the OpenWrt initramfs image.

   $ setenv ipaddr 192.168.2.1
   $ setenv serverip 192.168.2.2
   $ tftpboot openwrt.bin
   $ bootm

4. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device
   using scp and install using sysupgrade.

   $ sysupgrade -n <path-to-sysupgrade.bin>

Signed-off-by: Flole Systems <flole@flole.de>
Signed-off-by: Stefan Agner <stefan@agner.ch>
(cherry picked from commit 984786a2f7)
2023-06-26 13:20:39 +02:00
John Audia
51c397c33f kernel: bump 5.15 to 5.15.118
All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 1f5fce27c1)
2023-06-25 16:05:18 +02:00
Lech Perczak
b1b829ad6a ipq40xx: meraki-mr33, meraki-mr74: disable image generation
After migrating to kernel 5.15, upgrading causes the units to become
soft-bricked, hanging forever at the kernel startup.
Kernel size limitation of 4000000 bytes is suspected here, but this is
not fully confirmed.

Disable the images to protect users from inadvertent bricking of units,
because recovery of those is painful with Cisco's U-boot, until the root
cause is found and fixed.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit 9d64cc068f)
2023-06-25 12:34:47 +02:00
Davide Fioravanti
fca03ea458 ramips: fix lan leds for Wavlink WL-WN535K1
Previously both lan1 and lan2 leds were wrongly labelled as lan2.
Moreover they were connected to the wrong lan port.
Fixes 8fde82095b ("ramips: add support for Wavlink WL-WN535K1")

Reported-by: Nicolò Maria Semprini <nicosemp@gmail.com>
Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
(cherry picked from commit c71dada926)
2023-06-25 12:34:47 +02:00
Kim DoHyoung
0a63e72fbb ramips: mt7621: add support for Zbtlink ZBT-WG1608 (32M)
Zbtlink ZBT-WG1608 is a Wi-Fi router intendent to use with WWAN (4G/5G)
modems.

Specifications:
* SoC: MediaTek MT7621A
* RAM: 256/512 MiB
* Flash: 16/32 MiB (SPI NOR)
* Wi-Fi:
  * MediaTek MT7603E : 2.4Ghz
  * MediaTek MT7613BE : 5Ghz
* Ethernet: 10/100/1000 Mbps Ethernet x5 ports (4xLAN + WAN)
* M.2: 1x slot with USB&SIM
  * EM7455/EM12-G/EM160R/RM500Q-AE
* USB: 1x 3.0 Type-A port
* External storage: 1x microSD (SDXC) slot
* UART: console (115200 baud)
* LED:
  * 1 power indicator
  * 1 WLAN 2.4G controlled (wlan 2G)
  * 3 SoC controlled (wlan 5G, wwan, internet)
  * 5 per Eth phy (4xLAN + WAN)

MAC Addresses:
* LAN    : f8:5e:3c:xx:xx:e0 (Factory, 0xe000 (hex))
* WAN    : f8:5e:3c:xx:xx:e1 (Factory, 0xe006 (hex))
* 2.4 GHz: f8:5e:3c:xx:xx:de (Factory, 0x0004 (hex))
* 5 GHz  : f8:5e:3c:xx:xx:df (Factory, 0x8004 (hex))

Installation:
* Vendor's firmware is OpenWrt (LEDE) based, so the sysupgrade image can
  be directly used to install OpenWrt. Firmware must be upgraded using the
  'force' and 'do not save configuration' command line options (or
  correspondig web interface checkboxes) since the vendor firmware is from
  the pre-DSA era.

Recovery Mode:
 * Press reset button, power up the device, wait for about 10sec.
 * Upload sysupgrade image through the firmware recovery mode web page at
  192.168.1.1.

Signed-off-by: Kim DoHyoung <azusahmr@k-on.kr>
(cherry picked from commit 0bbd5699c8)
2023-06-25 12:32:50 +02:00
David Bauer
b6f2c58dd6 ath79: add support for Aruba AP-115
Hardware
========

CPU   Qualcomm Atheros QCA9558
RAM   256MB DDR2
FLASH 2x 16M SPI-NOR (Macronix MX25L12805D)
WIFI  Qualcomm Atheros QCA9558
      Atheros AR9590

Installation
============

1. Attach to the serial console of the AP-105.
   Interrupt autoboot and change the U-Boot env.

   $ setenv rb_openwrt "setenv ipaddr 192.168.1.1;
     setenv serverip 192.168.1.66;
     netget 0x80060000 ap115.bin; go 0x80060000"
   $ setenv fb_openwrt "bank 1;
     cp.b 0xbf100040 0x80060000 0x10000; go 0x80060000"
   $ setenv bootcmd "run fb_openwrt"
   $ saveenv

2. Load the OpenWrt initramfs image on the device using TFTP.
   Place the initramfs image as "ap105.bin" in the TFTP server
   root directory, connect it to the AP and make the server reachable
   at 192.168.1.66/24.

   $ run rb_openwrt

3. Once OpenWrt booted, transfer the sysupgrade image to the device
   using scp and use sysupgrade to install the firmware.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 1b467a902e)
2023-06-23 00:23:48 +02:00
Daniel González Cabanelas
aa256ab580 bmips: add support for Arcadyan AR7516
The Arcadyan AR7516, AKA Orange Bright Box or EE Bright Box 1, is a wifi
fast ethernet router, 2.4 GHz single band with two internal antennas. It
comes with a horizontal stand black shiny casing.

Newer Bright Box 1 model stands vertically, and comes with a totally
different board inside, not compatible with this firmware.

Hardware:
 - SoC: Broadcom BCM6328
 - CPU: single core BMIPS4350 V7.5 @ 320Mhz
 - RAM: 64 MB DDR2
 - Flash: 8 MB SPI NOR
 - Ethernet LAN: 4x 100Mbit
 - Wifi 2.4 GHz: Broadcom BCM43227 802.11bgn (onboard)
 - USB: 1x 2.0
 - ADSL: yes, unsupported
 - Buttons: 2x
 - LEDs: 9x, power LED is hardware controlled
 - UART: yes

Installation in two steps, new CFE bootloader and firmware:

Install new CFE:
  1. Power off the router and press the RESET button
  2. Power on the router and wait some seconds
  3. Release the RESET button
  3. Browse to http://192.168.1.1, this web interface will offer both
     firmware (“Software”) upgrade and bootloader upgrade; be sure to
     use the bootloader section of the upload form.
  4. Upload the new CFE (availabe at the wiki page)
  5. Wait about a minute for flashing to finish and reboot into the new bootloader.

Install OpenWrt via new CFE web UI:
  1. After installing the new CFE, visit http://192.168.1.1
  2. Upload the Openwrt cfe firmware
  5. Wait a few minutes for it to finish

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
(cherry-picked from df8e4b6c2e)
2023-06-22 17:55:04 +02:00
Etienne Champetier
09322f3c0c
kernel: remove bridge offload hack
This patch initially introduced in 94b4da9b4a
breaks mvebu devices when using vlan filtering with kernel 5.15 or 6.1,
it was working ok in 5.10.

With this patch, frame that should exit untagged from the switch exit tagged.
Running 'tcpdump -Q out -evnnli eth1' (eth1 being the dsa interface)
- with the hack, frame is sent directly to the
destination port 4 with VID 2, so the switch leave the tag as instructed:
11:22:33:44:55:66 > 77:88:99:aa:bb:cc, Marvell EDSA ethertype 0xdada (Unknown), rsvd 0 0, mode From CPU, target dev 0, port 4, tagged, VID 2, FPri 0, ethertype ARP (0x0806), length 50: Ethernet (len 6), IPv4 (len 4), Request who-has 5.6.7.8 tell 1.2.3.4, length 28

- without the hack, frame is sent to the switch that
performs the forwarding decision and untagging:
11:22:33:44:55:66 > 77:88:99:aa:bb:cc, Marvell EDSA ethertype 0xdada (Unknown), rsvd 0 0, mode Forward, dev 1, port 0, tagged, VID 2, FPri 0, ethertype ARP (0x0806), length 50: Ethernet (len 6), IPv4 (len 4), Request who-has 5.6.7.8 tell 1.2.3.4, length 28

Removing this patch makes my Turris Omnia usable with vlan filtering,
ie wifi device can talk to wired device again.
Using kernel 5.15 some broadcast/multicast traffic is still leaked
(on a VLAN 2 access port I see tagged VLAN 3 frame),
using kernel 6.1 fixes that.

People needing the extra performance should try the bridger package.

Acked-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
(cherry picked from commit 244328b19c)
2023-06-20 10:55:43 +02:00
Daniel González Cabanelas
ac6832110a bmips: add support for NuCom R5010UNv2
The NuCom R5010UNv2 is a wifi fast ethernet router, 2.4 GHz single band
with two external antennas.

Hardware:
 - SoC: Broadcom BCM6328
 - CPU: single core BMIPS4350 V7.5 @ 320Mhz
 - RAM: 64 MB DDR2
 - Flash: 16 MB SPI NOR
 - Ethernet LAN: 4x 100Mbit
 - Wifi 2.4 GHz: Broadcom BCM43217 802.11bgn (onboard)
 - USB: 1x 2.0
 - Buttons: 2x
 - ADSL: yes, unsupported
 - LEDs: 7x
 - UART: yes

Installation via CFE web UI:
  1. Power off the router and press the RESET button
  2. Power on the router and wait 12 or more seconds
  3. Release the RESET button
  4. Browse to http://192.168.1.1 and upload the Openwrt cfe firmware
  5. Wait a few minutes for it to finish

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
(cherry picked from commit 6cb3328b4f)
2023-06-19 20:42:44 +02:00
Daniel González Cabanelas
43746c4c5a bmips: enable the data Read Ahead Cache for BMIPS4350
The data RAC is left disabled by the bootloader in some SoCs, at least in
the core it boots from. Enabling this feature increases the performance up
to +30% depending on the task.

The kernel enables the whole RAC unconditionally on BMIPS3300 CPUs. Enable
the data RAC in a similar way also for BMIPS4350.

Tested on DGND3700 v1 (BCM6368) and HG556a (BCM6358).

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
(cherry picked from commit 6d1265b148)
2023-06-19 20:42:19 +02:00
Álvaro Fernández Rojas
6d3770501d bmips: fix DMA RAC flush
BMIPS_GET_CBR() returns an invalid address on some SoCs.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 62cdca25ed)
2023-06-19 20:41:57 +02:00
Maximilian Weinmann
8a0746955d ramips: Add support for Beeline SmartBox TURBO+
This adds support for Beeline Smart Box TURBO+ (Serсomm S3 CQR) router.

Device specification
--------------------
SoC Type: MediaTek MT7621AT (880 MHz, 2 cores)
RAM (Nanya NT5CC64M16GP): 128 MiB
Flash (Macronix MX30LF1G18AC): 128 MiB
Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
Wireless 5 GHz (MT7615N): a/n/ac, 4x4
Ethernet: 5 ports - 5×GbE (WAN, LAN1-4)
USB ports: 1xUSB3.0
Buttons: 2 button (reset, wps)
LEDs: Red, Green, Blue
Zigbee (EFR32MG1B232GG): 3.0
Stock bootloader: U-Boot 1.1.3
Power: 12 VDC, 1.5 A

Installation (fw 2.0.9)
-----------------------
1.  Login to the web interface under SuperUser (root) credentials.
    Password: SDXXXXXXXXXX, where SDXXXXXXXXXX is serial number of the
    device written on the backplate stick.
2.  Navigate to Setting -> WAN. Add:
       Name - WAN1
       Connection Type - Static
       IP Address - 172.16.0.1
       Netmask - 255.255.255.0
    Save -> Apply. Set default: WAN1
3.  Enable SSH and HTTP on WAN. Setting -> Remote control. Add:
       Protocol - SSH
       Port - 22
       IP Address - 172.16.0.1
       Netmask - 255.255.255.0
       WAN Interface - WAN1
    Save ->Apply
    Add:
       Protocol - HTTP
       Port - 80
       IP Address - 172.16.0.1
       Netmask - 255.255.255.0
       WAN interface - WAN1
    Save -> Apply
4.  Set up your PC ethernet:
       Connection Type - Static
       IP Address - 172.16.0.2
       Netmask - 255.255.255.0
       Gateway - 172.16.0.1
5.  Connect PC using ethernet cable to the WAN port of the router
6.  Connect to the router using SSH shell under SuperUser account
7.  Make a mtd backup (optional, see related section)
8.  Change bootflag to Sercomm1 and reboot:
        printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
        reboot
9.  Login to the router web interface under admin account
10. Remove dots from the OpenWrt factory image filename
11. Update firmware via web using OpenWrt factory image

Revert to stock
---------------
Change bootflag to Sercomm1 in OpenWrt CLI and then reboot:
   printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3

mtd backup
----------
1. Set up a tftp server (e.g. tftpd64 for windows)
2. Connect to a router using SSH shell and run the following commands:
      cd /tmp
      for i in 0 1 2 3 4 5 6 7 8 9 10; do nanddump -f mtd$i /dev/mtd$i; \
      tftp -l mtd$i -p 172.16.0.2; md5sum mtd$i >> mtd.md5; rm mtd$i; done
      tftp -l mtd.md5 -p 171.16.0.2

Recovery
--------
Use sercomm-recovery tool.
Link: https://github.com/danitool/sercomm-recovery

MAC Addresses (fw 2.0.9)
------------------------
+-----+------------+---------+
| use | address    | example |
+-----+------------+---------+
| LAN | label      | *:e8    |
| WAN | label + 1  | *:e9    |
| 2g  | label + 4  | *:ec    |
| 5g  | label + 5  | *:ed    |
+-----+------------+---------+
The label MAC address was found in Factory 0x21000

Factory image format
--------------------
+---+-------------------+-------------+--------------------+
| # | Offset            | Size        | Description        |
+---+-------------------+-------------+--------------------+
| 1 | 0x0               | 0x200       | Tag Header Factory |
| 2 | 0x200             | 0x100       | Tag Header Kernel1 |
| 3 | 0x300             | 0x100       | Tag Header Kernel2 |
| 4 | 0x400             | SIZE_KERNEL | Kernel             |
| 5 | 0x400+SIZE_KERNEL | SIZE_ROOTFS | RootFS(UBI)        |
+---+-------------------+-------------+--------------------+

Co-authored-by: Mikhail Zhilkin <csharper2005@gmail.com>
Signed-off-by: Maximilian Weinmann <x1@disroot.org>
(cherry picked from commit 8fcfb21b16)
2023-06-17 12:59:37 +02:00
Tianling Shen
a46e5ce4ad rockchip: fix setup network config for nanopi r2c
Without it the WAN port won't be initialized properly.

Fixes: 8f578c15b3 ("rockchip: add NanoPi R2C support")
Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit d312f12b1a)
2023-06-17 12:21:13 +02:00
John Audia
1b6f2af148 kernel: bump 5.15 to 5.15.117
Manually rebased:
	generic/backport-5.15/346-v5.18-01-Revert-ata-ahci-mvebu-Make-SATA-PHY-optional-for-Arm.patch

Removed upstreamed:
	generic/backport-5.15/830-v6.2-ata-ahci-fix-enum-constants-for-gcc-13.patch

All other patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 0e89ba8430)
2023-06-17 12:09:03 +02:00
John Audia
1de5f74062 kernel: bump 5.15 to 5.15.116
All patches rebased automatically.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 5dc78d8f18)
2023-06-17 12:09:03 +02:00
John Audia
81979018e0 kernel: add CONFIG_DRM_RCAR_USE_LVDS is not set
Added missing symbol.

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit fc3383a558)
2023-06-17 12:09:03 +02:00
John Audia
68bc059c55 kernel: bump 5.15 to 5.15.115
Manually rebased:
	backport-5.15/603-v5.19-page_pool-Add-recycle-stats-to-page_pool_put_page_bu.patch
	pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch*

Removed upstreamed:
	generic-backport/610-v6.3-net-page_pool-use-in_softirq-instead.patch[1]
	backport-5.15/705-12-v6.0-net-dsa-mt7530-rework-mt753-01-_setup.patch[2]
	backport-5.15/790-v6.4-0010-net-dsa-mt7530-split-off-common-parts-from-mt7531_se.patch[3]
	backport-5.15/703-10-v5.16-net-dsa-introduce-helpers-for-iterating-through-port.patch[4]

All other patches automatically rebased.

* Modified to define the variable i as suggested by DragonBluep in PR discussion.
  See: https://github.com/openwrt/openwrt/pull/12823#issuecomment-1578518576

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.115&id=3af319d5147454dc63665ef451229c674b538377
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.115&id=0753c1ef24194580f7165ae6e259b59a851392f2
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.115&id=5a7266feaa6d708fc6880a161786eaa884ef3c8e
4. 9902f91cf6

Build system: x86_64
Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 5714660643)
2023-06-17 12:09:03 +02:00
Christian Marangi
6f9495b896
ipq806x: set PERFORMANCE as the default cpufreq governor
Move default cpufreq governor from ONDEMAND to PERFORMANCE. The temp
increase is just 2°C and Watt usage the change is minimal in the order
of additional millwatt. The SoC and krait in general looks to suffer for
some problem with cache scaling. To have better system stability, force
cpu freq and cache freq to the max value supported by the system. This
follows mvebu platform where cpufreq is broken and cause minimal
temp/watt increase.

User can still tweak the governor to ondemand using sysfs entry if
needed.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 6f5ea752d7)
2023-06-16 11:42:40 +02:00
Christian Marangi
11ad38f0bb
Revert "ipq806x: disable cache and fabric devfreq driver to improve stability"
This reverts commit 60fc93b359.

Reenable devfreq and revert for both 5.15 and 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 37e4593213)
2023-06-16 11:41:35 +02:00
Daniel González Cabanelas
dee8ca626c bcm63xx: fix the Home Hub 2a power LED
Power LED register is wrong at dts. Fix it.

Fixes: 9ceeaf4c6c ("brcm63xx: switch to hardware led controllers")
Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
(cherry picked from commit 0e01ba9361)
2023-06-16 14:41:05 +02:00
Álvaro Fernández Rojas
66e1bef8f7 bmips: add support for Comtrend VG-8050
The Comtrend VG-8050 is a wifi gigabit ethernet router, 2.4 GHz single band with
two external antennas.

Hardware:
 - SoC: Broadcom BCM63169
 - CPU: dual core BMIPS4350 @ 400Mhz
 - RAM: 128 MB DDR
 - Flash: 128 MB NAND
 - LAN switch: Broadcom BCM53125, 5x 1Gbit
 - Wifi 2.4 GHz: SoC (BCM63268) 802.11bgn
 - USB: 1x 2.0 (optional)
 - Buttons: 2x (reset)
 - LEDs: yes
 - UART: yes

Installation via CFE web UI:
  1. Power off the router.
  2. Press reset button near the power switch.
  3. Keep it pressed while powering up during ~20+ seconds.
  4. Browse to http://192.168.1.1 and upload the firmware.
  5. Wait a few minutes for it to finish.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 47cc09aa7a)
2023-06-16 09:50:34 +02:00
Álvaro Fernández Rojas
b073d6cf7a bmips: dts: dgnd3700: fix WAN port
All switch ports are labeled as port@address so let's follow the same pattern.

Fixes: ed79519b8d ("bmips: add support for Netgear DGND3700 v1, DGND3800B")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit d9210c5ff7)
2023-06-15 20:58:18 +02:00
Álvaro Fernández Rojas
3d66e7f1db bmips: add support for Sercomm AD1018
The Sercomm AD1018 is a wifi fast ethernet router, 2.4 GHz single band with
two internal antennas.

Hardware:
 - SoC: Broadcom BCM6328
 - CPU: single core BMIPS4350 @ 320Mhz
 - RAM: 64 MB (v1) / 128 MB (v2) DDR
 - Flash: 128 MB NAND
 - Ethernet LAN: 4x 100Mbit
 - Wifi 2.4 GHz: miniPCI Broadcom BCM43217 802.11bgn
 - USB: 1x 2.0
 - Buttons: 3x (reset)
 - LEDs: yes
 - UART: yes

Installation via OEM web UI:
  1. Use the admin credentials to login via web UI
  2. Go to Managament->Update firmware and select the OpenWrt CFE firmware
  3. Press "Update Firmware" button and wait some minutes until it finish

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 38ebb2eafd)
2023-06-15 20:58:16 +02:00
Álvaro Fernández Rojas
b8bbe0d800 bmips: bump LOADER_ENTRY to RAM + 16M
This is needed on devices like Sercomm AD1018 for booting recent kernels due
to bigger kernels.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 434434ca47)
2023-06-15 20:58:11 +02:00
Daniel González Cabanelas
40966d612e bmips: add support for Actiontec R1000H
The  Actiontec R1000H is a gigabit wifi router, 2.4 GHz single band with
two external antennas. It comes with a coaxial HomePNA port.

Hardware:
 - SoC: Broadcom BCM6368
 - CPU: dual core BMIPS4350 V3.1 @400Mhz
 - RAM: 64 MB DDR
 - Flash: 32 MB parallel NOR
 - LAN switch: Broadcom BCM53115, 5x 1Gbit
 - LAN coaxial : 1x HPNA 3.1, CG3211 + CG3213
 - Wifi 2.4 GHz: Broadcom BCM4322 802.11bgn
 - USB: 1x 2.0
 - Buttons: 2x, 1 reset
 - LEDs: 7x
 - UART: yes

The HPNA hardware probably needs a firmware to make the coaxial port work.
In the OEM firmware, it's apparently sent with an utility (inhpna) through
the ethernet port.

Installation via CFE web UI:
  1. Connect the UART serial port.
  2. Power on the router and press enter at the console prompt to stop the
     bootloader.
  4. Browse to http://192.168.1.1 and upload the OpenWrt CFE firmware
  5. Wait a few minutes for it to finish

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
(cherry picked from commit e1a55de7a7)
2023-06-15 18:01:20 +02:00
Álvaro Fernández Rojas
e6acfe03dd bcm63xx: switch to standard nand_do_upgrade
Now that JFFS2 cleanmarkers are supported on the standard nand_do_upgrade
function we can start using it on bcm63xx.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from 60fc3bc948)
2023-06-15 11:49:32 +02:00
Álvaro Fernández Rojas
70afa8e6b6 bmips: switch to standard nand_do_upgrade
Now that JFFS2 cleanmarkers are supported on the standard nand_do_upgrade
function we can start using it on bmips.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from 464dfac049)
2023-06-15 11:49:13 +02:00
Álvaro Fernández Rojas
3506efe29c bcm63xx: fix NETGEAR DGND3700v2 boot loop
The DGND3700v2 renames the cferam bootloader from cferam to cfeXXX, where XXX
is the number of firmware upgrades performed by the bootloader. Other bcm63xx
devices rename cferam.000 to cferam.XXX, but this device is special because
the cferam name isn't changed on the first firmware flashing but it's changed
on the subsequent ones.
Therefore, we need to look for "cfe" instead of "cferam" to properly detect
the cferam partition and fix the bootlop.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit cdfcac6e24)
2023-06-15 11:39:18 +02:00
Álvaro Fernández Rojas
18a85ecc29 bmips: fix NETGEAR DGND3700v2 boot loop
The DGND3700v2 renames the cferam bootloader from cferam to cfeXXX, where XXX
is the number of firmware upgrades performed by the bootloader. Other bcm63xx
devices rename cferam.000 to cferam.XXX, but this device is special because
the cferam name isn't changed on the first firmware flashing but it's changed
on the subsequent ones.
Therefore, we need to look for "cfe" instead of "cferam" to properly detect
the cferam partition and fix the bootlop.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 915e914cfa)
2023-06-15 11:39:12 +02:00
Álvaro Fernández Rojas
753be3837f kernel: mtd: bcm-wfi: add cferam name support
Some devices rename cferam bootloader using specific patterns and don't follow
broadcom standards for renaming cferam files. This requires supporting
different cferam file names.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 8813edd8d9)
2023-06-15 11:39:09 +02:00
Zoltan HERPAI
4a281a7789 sifiveu: add new target for SiFive U-based boards
RISC-V is a new CPU architecture aimed to be fully free and open. This
target will add support for it, based on 5.15.

Supports running on:
 - HiFive Unleashed - FU540, first generation
 - HiFive Unmatched - FU740, current latest generation, PCIe

SD-card images are generated, where the partitions are required to have
specific type codes. As it is commonplace nowadays, OpenSBI is used as the
first stage, with U-boot following as the proper bootloader.

Specifications:

HiFive Unleashed:
 - CPU: SiFive FU540 quad-core RISC-V (U54, RV64IMAFDC or RV64GC)
 - Memory: 8Gb
 - Ethernet: 1x 10/100/1000
 - Console: via microUSB

HiFive Unmatched:
 - CPU: SiFive FU740 quad-core RISC-V (U74, RV64IMAFDCB or RV64GCB)
 - Memory: 16Gb
 - Ethernet: 1x 10/100/1000
 - USB: 4x USB 3.2
 - PCIe:  - 1x PCIe Gen3 x8
          - 1x M.2 key M (PCIe x4)
          - 1x M.2 Key E (PCIe x1 / USB2.0)
 - Console: via microUSB

Installation:
Standard SD-card installation via dd-ing the generated image to
an SD-card of at least 256Mb.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
(cherry picked from commit a3469a90c4)
2023-06-14 09:22:08 +02:00
Zoltan HERPAI
341e312ada generic: groundwork for RISC-V
Add build infrastructure for RISC-V.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
(cherry picked from commit 50c05f6cd7)
2023-06-14 09:22:08 +02:00
Petr Štetiar
848759c236
uboot-armsr: add support for QEMU armv7/armv8
Add new package so we can use self-compiled bootloader during QEMU based
testing and development.

Backported fix[1] is needed for EFI boot from virtio devices.

1. https://patchwork.ozlabs.org/project/uboot/patch/20230424134946.v10.7.Ia5f5e39c882ac22b5f71c4d576941b34e868eeba@changeid/

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit b8e3fa2d12)
2023-06-13 14:15:22 +02:00
Mathew McBride
7198185e3a
armsr: rename from armvirt
Now that the armvirt target supports real hardware, not just
VMs, thanks to the addition of EFI, rename it to something
more appropriate.

'armsr' (Arm SystemReady) was chosen after the name of
the Arm standards program.

The 32 and 64 bit targets have also been renamed
armv7 and armv8 respectively, to allow future profiles
where required (such as armv9).

See https://developer.arm.com/documentation/102858/0100/Introduction
for more information.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(23.05 version of commit 40b02a2301)
2023-06-13 14:14:29 +02:00
Mathew McBride
963ce6990f
kernel: kmod-amazon-ena: move to top level netdevices
The Amazon ENA network devices are also used on the
AWS Arm (Graviton) instance types, so move it from
the x86-only module file to the top level netdevices.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(cherry picked from commit 3a7c8fd15e)
2023-06-13 14:14:28 +02:00
Mathew McBride
86b50228c0
armvirt: 64: disable CONFIG_SMC91X
The SMC91X family is a ISA-age Ethernet controller.
I'm not particularly sure what it's doing in armvirt/64,
as it's unlikely there is a QEMU or real hardware configuration
that exists with it.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(23.05/5.15 version of commit 214e94cddf)
2023-06-13 14:14:27 +02:00
Mathew McBride
bacc385dc5
armvirt: base-files: add tty0 to inittab
tty0 is the default console for devices with screens/framebuffers.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(cherry picked from commit e41b82f619)
2023-06-13 14:14:27 +02:00
Mathew McBride
067f252331
armvirt: config changes required for framebuffer console
These Kconfig options are required to get a screen console
working with the VMware Fusion ARM (Apple Silicon) preview.
They are likely to be the same for other Arm standard
"desktop" hardware that may emerge.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(23.05/5.15 version of 83f564f746)
2023-06-13 14:14:26 +02:00
Mathew McBride
4177b69b46
armvirt: package and select Rockchip DWMAC Ethernet driver
For devices that implement the "rockchip,*-gmac" compatible controller,
including:
- RK3328
- RK3399
- RK3568
- RK3588
- PX30

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(cherry picked from commit abbffe55dd)
2023-06-13 14:14:25 +02:00
Mathew McBride
bbd1676cd2
armvirt: 64: add Allwinner A3/A83T/A64 (sun8i family) Ethernet
Add support for the dwmac (stmmac) variant used by Allwinner
Arm64 boards.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(cherry picked from commit 847467a572)
2023-06-13 14:14:24 +02:00
Mathew McBride
a86b74cbfe
armvirt: 64: add Marvell (formerly Cavium) ThunderX series network driver
Based on working configuration supplied by Anton Antonov.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(cherry picked from commit 5d2a5f7398)
2023-06-13 14:12:36 +02:00
Anton Antonov
a80eeec96d
armvirt: 64: Add storage support for qemu-sbsa platform
Enable SATA support, which is used by the Server Base
System Architecture reference board[1].

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Mathew McBride <matt@traverse.com.au>

[1] - https://qemu.readthedocs.io/en/latest/system/arm/sbsa.html
(23.05/5.15 version of 26905c9612)
2023-06-13 14:12:35 +02:00
Anton Antonov
3eb25435af
armvirt: 64: Add NXP i.MX 8M Mini/Nano/Quad/Plus EVK support
Also includes Advantech RSB-3720 (iMX8 Plus) support.

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Mathew McBride <matt@traverse.com.au>
[Re-sort into kernel config, move network into modules]
(23.05/5.15 version of commit 3efb3b801b)
2023-06-13 14:12:35 +02:00
Mathew McBride
2bec445c1d
armvirt: 64: add support for other SystemReady-compatible vendors
These changes are to support other vendors that have SystemReady/EFI
support, including:
* Marvell Armada
** (This is speculative as I don't have a machine of my own to test)
* Amazon Graviton (tested bare-metal and virtualized instances)
* VMware (Fusion for ARM Mac preview)
* NXP/Freescale (Layerscape series not already selected)
* HiSilicon
* Allwinner/sunxi
* Rockchip (untested, options taken from arm64 defconfig)

To give an idea of the hardware certified for SystemReady,
see
https://www.arm.com/architecture/system-architectures/systemready-certification-program/ir
and
https://www.arm.com/architecture/system-architectures/systemready-certification-program/es

Other vendors that _should_ work include Marvell Octeon 10
and Ampere. I understand these systems should work
"out of the box" in ACPI mode but may require other drivers
(e.g PCIe NICs and storage controllers).

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(23.05/5.15 version of c3151b6f04)
2023-06-13 14:12:34 +02:00
Mathew McBride
f1a02ba135
armvirt: add options and driver modules for NXP Layerscape DPAA2 platform
Tested with a Traverse Technologies Ten64 (LS1088A) board.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(23.05/5.15 version of commit 54bb95f879)
2023-06-13 14:12:33 +02:00
Mathew McBride
182fb97d8f
armvirt: add 5.15 patches for NXP DPAA2 platform
This fixes an issue with NXP's DPAA2 platforms (LS1088/2088/LX2160)
* A deadlock issue when attempting to detach the SFP management from
  a PHY interface (e.g when trying to reboot). These issues were fixed
  in kernel 6.2[1], but it's version does not cleanly apply onto 5.15.

Signed-off-by: Mathew McBride <matt@traverse.com.au>

[1] - see patch series "Fix rtnl_mutex deadlock with DPAA2 and SFP modules",
https://patchwork.kernel.org/project/netdevbpf/cover/20221129141221.872653-1-vladimir.oltean@nxp.com/
2023-06-13 14:12:32 +02:00
Mathew McBride
23ca9a1677
armvirt: add ACPI support
ACPI support is required for Arm 'SystemReady' server and workstation
systems (and as an option on embedded platforms).

These config changes allow OpenWrt to boot in a QEMU virtual machine
with a UEFI/EDKII 'BIOS', but with no other hardware enabled yet.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(23.05/5.15 version of cb3bbbf00c)
2023-06-13 14:12:31 +02:00
Mathew McBride
0bedcbb9ff
build: enable vmdk/vmware images for arm64 target
This is useful for VMware's ARM64 products, e.g Fusion for M1/ARM Macs.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(cherry picked from commit f899e0e024)
2023-06-13 14:12:30 +02:00
Mathew McBride
b0e724e49c
armvirt: remove model name override
Now that armvirt has been expanded to boot on more generic
ARM machines, remove the board and model name override.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(cherry picked from commit 3d99314569)
2023-06-13 14:12:29 +02:00
Mathew McBride
84f566b00c
armvirt: set kernel partition as the EFI system partition
U-Boot with EFI boot manager functionality will store
EFI boot order data on the ESP in the ubootefi.var file.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(cherry picked from commit 9a76b99c1b)
2023-06-13 14:12:28 +02:00