OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Steven Maddox - 14.11.2021

FS#4137 - OpenWRT 21.02.1 doesn't completely boot on RaidSonic IB-NAS4220-B

Device: RaidSonic IB-NAS4220-B
OpenWRT version: 21.02.1

Problem:

When OpenWRT 21.02.1 is flashed to the RaidSonic IB-NAS4220-B by using the following file...
https://downloads.openwrt.org/releases/21.02.1/targets/gemini/generic/openwrt-21.02.1-gemini-raidsonic_ib-4220-b-squashfs-factory.bin

It results in a system which will not boot and hangs on...

[    7.047812] Waiting for root device /dev/mtdblock3...

Steps to reproduce:

Once you’ve extracted the .bin file (linked to above... which is actually a .tar.gz in disguise)... you’ll have files zImage, rd.gz and hddapp.tgz which you can put on a TFTP server so that the boot loader can access them.

e.g. on my Linux desktop, I might download, extract and host those files via a temporary TFTP server (using dnsmasq)...

mkdir ~/owrt-tftp
cd ~/owrt-tftp
wget -O- https://downloads.openwrt.org/releases/21.02.1/targets/gemini/generic/openwrt-21.02.1-gemini-raidsonic_ib-4220-b-squashfs-factory.bin | tar -zx
sudo dnsmasq -i enx001060b1d868 –enable-tftp –tftp-root=”$(pwd)” -d -p0

Then via serial this is how flashing it and booting it went...

Storlink SL351x Boot Loader [Linux], version 1.0.9
Built by linux, 17:27:04, Dec 19 2007

Processor: SL3516c2
CPU Rate: 300000000
AHB Bus Clock:150MHz    Ratio:2/1
MAC 1 Address: 00:01:D2:07:0D:BD
MAC 2 Address: 00:50:C2:2B:D0:02
inet addr: 192.168.0.200/255.255.255.0
==> enter ^C to abort booting within 3 seconds ...... 
PHY 0 Addr 1 Vendor ID: 0x01410e11
mii_write: phy_addr=0x1 reg_addr=0x4 value=0x5e1 
mii_write: phy_addr=0x1 reg_addr=0x9 value=0x300 
mii_write: phy_addr=0x1 reg_addr=0x0 value=0x1200 
mii_write: phy_addr=0x1 reg_addr=0x0 value=0x9200 
mii_write: phy_addr=0x1 reg_addr=0x0 value=0x1200 

                              Boot Menu
==============================================================================
0: Reboot                                   1: Start the Kernel Code
2: List Image                               3: Delete Image
4: Create New Image                         5: Enter Command Line Interface
6: Set IP Address                           7: Set MAC Address
8: Show Configuration                       F: Create Default FIS
X: Upgrade Boot                             Y: Upgrade Kernel
Z: Upgrade Firmware                         A: Upgrade Application
R: Upgrade RAM Disk                         

=> Select: 8

Processor: SL3516c2
CPU Rate: 300000000
AHB Bus Clock:150MHz    Ratio:2/1
MAC 1 Address: 00:01:D2:07:0D:BD
MAC 2 Address: 00:50:C2:2B:D0:02
inet addr: 192.168.0.200/255.255.255.0

                              Boot Menu
==============================================================================
0: Reboot                                   1: Start the Kernel Code
2: List Image                               3: Delete Image
4: Create New Image                         5: Enter Command Line Interface
6: Set IP Address                           7: Set MAC Address
8: Show Configuration                       F: Create Default FIS
X: Upgrade Boot                             Y: Upgrade Kernel
Z: Upgrade Firmware                         A: Upgrade Application
R: Upgrade RAM Disk                         

=> Select: Y



1  : Download by X-modem
2  : Download by TFTP
ESC: Return 
==> 2
TFTP Server IP Address: 192.168.0.66
Image Path and name(e.g. /images/zImage): zImage
TFTP Download zImage from 192.168.0.66 .....................

Successful to download by TFTP! Size=2097152

Do not power-off this device while flash programming is proceeding!!
==> enter ^C to abort program flash 0x30020000 within 3 seconds ...... 

Erase flash (0x30020000): Size=3145728 ........................ OK!
Program flash (0x30020000): Size=2097152 ................ OK!

Start Update FIS data......
Erase flash (0x30fe0000): Size=131072 . OK!
Program flash (0x30fe0000): Size=5120 . OK!
Successful to upgrade (0x30020000)!

                              Boot Menu
==============================================================================
0: Reboot                                   1: Start the Kernel Code
2: List Image                               3: Delete Image
4: Create New Image                         5: Enter Command Line Interface
6: Set IP Address                           7: Set MAC Address
8: Show Configuration                       F: Create Default FIS
X: Upgrade Boot                             Y: Upgrade Kernel
Z: Upgrade Firmware                         A: Upgrade Application
R: Upgrade RAM Disk                         

=> Select: A



1  : Download by X-modem
2  : Download by TFTP
ESC: Return 
==> 2
TFTP Server IP Address: 192.168.0.66
Image Path and name(e.g. /hddapp.tgz): hddapp.tgz
TFTP Download hddapp.tgz from 192.168.0.66 .......................................................

Successful to download by TFTP! Size=6291456

Do not power-off this device while flash programming is proceeding!!
==> enter ^C to abort program flash 0x30920000 within 3 seconds ...... 

Erase flash (0x30920000): Size=6291456 ................................................ OK!
Program flash (0x30920000): Size=6291456 ................................................ OK!

Start Update FIS data......
Erase flash (0x30fe0000): Size=131072 . OK!
Program flash (0x30fe0000): Size=5120 . OK!
Successful to upgrade (0x30920000)!

                              Boot Menu
==============================================================================
0: Reboot                                   1: Start the Kernel Code
2: List Image                               3: Delete Image
4: Create New Image                         5: Enter Command Line Interface
6: Set IP Address                           7: Set MAC Address
8: Show Configuration                       F: Create Default FIS
X: Upgrade Boot                             Y: Upgrade Kernel
Z: Upgrade Firmware                         A: Upgrade Application
R: Upgrade RAM Disk                         

=> Select: R



1  : Download by X-modem
2  : Download by TFTP
ESC: Return 
==> 2
TFTP Server IP Address: 192.168.0.66
Image Path and name(e.g. /images/zImage): rd.gz
TFTP Download rd.gz from 192.168.0.66 ...........

Successful to download by TFTP! Size=955102

Do not power-off this device while flash programming is proceeding!!
==> enter ^C to abort program flash 0x30320000 within 3 seconds ...... 

Erase flash (0x30320000): Size=6291456 ................................................ OK!
Program flash (0x30320000): Size=955102 ........ OK!

Start Update FIS data......
Erase flash (0x30fe0000): Size=131072 . OK!
Program flash (0x30fe0000): Size=5120 . OK!
Successful to upgrade (0x30320000)!

                              Boot Menu
==============================================================================
0: Reboot                                   1: Start the Kernel Code
2: List Image                               3: Delete Image
4: Create New Image                         5: Enter Command Line Interface
6: Set IP Address                           7: Set MAC Address
8: Show Configuration                       F: Create Default FIS
X: Upgrade Boot                             Y: Upgrade Kernel
Z: Upgrade Firmware                         A: Upgrade Application
R: Upgrade RAM Disk                         

=> Select: 0

Reboot system...

Failed to change IP address due to illegal value
Failed to change IP Gateway due to illegal value




Storlink SL351x Boot Loader [Linux], version 1.0.9
Built by linux, 17:27:04, Dec 19 2007

Processor: SL3516c2
CPU Rate: 300000000
AHB Bus Clock:150MHz    Ratio:2/1
MAC 1 Address: 00:01:D2:07:0D:BD
MAC 2 Address: 00:50:C2:2B:D0:02
inet addr: 192.168.0.200/255.255.255.0
==> enter ^C to abort booting within 3 seconds ...... 
Load Kern image from 0x30020000 to 0x1600000 size 2097152
Load Ramdisk image from 0x30320000 to 0x800000 size 955102
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 PREEMPT Sun Oct 24 09:01:35 2021
[    0.000000] CPU: FA526 [66015261] revision 1 (ARMv4), cr=0000397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Raidsonic NAS IB-4220-B
[    0.000000] Memory policy: Data cache writeback
[    0.000000] cma: Reserved 16 MiB at 0x07000000
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line: console=ttyS0,19200n8 root=/dev/mtdblock3 rw rootfstype=squashfs,jffs2 rootwait
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 103620K/131072K available (6060K kernel code, 217K rwdata, 1644K rodata, 1024K init, 238K bss, 11068K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x29c/0x498 with crng_init=0
[    0.000000] clocksource: FTTMR010-TIMER2: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.000029] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.000127] Switching to timer-based delay loop, resolution 40ns
[    0.000761] Console: colour dummy device 80x30
[    0.000918] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)
[    0.000981] pid_max: default: 32768 minimum: 301
[    0.001859] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001950] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.005045] CPU: Testing write buffer coherency: ok
[    0.009061] Setting up static identity map for 0x100000 - 0x100048
[    0.009648] rcu: Hierarchical SRCU implementation.
[    0.022636] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.022712] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.026641] pinctrl core: initialized pinctrl subsystem
[    0.033627] NET: Registered protocol family 16
[    0.041654] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.053778] No ATAGs?
[    0.064247] pinctrl-gemini 40000000.syscon:pinctrl: detected 3516 chip variant
[    0.064320] pinctrl-gemini 40000000.syscon:pinctrl: GLOBAL MISC CTRL at boot: 0x83c22037
[    0.064367] pinctrl-gemini 40000000.syscon:pinctrl: flash pin is set
[    0.065952] pinctrl-gemini 40000000.syscon:pinctrl: initialized Gemini pin control driver
[    0.257678] pl08xdmac 67000000.dma-controller: FTDMAC020 1.16 rel 1
[    0.257740] pl08xdmac 67000000.dma-controller: FTDMAC020 4 channels, has built-in bridge, AHB0 and AHB1, supports linked lists
[    0.258001] pl08xdmac 67000000.dma-controller: initialized 4 virtual memcpy channels
[    0.259615] pl08xdmac 67000000.dma-controller: DMA: PL080 rev0 at 0x67000000 irq 28
[    0.260081] Gemini SoC 3516 revision c2, set arbitration 00200030
[    0.268005] vgaarb: loaded
[    0.271989] SCSI subsystem initialized
[    0.287129] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.293429] clocksource: Switched to clocksource FTTMR010-TIMER2
[    0.384678] thermal_sys: Registered thermal governor 'step_wise'
[    0.385986] NET: Registered protocol family 2
[    0.386509] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.389778] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.389942] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.390045] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.390127] TCP: Hash tables configured (established 1024 bind 1024)
[    0.390624] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.390738] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.391643] NET: Registered protocol family 1
[    0.391784] PCI: CLS 0 bytes, default 32
[    0.400259] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    0.513343] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.513390] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.699187] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.699929] io scheduler mq-deadline registered
[    0.699976] io scheduler kyber registered
[    0.706151] ftgpio010-gpio 4d000000.gpio: FTGPIO010 @(ptrval) registered
[    0.711817] ftgpio010-gpio 4e000000.gpio: FTGPIO010 @(ptrval) registered
[    0.714713] ftgpio010-gpio 4f000000.gpio: FTGPIO010 @(ptrval) registered
[    0.724974] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.753268] printk: console [ttyS0] disabled
[    0.754208] 42000000.serial: ttyS0 at MMIO 0x42000000 (irq = 18, base_baud = 3000000) is a 16550A
[    3.632841] printk: console [ttyS0] enabled
[    3.665802] Loading iSCSI transport class v2.0-870.
[    3.704501] gemini_sata_bridge 46000000.sata: SATA ID 00000e00, PHY ID: 01000100
[    3.750173] gemini_sata_bridge 46000000.sata: set up the Gemini IDE/SATA nexus
[    3.795569] pata_ftide010 63000000.ide: set up Gemini PATA0
[    3.830157] pata_ftide010 63000000.ide: device ID 00000500, irq 26, reg [mem 0x63000000-0x63000fff]
[    3.885078] pata_ftide010 63000000.ide: SATA0 (master) start
[    4.093523] gemini_sata_bridge 46000000.sata: SATA0 PHY ready
[    4.128025] pata_ftide010 63000000.ide: brought 1 bridges online
[    4.170153] scsi host0: pata_ftide010
[    4.195220] ata1: SATA max UDMA/133 irq 26
[    4.222317] pata_ftide010 63400000.ide: set up Gemini PATA1
[    4.256481] pata_ftide010 63400000.ide: device ID 00000500, irq 27, reg [mem 0x63400000-0x63400fff]
[    4.311250] pata_ftide010 63400000.ide: SATA1 (master) start
[    4.429812] ata1.00: HPA detected: current 976771055, native 976773168
[    4.469031] ata1.00: ATA-8: WDC WD5000AAJS-22YFA0, 12.01C02, max UDMA/133
[    4.509766] ata1.00: 976771055 sectors, multi 0: LBA48 NCQ (depth 0/32)
[    4.549510] gemini_sata_bridge 46000000.sata: SATA1 PHY ready
[    4.584596] pata_ftide010 63400000.ide: brought 1 bridges online
[    4.623998] scsi 0:0:0:0: Direct-Access     ATA      WDC WD5000AAJS-2 1C02 PQ: 0 ANSI: 5
[    4.677790] scsi host1: pata_ftide010
[    4.701723] ata2: SATA max UDMA/133 irq 27
[    4.733205] sd 0:0:0:0: [sda] 976771055 512-byte logical blocks: (500 GB/466 GiB)
[    4.782402] physmap-flash 30000000.flash: no enabled pin control state
[    4.825925] physmap-flash 30000000.flash: no disabled pin control state
[    4.866174] sd 0:0:0:0: [sda] Write Protect is off
[    4.895772] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    4.950469] physmap-flash 30000000.flash: initialized Gemini-specific physmap control
[    5.022102] physmap-flash 30000000.flash: physmap platform flash device: [mem 0x30000000-0x30ffffff]
[    5.079830] ata2.00: HPA detected: current 976771055, native 976773168
[    5.121754] 30000000.flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x002101
[    5.183973] sd 0:0:0:0: [sda] Attached SCSI disk
[    5.213017] ata2.00: ATA-7: SAMSUNG HD502IJ, 1AA01113, max UDMA7
[    5.249280] Amd/Fujitsu Extended Query Table at 0x0040
[    5.280265] ata2.00: 976771055 sectors, multi 0: LBA48 NCQ (depth 0/32)
[    5.320148]   Amd/Fujitsu Extended Query version 1.3.
[    5.351156] number of CFI chips: 1
[    5.373939] scsi 1:0:0:0: Direct-Access     ATA      SAMSUNG HD502IJ  1113 PQ: 0 ANSI: 5
[    5.427677] Searching for RedBoot partition table in 30000000.flash at offset 0x0
[    5.479262] sd 1:0:0:0: [sdb] 976771055 512-byte logical blocks: (500 GB/466 GiB)
[    5.548038] No RedBoot partition table detected in 30000000.flash
[    5.585180] sd 1:0:0:0: [sdb] Write Protect is off
[    5.618553] Searching for RedBoot partition table in 30000000.flash at offset 0x0
[    5.664307] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    5.739093] No RedBoot partition table detected in 30000000.flash
[    5.800769] sd 1:0:0:0: [sdb] Attached SCSI disk
[    5.831336] mdio-gpio mdio: failed to get alias id
[    5.862316] libphy: GPIO Bitbanged MDIO: probed
[    5.889523] random: fast init done
[    5.916359] libphy: Fixed MDIO Bus: probed
[    5.988044] gmac-gemini 60000000.ethernet: Ethernet device ID: 0x000, revision 0x1
[    6.035869] gemini-ethernet-port 60008000.ethernet-port: probe 60008000.ethernet-port ID 0
[    6.087301] gemini-ethernet-port 60008000.ethernet-port: using a random ethernet address
[    6.139202] gemini-ethernet-port 60008000.ethernet-port eth0: irq 31, DMA @ 0x0x60008000, GMAC @ 0x0x6000a000
[    6.293890] Marvell 88E1118 gpio-0:01: attached PHY driver [Marvell 88E1118] (mii_bus:phy_addr=gpio-0:01, irq=POLL)
[    6.358786] gemini-ethernet-port 6000c000.ethernet-port: probe 6000c000.ethernet-port ID 1
[    6.410065] gemini-ethernet-port 6000c000.ethernet-port: using a random ethernet address
[    6.461878] gemini-ethernet-port 6000c000.ethernet-port eth1: irq 32, DMA @ 0x0x6000c000, GMAC @ 0x0x6000e000
[    6.522095] gemini-ethernet-port 6000c000.ethernet-port eth1: PHY init failed, deferring to ifup time
[    6.582733] rtc-ftrtc010 45000000.rtc: registered as rtc0
[    6.619257] gemini-poweroff 4b000000.power-controller: Gemini poweroff driver registered
[    6.731823] ftwdt010-wdt 41000000.watchdog: FTWDT010 watchdog driver enabled
[    6.785919] NET: Registered protocol family 10
[    6.818572] Segment Routing with IPv6
[    6.841325] NET: Registered protocol family 17
[    6.868323] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    6.946599] 8021q: 802.1Q VLAN Support v1.8
[    6.983395] rtc-ftrtc010 45000000.rtc: setting system clock to 2019-11-08T09:18:18 UTC (1573204698)
[    7.039504] Waiting for root device /dev/mtdblock3...

Some seconds later you’ll also get...

[  124.733643] random: crng init done

But ultimately I think it’s still waiting on that ‘Waiting for root device’ message.

Additionally I also went back to the original firmware that this device came with (flashing it via the same method as above)... this worked (I also made a RAID 1 from the two disks this NAS has, formatted them... just to see if it would make a difference). Then I tried to flash the 21.02.1 .bin file again, but this time via the original firmware’s own upgrade web page... which flashed it perfectly fine. But I could see via serial that booting up got stuck at the same point.

I’m about to try the ext4 version of that .bin file (which is oddly named .bin.gz... lovely consistency!) and see if I get the same problem.

Any tips most welcome... but this file just doesn’t work.

Steven Maddox commented on 14.11.2021 22:26

Just thought I'd add... I waited a long while and still nothing.

But it definitely hadn't frozen as pressing the power button makes it turn off normally...

[ 3856.027435] gemini-poweroff 4b000000.power-controller: poweroff button pressed
[ 3856.071485] reboot: Failed to start orderly shutdown: forcing the issue
[ 3856.111730] sd 1:0:0:0: [sdb] Synchronizing SCSI cache
[ 3856.143473] sd 1:0:0:0: [sdb] Stopping disk
[ 3856.169205] Emergency Sync complete
[ 3857.044697] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 3857.076175] sd 0:0:0:0: [sda] Stopping disk
[ 3857.649175] reboot: Power down
[ 3857.667686] gemini-poweroff 4b000000.power-controller: Gemini power off
Steven Maddox commented on 21.11.2021 08:49

Also trying the ext4 (rather than squashfs) version of this file...

https://downloads.openwrt.org/releases/21.02.1/targets/gemini/generic/openwrt-21.02.1-gemini-raidsonic_ib-4220-b-ext4-factory.bin.gz

Well when you're trying to write the hddapp.tgz file you get told it's too big...

                              Boot Menu
==============================================================================
0: Reboot                                   1: Start the Kernel Code
2: List Image                               3: Delete Image
4: Create New Image                         5: Enter Command Line Interface
6: Set IP Address                           7: Set MAC Address
8: Show Configuration                       F: Create Default FIS
X: Upgrade Boot                             Y: Upgrade Kernel
Z: Upgrade Firmware                         A: Upgrade Application
R: Upgrade RAM Disk                         

=> Select: A



1  : Download by X-modem
2  : Download by TFTP
ESC: Return 
==> 2
TFTP Server IP Address: 192.168.0.66
Image Path and name(e.g. /images/zImage): hddapp.tgz
TFTP Download hddapp.tgz from 192.168.0.66 ........................................................

Successful to download by TFTP! Size=6292480
File is too large!

Which basically means unless something changes... either way it's game over for the latest version of OpenWRT working on this device any longer?

Project Manager
Christian Lamparter commented on 21.11.2021 13:17
 [    4.782402] physmap-flash 30000000.flash: no enabled pin control state
 [    4.825925] physmap-flash 30000000.flash: no disabled pin control state
 [    4.950469] physmap-flash 30000000.flash: initialized Gemini-specific physmap control
 [    5.022102] physmap-flash 30000000.flash: physmap platform flash device: [mem 0x30000000-0x30ffffff]
 [    5.121754] 30000000.flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x002101
 [    5.249280] Amd/Fujitsu Extended Query Table at 0x0040
 [    5.320148]   Amd/Fujitsu Extended Query version 1.3.
 [    5.351156] number of CFI chips: 1
 [    5.427677] Searching for RedBoot partition table in 30000000.flash at offset 0x0
 [    5.548038] No RedBoot partition table detected in 30000000.flash
 [    5.618553] Searching for RedBoot partition table in 30000000.flash at offset 0x0
 [    5.739093] No RedBoot partition table detected in 30000000.flash

Something is wrong here, the partition parser on your NAS4220-B doesn't seem to be able to find the RedBoot Partition table. What's odd is that according to the Device's dts, it should be located at offset "0xfe0000" and not "0x0".

The reason why OpenWrt 19.07 worked was that it had a static partition table
0900-arm-dts-gemini-add-openwrt-partitions-for-nas4220b.patch

whereas now, the information should be coming from the RedBoot partition table:
gemini-nas4220b.dts

(Maybe your flash has 64KiB/128KiB erase blocks? Maybe the table is located elsewhere? etc.)

To generate a flashdump (which would help locating the table, you could boot up 19.07 and run

gzip -c /dev/mtd*ro > /tmp/flashdump.gz

. This will produce a packed flashdump that can be copied over to a PC and inspected from there.

To check the flash erase size:

cat /sys/class/mtd/mtd0/erasesize

(there might be more other "useful" information in that /sys/class/mtd/mtd0/)

Cheers,
Christian

(Let's hope this isn't eaten.)

Steven Maddox commented on 21.11.2021 22:31

OK so I just flashed the squashfs version of 19.07.8 from...

https://downloads.openwrt.org/releases/19.07.8/targets/gemini/generic/openwrt-19.07.8-gemini-raidsonic_ib-4220-b-squashfs-factory.bin

It booted just fine and so I've listed the contents of that path you mentioned, and also shown the contents of the 'files' within it (but haven't gone deeper into any subdirectories or symlinks)...

root@OpenWrt:/# ls -lah /sys/class/mtd/mtd0/
drwxr-xr-x    4 root     root           0 Jan  1  1970 .
drwxr-xr-x   22 root     root           0 Jan  1  1970 ..
-r--r--r--    1 root     root        4.0K Jul 29 19:55 bad_blocks
-r--r--r--    1 root     root        4.0K Jul 29 19:55 bbt_blocks
-rw-r--r--    1 root     root        4.0K Jul 29 19:55 bitflip_threshold
-r--r--r--    1 root     root        4.0K Jul 29 19:55 corrected_bits
-r--r--r--    1 root     root        4.0K Jan  1  1970 dev
lrwxrwxrwx    1 root     root           0 Jul 29 19:55 device -> ../../../30000000.flash
-r--r--r--    1 root     root        4.0K Jul 29 19:55 ecc_failures
-r--r--r--    1 root     root        4.0K Jul 29 19:55 ecc_step_size
-r--r--r--    1 root     root        4.0K Jul 29 19:55 ecc_strength
-r--r--r--    1 root     root        4.0K Jul 29 19:55 erasesize
-r--r--r--    1 root     root        4.0K Jul 29 19:55 flags
drwxr-xr-x    6 root     root           0 Jan  1  1970 mtdblock0
-r--r--r--    1 root     root        4.0K Jul 29 19:55 name
-r--r--r--    1 root     root        4.0K Jul 29 19:55 numeraseregions
lrwxrwxrwx    1 root     root           0 Jul 29 19:55 of_node -> ../../../../../../firmware/devicetree/base/soc/flash@30000000/partition@0
-r--r--r--    1 root     root        4.0K Jul 29 19:55 offset
-r--r--r--    1 root     root        4.0K Jul 29 19:55 oobsize
drwxr-xr-x    2 root     root           0 Jul 29 19:55 power
-r--r--r--    1 root     root        4.0K Jul 29 19:55 size
-r--r--r--    1 root     root        4.0K Jul 29 19:55 subpagesize
lrwxrwxrwx    1 root     root           0 Jul 29 19:55 subsystem -> ../../../../../../class/mtd
-r--r--r--    1 root     root        4.0K Jul 29 19:55 type
-rw-r--r--    1 root     root        4.0K Jan  1  1970 uevent
-r--r--r--    1 root     root        4.0K Jul 29 19:55 writesize
root@OpenWrt:/# cat /sys/class/mtd/mtd0/bad_blocks 
0
root@OpenWrt:/# cat /sys/class/mtd/mtd0/bbt_blocks 
0
root@OpenWrt:/# cat /sys/class/mtd/mtd0/bitflip_threshold 
0
root@OpenWrt:/# cat /sys/class/mtd/mtd0/corrected_bits 
0
root@OpenWrt:/# cat /sys/class/mtd/mtd0/dev
90:0
root@OpenWrt:/# cat /sys/class/mtd/mtd0/ecc_failures 
0
root@OpenWrt:/# cat /sys/class/mtd/mtd0/ecc_step_size 
0
root@OpenWrt:/# cat /sys/class/mtd/mtd0/ecc_strength 
0
root@OpenWrt:/# cat /sys/class/mtd/mtd0/erasesize 
131072
root@OpenWrt:/# cat /sys/class/mtd/mtd0/flags 
0x800
root@OpenWrt:/# cat /sys/class/mtd/mtd0/name 
RedBoot
root@OpenWrt:/# cat /sys/class/mtd/mtd0/numeraseregions 
0
root@OpenWrt:/# cat /sys/class/mtd/mtd0/offset 
0
root@OpenWrt:/# cat /sys/class/mtd/mtd0/oobsize 
0
root@OpenWrt:/# cat /sys/class/mtd/mtd0/size 
131072
root@OpenWrt:/# cat /sys/class/mtd/mtd0/subpagesize 
1
root@OpenWrt:/# cat /sys/class/mtd/mtd0/type 
nor
root@OpenWrt:/# cat /sys/class/mtd/mtd0/uevent 
MAJOR=90
MINOR=0
DEVNAME=mtd0
DEVTYPE=mtd
OF_NAME=partition
OF_FULLNAME=/soc/flash@30000000/partition@0
OF_COMPATIBLE_N=0
root@OpenWrt:/# cat /sys/class/mtd/mtd0/writesize 
1

Also generated that file you wanted and attached it.

However because this bug tracker doesn't like attached files being bigger than 2 MiB per comment... you'll be seeing another 9 comments from me with the other parts and you can put them together with...

cat flashdump.gz.1 flashdump.gz.2 flashdump.gz.3 flashdump.gz.4 flashdump.gz.5 flashdump.gz.6 flashdump.gz.7 flashdump.gz.8 flashdump.gz.9 flashdump.gz.10 > flashdump.gz

:)

[Thank you. I've removed the attachments and their posts. I think they have served their purpose.]

Project Manager
Christian Lamparter commented on 23.11.2021 20:52

the provided flashdump has something that resembles a partition table right at 0xfe0000.

and from your post:

root@OpenWrt:/# cat /sys/class/mtd/mtd0/erasesize
> 131072

This means that your flash chip reports a 128KiB erasesize (and not the assumed 32 KiB)

if you could patch that 0x1fc value in the device-tree gemini-nas4220b.dts

to (0xfe0000 / 131072) = 127 = 0x7f. Then everything should fall into place and everything "should" work.

Note:
There's something to watch out though: manufacturers sometimes have to switch to a different flash chip. I looked around if I could find any mentions of what other flash chips are used.
I looked around and found a review which had PCB shots. Their sample had a S29GL128N(11TFI01 - somewhat unreadable). This is a Spanion Parallel NOR MirrorBitâ„¢ Flash chip. The Spanion datasheet says "S29GL128N: One hundred twenty-eight 64 Kword (128 Kbyte) sectors".

Note2:

(It seems the "kernel" is called "kern" instead. Still, I don't think this is an issue
since it seems that the gemini's sysupgrade platform.sh only supports the DIR-685)

Project Manager
Christian Lamparter commented on 23.11.2021 21:58

Attached a preliminary patch. (Please take a look, I'm not a native speaker)

This is for the current snapshot release though. If you are unfamiliar with the building process, I can add the patch to my queue and push it later (probably weekend or next week). Once a new image snapshot image is generated, you can download it from the site and test it. If it works the patch will be sent upstream to the linux-arm mailing list for review and a patch for the next openwrt 21.02 will be made (so the next 21.02 release will work again).

Steven Maddox commented on 25.11.2021 07:37

Hey Christian,

Thank you so much for looking into this.

A few of us discuss running OpenWRT on NAS devices over on http://nas-forum.org and I noticed a thread on there (about the IB-NAS4210-B... which is the single-disk version of the IB-NAS4220-B, that we're discussing... which is dual disk)... and they seem to be discussing partitions too.

Any chance you can take a quick look and see if perhaps your fix might apply to IB-NAS4210-B users as well?

http://nas-forum.org/index.php?page=Thread&postID=3902

If you can add the patch to your queue that'd be great, thank you. I'll be sure to promptly test (and re-test as much as needed) anything I can easily download and flash. I only have a IB-NAS4220-B however (not a IB-NAS4210-B).

Thanks

Steven

Project Manager
Christian Lamparter commented on 28.11.2021 19:04

Hi Steven,

the builder-bots successfully built and uploaded a snapshot image with the fix.

https://downloads.openwrt.org/snapshots/targets/gemini/generic/

Please let me know, if the NAS 4220-B now finds the rootfs.

As for adding the NAS-4210. Yea, best if someone with a real device can do it.
Nobody needs to reinvent the wheel though, if it's a mix between the DNS-313
and NAS-4220, it would be best to take the appropriate parts and get the
device-tree file through the upstream review (maybe Linus Walleij can help,
since he seems to own the gemini variants and he'll be familiar).

Cheers,
Christian

Steven Maddox commented on 28.11.2021 20:54

Hey Christian,

Sorry to have to report that it appears that build doesn't boot due to a segmentation fault.

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.82 (builder@buildhost) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 11.2.0 r18216-a662d8550f) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 PREEMPT Sun Nov 28 00:13:08 2021
[    0.000000] CPU: FA526 [66015261] revision 1 (ARMv4), cr=0000397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Raidsonic NAS IB-4220-B
[    0.000000] Memory policy: Data cache writeback
[    0.000000] cma: Reserved 16 MiB at 0x07000000
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   HighMem  empty
[    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] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line: console=ttyS0,19200n8 root=/dev/mtdblock3 rw rootfstype=squashfs,jffs2 rootwait
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 102172K/131072K available (6704K kernel code, 632K rwdata, 1728K rodata, 1024K init, 245K bss, 12516K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] 	Trampoline variant of Tasks RCU enabled.
[    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: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x2e0/0x4e8 with crng_init=0
[    0.000000] clocksource: FTTMR010-TIMER2: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.000029] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.000133] Switching to timer-based delay loop, resolution 40ns
[    0.000812] Console: colour dummy device 80x30
[    0.000991] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)
[    0.001074] pid_max: default: 32768 minimum: 301
[    0.001847] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001950] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.005041] CPU: Testing write buffer coherency: ok
[    0.009677] Setting up static identity map for 0x100000 - 0x100048
[    0.010382] rcu: Hierarchical SRCU implementation.
[    0.010879] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.024614] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.024706] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.028791] pinctrl core: initialized pinctrl subsystem
[    0.040965] NET: Registered protocol family 16
[    0.051908] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.077690] thermal_sys: Registered thermal governor 'step_wise'
[    0.078654] No ATAGs?
[    0.213562] pinctrl-gemini 40000000.syscon:pinctrl: detected 3516 chip variant
[    0.213638] pinctrl-gemini 40000000.syscon:pinctrl: GLOBAL MISC CTRL at boot: 0x83c22037
[    0.213693] pinctrl-gemini 40000000.syscon:pinctrl: flash pin is set
[    0.215273] pinctrl-gemini 40000000.syscon:pinctrl: initialized Gemini pin control driver
[    0.554886] pl08xdmac 67000000.dma-controller: FTDMAC020 1.16 rel 1
[    0.554954] pl08xdmac 67000000.dma-controller: FTDMAC020 4 channels, has built-in bridge, AHB0 and AHB1, supports linked lists
[    0.555246] pl08xdmac 67000000.dma-controller: initialized 4 virtual memcpy channels
[    0.556963] pl08xdmac 67000000.dma-controller: DMA: PL080 rev0 at 0x67000000 irq 28
[    0.572994] Gemini SoC 3516 revision c2, set arbitration 00200030
[    0.577502] vgaarb: loaded
[    0.587463] SCSI subsystem initialized
[    0.629622] clocksource: Switched to clocksource FTTMR010-TIMER2
[    0.826746] NET: Registered protocol family 2
[    0.827271] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.833510] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.833744] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.833866] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.833956] TCP: Hash tables configured (established 1024 bind 1024)
[    0.834475] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.834611] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.835422] NET: Registered protocol family 1
[    0.835576] PCI: CLS 0 bytes, default 32
[    0.848542] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    0.884328] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.884392] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.337895] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    1.338635] io scheduler mq-deadline registered
[    1.338701] io scheduler kyber registered
[    1.348657] ftgpio010-gpio 4d000000.gpio: FTGPIO010 @(ptrval) registered
[    1.358583] ftgpio010-gpio 4e000000.gpio: FTGPIO010 @(ptrval) registered
[    1.372063] ftgpio010-gpio 4f000000.gpio: FTGPIO010 @(ptrval) registered
[    1.395561] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    1.454377] printk: console [ttyS0] disabled
[    1.454725] 42000000.serial: ttyS0 at MMIO 0x42000000 (irq = 18, base_baud = 3000000) is a 16550A
[    4.585263] printk: console [ttyS0] enabled
[    4.628478] Loading iSCSI transport class v2.0-870.
[    4.680737] gemini_sata_bridge 46000000.sata: SATA ID 00000e00, PHY ID: 01000100
[    4.731465] gemini_sata_bridge 46000000.sata: set up the Gemini IDE/SATA nexus
[    4.778684] pata_ftide010 63000000.ide: set up Gemini PATA0
[    4.818250] pata_ftide010 63000000.ide: device ID 00000500, irq 26, reg [mem 0x63000000-0x63000fff]
[    4.873180] pata_ftide010 63000000.ide: SATA0 (master) start
[    5.069642] random: fast init done
[    5.090144] gemini_sata_bridge 46000000.sata: SATA0 PHY ready
[    5.124668] pata_ftide010 63000000.ide: brought 1 bridges online
[    5.171979] scsi host0: pata_ftide010
[    5.197782] ata1: SATA max UDMA/133 irq 26
[    5.227757] pata_ftide010 63400000.ide: set up Gemini PATA1
[    5.264823] pata_ftide010 63400000.ide: device ID 00000500, irq 27, reg [mem 0x63400000-0x63400fff]
[    5.320075] pata_ftide010 63400000.ide: SATA1 (master) start
[    5.439757] ata1.00: HPA detected: current 976771055, native 976773168
[    5.478968] ata1.00: ATA-8: WDC WD5000AAJS-22YFA0, 12.01C02, max UDMA/133
[    5.519723] ata1.00: 976771055 sectors, multi 0: LBA48 NCQ (depth 0/32)
[    5.559470] gemini_sata_bridge 46000000.sata: SATA1 PHY ready
[    5.594533] pata_ftide010 63400000.ide: brought 1 bridges online
[    5.633699] scsi 0:0:0:0: Direct-Access     ATA      WDC WD5000AAJS-2 1C02 PQ: 0 ANSI: 5
[    5.692530] scsi host1: pata_ftide010
[    5.717882] ata2: SATA max UDMA/133 irq 27
[    5.751973] sd 0:0:0:0: [sda] 976771055 512-byte logical blocks: (500 GB/466 GiB)
[    5.811377] physmap-flash 30000000.flash: no enabled pin control state
[    5.857668] physmap-flash 30000000.flash: no disabled pin control state
[    5.898137] sd 0:0:0:0: [sda] Write Protect is off
[    5.927931] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    5.983003] physmap-flash 30000000.flash: initialized Gemini-specific physmap control
[    6.030720] ata2.00: HPA detected: current 976771055, native 976773168
[    6.092776]  sda: sda1 sda2 sda3
[    6.113574] physmap-flash 30000000.flash: physmap platform flash device: [mem 0x30000000-0x30ffffff]
[    6.181527] ata2.00: ATA-7: SAMSUNG HD502IJ, 1AA01113, max UDMA7
[    6.219078] sd 0:0:0:0: [sda] Attached SCSI disk
[    6.249520] 30000000.flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x002101
[    6.310788] ata2.00: 976771055 sectors, multi 0: LBA48 NCQ (depth 0/32)
[    6.351201] Amd/Fujitsu Extended Query Table at 0x0040
[    6.384231] scsi 1:0:0:0: Direct-Access     ATA      SAMSUNG HD502IJ  1113 PQ: 0 ANSI: 5
[    6.432902]   Amd/Fujitsu Extended Query version 1.3.
[    6.463368] number of CFI chips: 1
[    6.489845] sd 1:0:0:0: [sdb] 976771055 512-byte logical blocks: (500 GB/466 GiB)
[    6.545664] Searching for RedBoot partition table in 30000000.flash at offset 0xfe0000
[    6.593698] sd 1:0:0:0: [sdb] Write Protect is off
[    6.643536] 7 RedBoot partitions found on MTD device 30000000.flash
[    6.681857] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.736180] Creating 7 MTD partitions on "30000000.flash":
[    6.776981] 0x000000000000-0x000000020000 : "BOOT"
[    6.806990]  sdb: sdb1 sdb2 sdb3
[    6.829570] 0x000000020000-0x000000220000 : "Kern"
[    6.877363] sd 1:0:0:0: [sdb] Attached SCSI disk
[    6.908457] 0x000000320000-0x000000448576 : "Ramdisk"
[    6.946137] mtd: partition "Ramdisk" doesn't end on an erase/write block -- force read-only
[    6.999540] 0x000000920000-0x000000f20000 : "Application"
[    7.039586] 0x000000f20000-0x000000f40000 : "VCTL"
[    7.076999] 0x000000f40000-0x000000fe0000 : "CurConf"
[    7.115289] 0x000000fe0000-0x000001000000 : "FIS directory"
[    7.238366] libphy: Fixed MDIO Bus: probed
[    7.297700] mdio-gpio mdio: failed to get alias id
[    7.390995] libphy: GPIO Bitbanged MDIO: probed
[    7.444258] gmac-gemini 60000000.ethernet: Ethernet device ID: 0x000, revision 0x1
[    7.492889] gemini-ethernet-port 60008000.ethernet-port: probe 60008000.ethernet-port ID 0
[    7.546699] gemini-ethernet-port 60008000.ethernet-port: using a random ethernet address
[    7.671101] Marvell 88E1118 gpio-0:01: attached PHY driver [Marvell 88E1118] (mii_bus:phy_addr=gpio-0:01, irq=POLL)
[    7.736339] gemini-ethernet-port 60008000.ethernet-port eth0: irq 31, DMA @ 0x0x60008000, GMAC @ 0x0x6000a000
[    7.802972] gemini-ethernet-port 6000c000.ethernet-port: probe 6000c000.ethernet-port ID 1
[    7.859905] gemini-ethernet-port 6000c000.ethernet-port: using a random ethernet address
[    7.909252] gemini-ethernet-port 6000c000.ethernet-port (unnamed net_device) (uninitialized): PHY init failed
[    7.976041] rtc-ftrtc010 45000000.rtc: registered as rtc0
[    8.020693] rtc-ftrtc010 45000000.rtc: setting system clock to 1970-01-01T00:00:00 UTC (0)
[    8.074193] gemini-poweroff 4b000000.power-controller: Gemini poweroff driver registered
[    8.203213] ftwdt010-wdt 41000000.watchdog: FTWDT010 watchdog driver enabled
[    8.266164] NET: Registered protocol family 10
[    8.297302] Segment Routing with IPv6
[    8.320193] NET: Registered protocol family 17
[    8.347216] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    8.425502] 8021q: 802.1Q VLAN Support v1.8
[    8.474430] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    8.525489] Freeing unused kernel memory: 1024K
[    8.579783] Run /sbin/init as init process
[    9.676628] init: Console is alive
[    9.698510] init: - watchdog -
[   13.299949] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[   13.591612] usbcore: registered new interface driver usbfs
[   13.659834] usbcore: registered new interface driver hub
[   13.729771] usbcore: registered new device driver usb
[   13.833915] raid6: skip pq benchmark and using algorithm int32x8
[   13.881514] raid6: using intx1 recovery algorithm
[   13.914106] xor: measuring software checksum speed
[   14.019767]    arm4regs        :   247 MB/sec
[   14.184037]    8regs           :   175 MB/sec
[   14.319774]    32regs          :   224 MB/sec
[   14.376742] xor: using function: arm4regs (247 MB/sec)
[   15.484274] Btrfs loaded, crc32c=crc32c-generic
[   15.590432] gpio-keys gpio_keys: does not support key code:141
[   15.656339] gpio-keys: probe of gpio_keys failed with error -22
[   15.761151] fotg210_hcd: FOTG210 Host Controller (EHCI) Driver
[   15.831440] fotg210-hcd 68000000.usb: initialized Gemini PHY
[   15.865750] fotg210-hcd 68000000.usb: Faraday USB2.0 Host Controller
[   15.909888] fotg210-hcd 68000000.usb: new USB bus registered, assigned bus number 1
[   16.134021] fotg210-hcd 68000000.usb: irq 29, io mem 0x68000000
[   16.180091] fotg210-hcd 68000000.usb: USB 2.0 started, EHCI 1.00
[   16.220067] hub 1-0:1.0: USB hub found
[   16.247129] hub 1-0:1.0: 1 port detected
[   16.284625] fotg210-hcd 69000000.usb: initialized Gemini PHY
[   16.321437] fotg210-hcd 69000000.usb: Faraday USB2.0 Host Controller
[   16.360264] fotg210-hcd 69000000.usb: new USB bus registered, assigned bus number 2
[   16.407487] fotg210-hcd 69000000.usb: irq 30, io mem 0x69000000
[   16.453560] fotg210-hcd 69000000.usb: USB 2.0 started, EHCI 1.00
[   16.493459] hub 2-0:1.0: USB hub found
[   16.520710] hub 2-0:1.0: 1 port detected
[   16.611107] usbcore: registered new interface driver usb-storage
[   16.689990] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[   16.785618] init: - preinit -
[   20.529907] random: jshn: uninitialized urandom read (4 bytes read)
[   20.924199] random: jshn: uninitialized urandom read (4 bytes read)
[   21.030835] random: jshn: uninitialized urandom read (4 bytes read)
[   21.209927] 8<--- cut here ---
[   21.228596] Unable to handle kernel paging request at virtual address 4452007f
[   21.272435] pgd = (ptrval)
[   21.288772] [4452007f] *pgd=00000000
[   21.314397] gemini-ethernet-port 60008000.ethernet-port eth0: Unsupported PHY speed (-1) on gpio-0:01
[   21.369753] Internal error: Oops: 1 [#1] PREEMPT ARM
[   21.399455] Modules linked in: usb_storage leds_gpio fotg210_hcd gpio_button_hotplug reiserfs btrfs zstd_decompress zstd_compress zlib_deflate xxhash xor raid6_pq lzo_compress libcrc32c usbcore usb_common
[   21.508427] CPU: 0 PID: 757 Comm: ip Not tainted 5.10.82 #0
[   21.541757] Hardware name: Gemini (Device Tree)
[   21.568872] PC is at geth_resize_freeq+0x30/0x398
[   21.597010] LR is at gmac_open+0x50/0x314
[   21.620982] pc : [<c059cbd4>]    lr : [<c059d0c4>]    psr: 20000013
[   21.658471] sp : c1bddd50  ip : 00000000  fp : c1241d00
[   21.689720] r10: c110d560  r9 : c1241d0c  r8 : 00001002
[   21.720971] r7 : 00000000  r6 : 00000000  r5 : c1310b60  r4 : c110d000
[   21.760026] r3 : 44520057  r2 : c111c980  r1 : 60000013  r0 : c110d560
[   21.799084] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[   21.841780] Control: 0000397f  Table: 018ac000  DAC: 00000051
[   21.876155] Process ip (pid: 757, stack limit = 0x(ptrval))
[   21.909504] Stack: (0xc1bddd50 to 0xc1bde000)
[   21.935638] dd40:                                     00000000 00000000 00001002 c110d000
[   21.984715] dd60: c07cf99c 00000000 00000000 00001002 c1241d0c c059d0c4 c110d000 c110d000
[   22.033792] dd80: ffffffed 00000000 00000000 ffffffeb 0000000e c110d000 c07cf99c 00000000
[   22.082869] dda0: 00000000 00001002 c1241d0c c1409d70 c1241d00 c05f8108 20000013 c01112f8
[   22.131945] ddc0: c110d000 00000000 c110d000 00000001 00001003 c05f8494 00000000 c1bde060
[   22.181022] dde0: c1bde060 c0111340 c110d000 c0b90dd8 00001002 00000000 c110d144 c05f8510
[   22.230100] de00: c1bdde70 c0b90dd8 00000000 00000000 ffffffff c06b7950 c1886f2c 00000000
[   22.279174] de20: 00000000 00008914 c110d000 c1be1968 c1a83300 00001003 000137dc 00000038
[   22.328249] de40: 00067c56 c4363d6f 00085000 00008914 bef33c30 c0b90dd8 00000000 00000051
[   22.377322] de60: 00000004 c1409d70 00000000 c06bae2c 30687465 00000000 00000000 00000000
[   22.426395] de80: 00001003 000137dc 00000038 00067c56 00000000 c0211770 c6eeed00 00000065
[   22.475472] dea0: c1bddef4 c0b90dd8 c1bddef4 c05ef730 00008913 00000013 c1bddef4 c05ef730
[   22.524551] dec0: 00008913 c4363d6f c0b90dd8 00008914 bef33c30 c0b90dd8 bef33c30 c1a56f00
[   22.573626] dee0: 00000004 c05cf7e0 c0b7afe4 c0100201 c1bdc000 30687465 00000000 00000000
[   22.622702] df00: 00000000 00001002 000137dc 00000038 00067c56 c4363d6f c07d41a0 00008914
[   22.671779] df20: c1a56f00 bef33c30 bef33c30 c1a56f00 00000004 c0265a4c c101b3d0 c148d550
[   22.720852] df40: 00000000 00000003 c0b9395c 00000000 00000000 00000004 c1409d40 c1409d70
[   22.769928] df60: c1409d40 c05cd9c0 00000004 c1a56f00 00000000 c1409d40 c0100244 c05cfabc
[   22.819005] df80: c1bddf8c 00067186 00000001 bef33c30 00000036 c0100244 c1bdc000 00000000
[   22.868079] dfa0: 00000000 c0100060 00067186 00000001 00000004 00008914 bef33c30 bef33bf0
[   22.917154] dfc0: 00067186 00000001 bef33c30 00000036 00000004 00000000 bef33cec 00000000
[   22.966229] dfe0: 00085b28 bef33ac0 00062f10 b6f87490 20000010 00000004 00000000 00000000
[   23.015244] [<c059cbd4>] (geth_resize_freeq) from [<c059d0c4>] (gmac_open+0x50/0x314)
[   23.062165] [<c059d0c4>] (gmac_open) from [<c05f8108>] (__dev_open+0xf0/0x174)
[   23.105426] [<c05f8108>] (__dev_open) from [<c05f8494>] (__dev_change_flags+0x144/0x1a8)
[   23.153887] [<c05f8494>] (__dev_change_flags) from [<c05f8510>] (dev_change_flags+0x18/0x48)
[   23.204432] [<c05f8510>] (dev_change_flags) from [<c06b7950>] (devinet_ioctl+0x7f4/0x840)
[   23.253410] [<c06b7950>] (devinet_ioctl) from [<c06bae2c>] (inet_ioctl+0x228/0x324)
[   23.299288] [<c06bae2c>] (inet_ioctl) from [<c05cf7e0>] (sock_ioctl+0x5b4/0x73c)
[   23.343596] [<c05cf7e0>] (sock_ioctl) from [<c0265a4c>] (sys_ioctl+0x178/0xab8)
[   23.387364] [<c0265a4c>] (sys_ioctl) from [<c0100060>] (ret_fast_syscall+0x0/0x50)
[   23.432679] Exception stack(0xc1bddfa8 to 0xc1bddff0)
[   23.463004] dfa0:                   00067186 00000001 00000004 00008914 bef33c30 bef33bf0
[   23.512080] dfc0: 00067186 00000001 bef33c30 00000036 00000004 00000000 bef33cec 00000000
[   23.561094] dfe0: 00085b28 bef33ac0 00062f10 b6f87490
[   23.591421] Code: 15953008 e5933008 e3530000 0a000076 (e5932028) 
[   23.628448] gemini-ethernet-port 60008000.ethernet-port eth0: Link is Down
[   23.669749] gemini-ethernet-port 60008000.ethernet-port eth0: link flow control: none
[   23.726838] ---[ end trace 8e81cac5036a7d7a ]---
Segmentation fault
[   24.732803] gemini-ethernet-port 60008000.ethernet-port eth0: Link is Up - 100Mbps/Full - flow control off
[   24.790744] gemini-ethernet-port 60008000.ethernet-port eth0: link flow control: none
Project Manager
Christian Lamparter commented on 30.11.2021 23:35

Ok, the fis-index-block worked. I think the problem you have now is not related to the NOR flash. Instead the ethernet driver could be buggy. I've contacted upstream. Let's see.

Steven Maddox commented on 02.12.2021 14:36

Thanks Christian (let me know if you hear from upstream - or possibly a link to where you raised it?),

In the mean time... does your dts patch also mean the ext4 version (which I'd prefer to use) got re-built as well? If it does... then I'm going to try that again next (even if the ethernet driver crashes)... because if it's still too big to fit (see my 2nd comment) then I guess that needs addressing too separately.

I'm also curious if its possible to put the ext4 filesystem of OpenWRT on a USB pen and flash a kernel/image to the device that would seek out the main filesystem on the USB pen instead. This is because the NAS-4220 is fortunate to have 2 x USB Type-A ports... one of which is at the back and would be perfect for this. It'd also mean there wouldn't be any harsh limits on the number of packages I can install. Any thoughts on that would be most appreciated :)

Steven

Project Manager
Christian Lamparter commented on 02.12.2021 19:19

hm, I wrote to the devs. I don't know the in-and-outs of the gemini ethernet driver.
The "shared" queues makes it special... and it's an interaction between at least two patches that caused this.

As for ext4-root:

I would be surprised if any of the storlink-like devices can boot off ext4 images without modification. Reason being here that the kernel cmdline is set to "rootfstype=squashfs,jffs2". So it will only check squashfs or jffs2 rootfs.

What is very common though is to use extroot-mechanism for the sort of thing you are describing.

though it's not 100% the same as one "ext4" root-filesystem. It's because just the changes (i.e. installed packages, configuration modifications, new files) are being stored on "extroot" device. The advantage of doing this is that you can easily restore a device back to "factory" (i.e. initial openwrt) defaults (usually by the "10s press" of the reset button).

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing