-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mediatek: add Nokia EA0326GMP support #14993
Conversation
1715173329
commented
Mar 27, 2024
•
edited
edited
6554470
to
d8760ca
Compare
Hi @dangowrt could you please take a look? For the first-time installation the |
0e514f3
to
45d6d40
Compare
45d6d40
to
a3342e0
Compare
This is difficult to fix by design, and I guess the best would be to include |
309f3c4
to
da3cfc3
Compare
Would it make sense to simply introduce fitblk to legacy fit sysupgrade logic? The code will check if fit device exists so it should not break anything. And it's also unnecessary to do bootdev detection for a single-storage device. h3c,magic-nx30-pro|\
jcg,q30-pro|\
mediatek,mt7981-rfb|\
netcore,n60|\
qihoo,360t7|\
xiaomi,mi-router-ax3000t-ubootmod|\
xiaomi,mi-router-wr30u-ubootmod)
+ [ -e /dev/fit0 ] && fitblk /dev/fit0
+ [ -e /dev/fitrw ] && fitblk /dev/fitrw
CI_KERNPART="fit"
nand_do_upgrade "$1"
;; |
Technically this can work. I was kinda intending to make it as obvious as possible which device has already been converted to fitblk, so device owners notice and may carry out conversion on the device.
The hope was kinda to have a single generic sysupgrade codepath, but yes, given the chicken-egg/bootstrapping problem when installing OpenWrt to a device currently running vendor firmware or older OpenWrt that would be the best work-around I can imagine. |
@Tian-Jionglu can you stop sending off-topic comments here? |
da3cfc3
to
c266acd
Compare
I see, thank you! |
c266acd
to
6703aa6
Compare
6703aa6
to
c1c0f1c
Compare
4098e01
to
b18a33d
Compare
b18a33d
to
57fde6d
Compare
57fde6d
to
253c556
Compare
@dangowrt could you please take a look? thanks! |
Hardware specification: SoC: MediaTek MT7981B 2x A53 Flash: 128 MB SPI-NAND RAM: 256MB Ethernet: 4x 10/100/1000 Mbps Switch: MediaTek MT7531AE WiFi: MediaTek MT7976C Button: Reset, WPS/Mesh Power: DC 12V 1A Gain SSH access: 1. Login into web interface, and download the configuration. 2. Download the configration utilities: https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7981-nokia-ea0326gmp-config-utils.tar.gz These binaries are extraced from the factory firmware, which are dynamically linked with aarch64 musl 1.1.24. To use them, you must run them under the same runtime environment, otherwise the binaries will not work properly! 3. Upload the configuration and utilities to a suitable environment. 4. Uncompress the utilities, move them to '/bin' and give them executable permisison: tar -zxf openwrt-mediatek-mt7981-nokia-ea0326gmp-config-utils.tar.gz mv mkconfig seama /bin chmod +x /bin/mkconfig chmod +x /bin/seama 5. Decrypt and uncompress the configuration: Enter fakeroot if you are not login as root. mkconfig -a de-enca -m EA0326GMP_3FE79221BAAA -i EA0326GMP_3FE79221BAAA-xxxxxxxx-backup.tar.gz -o backup.tar.gz tar -zxf backup.tar.gz 6. Edit 'etc/config/dropbear', set 'enable' to '1'. 7. Edit 'etc/passwd', remove root password: 'root::1:0:99999:7:::'. 8. Repack the configuration: tar -zcf backup.tar.gz etc/ mkconfig -a enca -m EA0326GMP_3FE79221BAAA -i backup.tar.gz -o EA0326GMP_3FE79221BAAA-xxxxxxxx-backup.tar.gz 9. Upload new configuration via web interface, now you can SSH to EA0326GMP. A minimum configuration which enabled SSH access is also provided to simplify the process: https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7981-nokia-ea0326gmp-enable-ssh.tar.gz Flash instructions: 1. SSH to EA0326GMP, backup everything, especially 'Factory' part. 2. Write new BL2: mtd write openwrt-mediatek-filogic-nokia_ea0326gmp-preloader.bin BL2 3. Write new FIP: mtd write openwrt-mediatek-filogic-nokia_ea0326gmp-bl31-uboot.fip FIP 4. Set static IP on your PC: IP 192.168.1.254/24, GW 192.168.1.1 5. Serve OpenWrt initramfs image using TFTP server. 6. Cut off the power and re-engage, wait for TFTP recovery to complete. 7. After OpenWrt has booted, perform sysupgrade. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
For the first-time installation (mostly migrates from vendor firmware) the ubiblock is not ready, but bootdev detection relies on it. This means users must create ubiblock manually otherwise the sysupgrade will not work. Now a unique case is added for nand devices which use new fit format, let's move to it. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
253c556
to
a568540
Compare
@1715173329 I have a script that simulates WPS key presses, which works fine on other devices but produces the opposite results on the EA0326GMP. This is because the ACTION="pressed" and ACTION="released" are swapped. Later, I found that changing the key to a low level made it work correctly. |
That's weird. I extracted this value from vendor dts. Will confirm it later. |
Indeed. So they just copy&paste the rfb dts. Thanks for report. |