26

Odp: Oolite-7620a

Odlutuj i odczytaj na programatorze. Chcesz programowo to też przez dd, a później poskładaj to odpowiednio w jeden plik żeby miał 32MB.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

27 (edytowany przez marcinwijata 2021-01-24 08:57:50)

Odp: Oolite-7620a

Jedna z propozycji, którą znalazłem jest taka:
https://forum.openwrt.org/t/solved-how- … outer/2996
ale wydaje mi się za bardzo skomplikowana i "dirty" jak sam autor napisał.
Jak zaaplikowąć polecenie "dd" , aby "zgarnęło" całą pamięć flash do jednego pliku.
Twój ostatni wpis to sugerował że tak można.
Poskładaj to odpowiednio.....
Masz tu na myśli bufor programatora, w którym będę mógł składać cały obraz z kliku plików, czy poskładanie jeszcze na poziomie zrzutu pamięci ?

EDIT: Płytka jest bardzo " gęsta " i nie chcę pamięci odlutowywać - ryzyko uszkodzenia, zepsucia płytki.

28 (edytowany przez Cezary 2021-01-24 09:35:08)

Odp: Oolite-7620a

Nie masz tam jednej partycji obejmującej cały flash, więc zgrywasz poszczególne partycje (0/1/2/3) i łączysz je ze sobą (zwykłe cat pod linuksem lub copy /b pod windowsem). Coś za bardzo kombinujesz.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

29 (edytowany przez marcinwijata 2021-01-24 23:50:26)

Odp: Oolite-7620a

Wykonałem jak wskazałeś:

root@OpenWrt:~# sysupgrade -n -F /tmp/openwrt-19.07-snapshot-r11267-b14eeccdfe-ramips-mt7620-zbt-we826-32M-squashfs-sysupgrade.bin
Image metadata not found
Image check failed but --force given - will update anyway!
Commencing upgrade. Closing all shell sessions.

Zrobiłem restart systemu ( po kilku minutach, min 4 min ) i wstał na starym, jak gdyby nic się nie zmieniło

Plik usunął z katalogu tmp, po restarcie go nie widzę

30

Odp: Oolite-7620a

Więc nie zrobił tego, a dlaczego - patrz już na konsoli szeregowej. Zawsze możesz spróbować wgrać obraz przez bootloader (ta opcja 2).

Robisz rzecz wysoce eksperymentalną więc nie dziw się że coś nie działa lub działa inaczej.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

31 (edytowany przez marcinwijata 2021-01-25 10:26:02)

Odp: Oolite-7620a

Dziękuję,
wywołam cały proces z konsoli UART zobaczę co wtedy się wydarzy. Teraz było po SSH/Ethernet.
Kiedy to zrobiłem po SSH/Ethernet na konsoli szeregoej było cicho, miałem ją na podglądzie.
A... czy jest możliwe że obecny firmware ma jakiegoś lock-a założonego ?

32

Odp: Oolite-7620a

Wiesz, równie dobrze może coś sprawdzać przy aktualizacji i nie pozwala na wykonanie tego dopóki nie masz odpowiedniego firmware. Zobacz przez serial co się dzieje, zobacz czy możesz wgrać przez bootloader.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

33

Odp: Oolite-7620a

Są postępy, kiedy wydałem rozkaz z konsoli UART:

root@OpenWrt:/#  sysupgrade -n -F /tmp/openwrt-19.07-snapshot-r11267-b14eeccdfe-
ramips-mt7620-zbt-we826-32M-squashfs-sysupgrade.bin
Sysupgrade is not yet supported on oolite-7620a.
Image check 'platform_check_image' failed but --force given - will update anyway                    !
killall: watchdog: no process killed
Sending TERM to remaining processes ... udhcpc ntpd dnsmasq ubusd logd netifd od                    hcpd uhttpd
Sending KILL to remaining processes ...
Switching to ramdisk...
Performing system upgrade...
Unlocking firmware ...

Writing from <stdin> to firmware ...  [[w]                                     ]
Upgrade completed
Rebooting s[  232.690000] Restarting system.

Dmesg

[    0.000000] Linux version 4.14.212 (cezary@eko.one.pl) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r11261-3f5fecfd33)) #0 Thu Dec 17 14:51:43 2020
[    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:6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is ZBT-WE826 (32M)
[    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 80484730, 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 0x80487740 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=ttyS0,115200 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=0004000f
[    0.000000] Readback ErrCtl register=0004000f
[    0.000000] Memory: 123780K/131072K available (3943K kernel code, 181K rwdata, 504K rodata, 1188K init, 215K bss, 7292K 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.000012] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015490] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.087736] pid_max: default: 32768 minimum: 301
[    0.097139] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110165] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.130298] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.149780] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.161954] pinctrl core: initialized pinctrl subsystem
[    0.173585] NET: Registered protocol family 16
[    0.440750] mt7620-pci 10140000.pcie: PCIE0 no card, disable it(RST&CLK)
[    0.453993] mt7620-pci: probe of 10140000.pcie failed with error -1
[    0.484651] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.495692] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.508277] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.519277] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[    0.531864] rt2880_gpio 10000688.gpio: registering 1 gpios
[    0.542691] rt2880_gpio 10000688.gpio: registering 1 irq handlers
[    0.560101] clocksource: Switched to clocksource systick
[    0.571763] NET: Registered protocol family 2
[    0.581307] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.595095] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.607686] TCP: Hash tables configured (established 1024 bind 1024)
[    0.620470] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.631994] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.644690] NET: Registered protocol family 1
[    0.653274] PCI: CLS 0 bytes, default 32
[    0.656112] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    0.668853] Crashlog allocated RAM at address 0x3f00000
[    0.681027] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.699737] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.711248] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.741592] io scheduler noop registered
[    0.749234] io scheduler deadline registered (default)
[    0.760516] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.776004] console [ttyS0] disabled
[    0.783068] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    0.802747] console [ttyS0] enabled
[    0.809796] bootconsole [early0] disabled
[    0.826230] spi spi0.0: force spi mode3
[    0.841952] m25p80 spi0.0: w25q256 (32768 Kbytes)
[    0.846807] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.853323] Creating 4 MTD partitions on "spi0.0":
[    0.858222] 0x000000000000-0x000000030000 : "u-boot"
[    0.864251] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.870608] 0x000000040000-0x000000050000 : "factory"
[    0.876620] 0x000000050000-0x000002000000 : "firmware"
[    0.885789] 2 uimage-fw partitions found on MTD device firmware
[    0.891912] Creating 2 MTD partitions on "firmware":
[    0.896992] 0x000000000000-0x000000180a08 : "kernel"
[    0.902972] 0x000000180a08-0x000001fb0000 : "rootfs"
[    0.908843] mtd: device 5 (rootfs) set to be root filesystem
[    0.916303] 1 squashfs-split partitions found on MTD device rootfs
[    0.922701] 0x000000460000-0x000001fb0000 : "rootfs_data"
[    0.929935] libphy: Fixed MDIO Bus: probed
[    0.943229] gsw: setting port4 to ephy mode
[    0.947551] mtk_soc_eth 10100000.ethernet eth0 (uninitialized): port 2 link up (100Mbps/Full duplex)
[    0.957144] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    0.963940] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    0.973104] rt2880_wdt 10000120.watchdog: Initialized
[    0.979608] NET: Registered protocol family 10
[    0.988737] Segment Routing with IPv6
[    0.992672] NET: Registered protocol family 17
[    0.997266] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.010523] 8021q: 802.1Q VLAN Support v1.8
[    1.016391] hctosys: unable to open rtc device (rtc0)
[    1.033012] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.046817] Freeing unused kernel memory: 1188K
[    1.051492] This architecture does not have kernel memory protection.
[    2.640057] random: fast init done
[    2.809057] init: Console is alive
[    2.812887] init: - watchdog -
[    6.005486] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.309755] usbcore: registered new interface driver usbfs
[    6.315542] usbcore: registered new interface driver hub
[    6.321123] usbcore: registered new device driver usb
[    6.358542] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.373684] SCSI subsystem initialized
[    6.383093] ehci-platform: EHCI generic platform driver
[    6.398818] phy phy-usbphy.0: remote usb device wakeup disabled
[    6.404896] phy phy-usbphy.0: UTMI 16bit 30MHz
[    6.409448] ehci-platform 101c0000.ehci: EHCI Host Controller
[    6.415415] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[    6.423644] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[    6.437032] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[    6.444463] hub 1-0:1.0: USB hub found
[    6.448796] hub 1-0:1.0: 1 port detected
[    6.456190] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    6.464194] ohci-platform: OHCI generic platform driver
[    6.469898] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
[    6.476860] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[    6.485112] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[    6.518908] hub 2-0:1.0: USB hub found
[    6.523188] hub 2-0:1.0: 1 port detected
[    6.567115] usbcore: registered new interface driver usb-storage
[    6.582856] usbcore: registered new interface driver uas
[    6.588975] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.597984] init: - preinit -
[    6.739145] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    6.868742] mmc0: new high speed SDHC card at address aaaa
[    6.879907] mmcblk0: mmc0:aaaa SC16G 14.8 GiB
[    6.894167]  mmcblk0: p1
[    6.955748] random: procd: uninitialized urandom read (4 bytes read)
[    6.962826] hub 1-1:1.0: USB hub found
[    6.968162] hub 1-1:1.0: 4 ports detected
[    8.463140] 8021q: adding VLAN 0 to HW filter on device eth0
[    9.784835] mount_root: loading kmods from internal overlay
[    9.829808] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[    9.838598] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   12.699561] block: attempting to load /etc/config/fstab
[   12.705339] block: unable to load configuration (fstab: Entry not found)
[   12.712359] block: no usable configuration
[   12.717590] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   12.763243] urandom-seed: Seed file not found (/etc/urandom.seed)
[   12.874174] procd: - early -
[   12.877245] procd: - watchdog -
[   13.588707] procd: - watchdog -
[   13.592286] procd: - ubus -
[   13.892071] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.992775] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.999917] random: ubusd: uninitialized urandom read (4 bytes read)
[   14.007561] procd: - init -
[   15.000513] kmodloader: loading kernel modules from /etc/modules.d/*
[   15.054368] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   15.083537] Loading modules backported from Linux version v4.19.161-0-gdaefdc9eb24b
[   15.091445] Backport generated by backports.git v4.19.161-1-0-g4bb568fe
[   15.128968] ip_tables: (C) 2000-2006 Netfilter Core Team
[   15.155614] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   15.308856] xt_time: kernel timezone is -0000
[   15.563713] PPP generic driver version 2.4.2
[   15.579194] urngd: jent-rng init failed, err: 2
[   15.585897] NET: Registered protocol family 24
[   15.629094] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[   15.636577] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[   15.644495] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 7620 detected
[   15.652277] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   15.676061] kmodloader: done loading kernel modules from /etc/modules.d/*
[   52.789370] 8021q: adding VLAN 0 to HW filter on device eth0
[   52.820101] br-lan: port 1(eth0.1) entered blocking state
[   52.825628] br-lan: port 1(eth0.1) entered disabled state
[   52.831594] device eth0.1 entered promiscuous mode
[   52.836491] device eth0 entered promiscuous mode
[   52.899852] br-lan: port 1(eth0.1) entered blocking state
[   52.905380] br-lan: port 1(eth0.1) entered forwarding state
[   55.404990] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   55.420684] jffs2_build_filesystem(): unlocking the mtd device...
[   55.420846] done.
[   55.429192] jffs2_build_filesystem(): erasing all blocks after the end marker...
[   99.728967] random: crng init done
[   99.740082] random: 6 urandom warning(s) missed due to ratelimiting

Problemy: odrzuca połączenie przez stronkę - nie mogę się zalogować do LuCi. Może powinienem kliknąć jakiś reset ustawień z konsoli.

34

Odp: Oolite-7620a

Przecież ty wgrałeś wersję bez luci, więc jak niby chcesz się zalogować przez stronkę? Masz dokładnie to co wgrałeś, jak byś wgrał obraz z luci to mógłbyś sie zalogować przez www.

Wgraj sobie obraz z luci jeżeli taki chcesz.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

35 (edytowany przez marcinwijata 2021-01-25 23:00:20)

Odp: Oolite-7620a

Podpowiedz poproszę , który to będzie, wybacz pytanie.
Buszuję głównie tu: https://dl.eko.one.pl/openwrt-19.07/tar … ps/mt7620/

Edit:
Nawet LED-y działają....to chyba był jakiś klon tego ZBT-WE826 smile

BusyBox v1.30.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------------------------------
 |                                                                           |
 | OpenWrt 19.07-SNAPSHOT, r11267-b14eeccdfe                                 |
 |                                                                           |
 | Build time: 2020-12-18 15:00 CET                                          |
 | Cezary Jackiewicz (obsy), http://eko.one.pl                               |
 |                                                                           |
 -----------------------------------------------------------------------------
 | Machine: ZBT-WE826 (32M)                                                  |
 | Uptime: 0d, 00:26:56                                                      |
 | Load: 0.08 0.27 0.31                                                      |
 | Flash: total: 27.3MB, free: 21.4MB, used: 22%                             |
 | Memory: total: 122.0MB, free: 101.6MB, used: 16%                          |
 | Leases: 0                                                                 |
 | lan: static, 192.168.1.1                                                  |
 | wan: dhcp, ?                                                              |
 | wan6: dhcpv6, ?                                                           |
 -----------------------------------------------------------------------------
 === WARNING! ================================================================
 There is no root password defined on this device!
 Use the "passwd" command to set up a new password
 in order to prevent unauthorized SSH logins.
 -----------------------------------------------------------------------------

36

Odp: Oolite-7620a

Nawet informację masz z tym katalogu że to bez luci jest.

A jakbyś wszedł poziom wyżej miałbyś obrazy z luci: https://dl.eko.one.pl/luci/openwrt-19.07/ramips/mt7620/

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

37 (edytowany przez marcinwijata 2021-01-26 10:08:50)

Odp: Oolite-7620a

Zainstalowałem wersję z LuCi. Podczas instalacji włożone były: karta microSD i pendrive USB.
Napotkałem następujące problemy:
Zauważyłem bardzo duże obciązenie na procesach związanych z USB i SPI:

 2491  2488 root     R     1124   1%  73% mount_root done
  201     2 root     SW       0   0%  24% [spi0]

Potem włączyłem automount w fstab, ale nic to nie zmieniło
Jakieś dziwnie dużo dostępnej pamięci:

 | Build time: 2021-01-25 11:58 CET                                          |
 | Cezary Jackiewicz (obsy), [url]http://eko.one.pl[/url]                               |
 |                                                                           |
 -----------------------------------------------------------------------------
 | Machine: ZBT-WE826 (32M)                                                  |
 | Uptime: 0d, 00:05:16                                                      |
 | Load: 2.47 1.48 0.66                                                      |
 | Flash: total: 61.0MB, free: 60.9MB, used: 0%                              |
 | Memory: total: 122.0MB, free: 102.5MB, used: 15%                          |
 | Leases: 1                                                                 |
 | lan: static, 192.168.1.1                                                  |
 | wan: dhcp, ?                                                              |
 | wan6: dhcpv6, ?                                                           |
 -----------------------------------------------------------------------------
 === WARNING! ================================================================
 There is no root password defined on this device!
 Use the "passwd" command to set up a new password
 in order to prevent unauthorized SSH logins.
 -----------------------------------------------------------------------------
root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 5.5M      5.5M         0 100% /rom
tmpfs                    61.0M    380.0K     60.6M   1% /tmp
tmpfs                    61.0M    116.0K     60.9M   0% /tmp/root
overlayfs:/tmp/root      61.0M    116.0K     60.9M   0% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@OpenWrt:~#

Chciałem wrócić do poprzedniego obrazu bez LuCi ale jakiś problem się pojawił

root@OpenWrt:/# sysupgrade -n -F /tmp/openwrt-19.07-snapshot-r11267-b14eeccdfe-r
amips-mt7620-zbt-we826-32M-squashfs-sysupgrade.bin
Commencing upgrade. Closing all shell sessions.
Watchdog handover: fd=3
- watchdog -
killall: telnetd: no process killed
Sending TERM to remaining processes ... logd rpcd netifd sh odhcpd uhttpd dnsmasq sh mount_root ubus ubusd
Sending KILL to remaining processes ... mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root
Failed to kill all processes.
s[   82.389597] jffs2_build_filesystem(): erasing all blocks after the end marker...
ysupgrade aborte[  210.323753] reboot: Restarting system
d with return code: 256

38

Odp: Oolite-7620a

Żadne obciążenie. On jeszcze jffs robił i trzeba było go zostawić parę minut. Masz tam 32MB, a przerobienie go na jffs trwa parę ładnych minut tym bardziej że pewnie masz tam najtańszy możliwy flash i tym samym dość wolny.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

39

Odp: Oolite-7620a

Czyli odpalam i zostawiam na jakiś czas, niech mieli. Czy taki następny ruch ?

40

Odp: Oolite-7620a

Dokładnie. Po wgraniu lub resecie do fabrycznych masz go zostawić na parę minut w spokoju. Aż się jffs zrobi (wypisuje to w logach) lub właśnie widać będzie po obciążeniu że skończył robić swoje.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

41 (edytowany przez marcinwijata 2021-01-26 16:24:56)

Odp: Oolite-7620a

Wszystko zadziałało zgodnie z tym co napisałeś.
Próbuję zainstalować ffmpega i mam takie info:

Installing ffmpeg (3.4.7-3) to root...
Installing libffmpeg-full (3.4.7-3) to root...
Configuring libffmpeg-full.
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for ffmpe                                                                                                                               g:
 *      zlib
 *      libbz2-1.0
 *      alsa-lib
 *      shine
 * opkg_install_cmd: Cannot install package ffmpeg.

Jakie pakiety powinienem uzupełnić, aby to poszło dalej?

42

Odp: Oolite-7620a

Napisał to:
       zlib
       libbz2-1.0
       alsa-lib
       shine

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

43

Odp: Oolite-7620a

Raport końcowy:
Wszystkie założenia udało się zrealizować. Wychodzi na to, że GS-RMA5320 MT7620A     32m flash 128mddr  to klon ZBT-WE826 - 32M.
Ruszyło wszystko: modem LTE, SD, WIFI, diody LED.
Nie sprawdzałem resetu z guzika.
Podałem kilka obrazów testowych przez ładowanie  z TFTP, ale żaden z nich nie aktywował mi ttyS1 a bardzo mi się przyda do moich eksperymentów.

Dlaczego byłem taki zapobiegawczy: nie zajmowałem się do tej pory odzyskiwaniem routera z obrazu systemu a mam tylko jeden egz.GS-RMA5320. Przyjąłem porządną dawkę wiedzy od Was, od Cezarego. Dziękuję za nią. Za chwilę postawię kolejne zagadnienie związane z tym modułem

44 (edytowany przez marcinwijata 2021-01-31 14:43:51)

Odp: Oolite-7620a

Znalazłem takie wpisy w necie dotyczące aktywacji ttyS1 w dts, dtsi ale żaden z nich nie dał pozytywnego rezultatu
ttyS1:
https://dev.archive.openwrt.org/ticket/19700
https://www.programmersought.com/article/36903421943/
https://stackoverflow.com/questions/304 … evice-tree
https://forum.archive.openwrt.org/viewt … p?id=61450

Polecenie

dmesg | grep tty

Dawało zawsze taki wynik na naszych eksperymentalnych kompilacjach:

root@OpenWrt:/# dmesg | grep tty
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.775551] console [ttyS0] disabled
[    0.782614] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    0.802293] console [ttyS0] enabled

nigdzie ani śladu po ttyS1
takie samo polecenie na Twoim obrazie Cezary z LuCi

root@OpenWrt:/# dmesg | grep tty
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.775551] console [ttyS0] disabled
[    0.782614] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    0.802293] console [ttyS0] enabled

Czyli tak samo
ale jak popatrzę w dev-y to widzę coś takiego

ls /dev

już widzi tyle:

root@OpenWrt:/# ls /dev
bus                 mtd5                ttyS0
cdc-wdm0            mtd5ro              ttyS1
console             mtd6                ttyS10
cpu_dma_latency     mtd6ro              ttyS11
full                mtdblock0           ttyS12
fuse                mtdblock1           ttyS13
gpiochip0           mtdblock2           ttyS14
gpiochip1           mtdblock3           ttyS15
gpiochip2           mtdblock4           ttyS2
hwrng               mtdblock5           ttyS3
kmsg                mtdblock6           ttyS4
log                 net                 ttyS5
memory_bandwidth    network_latency     ttyS6
mmcblk0             network_throughput  ttyS7
mmcblk0p1           null                ttyS8
mtd0                port                ttyS9
mtd0ro              ppp                 ttyUSB0
mtd1                ptmx                ttyUSB1
mtd1ro              pts                 ttyUSB2
mtd2                random              ttyUSB3
mtd2ro              sda                 urandom
mtd3                sda1                watchdog
mtd3ro              shm                 watchdog0
mtd4                snd                 zero
mtd4ro              tty

Zastanawiam się co źle robimy, czy to składnia dts, dtsi jest niewłaściwie użyta, czy coś innego ?

45

Odp: Oolite-7620a

&uart {
status = "okay";
};

Dodaj do dtsu i zrekompiluj.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

46

Odp: Oolite-7620a

Zbudowałem 2 obrazy z dopisaniem fragmentu &uart {....  raz do "target/linux/ramips/dts/ZBT-WE826-32M.dts", raz do "target/linux/ramips/dts/MT7620a.dts", ale wynik bez oczekiwanego wpisu [ttyS1] enabled

Openwrt buduję z źródła wskazanego przez producenta: https://github.com/GainStrongService/le … ite-mt7620
W menuconfig ustawiam tak:

  • Target System: MediaTek Ralink MIPS

  • Subtarget: MT7620 based boards

  • Target Profile: Zbtlink ZBT-WE826 (32M)

Jak powinienem zmodyfikować ten wpis do dtsu? Może ten uart dla ttyS1 nie jest tam wcale zadeklarowany?

47

Odp: Oolite-7620a

Do ZBT-WE826-32M.dts jeżeli taki budujesz. Nigdzie indziej.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

48

Odp: Oolite-7620a

Ok, tak więc do ZBT-WE826-32M.dts dodałem

&uart {
    status = "okay";
};

Próbowałem dojść co może być nie tak, widzę że do tego pliku dts include'owany jest ZBT-WE826.dtsi, a w nim z kolei jest include'owany mt7620a.dtsi. W tym ostatnim jest sekcja aliasów:

aliases {
        spi0 = &spi0;
        spi1 = &spi1;
        serial0 = &uartlite;
    };

Jest tam tylko serial0, nie widzę w nim kolejnego uarta który mógłbym podać dla serial1. Wspierałem się tutaj tym wątkiem: https://stackoverflow.com/questions/189 … e-dts-file

Czy to dobry kierunek?

49

Odp: Oolite-7620a

No dokładnie, a w mt7620a.dts masz już definicję uart oraz uartlite. Uart jest domyślnie wyłączony.

Co ty w ogóle chcesz zrobić?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

50

Odp: Oolite-7620a

Chciałbym doprowadzić do sytuacji w której aktywne będą 2 seriale: S0 - tak jak do tej pory, S1 - jak na razie nie udało się doprowadzić do jego odblokowania, ale po dodaniu aliasu

aliases {
        spi0 = &spi0;
        spi1 = &spi1;
        serial0 = &uartlite;
        serial1 = &uart;
    };

pojawiło się już o nim jakieś info w dmesgu

root@OpenWrt:/# dmesg | grep ttyS
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.773644] 10000500.uart: ttyS1 at MMIO 0x10000500 (irq = 13, base_baud = 2500000) is a Palmchip BK-3103
[    0.793357] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    0.813038] console [ttyS0] enabled