Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
inbox:toh:arcadyan:astoria:we420223-99 [2022/12/27 15:57] – Add OpenWrt boot log harminbox:toh:arcadyan:astoria:we420223-99 [2023/05/18 16:51] – [Flashing via the original web interface] Fix list harm
Line 7: Line 7:
 ===== OpenWrt support ===== ===== OpenWrt support =====
  
-Official support is pendingpatches are available:+There is no stable release yet that supports this devicethere are snapshot releases though. 
  
-  * Patchwork patch: https://patchwork.ozlabs.org/project/openwrt/list/?series=313820 
-  * GitHub fork: https://github.com/hberntsen/openwrt-experia-wifi 
   * OpenWrt forum thread: https://forum.openwrt.org/t/adding-openwrt-support-for-arcadyan-we420223-99-kpn-experia-wifi/132653   * OpenWrt forum thread: https://forum.openwrt.org/t/adding-openwrt-support-for-arcadyan-we420223-99-kpn-experia-wifi/132653
   * Tweakers forum thread: https://gathering.tweakers.net/forum/list_messages/1882915   * Tweakers forum thread: https://gathering.tweakers.net/forum/list_messages/1882915
Line 25: Line 23:
  
 ===== Installation ===== ===== Installation =====
-This device is not officially supported by OpenWRT so there are no official builds for this device. Build it yourselfuse the following settings in ''menuconfig'': +If you are running an old firmware version that is equipped with a firmware upload page, that is usable for upgrading to OpenWRT, see 'Flashing via the original web interfacebelow.
-<code> +
-Target System (MediaTek Ralink MIPS) +
-Subtarget (MT7621 based boards) +
-Target Profile (Arcadyan WE420223-99) +
-</code> +
-Or ask for a build in the forum thread.+
  
-Unfortunately, the official firmware's U-Boot is [[https://forum.openwrt.org/t/adding-openwrt-support-for-arcadyan-we420223-99-kpn-experia-wifi/132653/5?u=harm|password protected]]. Furthermore, the official firmware does not accept unsigned firmware versions. You might be able to [[https://7bits.nl/journal/posts/cve-2021-38703-kpn-experia-wifi-root-shell/|gain root]] on firmware 1.00.15 and flash from there. Unless another exploit is found, OpenWRT needs to be directly written to the flash chip. The upside of this is that you don't need to solder the serial port.+Otherwisewe need to directly write to the flash chip since the official firmware's U-Boot is [[https://forum.openwrt.org/t/adding-openwrt-support-for-arcadyan-we420223-99-kpn-experia-wifi/132653/5?u=harm|password protected]]. The upside of this is that you don't need to solder the serial port.
  
-==== Connecting the flash chip to a Raspberry Pi ==== +==== Flashing via the original web interface ====
-A Raspberry Pi can be used to program the flash chip in-circuit (thanks FPSUsername for discovering). Connect the chip directly to the Raspberry Pi's SPI pins. You can solder wires to the flash chip but using a [[https://a.aliexpress.com/_v4MHHw|clip]] is easier. Make sure to connect the RESET pin to VCC for stability.+
  
-On the Raspberry Pi, you can use a specially crafted overlay for accessing the chip: https://gist.github.com/hberntsen/f37f5047a61c2cfeeaa1e3d0c2f7f033 .+The original firmware requires signed firmware. The code to do so is on GitHub: https://github.com/hberntsen/we420223-99-sign . You can download a signed OpenWRT initramfs image here: https://mega.nz/file/FjlgQKqD#23bEq46EiVqxMhGuwucYYpN4sbw2q1nLgmtimLORvFA .
  
-Download this file and install it with ''sudo dtc -@ -I dts -O dtb -o /boot/overlays/we420223.dtbo  we420223-99_overlay.dts''.+  - Flash the signed image via the web interface. OpenWRT should boot and start a DHCP server. 
 +  - Go to http://192.168.1.1/ and flash a new sysupgrade.bin file 
 +  - Profit! You might still want to unlock the U-Boot password for recovery in the future (see below) 
 +==== Writing directly to the flash chip ==== 
 +=== Connecting the flash chip to a Raspberry Pi === 
 +A Raspberry Pi can be used to program the flash chip in-circuit (thanks FPSUsername for discovering). On the Raspberry Pi, install ''xxd libubootenv-tool mtd-utils'' using ''apt'' on Raspberry Pi OS. To access the flash chip we have a specially crafted overlay: https://gist.github.com/hberntsen/f37f5047a61c2cfeeaa1e3d0c2f7f033. Download this file and install it with ''sudo dtc -@ -I dts -O dtb -o /boot/overlays/we420223.dtbo  we420223-99_overlay.dts''.
 Enable it in ''/boot/config.txt'' by adding a new line containing ''dtoverlay=we420223''. Enable it in ''/boot/config.txt'' by adding a new line containing ''dtoverlay=we420223''.
 +
 +Connect the chip directly to the Raspberry Pi's SPI pins. Use the following connections:
 +
 +{{:media:arcadyan:we420223-99-flash.png?400|}}
 +
 +^ Flash Chip  ^ Raspberry Pi         ^
 +| VCC         | 3v3                  |
 +| RESET       | 3v3                  |
 +| /CS         | GPIO 8 (SPI0 CE0)    |
 +| DO          | GPIO 9 (SPI0 MISO)   |
 +| CLK         | GPIO11 (SPI0 SCLK)   |
 +| DI          | GPIO 10 (SPI0 MOSI)  |
 +| GND         | Ground               |
 +
 +You can solder wires to the flash chip but using a [[https://a.aliexpress.com/_v4MHHw|clip]] is easier. Make sure to connect the RESET pin to VCC for stability.
  
 After connecting the flash chip and rebooting, the ''/dev/mtd*'' devices should be available. Run ''sudo apt install xxd libubootenv-tool mtd-utils'' to install the required software for flashing. After connecting the flash chip and rebooting, the ''/dev/mtd*'' devices should be available. Run ''sudo apt install xxd libubootenv-tool mtd-utils'' to install the required software for flashing.
  
-==== Creating a backup ====+=== Creating a backup ===
 For recovery, creating a backup of the flash is recommended. Run ''sudo dd if=/dev/mtd0 of=backup.bin'' to create one. It can be restored with ''sudo flashcp backup.bin /dev/mtd0''. For recovery, creating a backup of the flash is recommended. Run ''sudo dd if=/dev/mtd0 of=backup.bin'' to create one. It can be restored with ''sudo flashcp backup.bin /dev/mtd0''.
  
-==== Unlocking U-Boot ==== +=== Unlocking U-Boot === 
-The password of U-Boot can be removed, though this step is optional. The following script will unlock U-Boot:+The password of U-Boot can be removed, though this step is optional. It is particularly useful for recovering the device through the serial port (i.e. booting an OpenWrt initramfs). The following script will unlock U-Boot:
  
 <code> <code>
Line 69: Line 80:
 </code> </code>
  
-==== Flashing OpenWRT ==== +=== Flashing OpenWRT === 
-After building OpenWRT, you should have a `.trx` file containing the kernel and ubifs. First we make sure the bootpartition is set to 0:+First we make sure the u-boot bootpartition is set to 0:
 <code> <code>
 echo '/dev/mtd2 0x0 0x1000 0x1000' > fw_env.config echo '/dev/mtd2 0x0 0x1000 0x1000' > fw_env.config
Line 76: Line 87:
 </code> </code>
  
-Now flash it with ''sudo flashcp squashfs-factory.trx /dev/mtd4''. Disconnect the Raspberry and boot the device. The first boot will take some time as it is resizing the UBIFS to fully span the partition. +Download the latest ''squashfs-factory.trx'' release, e.g. ''wget https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/openwrt-ramips-mt7621-arcadyan_we420223-99-squashfs-factory.trx''
 +Now flash it with ''sudo flashcp openwrt-ramips-mt7621-arcadyan_we420223-99-squashfs-factory.trx /dev/mtd4''. Disconnect the flash chip from the Raspberry Pi, put the cooling block on and you are ready to test OpenWrt. The first boot will take some time as it is resizing the UBIFS to fully span the partition. You can connect a network cable to configure the device now, the IP is 192.168.1.1 and a DHCP server is enabled.
  
 ===== Debricking ===== ===== Debricking =====
Line 153: Line 164:
 ^ Interface Name   ^ Description                  ^ Default configuration    ^ ^ Interface Name   ^ Description                  ^ Default configuration    ^
 | br-lan           | LAN & WiFi                   | 192.168.1.1/24           | | br-lan           | LAN & WiFi                   | 192.168.1.1/24           |
-lan0             | Left port (viewed from back) | Attached to br-lan       | +swp0             | Left port (viewed from back) | Attached to br-lan       | 
-lan1             | Right port (viewed from back)| Attached to br-lan       |+swp1             | Right port (viewed from back)| Attached to br-lan       |
 | wlan0            | 2.4GHz WiFi                  | Disabled                 | | wlan0            | 2.4GHz WiFi                  | Disabled                 |
 | wlan1            | 5GHz WiFi                    | Disabled                 | | wlan1            | 5GHz WiFi                    | Disabled                 |
Line 1079: Line 1090:
 ==== OpenWrt bootlog ==== ==== OpenWrt bootlog ====
 <WRAP bootlog> <WRAP bootlog>
 +<nowiki>
 =================================================================== ===================================================================
       MT7621   stage1 code 10:33:55 (ASIC)       MT7621   stage1 code 10:33:55 (ASIC)
Line 1364: Line 1376:
 [    1.287960] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 20 [    1.287960] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 20
 [    1.304794] mtk_soc_eth 1e100000.ethernet: generated random MAC address 2e:72:0b:2d:99:3e [    1.304794] mtk_soc_eth 1e100000.ethernet: generated random MAC address 2e:72:0b:2d:99:3e
-[    1.321891] mtk_soc_eth 1e100000.ethernet lan0: mediatek frame engine at 0xbe100000, irq 20+[    1.321891] mtk_soc_eth 1e100000.ethernet swp0: mediatek frame engine at 0xbe100000, irq 20
 [    1.339883] i2c /dev entries driver [    1.339883] i2c /dev entries driver
 [    1.349384] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges: [    1.349384] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
Line 1377: Line 1389:
 [    1.479010] 8021q: 802.1Q VLAN Support v1.8 [    1.479010] 8021q: 802.1Q VLAN Support v1.8
 [    1.490791] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module [    1.490791] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
-[    1.523677] mt7530 mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=25)+[    1.523677] mt7530 mdio-bus:1f swp1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=25)
 [    1.547639] mt7530 mdio-bus:1f: configuring for fixed/rgmii link mode [    1.547639] mt7530 mdio-bus:1f: configuring for fixed/rgmii link mode
 [    1.564450] DSA: tree 0 setup [    1.564450] DSA: tree 0 setup
Line 1454: Line 1466:
 [    5.360807] random: jshn: uninitialized urandom read (4 bytes read) [    5.360807] random: jshn: uninitialized urandom read (4 bytes read)
 [    5.474410] random: jshn: uninitialized urandom read (4 bytes read) [    5.474410] random: jshn: uninitialized urandom read (4 bytes read)
-[    6.144296] mtk_soc_eth 1e100000.ethernet lan0: PHY [mdio-bus:00] driver [MediaTek MT7530 PHY] (irq=POLL) +[    6.144296] mtk_soc_eth 1e100000.ethernet swp0: PHY [mdio-bus:00] driver [MediaTek MT7530 PHY] (irq=POLL) 
-[    6.166211] mtk_soc_eth 1e100000.ethernet lan0: configuring for phy/rgmii link mode+[    6.166211] mtk_soc_eth 1e100000.ethernet swp0: configuring for phy/rgmii link mode
 Press the [f] key and hit [enter] to enter failsafe mode Press the [f] key and hit [enter] to enter failsafe mode
 Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
Line 1493: Line 1505:
 [   12.268338] mt7615e 0000:01:00.0: N9 Firmware Version: _reserved_, Build Time: 20200814163649 [   12.268338] mt7615e 0000:01:00.0: N9 Firmware Version: _reserved_, Build Time: 20200814163649
 [   12.293499] mt7615e 0000:01:00.0: CR4 Firmware Version: _reserved_, Build Time: 20190415154149 [   12.293499] mt7615e 0000:01:00.0: CR4 Firmware Version: _reserved_, Build Time: 20190415154149
-[   29.833747] mtk_soc_eth 1e100000.ethernet lan0: PHY [mdio-bus:00] driver [MediaTek MT7530 PHY] (irq=POLL) +[   29.833747] mtk_soc_eth 1e100000.ethernet swp0: PHY [mdio-bus:00] driver [MediaTek MT7530 PHY] (irq=POLL) 
-[   29.857310] mtk_soc_eth 1e100000.ethernet lan0: configuring for phy/rgmii link mode +[   29.857310] mtk_soc_eth 1e100000.ethernet swp0: configuring for phy/rgmii link mode 
-[   29.875310] br-lan: port 1(lan0) entered blocking state +[   29.875310] br-lan: port 1(swp0) entered blocking state 
-[   29.885831] br-lan: port 1(lan0) entered disabled state +[   29.885831] br-lan: port 1(swp0) entered disabled state 
-[   29.897080] device lan0 entered promiscuous mode+[   29.897080] device swp0 entered promiscuous mode
 [   29.933630] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode [   29.933630] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
 [   29.950170] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [   29.950170] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
 [   29.968455] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [   29.968455] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
 [   29.983949] device eth0 entered promiscuous mode [   29.983949] device eth0 entered promiscuous mode
-[   29.993952] mt7530 mdio-bus:1f lan1: configuring for phy/gmii link mode +[   29.993952] mt7530 mdio-bus:1f swp1: configuring for phy/gmii link mode 
-[   30.007840] 8021q: adding VLAN 0 to HW filter on device lan1 +[   30.007840] 8021q: adding VLAN 0 to HW filter on device swp1 
-[   30.023050] br-lan: port 2(lan1) entered blocking state +[   30.023050] br-lan: port 2(swp1) entered blocking state 
-[   30.033624] br-lan: port 2(lan1) entered disabled state +[   30.033624] br-lan: port 2(swp1) entered disabled state 
-[   30.045040] device lan1 entered promiscuous mode+[   30.045040] device swp1 entered promiscuous mode 
 +</nowiki>
 </WRAP>\\ </WRAP>\\
  
Line 1513: Line 1526:
 ===== Tags ===== ===== Tags =====
 [[meta:tags|How to add tags]] [[meta:tags|How to add tags]]
-{{tag>EXAMPLETAG unsupported}} 
  • Last modified: 2024/03/20 17:28
  • by harm