大破雑記帳

個人用メモな雑記ブログ いろんなことをざっくりと。

WSR-2533DHPLS stock -> OpenWrt

ファームウェアの生成や取り扱い周りを大体実装し終わったので、いくつかの投入方法でテストしたうちのWebUIからfactoryイメージを投入したもの

Flash内のImage1 (Kernel)に書き込まれ再起動した際、U-Bootによって2つのOSイメージがチェックされ、Image1とImage2で異なるのでImage1から2へコピーされた上でImage1からブートしている

hostsacd_daily_proc(145):HSAC-DBG:DATE[2024/3/30 9:45:32] 1711759532 154 154280(4) loggerdb:1319
The tail length is 46! Update len to 11796724!
decodesize 11796480...
cp: can't stat '/usr/sbin/uboot_env': No such file or directory
nvram_set: No such file or directory
token=tools, line=nandwrite
token=partitions, line=Kernel
token=Kernel, line=0x0:-
sector: Kernel -> offset=[0x0], write_len=[0xb40000]
[get_all_mtd] MTD[0]: /dev/mtd0, 0x8000000, 0x20000, mtk-nand
[get_all_mtd] MTD[1]: /dev/mtd1, 0x80000, 0x20000, Bootloader
[get_all_mtd] MTD[2]: /dev/mtd2, 0x80000, 0x20000, Config
[get_all_mtd] MTD[3]: /dev/mtd3, 0x80000, 0x20000, Factory
[get_all_mtd] MTD[4]: /dev/mtd4, 0x1800000, 0x20000, Kernel
[get_all_mtd] MTD[5]: /dev/mtd5, 0x31ffe4, 0x20000, kernel
[get_all_mtd] MTD[6]: /dev/mtd6, 0x14e0000, 0x20000, rootfs
[get_all_mtd] MTD[7]: /dev/mtd7, 0xb20000, 0x20000, rootfs_data
[get_all_mtd] MTD[8]: /dev/mtd8, 0x1800000, 0x20000, Kernel2
[get_all_mtd] MTD[9]: /dev/mtd9, 0x200000, 0x20000, glbcfg
[get_all_mtd] MTD[10]: /dev/mtd10, 0x200000, 0x20000, board_data
[get_all_mtd] MTD[11]: /dev/mtd11, 0x900000, 0x20000, debug_log
[get_all_mtd] MTD[12]: /dev/mtd12, 0x3600000, 0x20000, WTB
[merge_sector_info] sector[0]: name=[Kernel], dev=[/dev/mtd4], offset=[0], write_len=[11796480], max_allow_size=[25165824]
[validate_file] freeram=[137547776] bufferram=[7000064]
/tmp/uploadACNpLK: CRC OK
[do_nandwrite_erase] Erase MTD[Kernel]: start
[do_nandwrite_erase] Erase MTD[Kernel]: end
[do_nandwrite_update] Write MTD[Kernel]: start
[do_nandwrite_update] cmd=[/tmp/nandwrite -q -p --if_start=0x0 --if_len=0xb40000 /dev/mtd4 /tmp/uploadACNpLK]
[do_nandwrite_update] Write MTD[Kernel]: end
nvram_set: No such file or directory
nvram_set: No such file or directory
[switch_bank] to 0, return 2
upload return: 0
plc upgrade reboot
[  192.882337] reboot: Restarting system

===================================================================
                MT7621   stage1 code Dec 16 2019 17:45:55 (ASIC)
                CPU=500000000 HZ BUS=166666666 HZ
==================================================================
Change MPLL source from XTAL to CR...
do MEMPLL setting..
MEMPLL Config : 0x11000000
3PLL mode + External loopback
=== XTAL-40Mhz === DDR-1200Mhz ===
PLL3 FB_DL: 0xe, 1/0 = 652/372 39000000
PLL2 FB_DL: 0x14, 1/0 = 713/311 51000000
MEMPLL 3PLL mode calibration fail
DDR patch working
do DDR setting..[01F40000]
Apply DDR3 Setting...(use default AC)
          0    8   16   24   32   40   48   56   64   72   80   88   96  104  112  120
      --------------------------------------------------------------------------------
0000:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0001:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0002:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0003:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0004:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0005:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0006:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0007:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0008:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0009:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    1    1
000E:|    0    0    0    0    0    0    0    0    0    1    1    1    1    1    1    1
000F:|    0    0    0    0    1    1    1    1    1    1    1    1    1    1    0    0
0010:|    1    1    1    1    1    1    1    1    1    0    0    0    0    0    0    0
0011:|    1    1    1    1    0    0    0    0    0    0    0    0    0    0    0    0
0012:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0013:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0014:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0015:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0016:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0017:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0018:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0019:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
DRAMC_DQSCTL1[0e0]=13000000
DRAMC_DQSGCTL[124]=80000033
rank 0 coarse = 15
rank 0 fine = 72
B:|    0    0    0    0    0    0    0    0    0    0    1    1    1    0    0    0
opt_dle value:11
DRAMC_DDR2CTL[07c]=C287223D
DRAMC_PADCTL4[0e4]=000022B3
DRAMC_DQIDLY1[210]=0B0A090A
DRAMC_DQIDLY2[214]=07080907
DRAMC_DQIDLY3[218]=09080707
DRAMC_DQIDLY4[21c]=09070A07
DRAMC_R0DELDLY[018]=00001C1D
==================================================================
                RX      DQS perbit delay software calibration 
==================================================================
1.0-15 bit dq delay value
==================================================================
bit|     0  1  2  3  4  5  6  7  8  9
--------------------------------------
0 |    9 8 8 11 6 8 7 7 6 6 

=================================================
Checking Image1
--> nmbm nmbm0 read 83000000 180000 1c
Reading from 0x180000, size 0x1c
Succeeded
---------------------
TRX MAGIC    534c4844
Image len    b40000
header crc32 f1c3eebc
---------------------
 trx magic OK!
--> nmbm nmbm0 read 83000000 180000 b40000
Reading from 0x180000, size 0xb40000
Succeeded
---------------------
Image1 crc32 f1c3eebc
---------------------
 crc32 OK!
=================================================

=================================================
Checking Image2
--> nmbm nmbm0 read 83000000 1980000 1c
Reading from 0x1980000, size 0x1c
Succeeded
---------------------
TRX MAGIC    534c4844
Image len    cd6000
header crc32 bad4df21
---------------------
 trx magic OK!
--> nmbm nmbm0 read 83000000 1980000 cd6000
Reading from 0x1980000, size 0xcd6000
Succeeded
---------------------
Image2 crc32 bad4df21
---------------------
 crc32 OK!
=================================================
## check Image1 return 0, check Image2 return 0, Image1 crc32=f1c3eebc, Image2 crc32=bad4df21.
Image1 is ok!
Image2 is not same as Image1, copy Image1 to Image2!

=================================================
--> nmbm nmbm0 read 83000000 180000 1c
Reading from 0x180000, size 0x1c
Succeeded
--> nmbm nmbm0 read 83000000 180000 b40000
Reading from 0x180000, size 0xb40000
Succeeded
--> nmbm nmbm0 erase 1980000 1800000
Erasing from 0x1980000, size 0x1800000 ...
Succeeded
--> nmbm nmbm0 write 83000000 1980000 b40000
Writing to 0x1980000, size 0xb40000
Succeeded
=================================================
Recovery done!
genimg_get_format> IMAGE_FORMAT_TRX!
TRX Image
[210] Loading mtd[nmbm0] TRX image at offset 0x180000 to memory 0x83000000, size 0xb40000 ...
genimg_get_format> IMAGE_FORMAT_LEGACY!
Automatic boot of image at addr 0x83000000 ...
genimg_get_format> IMAGE_FORMAT_LEGACY!
## Booting kernel from Legacy Image at 8300001c ...
   Image Name:   MIPS OpenWrt Linux-6.1.82
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    3027450 Bytes = 2.9 MiB
   Load Address: 80001000
   Entry Point:  80001000
   Verifying Checksum ... OK
genimg_get_format> IMAGE_FORMAT_LEGACY!
   Uncompressing Kernel Image ... OK
[    0.000000] Linux version 6.1.82 (musashino205@TAIHA.NET) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 13.2.0 r25667-6460407338) 13.2.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Fri Mar 29 11:31:01 2024
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is Buffalo WSR-2533DHPLS
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] percpu: Embedded 12 pages/cpu s18016 r8192 d22944 u49152
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
[    0.000000] Kernel command line: console=ttyS0,115200n8 ubi.block=0,rootfs root=/dev/ubiblock0_0 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Writing ErrCtl register=000029c0
[    0.000000] Readback ErrCtl register=000029c0
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 248340K/262144K available (7363K kernel code, 627K rwdata, 1592K rodata, 1220K init, 222K bss, 13804K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 256
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000005] sched_clock: 64 bits at 880MHz, resolution 1ns, wraps every 4398046511103ns
[    0.008024] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.066230] pid_max: default: 32768 minimum: 301
[    0.071700] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.078912] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.089915] cblist_init_generic: Setting adjustable number of callback queues.
[    0.097141] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.103668] rcu: Hierarchical SRCU implementation.
[    0.108401] rcu:     Max phase no-delay instances is 1000.
[    0.114339] smp: Bringing up secondary CPUs ...
[    0.119748] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.119776] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.119791] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.119841] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.179097] Synchronize counters for CPU 1: done.
[    0.211705] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.211726] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.211737] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.211769] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.270655] Synchronize counters for CPU 2: done.
[    0.301290] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.301309] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.301320] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.301356] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.355852] Synchronize counters for CPU 3: done.
[    0.385702] smp: Brought up 1 node, 4 CPUs
[    0.395182] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.404995] futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.412057] pinctrl core: initialized pinctrl subsystem
[    0.418723] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.442182] clocksource: Switched to clocksource GIC
[    0.448627] NET: Registered PF_INET protocol family
[    0.453731] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.461792] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.470091] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.477785] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.485405] TCP bind hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    0.492635] TCP: Hash tables configured (established 2048 bind 2048)
[    0.499072] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.505577] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.512909] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.518526] PCI: CLS 0 bytes, default 32
[    0.525137] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    0.537195] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.543013] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.557542] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.563572] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.569451] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.575556] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
[    0.582247] mt7621-pci 1e140000.pcie:   No bus range found for /pcie@1e140000, using [bus 00-ff]
[    0.590968] mt7621-pci 1e140000.pcie:      MEM 0x0060000000..0x006fffffff -> 0x0060000000
[    0.599094] mt7621-pci 1e140000.pcie:       IO 0x001e160000..0x001e16ffff -> 0x0000000000
[    0.962196] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
[    0.969100] mt7621-pci 1e140000.pcie: PCIE0 enabled
[    0.973978] mt7621-pci 1e140000.pcie: PCIE1 enabled
[    0.978787] PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[    0.985955] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
[    0.992265] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.997662] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    1.004517] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    1.010672] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[    1.016630] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    1.022848] pci 0000:00:00.0: reg 0x14: [mem 0x60200000-0x6020ffff]
[    1.029141] pci 0000:00:00.0: supports D1
[    1.033099] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    1.039468] pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400
[    1.045485] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    1.051665] pci 0000:00:01.0: reg 0x14: [mem 0x60210000-0x6021ffff]
[    1.057981] pci 0000:00:01.0: supports D1
[    1.061899] pci 0000:00:01.0: PME# supported from D0 D1 D3hot
[    1.069719] pci 0000:01:00.0: [14c3:7615] type 00 class 0x000280
[    1.075748] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    1.082649] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    1.097717] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    1.102905] pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
[    1.108906] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.115677] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.122526] pci 0000:02:00.0: [14c3:7615] type 00 class 0x000280
[    1.128475] pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    1.135384] pci 0000:02:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:01.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    1.150458] pci 0000:00:01.0: PCI bridge to [bus 02-ff]
[    1.155649] pci 0000:00:01.0:   bridge window [io  0x0000-0x0fff]
[    1.161649] pci 0000:00:01.0:   bridge window [mem 0x60100000-0x601fffff]
[    1.168446] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    1.175055] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    1.181569] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.188516] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    1.195078] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.201965] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    1.208742] pci 0000:00:01.0: BAR 8: assigned [mem 0x60100000-0x601fffff]
[    1.215471] pci 0000:00:00.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[    1.222221] pci 0000:00:01.0: BAR 1: assigned [mem 0x60210000-0x6021ffff]
[    1.228921] pci 0000:00:00.0: BAR 7: assigned [io  0x0000-0x0fff]
[    1.234994] pci 0000:00:01.0: BAR 7: assigned [io  0x1000-0x1fff]
[    1.241021] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    1.248314] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.253227] pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
[    1.259246] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.266031] pci 0000:02:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit]
[    1.273282] pci 0000:00:01.0: PCI bridge to [bus 02]
[    1.278166] pci 0000:00:01.0:   bridge window [io  0x1000-0x1fff]
[    1.284244] pci 0000:00:01.0:   bridge window [mem 0x60100000-0x601fffff]
[    1.292528] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    1.300367] printk: console [ttyS0] disabled
[    1.304740] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 18, base_baud = 3125000) is a 16550A
[    1.313760] printk: console [ttyS0] enabled
[    1.313760] printk: console [ttyS0] enabled
[    1.322008] printk: bootconsole [early0] disabled
[    1.322008] printk: bootconsole [early0] disabled
[    1.334700] nand: device found, Manufacturer ID: 0x98, Chip ID: 0xf1
[    1.341087] nand: Toshiba NAND 128MiB 3,3V 8-bit
[    1.345740] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.353317] mt7621-nand 1e003000.nand: ECC strength adjusted to 4 bits
[    1.361882] Signature found at block 1023 [0x07fe0000]
[    1.367025] NMBM management region starts at block 960 [0x07800000]
[    1.377296] First info table with writecount 2 found in block 960
[    1.395183] Second info table with writecount 2 found in block 963
[    1.401440] NMBM has been successfully attached
[    1.406119] 9 fixed-partitions partitions found on MTD device mt7621-nand
[    1.413241] Creating 9 MTD partitions on "mt7621-nand":
[    1.418476] 0x000000000000-0x000000080000 : "u-boot"
[    1.430053] 0x000000080000-0x000000100000 : "u-boot-env"
[    1.441782] 0x000000100000-0x000000180000 : "factory"
[    1.453709] 0x000000180000-0x000001980000 : "firmware"
[    1.776521] 2 trx partitions found on MTD device firmware
[    1.781941] Creating 2 MTD partitions on "firmware":
[    1.786907] 0x00000000001c-0x000000600000 : "linux"
[    1.791768] mtd: partition "linux" doesn't start on an erase/write block boundary -- force read-only
[    1.864492] 0x000000600000-0x000001800000 : "ubi"
[    2.057854] 0x000001980000-0x000003180000 : "Kernel2"
[    2.313668] 0x000003180000-0x000003380000 : "glbcfg"
[    2.340689] 0x000003380000-0x000003580000 : "board_data"
[    2.367931] 0x000003580000-0x000003e80000 : "debug_log"
[    2.468032] 0x000003e80000-0x000007480000 : "WTB"
[    3.173691] mtk_soc_eth 1e100000.ethernet: generated random MAC address 65:74:68:25:64:00
[    3.181909] mtk_soc_eth 1e100000.ethernet: generated random MAC address 77:61:6e:00:64:00
[    3.191599] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    3.205437] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 19
[    3.217122] mtk_soc_eth 1e100000.ethernet wan: mediatek frame engine at 0xbe100000, irq 19
[    3.227086] i2c_dev: i2c /dev entries driver
[    3.234148] NET: Registered PF_INET6 protocol family
[    3.241836] Segment Routing with IPv6
[    3.245645] In-situ OAM (IOAM) with IPv6
[    3.249665] NET: Registered PF_PACKET protocol family
[    3.255140] 8021q: 802.1Q VLAN Support v1.8
[    3.268434] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    3.294072] mt7530-mdio mdio-bus:1f: configuring for fixed/rgmii link mode
[    3.301823] mt7530-mdio mdio-bus:1f: Link is Up - 1Gbps/Full - flow control rx/tx
[    3.303486] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=21)
[    3.322521] mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7530 PHY] (irq=22)
[    3.335369] mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7530 PHY] (irq=23)
[    3.348282] device eth0 entered promiscuous mode
[    3.353082] DSA: tree 0 setup
[    3.358161] UBI: auto-attach mtd5
[    3.361507] ubi0: attaching mtd5
[    3.460501] UBI: EOF marker found, PEBs from 36 will be erased
[    3.605608] ubi0: scanning is finished
[    3.654082] ubi0: volume 1 ("rootfs_data") re-sized from 9 to 87 LEBs
[    3.661492] ubi0: attached mtd5 (name "ubi", size 18 MiB)
[    3.666976] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    3.673860] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    3.680623] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    3.687580] ubi0: good PEBs: 144, bad PEBs: 0, corrupted PEBs: 0
[    3.693585] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    3.700779] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1711711861
[    3.709891] ubi0: available PEBs: 0, total reserved PEBs: 144, PEBs reserved for bad PEB handling: 19
[    3.719135] ubi0: background thread "ubi_bgt0d" started, PID 307
[    3.721044] block ubiblock0_0: created from ubi0:0(rootfs)
[    3.730684] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    3.780841] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    3.793387] Freeing unused kernel image (initmem) memory: 1220K
[    3.799355] This architecture does not have kernel memory protection.
[    3.805845] Run /sbin/init as init process
[    4.454534] init: Console is alive
[    4.458315] init: - watchdog -
[    5.207570] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    5.269387] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    5.283777] init: - preinit -
[    8.752179] random: crng init done
[    8.917712] mtdblock: MTD device 'board_data' is NAND, please consider using UBI block devices instead.
[   10.143345] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[   10.155815] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   10.162699] mt7530-mdio mdio-bus:1f lan1: configuring for phy/gmii link mode
[   10.171743] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   12.391047] UBIFS (ubi0:1): default file-system created
[   12.397708] UBIFS (ubi0:1): Mounting in unauthenticated mode
[   12.403657] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 464
[   12.532660] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   12.540499] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   12.550424] UBIFS (ubi0:1): FS size: 9777152 bytes (9 MiB, 77 LEBs), max 87 LEBs, journal size 1015809 bytes (0 MiB, 6 LEBs)
[   12.561641] UBIFS (ubi0:1): reserved for root: 461798 bytes (450 KiB)
[   12.568084] UBIFS (ubi0:1): media format: w5/r0 (latest is w5/r0), UUID AC2F689B-4F98-41CD-8752-D9F3A13D8CC7, small LPT model
[   12.582928] mount_root: overlay filesystem has not been fully initialized yet
[   12.590750] mount_root: switching to ubifs overlay
[   12.603805] urandom-seed: Seed file not found (/etc/urandom.seed)
[   12.721434] procd: - early -
[   12.724825] procd: - watchdog -
[   13.338500] procd: - watchdog -
[   13.343095] procd: - ubus -
[   13.501447] procd: - init -
Please press Enter to activate this console.
[   14.195405] kmodloader: loading kernel modules from /etc/modules.d/*
[   14.265378] mtk-eip93 1e004000.crypto: EIP93 Crypto Engine Initialized.
[   14.471976] Loading modules backported from Linux version v6.6.15-0-g51f354b815c4
[   14.479528] Backport generated by backports.git 193becf2
[   14.703327] pci 0000:00:00.0: enabling device (0006 -> 0007)
[   14.709016] mt7615e 0000:01:00.0: enabling device (0000 -> 0002)
[   14.717489] mt7615e 0000:01:00.0: Invalid MAC address, using random address 3a:fc:cc:42:a5:7c
[   14.730142] mt7615e 0000:01:00.0: registering led 'mt76-phy0'
[   14.740070] pci 0000:00:01.0: enabling device (0006 -> 0007)
[   14.745984] mt7615e 0000:02:00.0: enabling device (0000 -> 0002)
[   14.753643] mt7615e 0000:01:00.0: HW/SW Version: 0x8a108a10, Build Time: 20180518100604a
[   14.753643] 
[   14.759638] mt7615e 0000:02:00.0: Invalid MAC address, using random address 6e:12:18:b0:51:e9
[   14.777711] mt7615e 0000:02:00.0: registering led 'mt76-phy1'
[   14.823936] mt7615e 0000:02:00.0: HW/SW Version: 0x8a108a10, Build Time: 20180518100604a
[   14.823936] 
[   14.883842] PPP generic driver version 2.4.2
[   14.889966] NET: Registered PF_PPPOX protocol family
[   14.904266] kmodloader: done loading kernel modules from /etc/modules.d/*
[   15.090688] mt7615e 0000:01:00.0: N9 Firmware Version: _reserved_, Build Time: 20200814163649
[   15.090757] mt7615e 0000:02:00.0: N9 Firmware Version: _reserved_, Build Time: 20200814163649
[   15.136201] mtdblock: MTD device 'board_data' is NAND, please consider using UBI block devices instead.
[   15.198679] mt7615e 0000:01:00.0: CR4 Firmware Version: _reserved_, Build Time: 20190415154149
[   15.198776] mt7615e 0000:02:00.0: CR4 Firmware Version: _reserved_, Build Time: 20190415154149
[   15.684702] urngd: v1.0.2 started.
[   16.374525] mtdblock: MTD device 'board_data' is NAND, please consider using UBI block devices instead.
[   38.523332] mtk_soc_eth 1e100000.ethernet eth0: Link is Down
[   38.553075] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[   38.561412] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   38.570362] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   38.581462] mt7530-mdio mdio-bus:1f lan1: configuring for phy/gmii link mode
[   38.590546] br-lan: port 1(lan1) entered blocking state
[   38.595892] br-lan: port 1(lan1) entered disabled state
[   38.603968] device lan1 entered promiscuous mode
[   38.627839] mt7530-mdio mdio-bus:1f lan2: configuring for phy/gmii link mode
[   38.636723] br-lan: port 2(lan2) entered blocking state
[   38.642004] br-lan: port 2(lan2) entered disabled state
[   38.649640] device lan2 entered promiscuous mode
[   38.665045] mt7530-mdio mdio-bus:1f lan3: configuring for phy/gmii link mode
[   38.674156] br-lan: port 3(lan3) entered blocking state
[   38.679432] br-lan: port 3(lan3) entered disabled state
[   38.687063] device lan3 entered promiscuous mode
[   38.708754] mtk_soc_eth 1e100000.ethernet wan: PHY [mdio-bus:00] driver [MediaTek MT7530 PHY] (irq=POLL)
[   38.718342] mtk_soc_eth 1e100000.ethernet wan: configuring for phy/rgmii link mode
[   41.731319] mt7530-mdio mdio-bus:1f lan1: Link is Up - 10Mbps/Full - flow control off
[   41.739283] br-lan: port 1(lan1) entered blocking state
[   41.744566] br-lan: port 1(lan1) entered forwarding state
[   41.750676] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   41.872433] mtk_soc_eth 1e100000.ethernet wan: Link is Up - 1Gbps/Full - flow control off
[   41.880661] IPv6: ADDRCONF(NETDEV_CHANGE): wan: link becomes ready



BusyBox v1.36.1 (2024-03-28 11:18:56 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r25698+3-9baf5d0f44
 -----------------------------------------------------
=== 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:/# ubus call system board
{
        "kernel": "6.1.82",
        "hostname": "OpenWrt",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "Buffalo WSR-2533DHPLS",
        "board_name": "buffalo,wsr-2533dhpls",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "SNAPSHOT",
                "revision": "r25698+3-9baf5d0f44",
                "target": "ramips/mt7621",
                "description": "OpenWrt SNAPSHOT r25698+3-9baf5d0f44"
        }
}
root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00020000 "u-boot"
mtd1: 00080000 00020000 "u-boot-env"
mtd2: 00080000 00020000 "factory"
mtd3: 01800000 00020000 "firmware"
mtd4: 005fffe4 00020000 "linux"
mtd5: 01200000 00020000 "ubi"
mtd6: 01800000 00020000 "Kernel2"
mtd7: 00200000 00020000 "glbcfg"
mtd8: 00200000 00020000 "board_data"
mtd9: 00900000 00020000 "debug_log"
mtd10: 03600000 00020000 "WTB"
root@OpenWrt:/# ubinfo -a
UBI version:                    1
Count of UBI devices:           1
UBI control device major/minor: 10:127
Present UBI devices:            ubi0

ubi0
Volumes count:                           2
Logical eraseblock size:                 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks:     144 (18284544 bytes, 17.4 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:  19
Current maximum erase counter value:     2
Minimum input/output unit size:          2048 bytes
Character device major/minor:            251:0
Present volumes:                         0, 1

Volume ID:   0 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        34 LEBs (4317184 bytes, 4.1 MiB)
State:       OK
Name:        rootfs
Character device major/minor: 251:1
-----------------------------------
Volume ID:   1 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        87 LEBs (11046912 bytes, 10.5 MiB)
State:       OK
Name:        rootfs_data
Character device major/minor: 251:2
root@OpenWrt:/# mount
/dev/root on /rom type squashfs (ro,relatime,errors=continue)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/ubi0_1 on /overlay type ubifs (rw,noatime,assert=read-only,ubi=0,vol=1)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,noexec,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
bpffs on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
root@OpenWrt:/# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 4.3M      4.3M         0 100% /rom
tmpfs                   121.9M    204.0K    121.7M   0% /tmp
/dev/ubi0_1               7.9M    156.0K      7.4M   2% /overlay
overlayfs:/overlay        7.9M    156.0K      7.4M   2% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@OpenWrt:/#