abnoeh wrote:kexecuser wrote:Hi abnoeh,
snip
I did both. please check again. but I didn't make this build system, @zaccareal did. And I have no real idea how it works...
Hi abnoeh,
Good work! I booted it and it runs. Congratulations! ;-)
I post here some comments:
- How to boot the INITRAMFS firmware?
1) Boot your device using the SERIAL connection, and stop the U-boot with key '4'.
2) Copy the firmware-initramfs to one TFTP server running in address 192.168.0.100.
3) Type in the U-boot console: "tftpboot 0x82000000 openwrt-ramips-mt7620-ArcherC2-initramfs-kernel.bin"
4) After END the TFTP download, type "boot.m 0x82000000"
VoilĂ ! Your OpenWRT will boot in your device WITHOUT CHANGING ANYTHING IN THE FLASH.
- After booting OpenWRT I recommend to do a backup of your STOCK firmware:
1) Connect using SSH to your device (change the IP using the SERIAL connection if you need it).
2) Execute:
# mkdir /tmp/backup
# cat /proc/mtd > /tmp/backup/mtd.txt
# dd if=/dev/mtd0ro of=/tmp/backup/mtd0ro.u-boot
# dd if=/dev/mtd1ro of=/tmp/backup/mtd1ro.firmware
# dd if=/dev/mtd2ro of=/tmp/backup/mtd2ro.kernel
# dd if=/dev/mtd3ro of=/tmp/backup/mtd3ro.rootfs
# dd if=/dev/mtd4ro of=/tmp/backup/mtd4ro.rootfs_data
# dd if=/dev/mtd5ro of=/tmp/backup/mtd5ro.config
# dd if=/dev/mtd6ro of=/tmp/backup/mtd6ro.rom
# dd if=/dev/mtd7ro of=/tmp/backup/mtd7ro.romfile
# dd if=/dev/mtd8ro of=/tmp/backup/mtd8ro.radio
3) Using the SCP command copy these files to your computer and save them in a safe location.
- More or less, all seems to work with this firmware... except:
1) The 5GHz radio seems to have troubles.
2) In the booting process I see some problems. DMESG shows:
[ 0.000000] Linux version 4.4.14 (debi@debian) (gcc version 5.3.0 (OpenWrt GCC 5.3.0 12009) ) #12 Mon Mar 12 13:46:22 UTC 2018
...
[ 0.119436] rt2880-pinmux pinctrl: failed to lookup the sleep state
...
[ 0.687485] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[ 0.694063] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
...
[ 0.702312] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
...
[ 5.860580] ralink-usb-phy usbphy: invalid resource
...
[ 5.910861] m25p80 spi0.0: found s25fl064k, expected mx25l6405d
...
[ 10.096763] MT7610 AP Driver version: 3.0.0.9
[ 10.108069] Loading modules backported from Linux version wt-2016-05-12-0-g7a54796
[ 10.115870] Backport generated by backports.git backports-20160216-0-ge3c56e4
...
[ 10.307499] wireguard: Unknown symbol udp_sock_create4 (err 0)
[ 10.313568] wireguard: Unknown symbol udp_tunnel6_xmit_skb (err 0)
[ 10.320145] wireguard: Unknown symbol udp_tunnel_sock_release (err 0)
[ 10.326811] wireguard: Unknown symbol setup_udp_tunnel_sock (err 0)
[ 10.333266] wireguard: Unknown symbol udp_sock_create6 (err 0)
[ 10.339342] wireguard: Unknown symbol udp_tunnel_xmit_skb (err 0)
...
[ 10.463604] wireguard: Unknown symbol udp_sock_create4 (err 0)
[ 10.469665] wireguard: Unknown symbol udp_tunnel6_xmit_skb (err 0)
[ 10.476301] wireguard: Unknown symbol udp_tunnel_sock_release (err 0)
[ 10.482976] wireguard: Unknown symbol setup_udp_tunnel_sock (err 0)
[ 10.489473] wireguard: Unknown symbol udp_sock_create6 (err 0)
[ 10.495604] wireguard: Unknown symbol udp_tunnel_xmit_skb (err 0)
[ 10.525205] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0500 detected
[ 10.533199] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 7620 detected
[ 10.540960] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 10.570918] wireguard: Unknown symbol udp_sock_create4 (err 0)
[ 10.577057] wireguard: Unknown symbol udp_tunnel6_xmit_skb (err 0)
[ 10.583693] wireguard: Unknown symbol udp_tunnel_sock_release (err 0)
[ 10.590375] wireguard: Unknown symbol setup_udp_tunnel_sock (err 0)
[ 10.596878] wireguard: Unknown symbol udp_sock_create6 (err 0)
[ 10.603000] wireguard: Unknown symbol udp_tunnel_xmit_skb (err 0)
[ 10.644294] wireguard: Unknown symbol udp_sock_create4 (err 0)
[ 10.650363] wireguard: Unknown symbol udp_tunnel6_xmit_skb (err 0)
[ 10.657010] wireguard: Unknown symbol udp_tunnel_sock_release (err 0)
[ 10.663708] wireguard: Unknown symbol setup_udp_tunnel_sock (err 0)
[ 10.670185] wireguard: Unknown symbol udp_sock_create6 (err 0)
[ 10.676326] wireguard: Unknown symbol udp_tunnel_xmit_skb (err 0)
...
Two main things worry me:
A) The mismatch of the SPI FLASH! My is "mx25l6405d" instead of "s25fl064k" described in the Wiki.
I hope this doesn't creates troubles when flashing, but I'm not sure. My device is "v1-EU". Please, update the Wiki.
B) The errors with the 5GHz MT7610 radio driver.
I feel the driver needs to be improved or updated for solve the problems. Any idea?
- Changes proposed in the ".config" for improving the development (in the sense of helping to fix the firmware):
# CONFIG_PACKAGE_kmod-block2mtd: enable for mounting flash partitions (see wiki.openwrt.org/doc/techref/block_mount)
# CONFIG_PACKAGE_kmod-fs-squashfs: enable for accessing to the squash partition in the flash
# CONFIG_PACKAGE_kmod-mtd-rw: enable for write access of the flash using MTD tools (useful for writing the firmware section in MTD1 [mtd2+mtd3] without touching the rest)
# CONFIG_PACKAGE_kmod-mtdtests: enable for testing/checking the flash structure
# CONFIG_RT_CFG80211: I'm not sure, but this is not required to be enabled for controlling the radio using standard tools?
I hope soon you can generate a PR for merge with the mainstream.
Regards.