大破雑記帳

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

HDL2-A2.0

突然NASに興味を持ち、ヤフオクなど漁った結果安価な出品があったので確保したもの。
事前情報でシリアルコンソールの入力を受け付けないという話はあったが、とりあえずトライしていくことにした。
弄っていくのでメモ。

U-Boot

事前情報通り、U-Bootにおいて入力が受け付けられず(というより恐らくは中断プロンプトが無効化されている)ブートシーケンスを止めることができない。
ブートの際、まずSATAに接続されているストレージからのOS読み出しを試行し、SATAに接続されていない、あるいはOSデータが読み出せない場合は、USBポートに接続されているストレージから特定パスのOSデータ読み出しを試行する模様。

  • bootlog

      ============================================================
      HDL2-A series Initial boot loader
    
      Copyright (C) 2008-2011 I-O DATA DEVICE, INC.
      ============================================================
      ** LOADER **
      ** MARVELL BOARD: HDL2A LE
    
      U-Boot 1.1.4 (Aug 27 2011 - 16:33:44) MV : 3.5.9 I-O : 1.03
    
      U-Boot code: 00600000 -> 0066FFF0  BSS: -> 006BDAE0
    
      Soc: 88F6282 A1CPU running @ 1600Mhz L2 running @ 533Mhz
      SysClock = 533Mhz , TClock = 200Mhz
    
      DRAM (DDR3) CAS Latency = 7 tRP = 7 tRAS = 20 tRCD=7
      DRAM CS[0] base 0x00000000   size 256MB
      DRAM Total size 256MB  16bit width
      Addresses 8M - 0M are saved for the U-Boot usage.
      Mem malloc Initialization (8M - 7M): Done
      [512kB@f8000000] Flash: 512 kB
    
      CPU : Marvell Feroceon (Rev 1)
    
      Streaming disabled
      Write allocate disabled
    
      USB 0: host mode
      PEX 0: interface detected no Link.
      PEX 1: interface detected no Link.
      Net:   egiga0 [PRIME]
    
      Reset IDE:
      Marvell Serial ATA Adapter
      Integrated Sata device found
    
      ** Bad partition 1 **
      ** Bad partition 1 **
      (Re)start USB...
      USB:   scanning bus for devices... 2 USB Device(s) found
      Waiting for storage device(s) to settle before scanning...
      0 Storage Device(s) found
      ** Can't read from device 0 **
    
      ** Unable to use usb 0:0 for fatload **
      ** Can't read from device 0 **
    
      ** Unable to use usb 0:1 for fatload **
    

    HDL2-Aシリーズと同一のSoCを搭載し、既にOpenWrtでサポートされているNETGEAR ReadyNAS Duo v2のinitramfsイメージをHDL2-Aがブート時に読もうとするパスでダミーのinitrdと共にUSBフラッシュメモリ内に置いたところ、それを読み出してブートが行われた。
    なお、OpenWrtではinitrdは必要無い為当初0byteのinitrdファイルを置いたが蹴られ、/dev/zero を利用して64KB(サイズは適当)にしたところ通過してOpenWrtがブートされた。

      ============================================================
      HDL2-A series Initial boot loader
    
      Copyright (C) 2008-2011 I-O DATA DEVICE, INC.
      ============================================================
      ** LOADER **
      ** MARVELL BOARD: HDL2A LE
    
      U-Boot 1.1.4 (Aug 27 2011 - 16:33:44) MV : 3.5.9 I-O : 1.03
    
      U-Boot code: 00600000 -> 0066FFF0  BSS: -> 006BDAE0
    
      Soc: 88F6282 A1CPU running @ 1600Mhz L2 running @ 533Mhz
      SysClock = 533Mhz , TClock = 200Mhz
    
      DRAM (DDR3) CAS Latency = 7 tRP = 7 tRAS = 20 tRCD=7
      DRAM CS[0] base 0x00000000   size 256MB
      DRAM Total size 256MB  16bit width
      Addresses 8M - 0M are saved for the U-Boot usage.
      Mem malloc Initialization (8M - 7M): Done
      [512kB@f8000000] Flash: 512 kB
    
      CPU : Marvell Feroceon (Rev 1)
    
      Streaming disabled
      Write allocate disabled
    
      USB 0: host mode
      PEX 0: interface detected no Link.
      PEX 1: interface detected no Link.
      Net:   egiga0 [PRIME]
    
      Reset IDE:
      Marvell Serial ATA Adapter
      Integrated Sata device found
      [0 0 0]: Enable DMA mode (6)
      Device 0 @ 0 0:
      Model: KLEVV SSD NEO N500 120GB
      Firm: R1001C0
      Ser#: E201904120051356
      Type: Hard Disk
      Supports 48-bit addressing
      Capacity: 114473.4 MB = 111.7 GB (0x000000000DF94BB0 x 512)
    
      ** Bad partition 1 **
      ** Bad partition 1 **
      (Re)start USB...
      USB:   scanning bus for devices... 3 USB Device(s) found
      Waiting for storage device(s) to settle before scanning...
      1 Storage Device(s) found
      get_partition_info_efi: Invalid Argument(s)
      ** Partition 0 not valid on device 0 **
    
      ** Unable to use usb 0:0 for fatload **
      .
      reading l2a/uImage.l2a
      .......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
    
      4825606 bytes read
      .
      reading l2a/initrd.l2a
      ......
    
      65536 bytes read
      ## Starting secure boot ...
      ## Starting application at 0x00100000 ...
      ## Application terminated, rc = 0x0
      ................
      ## Booting image at 00800000 ...
      Image Name:   ARM OpenWrt Linux-5.10.96
      Image Type:   ARM Linux Kernel Image (uncompressed)
      Data Size:    4825542 Bytes =  4.6 MB
      Load Address: 00008000
      Entry Point:  00008000
      Verifying Checksum ... OK
      OK
    
      Starting kernel ...
    
      [    0.000000] Booting Linux on physical CPU 0x0
      [    0.000000] Linux version 5.10.96 (builder@buildhost) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 11.2.0 r18780-73fd9f79ce) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 Wed Feb 9 21:17:54 2022
      [    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
      [    0.000000] CPU: VIVT data cache, VIVT instruction cache
      [    0.000000] OF: fdt: Machine model: NETGEAR ReadyNAS Duo v2
      [    0.000000] Memory policy: Data cache writeback
      [    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] Built 1 zonelists, mobility grouping on.  Total pages: 64960
      [    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=spi_flash:448k(u-boot),64k@448k(env) root=/dev/md2 initrd=0x2000040,16M rw model=HDL2-A
      [    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] mem auto-init: stack:off, heap alloc:off, heap free:off
      [    0.000000] Memory: 226956K/262144K available (5962K kernel code, 597K rwdata, 1544K rodata, 7168K init, 214K bss, 35188K reserved, 0K cma-reserved)
      [    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
      [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
      [    0.000000] random: get_random_bytes called from start_kernel+0x330/0x55c with crng_init=0
      [    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
      [    0.000006] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
      [    0.000033] Switching to timer-based delay loop, resolution 5ns
      [    0.000100] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
      [    0.000121] pid_max: default: 32768 minimum: 301
      [    0.000258] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
      [    0.000278] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
      [    0.000989] CPU: Testing write buffer coherency: ok
      [    0.001683] Setting up static identity map for 0x100000 - 0x10003c
      [    0.001875] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
      [    0.002015] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
      [    0.004783] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
      [    0.004809] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
      [    0.004902] pinctrl core: initialized pinctrl subsystem
      [    0.005736] NET: Registered protocol family 16
      [    0.006068] DMA: preallocated 256 KiB pool for atomic coherent allocations
      [    0.006868] thermal_sys: Registered thermal governor 'step_wise'
      [    0.006940] cpuidle: using governor ladder
      [    0.007213] Feroceon L2: Enabling L2
      [    0.007249] Feroceon L2: Cache support initialised.
      [    0.015469] No ATAGs?
      [    0.050959] SCSI subsystem initialized
      [    0.052063] usbcore: registered new interface driver usbfs
      [    0.052107] usbcore: registered new interface driver hub
      [    0.052145] usbcore: registered new device driver usb
      [    0.056419] clocksource: Switched to clocksource orion_clocksource
      [    0.057048] NET: Registered protocol family 2
      [    0.057152] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
      [    0.057658] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
      [    0.057695] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
      [    0.057726] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
      [    0.057755] TCP: Hash tables configured (established 2048 bind 2048)
      [    0.057820] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
      [    0.057843] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
      [    0.057950] NET: Registered protocol family 1
      [    0.057977] PCI: CLS 0 bytes, default 32
      [    0.114164] Unpacking initramfs...
      [    0.114189] Initramfs unpacking failed: invalid magic at start of compressed archive
      [    0.160974] Freeing initrd memory: 16388K
      [    0.162613] workingset: timestamp_bits=14 max_order=16 bucket_order=2
      [    0.165705] squashfs: version 4.0 (2009/01/31) Phillip Lougher
      [    0.165721] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
      [    0.166318] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
      [    0.167861] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
      [    0.168839] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
      [    0.168874] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
      [    0.168895] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1044000..0x00f1045fff -> 0x0000044000
      [    0.168914] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1080000..0x00f1081fff -> 0x0000080000
      [    0.168934] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
      [    0.168951] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
      [    0.168969] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
      [    0.168982] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
      [    0.169139] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
      [    0.169155] pci_bus 0000:00: root bus resource [bus 00-ff]
      [    0.169168] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
      [    0.169179] pci_bus 0000:00: root bus resource [mem 0xf1044000-0xf1045fff] (bus address [0x00044000-0x00045fff])
      [    0.169190] pci_bus 0000:00: root bus resource [mem 0xf1080000-0xf1081fff] (bus address [0x00080000-0x00081fff])
      [    0.169200] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
      [    0.169209] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
      [    0.169290] pci 0000:00:01.0: [11ab:6282] type 01 class 0x060400
      [    0.170256] PCI: bus0: Fast back to back transfers disabled
      [    0.170271] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
      [    0.171082] PCI: bus1: Fast back to back transfers enabled
      [    0.171097] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
      [    0.171234] pci 0000:00:01.0: PCI bridge to [bus 01]
      [    0.171596] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
      [    0.172864] printk: console [ttyS0] disabled
      [    0.172941] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
      [    0.796333] printk: console [ttyS0] enabled
      [    0.801062] Loading iSCSI transport class v2.0-870.
      [    1.056431] nand: No NAND device found
      [    1.073233] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
      [    1.083027] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:a0:b0:ca:71:c7
      [    2.166424] rtc-mv f1010300.rtc: internal RTC not ticking
      [    2.171923] i2c /dev entries driver
      [    2.176730] orion_wdt: Initial timeout 21 sec
      [    2.188536] marvell-cesa f1030000.crypto: CESA device successfully registered
      [    2.196407] NET: Registered protocol family 10
      [    2.202447] Segment Routing with IPv6
      [    2.206180] NET: Registered protocol family 17
      [    2.210705] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
      [    2.223835] 8021q: 802.1Q VLAN Support v1.8
      [    2.252205] Freeing unused kernel memory: 7168K
      [    2.257579] Run /init as init process
      [    2.434484] init: Console is alive
      [    2.438200] init: - watchdog -
      [    2.447100] kmodloader: loading kernel modules from /etc/modules-boot.d/*
      [    2.453937] random: fast init done
      [    2.459077] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
      [    2.468087] ehci-fsl: Freescale EHCI Host controller driver
      [    2.476511] ehci-orion: EHCI orion driver
      [    2.480690] orion-ehci f1050000.ehci: EHCI Host Controller
      [    2.486212] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
      [    2.494070] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
      [    2.526436] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
      [    2.532932] hub 1-0:1.0: USB hub found
      [    2.537217] hub 1-0:1.0: 1 port detected
      [    2.544011] ehci-platform: EHCI generic platform driver
      [    2.554977] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
      [    2.565042] init: - preinit -
      [    2.705898] random: jshn: uninitialized urandom read (4 bytes read)
      [    2.744255] random: jshn: uninitialized urandom read (4 bytes read)
      [    2.765404] random: jshn: uninitialized urandom read (4 bytes read)
      [    2.826467] usb 1-1: new high-speed USB device number 2 using orion-ehci
      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
      [    3.037406] hub 1-1:1.0: USB hub found
      [    3.041543] hub 1-1:1.0: 2 ports detected
      [    3.356428] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
      [    6.985392] procd: - early -
      [    6.988821] procd: - watchdog -
      [    7.537040] procd: - watchdog -
      [    7.540413] procd: - ubus -
      [    7.595565] procd: - init -
      Please press Enter to activate this console.
      [    7.939574] kmodloader: loading kernel modules from /etc/modules.d/*
      [    7.949893] urngd: v1.0.2 started.
      [    8.046273] PPP generic driver version 2.4.2
      [    8.057050] NET: Registered protocol family 24
      [    8.089007] kmodloader: done loading kernel modules from /etc/modules.d/*
      [    8.110257] random: crng init done
      [    8.113684] random: 7 urandom warning(s) missed due to ratelimiting
      [   36.644207] br-lan: port 1(eth0) entered blocking state
      [   36.649495] br-lan: port 1(eth0) entered disabled state
      [   36.654927] device eth0 entered promiscuous mode
    
      BusyBox v1.35.0 (2022-02-09 21:17:54 UTC) built-in shell (ash)
    
        _______                     ________        __
       |       |.-----.-----.-----.|  |  |  |.----.|  |_
       |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
       |_______||   __|_____|__|__||________||__|  |____|
                |__| W I R E L E S S   F R E E D O M
       -----------------------------------------------------
       OpenWrt SNAPSHOT, r18780-73fd9f79ce
       -----------------------------------------------------
      === 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": "5.10.96",
          "hostname": "OpenWrt",
          "system": "Feroceon 88FR131 rev 1 (v5l)",
          "model": "NETGEAR ReadyNAS Duo v2",
          "board_name": "netgear,readynas-duo-v2",
          "rootfs_type": "initramfs",
          "release": {
          "distribution": "OpenWrt",
          "version": "SNAPSHOT",
          "revision": "r18780-73fd9f79ce",
          "target": "kirkwood/generic",
          "description": "OpenWrt SNAPSHOT r18780-73fd9f79ce"
          }
      }