126

Odp: Netgear LBR20 Orbi

Tylko w miejsce gdzie zte są ( czyli mf286d np )   , czy raczej np buffalo wtr-m2133hp) ?
Niestety ale tu już mnie niewiedza przytłacza , jak dziecko we mgle jestem...

127

Odp: Netgear LBR20 Orbi

Tak, dobry pomysł  z tym buffalo m2133hp ma system w nand i w ubi, więc możesz się na nim wzorować.

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

128

Odp: Netgear LBR20 Orbi

Ale czy jest potrzeba robienia tego ubi? Nie lepiej zachować aktualny układ?

129

Odp: Netgear LBR20 Orbi

UBI dla ochorony nand przez zaoraniem.

GL.iNet GL-MT6000 + 2x AP_Xiaomi AX3000T

130

Odp: Netgear LBR20 Orbi

Więc lepiej żeby było ubi.

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

131 (edytowany przez MiG25 2024-01-24 23:02:38)

Odp: Netgear LBR20 Orbi

Więc coś próbuję z ubi... Na razie wyszło takie coś bez img... ( tu w generic.mk trzeba ręcznie pewnie opisać ,żeby się stworzyło).

Oczywicie sysupgrade się nie chce zrobić , ale ubiattach tak ( o ile wcześniej tą patycję ubi wyczyścimy "mtd erase ubi" )

[    2.012164] DSA: tree 0 setup
[    2.017234] ubi0: attaching mtd22
[    2.212030] ubi0: scanning is finished
[    2.212077] ubi0: empty MTD device detected
[    2.231650] ubi0: attached mtd22 (name "ubi", size 60 MiB)
[    2.231703] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    2.236052] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    2.242951] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    2.249782] ubi0: good PEBs: 480, bad PEBs: 0, corrupted PEBs: 0
[    2.256534] ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
[    2.262813] ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 1597702326
[    2.269838] ubi0: available PEBs: 436, total reserved PEBs: 44, PEBs reserved for bad PEB handli▒[    2.316430] Freeing unused kernel image (initmem) memory: 15360K

Jest info o ubi:

root@OpenWrt:/# ubinfo -a
UBI version:                    1
Count of UBI devices:           1
UBI control device major/minor: 10:126
Present UBI devices:            ubi0

ubi0
Volumes count:                           0
Logical eraseblock size:                 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks:     480 (60948480 bytes, 58.1 MiB)
Amount of available logical eraseblocks: 436 (55361536 bytes, 52.7 MiB)
Maximum count of volumes                 128
Count of bad physical eraseblocks:       0
Count of reserved physical eraseblocks:  40
Current maximum erase counter value:     1
Minimum input/output unit size:          2048 bytes
Character device major/minor:            246:0

Ale sysupgrade się nie chce zrobić:

root@OpenWrt:/# cd /tmp
root@OpenWrt:/tmp# sysupgrade -n openwrt-ipq40xx-generic-netgear_lbr20-squashfs-
sysupgrade.bin
Thu Jan  1 00:07:34 UTC 1970 upgrade: Commencing upgrade. Closing all shell sessions.
Watchdog handover: fd=3
- watchdog -
Watchdog did not previously reset the system
Thu Jan  1 00:07:34 UTC 1970 upgrade: Sending TERM to remaining processes ...
Thu Jan  1 00:07:39 UTC 1970 upgrade: Sending KILL to remaining processes ...
[  465.210682] stage2 (2338): drop_caches: 3
Thu Jan  1 00:07:45 UTC 1970 upgrade: Switching to ramdisk...
Thu Jan  1 00:07:47 UTC 1970 upgrade: Performing system upgrade...
grep: /sys/block/mmcblk*/mmcblk*p*/uevent: No such file or directory
grep: /sys/block/mmcblk*/mmcblk*p*/uevent: No such file or directory
Upgrade failed: kernel partition not found! R▒

Zaktualizowaem gita , no i pliki też są na mediafire.

132

Odp: Netgear LBR20 Orbi

A przy okazji , żeby orginał wstawał wystarczy całą patycję ntgrdata wyczyścić z uboota komendą

nand erase 0x1300000 0xa600000

Nawet pierwszy raz później przy konfiguracji pytał się wtedy , czy może zbierać dane ...  Później po przywróceniu ustawień fabrycznych już o to się nie pyta .... więc pewnie stąd w jednej z partycji tekst "unreal Turment..."

133

Odp: Netgear LBR20 Orbi

MiG25 napisał/a:

Ale sysupgrade się nie chce zrobić:

root@OpenWrt:/# cd /tmp
root@OpenWrt:/tmp# sysupgrade -n openwrt-ipq40xx-generic-netgear_lbr20-squashfs-
sysupgrade.bin
Thu Jan  1 00:07:34 UTC 1970 upgrade: Commencing upgrade. Closing all shell sessions.
Watchdog handover: fd=3
- watchdog -
Watchdog did not previously reset the system
Thu Jan  1 00:07:34 UTC 1970 upgrade: Sending TERM to remaining processes ...
Thu Jan  1 00:07:39 UTC 1970 upgrade: Sending KILL to remaining processes ...
[  465.210682] stage2 (2338): drop_caches: 3
Thu Jan  1 00:07:45 UTC 1970 upgrade: Switching to ramdisk...
Thu Jan  1 00:07:47 UTC 1970 upgrade: Performing system upgrade...
grep: /sys/block/mmcblk*/mmcblk*p*/uevent: No such file or directory
grep: /sys/block/mmcblk*/mmcblk*p*/uevent: No such file or directory
Upgrade failed: kernel partition not found! R▒

Zaktualizowaem gita , no i pliki też są na mediafire.

To są stare kody od platform/upgrade dla netgeara. Chyba pokazałeś upgrade starej wersji, dopiero w buildzie który zbudowałeś masz właściwy upgrade, tak?

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

134

Odp: Netgear LBR20 Orbi

Ten sysupgrade był robiony na najnowszym buildzie.

135

Odp: Netgear LBR20 Orbi

To sprawdź jeszcze raz, bo kod który się wyświelił pochodzi z szukania partycji mmc, więc nie z tego co powinno być wołane.

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

136 (edytowany przez MiG25 2024-01-25 07:27:42)

Odp: Netgear LBR20 Orbi

Masz racię , tym razem obraz stworzył się o nazwie *uImage*" , a ja z rozpędu wgrywałem *zImage* , przez co wgrał się stary...
Nowy wykonuje chyba to co należy:

root@OpenWrt:/tmp# sysupgrade -n openwrt-ipq40xx-generic-netgear_lbr20-squashfs-
sysupgrade.bin
Thu Jan  1 00:03:28 UTC 1970 upgrade: Commencing upgrade. Closing all shell sessions.
Watchdog handover: fd=3
- watchdog -
Watchdog did not previously reset the system
Thu Jan  1 00:03:28 UTC 1970 upgrade: Sending TERM to remaining processes ...
Thu Jan  1 00:03:28 UTC 1970 upgrade: Sending signal TERM to netifd (1290)
Thu Jan  1 00:03:32 UTC 1970 upgrade: Sending KILL to remaining processes ...
Thu Jan  1 00:03:32 UTC 1970 upgrade: Sending signal KILL to netifd (1290)
[  221.264966] stage2 (2380): drop_caches: 3
Thu Jan  1 00:03:41 UTC 1970 upgrade: Switching to ramdisk...
Thu Jan  1 00:03:43 UTC 1970 upgrade: Performing system upgrade...
verifying sysupgrade tar file integrity
Volume ID 0, size 37 LEBs (4698112 bytes, 4.4 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "kernel", alignment 1
Volume ID 1, size 39 LEBs (4952064 bytes, 4.7 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs", alignment 1
Set volume size to 45711360
Volume ID 2, size 360 LEBs (45711360 bytes, 43.5 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs_data", alignment 1
sysupgrade successful
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource ▒

ale to nie pozwala na start , odpalają się o kolei nmrp i tftp do ściągnięcia fw , a na koniec ,że nie znajduje kernel image:

U-boot dni1 V0.1 for DNI HW ID: 29766182; NOR flash 0MB; NAND flash 256MB; RAM 512MB
smem ram ptable found: ver: 1 len: 3
DRAM:  512 MiB
machid : 0x8010001
NAND:  ID = 9590dac2
Vendor = c2
Device = da
ONFI device found
SF NAND unsupported id:ff:ff:ff:ffSF: Unsupported manufacturer ff
ipq_spi: SPI Flash not found (bus/cs/speed/mode) = (0/0/48000000/0)
256 MiB
MMC:   qca_mmc: 0
*** Warning - bad CRC, using default environment

PCI0 Link Intialized
In:    serial
Out:   serial
Err:   serial
Valid chip addresses: 27 48
machid: 8010001
flash_type: 2
Net:    131072 bytes read: OK
MAC0 addr:34:98:b5:93:78:e8
PHY ID1: 0x4d
PHY ID2: 0xd0b2
ipq40xx_ess_sw_init done
eth0
Hit any key to stop autoboot:  0
eth0 PHY0 Down Speed :10 Half duplex
eth0 PHY1 Down Speed :10 Half duplex
eth0 PHY2 Down Speed :10 Half duplex
eth0 PHY3 Down Speed :10 Half duplex
eth0 PHY4 Down Speed :10 Half duplex

 nmrp server is stopped or failed !
Loading DNI firmware for checking...
Loading firmware 1 ...

NAND read: device 0 offset 0xa600000, size 0x20000
 131072 bytes read: OK

NAND read: device 0 offset 0xa600000, size 0x1020000
 16908288 bytes read: OK
rootfs imge header corrupted !
Loading firmware 2 ...

NAND read: device 0 offset 0xa600000, size 0x20000
 131072 bytes read: OK

NAND read: device 0 offset 0xa600000, size 0x1020000
 16908288 bytes read: OK
rootfs imge header corrupted !
eth0 PHY0 Down Speed :10 Half duplex
eth0 PHY1 Down Speed :10 Half duplex
eth0 PHY2 Down Speed :10 Half duplex
eth0 PHY3 Down Speed :10 Half duplex
eth0 PHY4 Down Speed :10 Half duplex

Firmware recovering from TFTP server is stopped or failed! :(
Wrong Image Format for bootm command
eth0 PHY0 Down Speed :10 Half duplex
eth0 PHY1 Down Speed :10 Half duplex
eth0 PHY2 Down Speed :10 Half duplex
eth0 PHY3 Down Speed :10 Half duplex
eth0 PHY4 Down Speed :10 Half duplex

Firmware recovering from TFTP server is stopped or failed! :(
ERROR: can't get kernel image!
(IPQ40xx) #

Po uruchomieniu jeszcze raz initramfs ubi wygląda tak :

root@OpenWrt:/# ubinfo -a
UBI version:                    1
Count of UBI devices:           1
UBI control device major/minor: 10:126
Present UBI devices:            ubi0

ubi0
Volumes count:                           3
Logical eraseblock size:                 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks:     480 (60948480 bytes, 58.1 MiB)
Amount of available logical eraseblocks: 0 (0 bytes)
Maximum count of volumes                 128
Count of bad physical eraseblocks:       0
Count of reserved physical eraseblocks:  40
Current maximum erase counter value:     2
Minimum input/output unit size:          2048 bytes
Character device major/minor:            246:0
Present volumes:                         0, 1, 2

Volume ID:   0 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        37 LEBs (4698112 bytes, 4.4 MiB)
State:       OK
Name:        kernel
Character device major/minor: 246:1
-----------------------------------
Volume ID:   1 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        39 LEBs (4952064 bytes, 4.7 MiB)
State:       OK
Name:        rootfs
Character device major/minor: 246:2
-----------------------------------
Volume ID:   2 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        360 LEBs (45711360 bytes, 43.5 MiB)
State:       OK
Name:        rootfs_data
Character device major/minor: 246:3
root@OpenWrt:/#

Czy to uboot nie potrafi z czegos takiego wystartować i musi być squashfs ?

137 (edytowany przez Cezary 2024-01-25 07:37:46)

Odp: Netgear LBR20 Orbi

Kernel wpakowałeś też w wolumin ubifs. Być może kernel trzeba włożyć normalnie w osobną partycję o nazwie kernel a sam system plików tylko obudować voluminem ubifs.

Odkomentuj macro KERNEL_IN_UBI i nie podstawiaj wartości, czyli zrób

KERNEL_IN_UBI :=

I takie coś skompiluj.

EDIT: ehh, ale to tez oznacza ze musisz wydzielić oddzielenie partycję nazwie kernel i dać jej jakąś tam wielkość.

EDIT2: sprawdź czy można władować obraz openwrt przez nmrp. Dobrze by było żeby można to wgrać bezinwazyjnie bez rozbierania urządzenia (lub przez gui netgeara).

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

138 (edytowany przez MiG25 2024-01-25 07:42:36)

Odp: Netgear LBR20 Orbi

Dało się wgrać obraz przez nmrp ( te pierwsze próby , gdzie overlay na początku był a po resecie ginął to były wgrane przez nmrp , przez sysupgrade z initramfs do tej pory nie udało się uruchomić.
Teraz dodałem linijki , żeby utworzył obraz img ,to zobaczymy co wyjdzie po wgraniu.

139 (edytowany przez MiG25 2024-01-25 08:15:38)

Odp: Netgear LBR20 Orbi

Ten img stworzony po wgraniu nmrp za pierwzym razem się uruchamia , wszystko jest ok ....

 nmrp server is stopped or failed !
Loading DNI firmware for checking...
Loading firmware 1 ...

NAND read: device 0 offset 0xa600000, size 0x20000
 131072 bytes read: OK

NAND read: device 0 offset 0xa600000, size 0x480000
 4718592 bytes read: OK
rootfs imge header corrupted !
Loading firmware 2 ...

NAND read: device 0 offset 0xa600000, size 0x20000
 131072 bytes read: OK

NAND read: device 0 offset 0xa600000, size 0x480000
 4718592 bytes read: OK
rootfs imge header corrupted !
eth0 PHY0 Down Speed :10 Half duplex
eth0 PHY1 Down Speed :10 Half duplex
eth0 PHY2 Down Speed :10 Half duplex
eth0 PHY3 Down Speed :10 Half duplex
eth0 PHY4 Down Speed :10 Half duplex

Firmware recovering from TFTP server is stopped or failed! :(
## Booting kernel from FIT Image at 84000000 ...
   Using 'config@1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM OpenWrt Linux-6.1.73
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x840000e4
     Data Size:    4592661 Bytes = 4.4 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80208000
     Entry Point:  0x80208000
     Hash algo:    crc32
     Hash value:   7e9027fc
     Hash algo:    sha1
     Hash value:   bb93189f40c8b46130de75acb29657a7783c052f
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Flattened Device Tree from FIT Image at 84000000
   Using 'config@1' configuration
   Trying 'fdt-1' FDT blob subimage
     Description:  ARM OpenWrt netgear_lbr20 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x84461634
     Data Size:    20177 Bytes = 19.7 KiB
     Architecture: ARM
     Hash algo:    crc32
     Hash value:   0bade00f
     Hash algo:    sha1
     Hash value:   2f824025c3cb3b436deea772d787d25929293ed3
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x84461634
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 86ff8000, end 86fffed0 ... OK
Device nand2 not found!

 131072 bytes read: OK
Using machid 0x8010001 from environment

Starting kernel ...

Ale za drugim razem ( po reboocie już ni jest ok) :

 nmrp server is stopped or failed !
Loading DNI firmware for checking...
Loading firmware 1 ...

NAND read: device 0 offset 0xa600000, size 0x20000
 131072 bytes read: OK

NAND read: device 0 offset 0xa600000, size 0x1020000
 16908288 bytes read: OK
rootfs imge header corrupted !
Loading firmware 2 ...

NAND read: device 0 offset 0xa600000, size 0x20000
 131072 bytes read: OK

NAND read: device 0 offset 0xa600000, size 0x1020000
 16908288 bytes read: OK
rootfs imge header corrupted !
eth0 PHY0 Down Speed :10 Half duplex
eth0 PHY1 Down Speed :10 Half duplex
eth0 PHY2 Down Speed :10 Half duplex
eth0 PHY3 Down Speed :10 Half duplex
eth0 PHY4 Down Speed :10 Half duplex

Firmware recovering from TFTP server is stopped or failed! :(
Wrong Image Format for bootm command
eth0 PHY0 Down Speed :10 Half duplex
eth0 PHY1 Down Speed :10 Half duplex
eth0 PHY2 Down Speed :10 Half duplex
eth0 PHY3 Down Speed :10 Half duplex
eth0 PHY4 Down Speed :10 Half duplex

Firmware recovering from TFTP server is stopped or failed! :(
ERROR: can't get kernel image!
(IPQ40xx) #

I tak za każdym razem mogę wgrywać img przez nmrp , i uruchomi się tylko raz... ( wcześniej z sqashfs było ,że po pierwszym razie tracił overlay)

140

Odp: Netgear LBR20 Orbi

Firmware recovering from TFTP server is stopped or failed! sad

Trzeba przejrzeć źródła voxela i sprawdzić czy on czasami nie ustawia sobie jakieś flagi w bootloaderze że uruchomienie obrazu się udało.

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

141

Odp: Netgear LBR20 Orbi

Ale wcześniej z tym sqashfs restartował się i bootował cały czas ( choć tylko za pierwszym razem był overlay po następnych rebootach tylko w ramie) , taka flaga mogłaby blokować dostęp do overlay za drugim razem?

142

Odp: Netgear LBR20 Orbi

Jedynie co zauważam , to przy dobrym starcie:

 nmrp server is stopped or failed !
Loading DNI firmware for checking...
Loading firmware 1 ...

NAND read: device 0 offset 0xa600000, size 0x20000
 131072 bytes read: OK

NAND read: device 0 offset 0xa600000, size 0x480000
 4718592 bytes read: OK
rootfs imge header corrupted !
Loading firmware 2 ...

NAND read: device 0 offset 0xa600000, size 0x20000
 131072 bytes read: OK

NAND read: device 0 offset 0xa600000, size 0x480000
 4718592 bytes read: OK
rootfs imge header corrupted !
eth0 PHY0 Down Speed :10 Half duplex
eth0 PHY1 Down Speed :10 Half duplex
eth0 PHY2 Down Speed :10 Half duplex
eth0 PHY3 Down Speed :10 Half duplex
eth0 PHY4 Down Speed :10 Half duplex

Firmware recovering from TFTP server is stopped or failed! :(
## Booting kernel from FIT Image at 84000000 ...
   Using 'config@1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM OpenWrt Linux-6.1.73
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x840000e4
     Data Size:    4592661 Bytes = 4.4 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80208000
     Entry Point:  0x80208000
     Hash algo:    crc32
     Hash value:   7e9027fc
     Hash algo:    sha1
     Hash value:   bb93189f40c8b46130de75acb29657a7783c052f
   Verifying Hash Integrity ... crc32+ sha1+ OK
#

Przy złym jest:

 nmrp server is stopped or failed !
Loading DNI firmware for checking...
Loading firmware 1 ...

NAND read: device 0 offset 0xa600000, size 0x20000
 131072 bytes read: OK

NAND read: device 0 offset 0xa600000, size 0x1020000
 16908288 bytes read: OK
rootfs imge header corrupted !
Loading firmware 2 ...

NAND read: device 0 offset 0xa600000, size 0x20000
 131072 bytes read: OK

NAND read: device 0 offset 0xa600000, size 0x1020000
 16908288 bytes read: OK
rootfs imge header corrupted !
eth0 PHY0 Down Speed :10 Half duplex
eth0 PHY1 Down Speed :10 Half duplex
eth0 PHY2 Down Speed :10 Half duplex
eth0 PHY3 Down Speed :10 Half duplex
eth0 PHY4 Down Speed :10 Half duplex

Czyli te rozmiary partycji w NAND się "poprawiają" , być może na gorsze...

143

Odp: Netgear LBR20 Orbi

Więc nie wiem, na razie nie mam pomysłu co może być przyczyną.

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

144

Odp: Netgear LBR20 Orbi

Czy jest możliwość zrobienia aktualizacji z poziomu interfejsu na oryginalnym oprogramowaniu?
Za aktualizację odpowiada paczka dnitoolbox:

/usr/sbin/fw_upg.sh
/usr/etc/firmware_update/do_action.sh
/usr/sbin/backup_partition.sh
/usr/sbin/firmware_update
/usr/lib/libcfgmtd.so
/usr/sbin/dni_block_chksum
/usr/etc/firmware_update/post_action.sh
/usr/etc/firmware_update/pre_action.sh
/usr/sbin/part_dev

Na partycję firmware trafia obraz z aktualizacją bez nagłówka (128B).
Nie wiem jak dokładnie działa ten system DNI.
Tutaj nie masz podwójnych partycji jak w innych podobnych urządzeniach?

145 (edytowany przez frutis 2024-01-25 13:31:12)

Odp: Netgear LBR20 Orbi

Tutaj jak jest wołana aktualizacja dla różnych modeli (/etc/rc.d/S11fwupgd):

#!/bin/sh /etc/rc.common

################################################################################
### this script is a sample, please modify it for your projects!!!
################################################################################

START=11

[ -f "/module_name" ] \
    && model="$(tr '[:lower:]' '[:upper:]' </module_name)" \
    || model="$(artmtd -r board_model_id | awk -F ":" '{print 2}')"
[ -f "/hw_id" ] \
    && hw_id="$(cat /hw_id)" \
    || hw_id="$(artmtd -r board_hw_id | awk -F ":" '{print $2}')"
[ -f "/flash_type" ] \
    && storage_type="$([ "$(cat /flash_type)" = "EMMC" ] && echo EMMC || echo NAND)" \
    || storage_type="$(grep -q firmware /proc/mtd && echo NAND || echo EMMC)"

opt_args=""
# fwupgd_debug should be set to "on" in env to run in debug mode.
[ "$fwupgd_debug" = "on" ] && opt_args='$opt_args -d'

start ()
{
    [ ! -d /tmp/fwupg ] && mkdir -p /tmp/fwupg

    case "$model" in
    "XR500")
        fwupgd    $opt_args \
            -M "$model" \
            -I "$hw_id" \
            -S "$storage_type" \
            -P "/dev/$(awk -F":" '/firmware/ {print $1}' /proc/mtd)" \
            -L "/dev/$(awk -F":" '/language/ {print $1}' /proc/mtd)" \
            -m 10 \
            -s 262144 \
        ;;
    "RBR50"|"RBS50"|"RBR40"|"RBS40")
        fwupgd    $opt_args \
            -M "$model" \
            -I "$hw_id" \
            -S "$storage_type" \
            -P "$(part_dev firmware)" \
            -B "$(part_dev firmware2)" \
            -L "$(part_dev language)" \
            -m 6 \
            -s 204800 \
            -F 2 \
        ;;
    "RBR20"|"RBS20"|"LBR20"|"LBR10"|"LBR1020")
        fwupgd    $opt_args \
            -M "$model" \
            -I "$hw_id" \
            -S "$storage_type" \
            -P "$(part_dev firmware)" \
            -L "$(part_dev language)" \
            -m 6 \
            -s 204800 \
        ;;
    *)
        echo "[fwupgd-ERROR] can not identify board module!!!"
        ;;
    esac
}

stop ()
{
    killall -SIGKILL fwupgd
}

restart()
{
    stop
    start
}

A sama aktualizacja to jest skrypt (/usr/etc/firmware_update/do_action.sh):

#! /bin/sh

# command to write firmware image to flash

# ${1} is path of firmware partition device
# ${2} is path of firmware image file
# e.g.: do_imgwrite.sh /dev/mtd8 /tmp/XXX.img
nandwrite --input-skip=128 -p -m -q ${1} ${2}

EDIT:
Za aktualizację to odpowiada jednak inna paczka netgear-fwupg:

/sbin/fwupgd
/sbin/fwupg
/etc/init.d/fwupgd

Znalazłem, że woła się też coś takiego:

[ "$(/bin/config get fwupgrade_performed)" = "1" ] && /bin/config set fwupgrade_performed=0

146

Odp: Netgear LBR20 Orbi

W międzyczasie porty RJ45 już działają , żółty oznaczony WAN/LAN1  jest przypięty jako "wan" , drugi oznaczony jako LAN2 na oznaczenie "lan" , dokładnie tak jak w mf289f czy mf18a...

I faktycznie da się fizycznie cały switch ( zarówno port LAN2 ( lan) jak i jednocześnie WAN/LAN1 (wan) wyłączyć przez gpio31:

echo 453 >/sys/class/gpio/export
echo "0" > /sys/class/gpio/gpio453/value

tylko czy taka wiedza coś daje (czy można to do czegoś wykorzystać)....

147

Odp: Netgear LBR20 Orbi

Mtd 27-38 są to volumeny UBI montowane z ntgrdata (mtd21):

mtd27: 0020f000 0001f000 "vol_traffic"
mtd28: 0020f000 0001f000 "vol_traffic.bak"
mtd29: 00516000 0001f000 "vol_devtable"
mtd30: 0009b000 0001f000 "vol_oopsdump"
mtd31: 01e08000 0001f000 "vol_circle"
mtd32: 04107000 0001f000 "vol_ntgr"
mtd33: 0020f000 0001f000 "vol_rae"
mtd34: 00516000 0001f000 "vol_arlo"
mtd35: 0020f000 0001f000 "vol_traffic_mobile"
mtd36: 0020f000 0001f000 "vol_traffic_mobile.bak"
mtd37: 00516000 0001f000 "vol_ntgrcrydata"
mtd38: 00117000 0001f000 "vol_jdx"

Jeśli bootloader nadpisuje partcję rootfs to może wykorzystać mtd21 jako UBI rootfs i rootfs_data?

148

Odp: Netgear LBR20 Orbi

MiG25 napisał/a:

W międzyczasie porty RJ45 już działają , żółty oznaczony WAN/LAN1  jest przypięty jako "wan" , drugi oznaczony jako LAN2 na oznaczenie "lan" , dokładnie tak jak w mf289f czy mf18a...

I faktycznie da się fizycznie cały switch ( zarówno port LAN2 ( lan) jak i jednocześnie WAN/LAN1 (wan) wyłączyć przez gpio31:

echo 453 >/sys/class/gpio/export
echo "0" > /sys/class/gpio/gpio453/value

tylko czy taka wiedza coś daje (czy można to do czegoś wykorzystać)....

IMO to gpio trzeba  ustawić w DTS na stałe, żeby zawsze wstawały interfejsy włączone. Bo ustawianie tego w userlandzie to chyba trochę za późno.

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

149 (edytowany przez MiG25 2024-01-25 14:25:08)

Odp: Netgear LBR20 Orbi

frutis napisał/a:

Mtd 27-38 są to volumeny UBI montowane z ntgrdata (mtd21):

mtd27: 0020f000 0001f000 "vol_traffic"
mtd28: 0020f000 0001f000 "vol_traffic.bak"
mtd29: 00516000 0001f000 "vol_devtable"
mtd30: 0009b000 0001f000 "vol_oopsdump"
mtd31: 01e08000 0001f000 "vol_circle"
mtd32: 04107000 0001f000 "vol_ntgr"
mtd33: 0020f000 0001f000 "vol_rae"
mtd34: 00516000 0001f000 "vol_arlo"
mtd35: 0020f000 0001f000 "vol_traffic_mobile"
mtd36: 0020f000 0001f000 "vol_traffic_mobile.bak"
mtd37: 00516000 0001f000 "vol_ntgrcrydata"
mtd38: 00117000 0001f000 "vol_jdx"

Jeśli bootloader nadpisuje partcję rootfs to może wykorzystać mtd21 jako UBI rootfs i rootfs_data?

Jak to wpisać ? partycja ntgrdata jest największą ze wszystkich 154MB smile

150

Odp: Netgear LBR20 Orbi

Jeżeli zrobisz jeden wielki obszar z nieużywanych partycji które sa po sobie to po prostu zmieniasz adresy ubi. Jeżeli nie są po sobie to wykorzystujesz mtd-concat, robisz jedna virtualną partycję ubi będącą połączeniem tych kilku różnych. Też to znajdziesz w innych dts'ach.

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