Gotcha, is there a way to switch from uboot-mod to stock partitioning?
Yes you have to manually restore the original partitions and than flash the stock version of the firmware. (Doesn't give any advantage anyways)
Any reason why i can't write to
mtd write openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-p
reloader.bin bl2
Could not open mtd device: bl2
Can't open device for writing!
root@OpenWrt:/dev# cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00040000 "bl2"
mtd1: 00080000 00040000 "u-boot-env"
mtd2: 00200000 00040000 "Factory"
mtd3: 00200000 00040000 "fip"
mtd4: 00040000 00040000 "zloader"
mtd5: 1da80000 00040000 "ubi"
In general MTDs are write protected so you need to unlock them.
Look for this
insmod mtd-rw.ko i_want_a_brick=1
Thank you @skyscreaper
This it possible to write the stock images to the mtd instead of the ubootmod versions?
@bmork What does the iwinfo phyX freqlist
command return for the 6G interface on your Telenor EX5700 router if you set the country to US
?
root@OpenWrt:~# iw reg set US
root@OpenWrt:~# iw reg get
global
country US: DFS-FCC
(902 - 904 @ 2), (N/A, 30), (N/A)
(904 - 920 @ 16), (N/A, 30), (N/A)
(920 - 928 @ 8), (N/A, 30), (N/A)
(2400 - 2472 @ 40), (N/A, 30), (N/A)
(5150 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5350 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5470 - 5730 @ 160), (N/A, 24), (0 ms), DFS
(5730 - 5850 @ 80), (N/A, 30), (N/A), AUTO-BW
(5850 - 5895 @ 40), (N/A, 27), (N/A), NO-OUTDOOR, AUTO-BW, PASSIVE-SCAN
(5925 - 7125 @ 320), (N/A, 12), (N/A), NO-OUTDOOR, PASSIVE-SCAN
(57240 - 71000 @ 2160), (N/A, 40), (N/A)
root@OpenWrt:~# iwinfo phy1 freqlist
5.955 GHz (Band: 6 GHz, Channel 1) [NO_HT40-, NO_IR, INDOOR_ONLY]
5.975 GHz (Band: 6 GHz, Channel 5) [NO_IR, INDOOR_ONLY]
5.995 GHz (Band: 6 GHz, Channel 9) [NO_IR, INDOOR_ONLY]
6.015 GHz (Band: 6 GHz, Channel 13) [NO_IR, INDOOR_ONLY]
6.035 GHz (Band: 6 GHz, Channel 17) [NO_IR, INDOOR_ONLY]
6.055 GHz (Band: 6 GHz, Channel 21) [NO_IR, INDOOR_ONLY]
6.075 GHz (Band: 6 GHz, Channel 25) [NO_IR, INDOOR_ONLY]
6.095 GHz (Band: 6 GHz, Channel 29) [NO_IR, INDOOR_ONLY]
6.115 GHz (Band: 6 GHz, Channel 33) [NO_IR, INDOOR_ONLY]
6.135 GHz (Band: 6 GHz, Channel 37) [NO_IR, INDOOR_ONLY]
6.155 GHz (Band: 6 GHz, Channel 41) [NO_IR, INDOOR_ONLY]
6.175 GHz (Band: 6 GHz, Channel 45) [NO_IR, INDOOR_ONLY]
6.195 GHz (Band: 6 GHz, Channel 49) [NO_IR, INDOOR_ONLY]
6.215 GHz (Band: 6 GHz, Channel 53) [NO_IR, INDOOR_ONLY]
6.235 GHz (Band: 6 GHz, Channel 57) [NO_IR, INDOOR_ONLY]
6.255 GHz (Band: 6 GHz, Channel 61) [NO_IR, INDOOR_ONLY]
6.275 GHz (Band: 6 GHz, Channel 65) [NO_IR, INDOOR_ONLY]
6.295 GHz (Band: 6 GHz, Channel 69) [NO_IR, INDOOR_ONLY]
6.315 GHz (Band: 6 GHz, Channel 73) [NO_IR, INDOOR_ONLY]
6.335 GHz (Band: 6 GHz, Channel 77) [NO_IR, INDOOR_ONLY]
6.355 GHz (Band: 6 GHz, Channel 81) [NO_IR, INDOOR_ONLY]
6.375 GHz (Band: 6 GHz, Channel 85) [NO_IR, INDOOR_ONLY]
6.395 GHz (Band: 6 GHz, Channel 89) [NO_IR, INDOOR_ONLY]
6.415 GHz (Band: 6 GHz, Channel 93) [NO_IR, INDOOR_ONLY]
6.435 GHz (Band: 6 GHz, Channel 97) [NO_IR, INDOOR_ONLY]
6.455 GHz (Band: 6 GHz, Channel 101) [NO_IR, INDOOR_ONLY]
6.475 GHz (Band: 6 GHz, Channel 105) [NO_IR, INDOOR_ONLY]
6.495 GHz (Band: 6 GHz, Channel 109) [NO_IR, INDOOR_ONLY]
6.515 GHz (Band: 6 GHz, Channel 113) [NO_IR, INDOOR_ONLY]
6.535 GHz (Band: 6 GHz, Channel 117) [NO_IR, INDOOR_ONLY]
6.555 GHz (Band: 6 GHz, Channel 121) [NO_IR, INDOOR_ONLY]
6.575 GHz (Band: 6 GHz, Channel 125) [NO_IR, INDOOR_ONLY]
6.595 GHz (Band: 6 GHz, Channel 129) [NO_IR, INDOOR_ONLY]
6.615 GHz (Band: 6 GHz, Channel 133) [NO_IR, INDOOR_ONLY]
6.635 GHz (Band: 6 GHz, Channel 137) [NO_IR, INDOOR_ONLY]
6.655 GHz (Band: 6 GHz, Channel 141) [NO_IR, INDOOR_ONLY]
6.675 GHz (Band: 6 GHz, Channel 145) [NO_IR, INDOOR_ONLY]
6.695 GHz (Band: 6 GHz, Channel 149) [NO_IR, INDOOR_ONLY]
6.715 GHz (Band: 6 GHz, Channel 153) [NO_IR, INDOOR_ONLY]
6.735 GHz (Band: 6 GHz, Channel 157) [NO_IR, INDOOR_ONLY]
6.755 GHz (Band: 6 GHz, Channel 161) [NO_IR, INDOOR_ONLY]
6.775 GHz (Band: 6 GHz, Channel 165) [NO_IR, INDOOR_ONLY]
6.795 GHz (Band: 6 GHz, Channel 169) [NO_IR, INDOOR_ONLY]
6.815 GHz (Band: 6 GHz, Channel 173) [NO_IR, INDOOR_ONLY]
6.835 GHz (Band: 6 GHz, Channel 177) [NO_IR, INDOOR_ONLY]
6.855 GHz (Band: 6 GHz, Channel 181) [NO_IR, INDOOR_ONLY]
6.875 GHz (Band: 6 GHz, Channel 185) [NO_IR, INDOOR_ONLY]
6.895 GHz (Band: 6 GHz, Channel 189) [NO_IR, INDOOR_ONLY]
6.915 GHz (Band: 6 GHz, Channel 193) [NO_IR, INDOOR_ONLY]
6.935 GHz (Band: 6 GHz, Channel 197) [NO_IR, INDOOR_ONLY]
6.955 GHz (Band: 6 GHz, Channel 201) [NO_IR, INDOOR_ONLY]
6.975 GHz (Band: 6 GHz, Channel 205) [NO_IR, INDOOR_ONLY]
6.995 GHz (Band: 6 GHz, Channel 209) [NO_IR, INDOOR_ONLY]
7.015 GHz (Band: 6 GHz, Channel 213) [NO_IR, INDOOR_ONLY]
7.035 GHz (Band: 6 GHz, Channel 217) [NO_IR, INDOOR_ONLY]
7.055 GHz (Band: 6 GHz, Channel 221) [NO_IR, INDOOR_ONLY]
7.075 GHz (Band: 6 GHz, Channel 225) [NO_IR, INDOOR_ONLY]
7.095 GHz (Band: 6 GHz, Channel 229) [NO_IR, INDOOR_ONLY]
7.115 GHz (Band: 6 GHz, Channel 233) [NO_HT40+, NO_IR, INDOOR_ONLY]
Thanks for checking.
So for US
it is impossible to start the AP due to NO_IR
?
Yes, looks that way. I tested
config wifi-device 'radio1'
option type 'mac80211'
option path 'soc/11280000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0+1'
option disabled '0'
option country 'US'
option htmode 'HE80'
option band '6g'
option channel '1'
and it fails with
Thu Apr 4 11:00:57 2024 daemon.notice hostapd: phy1-ap0: interface state UNINITIALIZED->COUNTRY_UPDATE
Thu Apr 4 11:00:57 2024 daemon.notice hostapd: Frequency 5955 (primary) not allowed for AP mode, flags: 0x10003 NO-IR
Thu Apr 4 11:00:57 2024 daemon.err hostapd: Primary frequency not allowed
Thu Apr 4 11:00:57 2024 daemon.warn hostapd: phy1-ap0: IEEE 802.11 Configured channel (1) or frequency (5955) (secondary_channel=1) not found from the channel list of the current mode (2) IEEE 802.11a
Thu Apr 4 11:00:57 2024 daemon.warn hostapd: phy1-ap0: IEEE 802.11 Hardware does not support configured channel
Thu Apr 4 11:00:57 2024 daemon.err hostapd: Could not select hw_mode and channel. (-3)
Thu Apr 4 11:00:57 2024 daemon.notice hostapd: phy1-ap0: interface state COUNTRY_UPDATE->NO_IR
Thu Apr 4 11:00:57 2024 daemon.notice hostapd: phy1-ap0: AP-NO_IR
Changing country to 'NO' and it says
Thu Apr 4 11:02:06 2024 daemon.notice hostapd: phy1-ap0: interface state UNINITIALIZED->COUNTRY_UPDATE
Thu Apr 4 11:02:06 2024 daemon.notice hostapd: phy1-ap0: interface state COUNTRY_UPDATE->ENABLED
Thu Apr 4 11:02:06 2024 daemon.notice hostapd: phy1-ap0: AP-ENABLED
I still don't have any 6GHz clients so I can't verify that it actually works.
I wonder if this will change in the future or will it stay as it is...
What do you guys think of the performance of this 5601 I am a bit disappointed actually . Wifi range could be a lot better Also the hardware acceleration on openvpn gives me only 200mbit Was hoping on more performance from that soc
out of curiosity, what's the cpu usage while using 200mbit on openvpn?
If that's high there could be problems with the cryptostuff offload... have you tried wireguard?
On htop it use 1 core out of the 4 on 100% rest is not being used it looks like
Have libopenssl-devcrypto kmod-cryptodev installed
root@OpenWrt-A:~# openssl engine -t -c
(dynamic) Dynamic engine loading support
[ unavailable ]
(devcrypto) /dev/crypto engine
[DES-CBC, DES-EDE3-CBC, AES-128-CBC, AES-192-CBC, AES-256-CBC]
[ available ]
root@OpenWrt-A:~# openssl speed -elapsed -evp aes-256-cbc
You have chosen to measure elapsed time instead of user CPU time.
Doing AES-256-CBC for 3s on 16 size blocks: 174140 AES-256-CBC's in 3.01s
Doing AES-256-CBC for 3s on 64 size blocks: 171474 AES-256-CBC's in 3.00s
Doing AES-256-CBC for 3s on 256 size blocks: 164091 AES-256-CBC's in 3.00s
Doing AES-256-CBC for 3s on 1024 size blocks: 151963 AES-256-CBC's in 3.00s
Doing AES-256-CBC for 3s on 8192 size blocks: 89462 AES-256-CBC's in 3.00s
Doing AES-256-CBC for 3s on 16384 size blocks: 61142 AES-256-CBC's in 3.00s
version: 3.0.13
built on: Fri Apr 12 00:51:51 2024 UTC
options: bn(64,64)
compiler: aarch64-openwrt-linux-musl-gcc -fPIC -pthread -Wa,--noexecstack -Wall -O3 -Os -pipe -mcpu=cortex-a53 -fno-caller-saves -fno-plt -fhonour-copts -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fPIC -Os -pipe -mcpu=cortex-a53 -fno-caller-saves -fno-plt -fhonour-copts -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -fPIC -znow -zrelro -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -D_FORTIFY_SOURCE=1 -DPIC
CPUINFO: OPENSSL_armcap=0x3d
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
AES-256-CBC 925.66k 3658.11k 14002.43k 51870.04k 244290.90k 333916.84k
root@OpenWrt-A:~# openssl engine -pre DUMP_INFO devcrypto
(devcrypto) /dev/crypto engine
Information about ciphers supported by the /dev/crypto engine:
Cipher DES-CBC, NID=31, /dev/crypto info: id=1, driver=safexcel-cbc-des (hw accelerated)
Cipher DES-EDE3-CBC, NID=44, /dev/crypto info: id=2, driver=safexcel-cbc-des3_ede (hw accelerated)
Cipher BF-CBC, NID=91, /dev/crypto info: id=3, CIOCGSESSION (session open call) failed
Cipher CAST5-CBC, NID=108, /dev/crypto info: id=4, CIOCGSESSION (session open call) failed
Cipher AES-128-CBC, NID=419, /dev/crypto info: id=11, driver=safexcel-cbc-aes (hw accelerated)
Cipher AES-192-CBC, NID=423, /dev/crypto info: id=11, driver=safexcel-cbc-aes (hw accelerated)
Cipher AES-256-CBC, NID=427, /dev/crypto info: id=11, driver=safexcel-cbc-aes (hw accelerated)
Cipher RC4, NID=5, /dev/crypto info: id=12, CIOCGSESSION (session open call) failed
Cipher AES-128-CTR, NID=904, /dev/crypto info: id=21, driver=ctr(aes-ce) (software)
Cipher AES-192-CTR, NID=905, /dev/crypto info: id=21, driver=ctr(aes-ce) (software)
Cipher AES-256-CTR, NID=906, /dev/crypto info: id=21, driver=ctr(aes-ce) (software)
Cipher AES-128-ECB, NID=418, /dev/crypto info: id=23, driver=safexcel-ecb-aes (hw accelerated)
Cipher AES-192-ECB, NID=422, /dev/crypto info: id=23, driver=safexcel-ecb-aes (hw accelerated)
Cipher AES-256-ECB, NID=426, /dev/crypto info: id=23, driver=safexcel-ecb-aes (hw accelerated)
Information about digests supported by the /dev/crypto engine:
Digest MD5, NID=4, /dev/crypto info: id=13, driver=safexcel-md5 (hw accelerated), CIOCCPHASH capable
Digest SHA1, NID=64, /dev/crypto info: id=14, driver=safexcel-sha1 (hw accelerated), CIOCCPHASH capable
Digest RIPEMD160, NID=117, /dev/crypto info: id=102, driver=unknown. CIOCGSESSION (session open) failed
Digest SHA224, NID=675, /dev/crypto info: id=103, driver=safexcel-sha224 (hw accelerated), CIOCCPHASH capable
Digest SHA256, NID=672, /dev/crypto info: id=104, driver=safexcel-sha256 (hw accelerated), CIOCCPHASH capable
Digest SHA384, NID=673, /dev/crypto info: id=105, driver=safexcel-sha384 (hw accelerated), CIOCCPHASH capable
Digest SHA512, NID=674, /dev/crypto info: id=106, driver=safexcel-sha512 (hw accelerated), CIOCCPHASH capable
please use the </> button (located on top of the post window), when you paste cli output, vanilla c&p is hard(er) to read.
Going to test with wireguard
Thank you, it did work.
To summarise, these are the steps I followed to get ubibootmod:
Unscrew, connect serial console as described before. With the router powered-off but the ttyUSB0 serial connected, do:
git clone https://github.com/981213/mtk_uartboot
cd mtk_uartboot
cargo build
./target/debug/mtk_uartboot -s /dev/ttyUSB0 --aarch64 -p bl2-mt7986-ddr4-ram.bin -f openwrt-23.05.3-mediatek-filogic-zyxel_ex5601-t0-ubootmod-bl31-uboot.fip
This will wait for the router to power on. Then power on the router, the custom u-boot should start and the mtk_uartboot
command will exit successfully.
Open a terminal emulator (e.g. minicom,screen) with baudrate 115200,
so you can see the output of the custom u-boot.
In the terminal you can see that the uboot tries to tftpboot repeatedly, looking for a specifc ubootmod-initramfs-recovery.itb hosted at 192.168.1.254
. You need to connect directly one of the router's 1gig ports to your host. The host's network needs to be setup to have the static address 192.168.1.254
(e.g. if you use systemd-networkd on the host, edit the /etc/systemd/network/ accordingly).
Start a tftp server on the host (e.g. atftp or tftp-hpa), disable your host's firewall (if you have one) and place the correctly-named ubootmod-initramfs-recovery.itb in your /srv/*tftp/
.
Eventually the tftpboot should fetch the file from the tftp server. Once this is done, you will be returned to u-boot prompt. Then, issue bootm
and openwrt will start running on RAM.
Log into the Openwrt-on-Ram (either via ssh or terminal emulator), and transfer the files necessary to flash the openwrt firmware to the /tmp
folder of the router. I used scp -O .... root@192.168.1.1:/tmp
for that.
The files you need are:
zyxel_ex5601-t0-ubootmod-bl31-uboot.fip
zyxel_ex5601-t0-ubootmod-initramfs-factory.ubi
zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb
zyxel_ex5601-t0-ubootmod-preloader.bin
zyxel_ex5601-t0-ubootmod-squashfs-sysupgrade.itb
kmod-mtd-rw*_aarch64_cortex-a53.ipk
The kernel module kmod-mtd-rw
should match the openwrt version you are currently running on ram; for example for 25.0.3 look into here:
https://downloads.openwrt.org/releases/23.05.3/targets/mediatek/filogic/kmods/
Then inside the router terminal:
cd /tmp
opkg install kmod-mtd-rw*_aarch64_cortex-a53.ipk
insmod mtd-rw.ko i_want_a_brick=1
ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
ubimkvol /dev/ubi0 -n 2 -N recovery -s 10MiB
ubiupdatevol /dev/ubi0_2 openwrt-mediatek-filogic*-ubootmod-initramfs-recovery.itb
mtd write openwrt-mediatek-filogic-*-ubootmod-preloader.bin bl2
mtd write openwrt-mediatek-filogic-*-ubootmod-bl31-uboot.fip fip
sysupgrade -n openwrt-mediatek-filogic-*ubootmod-squashfs-sysupgrade.itb
The router will then restart, and you should be running openwrt from flash.
just walked true notes, worked flawles for me. now looking to speed up the wifi.
it looks like 5 ghz cant connect altough it seems running
..
The kernel module
kmod-mtd-rw
should match the openwrt version you are currently running on ram; for example for 25.0.3 look into here:
https://downloads.openwrt.org/releases/23.05.3/targets/mediatek/filogic/kmods/
What files are needed for this kmod-mtd-rw? The link contain al lot of files do I have to download them all?
Edit: Found the file kmod-mtd-rw_5.15.150+git-20160214-2_aarch64_cortex-a53.ipk
After the file is fetched from the tftp server, then I am prompted with "root@openwrt:" bootm is not found.
How to proceed?