Thanks for the script. The script was here but it needs jboot-tools which was no installed by default... Installing it solved the problem and I now have the good soc_wmac.eeprom file.
Now I only have one wlan interface (rt7620 one), but mt76x0e does not seem to work. I give my dmesg in case it can help:
root@OpenWrt:~# dmesg
[ 0.000000] Linux version 4.14.115 (guillaume@guillaume-UX32A) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r9948-290a7dc0c7)) #0 Thu May 9 16:33:39 2019
[ 0.000000] Board has DDR2
[ 0.000000] Analog PMU set to hw control
[ 0.000000] Digital PMU set to hw control
[ 0.000000] SoC Type: MediaTek MT7620A ver:2 eco:4
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[ 0.000000] MIPS: machine is D-Link DIR-510L
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 08000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] On node 0 totalpages: 32768
[ 0.000000] free_area_init_node: node 0, pgdat 8049bf20, node_mem_map 81000040
[ 0.000000] Normal zone: 256 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 32768 pages, LIFO batch:7
[ 0.000000] random: get_random_bytes called from start_kernel+0x8c/0x474 with crng_init=0
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: console=ttyS1,57600 rootfstype=squashfs,jffs2
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Writing ErrCtl register=0007df10
[ 0.000000] Readback ErrCtl register=0007df10
[ 0.000000] Memory: 124680K/131072K available (3686K kernel code, 177K rwdata, 860K rodata, 196K init, 208K bss, 6392K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 256
[ 0.000000] CPU Clock: 580MHz
[ 0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[ 0.000000] systick: enable autosleep mode
[ 0.000000] systick: running - mult: 214748, shift: 32
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[ 0.000010] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[ 0.015471] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[ 0.087706] pid_max: default: 32768 minimum: 301
[ 0.097093] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.110110] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.129512] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.148991] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.161159] pinctrl core: initialized pinctrl subsystem
[ 0.171985] NET: Registered protocol family 16
[ 0.715513] mt7620-pci 10140000.pcie: PCIE0 no card, disable it(RST&CLK)
[ 0.728742] mt7620-pci: probe of 10140000.pcie failed with error -1
[ 0.757724] rt2880_gpio 10000600.gpio: registering 24 gpios
[ 0.768759] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[ 0.784654] clocksource: Switched to clocksource systick
[ 0.796311] NET: Registered protocol family 2
[ 0.805684] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.819457] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.832050] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.844832] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.856342] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.869026] NET: Registered protocol family 1
[ 0.877607] PCI: CLS 0 bytes, default 32
[ 0.880228] rt-timer 10000100.timer: maximum frequency is 1220Hz
[ 0.892971] Crashlog allocated RAM at address 0x3f00000
[ 0.905013] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[ 0.923029] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.934523] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.963572] io scheduler noop registered
[ 0.971277] io scheduler deadline registered (default)
[ 0.982300] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.995848] 10000500.uart: ttyS0 at MMIO 0x10000500 (irq = 13, base_baud = 2500000) is a Palmchip BK-3103
[ 1.015468] 10000c00.uartlite: ttyS1 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[ 1.035150] console [ttyS1] enabled
[ 1.048910] bootconsole [early0] disabled
[ 1.065362] cacheinfo: Failed to find cpu0 device node
[ 1.075637] cacheinfo: Unable to detect cache hierarchy for CPU 0
[ 1.092618] spi spi0.0: force spi mode3
[ 1.101083] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[ 1.111252] 4 fixed-partitions partitions found on MTD device spi0.0
[ 1.123911] Creating 4 MTD partitions on "spi0.0":
[ 1.133467] 0x000000000000-0x000000010000 : "jboot"
[ 1.144078] 0x000000010000-0x000000210000 : "recovery"
[ 1.155264] 0x000000210000-0x000000ff0000 : "firmware"
[ 1.168465] 2 jimage-fw partitions found on MTD device firmware
[ 1.180329] Creating 2 MTD partitions on "firmware":
[ 1.190248] 0x000000000000-0x00000018311f : "kernel"
[ 1.201034] 0x00000018311f-0x000000de0000 : "rootfs"
[ 1.211785] mtd: device 4 (rootfs) set to be root filesystem
[ 1.224545] 1 squashfs-split partitions found on MTD device rootfs
[ 1.236934] 0x0000005d0000-0x000000de0000 : "rootfs_data"
[ 1.248592] 0x000000ff0000-0x000001000000 : "config"
[ 1.260189] libphy: Fixed MDIO Bus: probed
[ 1.277477] gsw: setting port4 to ephy mode
[ 1.285882] mtk_soc_eth 10100000.ethernet eth0 (uninitialized): port 0 link up (100Mbps/Full duplex)
[ 1.304106] mtk_soc_eth 10100000.ethernet: generated random MAC address 22:cf:33:5a:90:31
[ 1.320490] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[ 1.332931] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[ 1.349953] rt2880_wdt 10000120.watchdog: Initialized
[ 1.361245] NET: Registered protocol family 10
[ 1.373911] Segment Routing with IPv6
[ 1.381386] NET: Registered protocol family 17
[ 1.390305] 8021q: 802.1Q VLAN Support v1.8
[ 1.404965] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[ 1.420104] Freeing unused kernel memory: 196K
[ 1.428981] This architecture does not have kernel memory protection.
[ 2.184117] init: Console is alive
[ 2.191228] init: - watchdog -
[ 2.641370] random: fast init done
[ 3.824905] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 4.020979] usbcore: registered new interface driver usbfs
[ 4.032073] usbcore: registered new interface driver hub
[ 4.042793] usbcore: registered new device driver usb
[ 4.086112] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 4.108244] SCSI subsystem initialized
[ 4.121087] ehci-platform: EHCI generic platform driver
[ 4.141876] phy phy-usbphy.0: remote usb device wakeup disabled
[ 4.153690] phy phy-usbphy.0: UTMI 16bit 30MHz
[ 4.162559] ehci-platform 101c0000.ehci: EHCI Host Controller
[ 4.174046] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[ 4.189947] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[ 4.210226] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[ 4.223689] hub 1-0:1.0: USB hub found
[ 4.231601] hub 1-0:1.0: 1 port detected
[ 4.242885] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 4.256902] ohci-platform: OHCI generic platform driver
[ 4.267671] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
[ 4.281296] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[ 4.297186] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[ 4.335199] hub 2-0:1.0: USB hub found
[ 4.343172] hub 2-0:1.0: 1 port detected
[ 4.358637] usbcore: registered new interface driver usb-storage
[ 4.371403] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 4.390036] init: - preinit -
[ 4.888171] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 5.175805] hub 1-1:1.0: USB hub found
[ 5.189027] hub 1-1:1.0: 4 ports detected
[ 5.307942] random: procd: uninitialized urandom read (4 bytes read)
[ 5.879296] 8021q: adding VLAN 0 to HW filter on device eth0
[ 7.022609] mount_root: loading kmods from internal overlay
[ 7.070400] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[ 7.085422] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[ 7.430857] jffs2: notice: (412) jffs2_build_xattr_subsystem: complete building xattr subsystem, 11 of xdatum (3 unchecked, 8 orphan) and 44 of xref (8 dead, 0 orphan) found.
[ 7.462613] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[ 7.481700] block: extroot: not configured
[ 7.558686] jffs2: notice: (410) jffs2_build_xattr_subsystem: complete building xattr subsystem, 11 of xdatum (3 unchecked, 8 orphan) and 44 of xref (8 dead, 0 orphan) found.
[ 7.591524] mount_root: loading kmods from internal overlay
[ 7.638075] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[ 7.657585] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[ 7.876083] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[ 7.899202] block: extroot: not configured
[ 7.908607] mount_root: switching to jffs2 overlay
[ 7.952353] overlayfs: upper fs does not support tmpfile.
[ 7.968566] urandom-seed: Seeding with /etc/urandom.seed
[ 8.154703] procd: - early -
[ 8.160652] procd: - watchdog -
[ 8.702402] procd: - watchdog -
[ 8.709040] procd: - ubus -
[ 8.880475] random: ubusd: uninitialized urandom read (4 bytes read)
[ 8.895348] random: ubusd: uninitialized urandom read (4 bytes read)
[ 8.908666] random: ubusd: uninitialized urandom read (4 bytes read)
[ 8.922412] procd: - init -
[ 9.501033] kmodloader: loading kernel modules from /etc/modules.d/*
[ 9.535414] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 9.563130] Loading modules backported from Linux version v4.19.32-0-g3a2156c839c7
[ 9.578290] Backport generated by backports.git v4.19.32-1-0-g1c4f7569
[ 9.595832] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 9.617133] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[ 9.710798] xt_time: kernel timezone is -0000
[ 9.815419] PPP generic driver version 2.4.2
[ 9.827044] NET: Registered protocol family 24
[ 9.882492] ieee80211 phy0: rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'soc_wmac.eeprom'.
[ 9.907140] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[ 9.922647] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 7620 detected
[ 9.937103] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 10.047431] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 11.279944] urandom_read: 5 callbacks suppressed
[ 11.279954] random: jshn: uninitialized urandom read (4 bytes read)
[ 18.918437] 8021q: adding VLAN 0 to HW filter on device eth0
[ 18.951154] device eth0 entered promiscuous mode
[ 18.970250] br-lan: port 1(eth0.1) entered blocking state
[ 18.981088] br-lan: port 1(eth0.1) entered disabled state
[ 18.992228] device eth0.1 entered promiscuous mode
[ 19.068171] br-lan: port 1(eth0.1) entered blocking state
[ 19.079002] br-lan: port 1(eth0.1) entered forwarding state
[ 19.090564] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[ 20.083914] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 23.589136] ieee80211 phy0: rt2800_rf_self_txdc_cal: Info - RF Tx self calibration start
[ 23.605813] ieee80211 phy0: rt2800_rf_self_txdc_cal: Info - RF Tx self calibration end
[ 28.832382] ieee80211 phy0: rt2800_loft_iq_calibration: Info - LOFT Calibration Done!
[ 28.851958] ieee80211 phy0: rt2800_iq_search: Info - IQCalibration Start!
[ 28.879868] ieee80211 phy0: rt2800_iq_search: Info - IQCalibration Done! CH = 0, (gain= 3, phase=3c)
[ 28.898977] ieee80211 phy0: rt2800_iq_search: Info - IQCalibration Start!
[ 28.926879] ieee80211 phy0: rt2800_iq_search: Info - IQCalibration Done! CH = 1, (gain= 1, phase=3d)
[ 28.945108] ieee80211 phy0: rt2800_loft_iq_calibration: Info - TX IQ Calibration Done!
[ 28.976765] ieee80211 phy0: rt2800_rxiq_calibration: Info - RXIQ G_imb=0, Ph_rx=-3
[ 29.002101] ieee80211 phy0: rt2800_rxiq_calibration: Info - RXIQ G_imb=0, Ph_rx=0
[ 29.026772] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 29.061906] br-lan: port 2(wlan0) entered blocking state
[ 29.072598] br-lan: port 2(wlan0) entered disabled state
[ 29.083613] device wlan0 entered promiscuous mode
[ 32.779254] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 32.792196] br-lan: port 2(wlan0) entered blocking state
[ 32.802835] br-lan: port 2(wlan0) entered forwarding state
[ 51.054459] random: crng init done
and loaded modules:
root@OpenWrt:~# lsmod
cfg80211 231840 5 rt2x00lib,mt76x02_lib,mt7603e,mt76,mac80211
compat 6519 4 rt2800soc,rt2800pci,mac80211,cfg80211
crc_ccitt 1035 2 rt2800lib,ppp_async
crc_itu_t 1035 0
crc16 1031 1 ext4
crc32c_generic 1424 0
crypto_hash 10066 3 ext4,jbd2,crc32c_generic
eeprom_93cx6 2250 1 rt2800pci
ehci_hcd 34839 1 ehci_platform
ehci_platform 4656 0
ext4 376846 0
fat 51646 1 vfat
gpio_button_hotplug 6448 0
ip_tables 9997 4 iptable_nat,iptable_mangle,iptable_filter
ip6_tables 9793 24 ip6table_mangle,ip6table_filter
ip6t_REJECT 1072 2
ip6table_filter 688 1
ip6table_mangle 1200 0
ipt_MASQUERADE 720 1
ipt_REJECT 1008 2
iptable_filter 688 1
iptable_mangle 944 0
iptable_nat 752 1
jbd2 52354 1 ext4
leds_gpio 2928 0
ledtrig_usbport 2784 0
mac80211 457638 10 rt2800lib,mt76x0e,mt76x0_common,rt2x00soc,rt2x00pci,rt2x00lib,mt76x2e,mt76x02_lib,mt7603e,mt76
mbcache 3182 1 ext4
mt76 26532 6 mt76x0e,mt76x0_common,mt76x2e,mt76x2_common,mt76x02_lib,mt7603e
mt7603e 36257 0
mt76x0_common 29685 1 mt76x0e
mt76x02_lib 40081 4 mt76x0e,mt76x0_common,mt76x2e,mt76x2_common
mt76x0e 3665 0
mt76x2_common 11592 1 mt76x2e
mt76x2e 10481 0
nf_conntrack 57064 12 nf_conntrack_ipv6,ipt_MASQUERADE,xt_state,xt_nat,xt_conntrack,xt_REDIRECT,nf_nat_masquerade_ipv4,nf_conntrack_ipv4,nf_nat_ipv4,nf_nat,nf_flow_table,nf_conntrack_rtcache
nf_conntrack_ipv4 4368 10
nf_conntrack_ipv6 4576 4
nf_conntrack_rtcache 2640 0
nf_defrag_ipv4 1046 1 nf_conntrack_ipv4
nf_defrag_ipv6 4830 1 nf_conntrack_ipv6
nf_flow_table 13791 2 xt_FLOWOFFLOAD,nf_flow_table_hw
nf_flow_table_hw 2160 1
nf_log_common 2703 2 nf_log_ipv4,nf_log_ipv6
nf_log_ipv4 3504 0
nf_log_ipv6 4176 0
nf_nat 9483 4 xt_nat,nf_nat_redirect,nf_nat_masquerade_ipv4,nf_nat_ipv4
nf_nat_ipv4 3441 1 iptable_nat
nf_nat_masquerade_ipv4 1628 1 ipt_MASQUERADE
nf_nat_redirect 1499 1 xt_REDIRECT
nf_reject_ipv4 2147 1 ipt_REJECT
nf_reject_ipv6 2536 1 ip6t_REJECT
nls_base 5152 6 vfat,fat,nls_utf8,nls_iso8859_1,nls_cp437,usbcore
nls_cp437 4432 0
nls_iso8859_1 2896 0
nls_utf8 880 0
ohci_hcd 22658 1 ohci_platform
ohci_platform 4144 0
ppp_async 6896 0
ppp_generic 22626 3 pppoe,ppp_async,pppox
pppoe 8464 0
pppox 1386 1 pppoe
rt2800lib 122098 3 rt2800soc,rt2800pci,rt2800mmio
rt2800mmio 6164 2 rt2800soc,rt2800pci
rt2800pci 3776 0
rt2800soc 2560 0
rt2x00lib 38329 7 rt2800soc,rt2800pci,rt2800mmio,rt2800lib,rt2x00soc,rt2x00pci,rt2x00mmio
rt2x00mmio 2480 3 rt2800soc,rt2800pci,rt2800mmio
rt2x00pci 1714 1 rt2800pci
rt2x00soc 1234 1 rt2800soc
scsi_mod 97138 3 sg,usb_storage,sd_mod
sd_mod 30336 0
sg 21504 0
slhc 5243 1 ppp_generic
usb_common 2551 1 usbcore
usb_storage 39579 0
usbcore 130947 6 ledtrig_usbport,usb_storage,ohci_platform,ohci_hcd,ehci_platform,ehci_hcd
vfat 8592 0
x_tables 13839 23 ipt_REJECT,ipt_MASQUERADE,xt_time,xt_tcpudp,xt_state,xt_nat,xt_multiport,xt_mark,xt_mac,xt_limit,xt_conntrack,xt_comment,xt_TCPMSS,xt_REDIRECT,xt_LOG,xt_FLOWOFFLOAD,iptable_mangle,iptable_filter,ip_tables,ip6table_mangle,ip6table_filter,ip6_tables,ip6t_REJECT
xt_FLOWOFFLOAD 2816 0
xt_LOG 816 0
xt_REDIRECT 752 0
xt_TCPMSS 2832 0
xt_comment 528107
xt_conntrack 2352 12
xt_limit 1232 20
xt_mac 656 0
xt_mark 720 0
xt_multiport 1328 0
xt_nat 1584 0
xt_state 752 0
xt_tcpudp 1840 8
xt_time 1808 0
I think I have the good modules (mt76x0e) loaded, but nothings shows up in kernel messages. Do I need some firmware?
Thanks for your help!