R7800 with corrupted firmware image and faulty LAN. Gosh

Question is whether or not that boots without any NAND failures. As long as the kernel has such low-level issues I don't believe you will get any much further. I might be able to send you a replacement NAND part. However, the tricky part will be how to get that sufficiently initialized so it will boot off of it again once soldered in.

Do you think I can boot off a small usb drive setting it as default storage, instead of using the nand?
I'd be a happy man, if the WAN port could be turned into a LAN. Could still use this expensive device as personal cloud system, perhaps.

If by booting one means really the very first code the SoC is executing e.g. after it's on-chip boot ROM, then I doubt that can be changed. Likely U-Boot will always need to reside in NAND. Whether that vendor U-Boot allows setting a custom auto boot command is another question.

The uboot loads everytime without any problem, apparently.
All considered, I would only need a way to shift all the owrt installation on a USB drive, like you showed me how, adding an automation to do it automagically.

  1. the Netgear UBoot has quite a lot of options, mostly unknown to me, but possibly useful. Being guided, I can fidget with them.

  2. UBoot resides in a chip that can be flashed as well with an improved version, isn't it? Has anyone ever made improvements on the R7800 UBoot?

I believe the R7800 has only one nonvolatile storage device being that very same NAND.

As for U-Boot, there is at least no mainline ipq806x U-Boot as of yet but googling you might find various more or less crappy vendor versions which have been extended/used for various occasions. Given no easy low-level recovery mechanism exists (besides maybe JTAG) playing with that is not that easy.

I'm aware none of these hassles I'm bothering you with are "easy" :joy:
I'll resign (re-sigh :slightly_smiling_face:) myself to buying another router and tweak it, but meanwhile I'm actively considering how to avoid considering this unfortunate box as a whole e-waste. The full speed USB 3.0 ports, the esata port, the dual core at 1.7Ghz...you know, it's not a flimsy hardware, afterall.

With the exception of OpenWrt not being able to find rootfs on ubiblock0_0, it looks like you were proceeding quite well up until the forced sysupgrade of OEM firmware in post #64

In posts #45 & 51, @sumo had the same problem of not being able to start the kernel that you do with the OEM kernel in post #74. Did you adjust the loadaddr accordingly?

Purely a guess based on "printenv", but it looks like it might be 0x42000000 instead of 0x44000000

I would focus on getting OEM firmware working first, then if successful, invoke a factory reset (it looks like nmrp might do that for you) before moving back to your OpenWrt uImage. Of course, you'll then want to ether TFTP a factory squashfs OpenWrt image or try a sysupgrade image.

1 Like

Hello @skyblaster. Thank you for your interest in the topic, really.
in addition to the multiple problems of this device, I'm wondering if this is not my case, too (taken from owrt wiki page) :

There are some models, which have broken NANDs. when flashing the Kernel, some (mostly one) blocks are skipped. As a result, the start of the root-partition (called “ubi” in this model) comes later.

Result: Bootloop of the device

What you can do is here, edit the file target/linux/ipq806x/files-x.x/arch/arm/boot/dts/qcom-ipq8065-r7800.dts and put the startAddress for “ubi” up. (&nand_controller –> nand@0 –> partitions –> ubi@1880000), currently(04.2020) at line 360 )

Edit the two numbers showing 1880000 to 18A0000. (skip 2 blocks)

Then compile the image using make.

I'm considering this because all images I flashed have problems finding the UBI partition. It's the only common behaviour I see.
Unfortunately I'm not accustomed with the imagebuild environment, but I can have a try.
Do you think building an image with the offset is worth the effort?

Hm, interesting indeed. I'm currently skiing but I could probably get a build going for you in the evening so you could at least try whether it helps.

Not likely.

If there would be a bad block in the kernel area, it would be shown in the boot log and typically the device goes into a boot loop.

Loading from device 0: nand0 (offset 0x1480000)
Skipping bad block 0x014a0000

See examples in

May God blast me immediately if I keep on disturbing your life. :sweat_smile:
Enjoy your free, quality time. Let's procrastinate to a moment you are totally bored, and see.
As @hnyman noted, from the log messages the error is not skipping something but more of the nand controller is dumb
This is not encouraging. Another hint of deep fault.

@tmomas, thank you for the proper quoting...it's much more readable now!

Also from that wiki page:

Master, 19.07 and 18.06 have since Q2/2018 a larger kernel partition, so that kernel 4.14+ and flow offloading is possible. Additionally master, 19.07 and 18.06 currently use 70 MB larger area on flash, so installing more packages is possible. That change was made for master and 18.06 branches in June 2018.

Due to that, you will need TFTP flash once to upgrade/downgrade from the older builds (17.01.x or 18.06.0-rc1 or earlier). Sysupgrade works normally after you have upgraded to 18.06.0 or newer.

Have you tried flashing any 17.01.x images.....for science? The UBI layout was different back then.

ubi@1680000 {
	label = "ubi";
	reg = <0x1680000 0x1E00000>;
};
1 Like

Yeah, that's true. Rather points to a low-level issue. So question remains whether on NAND or SoC side.

Given me having the infrastructure to low-level access NAND flash using a 360-clip I might try whether that works on the R7800. Then I could send you a pre-programmed replacement part. As for those NAND parts I should have some such laying around somewhere. Anyway, I won't get to any of this until later next week.

1 Like

:smile: :smile: :smile: never say no to science.
Here you have it, flashing 17.01.7 build...same behaviour.
Log is from 2 automatic reboots:

U-Boot 2012.07 [local,local] (Sep 03 2015 - 17:33:28)

U-boot 2012.07 dni1 V0.4 for DNI HW ID: 29764958 NOR flash 0MB; NAND flash 128MB; RAM 512MB; 1st Radio 4x4; 2nd Radio 4x4; Cascade
smem ram ptable found: ver: 0 len: 5
DRAM:  491 MiB
NAND:  SF: Unsupported manufacturer 00
ipq_spi: SPI Flash not found (bus/cs/speed/mode) = (0/0/48000000/0)
128 MiB
MMC:
*** Warning - bad CRC, using default environment

PCI0 Link Intialized
PCI1 Link Intialized
In:    serial
Out:   serial
Err:   serial
 131072 bytes read: OK
MMC Device 0 not found
cdp: get part failed for 0:HLOS
Net:   MAC1 addr:b0:39:56:97:cb:c4
athrs17_reg_init: complete
athrs17_vlan_config ...done
S17c init  done
MAC2 addr:b0:39:56:97:cb:c3
eth0, eth1
Hit any key to stop autoboot:  0
Mac2 unit failed

 Client starts...[Listening] for ADVERTISE...TTT
Retry count exceeded; boot the image as usual

 nmrp server is stopped or failed !

Loading from device 0: nand0 (offset 0x1480000)

** check kernel image **
   Verifying Checksum ... OK

** check rootfs image **
   Verifying Checksum ... OK
MMC Device 0 not found

Loading from nand0, offset 0x1480000
   Image Name:   ARM LEDE Linux-4.4.182
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2097023 Bytes = 2 MiB
   Load Address: 42208000
   Entry Point:  42208000
Automatic boot of image at addr 0x44000000 ...
   Image Name:   ARM LEDE Linux-4.4.182
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2097023 Bytes = 2 MiB
   Load Address: 42208000
   Entry Point:  42208000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK
mtdparts variable not set, see 'help mtdparts'
no partitions defined

defaults:
mtdids  : nand0=msm_nand
mtdparts: none
info: "mtdparts" not set
Using machid 0x136c from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.4.182 (buildbot@builds-02.infra.lede-project.org) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3104-41de9a2) ) #0 SMP Tue Jun 18 18:45:43 2019
[    0.000000] CPU: ARMv7 Processor [512f04d0] revision 0 (ARMv7), cr=10c5787d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] Machine model: Netgear Nighthawk X4S R7800
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] PERCPU: Embedded 11 pages/cpu @dda0c000 s13696 r8192 d23168 u45056
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 121920
[    0.000000] Kernel command line:
[    0.000000] Bootloader command line (ignored): console=ttyHSL1,115200n8
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 479364K/491520K available (4273K kernel code, 247K rwdata, 664K rodata, 220K init, 211K bss, 12156K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xde800000 - 0xff800000   ( 528 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xde000000   ( 480 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0208000 - 0xc06da77c   (4938 kB)
[    0.000000]       .init : 0xc06db000 - 0xc0712000   ( 220 kB)
[    0.000000]       .data : 0xc0712000 - 0xc074ffc0   ( 248 kB)
[    0.000000]        .bss : 0xc0752000 - 0xc0786fc0   ( 212 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: dg_timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 305801671480 ns
[    0.000009] sched_clock: 32 bits at 6MHz, resolution 160ns, wraps every 343597383600ns
[    0.000020] Switching to timer-based delay loop, resolution 160ns
[    0.000204] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.50 BogoMIPS (lpj=62500)
[    0.000228] pid_max: default: 32768 minimum: 301
[    0.000332] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000347] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000952] CPU: Testing write buffer coherency: ok
[    0.001266] Setting up static identity map for 0x42208280 - 0x422082d8
[    0.004304] Brought up 2 CPUs
[    0.004322] SMP: Total of 2 processors activated (25.00 BogoMIPS).
[    0.004332] CPU: All CPU(s) started in SVC mode.
[    0.015066] VFP support v0.3: implementor 51 architecture 64 part 4d variant 2 rev 0
[    0.015242] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.015272] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.015360] pinctrl core: initialized pinctrl subsystem
[    0.016635] NET: Registered protocol family 16
[    0.017893] DMA: preallocated 2048 KiB pool for atomic coherent allocations
[    0.041452] cpuidle: using governor ladder
[    0.072468] cpuidle: using governor menu
[    0.087599] qcom_rpm 108000.rpm: RPM firmware 3.0.16777364
[    0.126781] pps_core: LinuxPPS API ver. 1 registered
[    0.126796] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.126828] PTP clock support registered
[    0.127808] clocksource: Switched to clocksource dg_timer
[    0.129506] NET: Registered protocol family 2
[    0.130070] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.130110] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.130161] TCP: Hash tables configured (established 4096 bind 4096)
[    0.130210] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.130233] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.130413] NET: Registered protocol family 1
[    0.131628] No memory allocated for crashlog
[    0.138594] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.138608] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.140796] io scheduler noop registered
[    0.140810] io scheduler deadline registered (default)
[    0.142261] 1b500000.pci supply vdda not found, using dummy regulator
[    0.142354] 1b500000.pci supply vdda_phy not found, using dummy regulator
[    0.142427] 1b500000.pci supply vdda_refclk not found, using dummy regulator
[    0.142901] PCI host bridge /soc/pci@1b500000 ranges:
[    0.142938]    IO 0x0fe00000..0x0fefffff -> 0x0fe00000
[    0.142968]   MEM 0x08000000..0x0fdfffff -> 0x08000000
[    0.164966] qcom-pcie 1b500000.pci: PCI host bridge to bus 0000:00
[    0.164989] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.165007] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff] (bus address [0xfe00000-0xfefffff])
[    0.165023] pci_bus 0000:00: root bus resource [mem 0x08000000-0x0fdfffff]
[    0.165536] PCI: bus0: Fast back to back transfers disabled
[    0.167283] PCI: bus1: Fast back to back transfers disabled
[    0.167559] pci 0000:00:00.0: BAR 8: assigned [mem 0x08000000-0x081fffff]
[    0.167583] pci 0000:01:00.0: BAR 0: assigned [mem 0x08000000-0x081fffff 64bit]
[    0.167686] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.167708] pci 0000:00:00.0:   bridge window [mem 0x08000000-0x081fffff]
[    0.168471] 1b700000.pci supply vdda not found, using dummy regulator
[    0.168561] 1b700000.pci supply vdda_phy not found, using dummy regulator
[    0.168636] 1b700000.pci supply vdda_refclk not found, using dummy regulator
[    0.169100] PCI host bridge /soc/pci@1b700000 ranges:
[    0.169132]    IO 0x31e00000..0x31efffff -> 0x31e00000
[    0.169150]   MEM 0x2e000000..0x31dfffff -> 0x2e000000
[    0.203630] qcom-pcie 1b700000.pci: PCI host bridge to bus 0001:00
[    0.203649] pci_bus 0001:00: root bus resource [bus 00-ff]
[    0.203664] pci_bus 0001:00: root bus resource [mem 0x2e000000-0x31dfffff]
[    0.204122] PCI: bus0: Fast back to back transfers disabled
[    0.205866] PCI: bus1: Fast back to back transfers disabled
[    0.206263] pci 0001:00:00.0: BAR 8: assigned [mem 0x2e000000-0x2e1fffff]
[    0.206285] pci 0001:01:00.0: BAR 0: assigned [mem 0x2e000000-0x2e1fffff 64bit]
[    0.206385] pci 0001:00:00.0: PCI bridge to [bus 01]
[    0.206405] pci 0001:00:00.0:   bridge window [mem 0x2e000000-0x2e1fffff]
[    0.210380] gsbi 16300000.gsbi: GSBI port protocol: 6 crci: 0
[    0.211476] gsbi 1a200000.gsbi: GSBI port protocol: 3 crci: 0
[    0.212549] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.215254] msm_serial 16340000.serial: msm_serial: detected port #0
[    0.215364] msm_serial 16340000.serial: uartclk = 1843200
[    0.215427] 16340000.serial: ttyMSM0 at MMIO 0x16340000 (irq = 169, base_baud = 115200) is a MSM
[    0.215463] msm_serial: console setup on port #0
[    0.857042] console [ttyMSM0] enabled
[    0.861911] msm_serial: driver initialized
[    0.871716] loop: module loaded
[    1.376516] qcom-nandc 1ac00000.nand: failure submitting descs for command 144
[    1.376550] nand: second ID read did not match 01,a1 against 00,00
[    1.382722] nand: No NAND device found
[    1.389552] spi_qup 1a280000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[    1.393686] m25p80 spi32766.0: unrecognized JEDEC id bytes: 00,  0,  0
[    1.399829] m25p80: probe of spi32766.0 failed with error -2
[    1.406669] libphy: Fixed MDIO Bus: probed
[    1.412440] libphy: GPIO Bitbanged MDIO: probed
[    1.438092] switch0: Atheros AR8337 rev. 2 switch registered on gpio-0
[    2.275448] stmmac - user ID: 0x10, Synopsys ID: 0x37
[    2.275472]  Ring mode enabled
[    2.279559]  DMA HW capability register supported
[    2.282425]  Enhanced/Alternate descriptors
[    2.287196]  Enabled extended descriptors
[    2.291272]  RX Checksum Offload Engine supported (type 2)
[    2.295360]  TX Checksum insertion supported
[    2.300796]  Wake-Up On Lan supported
[    2.305170] eth%d: device MAC address b0:39:56:97:cb:c4
[    2.308795]  Enable RX Mitigation via HW Watchdog Timer
[    2.314996] stmmac - user ID: 0x10, Synopsys ID: 0x37
[    2.319051]  Ring mode enabled
[    2.324175]  DMA HW capability register supported
[    2.327128]  Enhanced/Alternate descriptors
[    2.331902]  Enabled extended descriptors
[    2.335895]  RX Checksum Offload Engine supported (type 2)
[    2.340128]  TX Checksum insertion supported
[    2.345443]  Wake-Up On Lan supported
[    2.349941] eth%d: device MAC address b0:39:56:97:cb:c3
[    2.353431]  Enable RX Mitigation via HW Watchdog Timer
[    2.359166] i2c /dev entries driver
[    2.364334] gcc-ipq806x 900000.clock-controller: tsens calibration failed
[    2.367939] Speed bin: 0
[    2.374180] PVS bin: 4
[    2.377107] cpuidle: enable-method property 'qcom,kpss-acc-v1' found operations
[    2.378998] cpuidle: enable-method property 'qcom,kpss-acc-v1' found operations
[    2.386182] sdhci: Secure Digital Host Controller Interface driver
[    2.393432] sdhci: Copyright(c) Pierre Ossman
[    2.399672] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.405996] L2 @ QSB rate. Forcing new rate.
[    2.409974] L2 @ 384000 KHz
[    2.414142] CPU0 @ 800000 KHz
[    2.416536] CPU1 @ QSB rate. Forcing new rate.
[    2.419803] CPU1 @ 384000 KHz
[    2.425844] NET: Registered protocol family 10
[    2.428343] NET: Registered protocol family 17
[    2.431441] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    2.436137] 8021q: 802.1Q VLAN Support v1.8
[    2.448762] Registering SWP/SWPB emulation handler
[    2.456450] cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table for cpu:0, -19
[    2.458014] cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table for cpu:1, -19
[    2.466029] hctosys: unable to open rtc device (rtc0)▒[    2.479685] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    2.479707] Please append a correct "root=" boot option; here are the available partitions:
[    2.486147] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    2.494306] CPU1: stopping
[    2.502634] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.182 #0
[    2.505323] Hardware name: Qualcomm (Flattened Device Tree)
[    2.511494] Function entered at [<c0220838>] from [<c021d3f8>]
[    2.516783] Function entered at [<c021d3f8>] from [<c03c1f90>]
[    2.522685] Function entered at [<c03c1f90>] from [<c021fa80>]
[    2.528499] Function entered at [<c021fa80>] from [<c0209474>]
[    2.534316] Function entered at [<c0209474>] from [<c020a594>]
[    2.540132] Exception stack(0xdd471f80 to 0xdd471fc8)
[    2.545969] 1f80: 00000001 00000000 00000000 c020b440 dd470000 c0714480 c062069c 00000000
[    2.551093] 1fa0: c070e224 dd471fd8 00000000 c0710108 1d309000 dd471fd0 c021a168 c021a16c
[    2.559238] 1fc0: 60000013 ffffffff
[    2.567386] Function entered at [<c020a594>] from [<c021a16c>]
[    2.570690] Function entered at [<c021a16c>] from [<c02610cc>]
[    2.576592] Function entered at [<c02610cc>] from [<4220952c>]
[    2.582409] Rebooting in 1 seconds..


U-Boot 2012.07 [local,local] (Sep 03 2015 - 17:33:28)

U-boot 2012.07 dni1 V0.4 for DNI HW ID: 29764958 NOR flash 0MB; NAND flash 128MB; RAM 512MB; 1st Radio 4x4; 2nd Radio 4x4; Cascade
smem ram ptable found: ver: 0 len: 5
DRAM:  491 MiB
NAND:  SF: Unsupported manufacturer 00
ipq_spi: SPI Flash not found (bus/cs/speed/mode) = (0/0/48000000/0)
128 MiB
MMC:
*** Warning - bad CRC, using default environment

PCI0 Link Intialized
PCI1 Link Intialized
In:    serial
Out:   serial
Err:   serial
 131072 bytes read: OK
MMC Device 0 not found
cdp: get part failed for 0:HLOS
Net:   MAC1 addr:b0:39:56:97:cb:c4
athrs17_reg_init: complete
athrs17_vlan_config ...done
S17c init  done
MAC2 addr:b0:39:56:97:cb:c3
eth0, eth1
Hit any key to stop autoboot:  0
Mac2 unit failed

 Client starts...[Listening] for ADVERTISE...TTT
Retry count exceeded; boot the image as usual

 nmrp server is stopped or failed !

Loading from device 0: nand0 (offset 0x1480000)

** check kernel image **
   Verifying Checksum ... OK

** check rootfs image **
   Verifying Checksum ... OK
MMC Device 0 not found

Loading from nand0, offset 0x1480000
   Image Name:   ARM LEDE Linux-4.4.182
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2097023 Bytes = 2 MiB
   Load Address: 42208000
   Entry Point:  42208000
Automatic boot of image at addr 0x44000000 ...
   Image Name:   ARM LEDE Linux-4.4.182
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2097023 Bytes = 2 MiB
   Load Address: 42208000
   Entry Point:  42208000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK
mtdparts variable not set, see 'help mtdparts'
no partitions defined

defaults:
mtdids  : nand0=msm_nand
mtdparts: none
info: "mtdparts" not set
Using machid 0x136c from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.4.182 (buildbot@builds-02.infra.lede-project.org) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3104-41de9a2) ) #0 SMP Tue Jun 18 18:45:43 2019
[    0.000000] CPU: ARMv7 Processor [512f04d0] revision 0 (ARMv7), cr=10c5787d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] Machine model: Netgear Nighthawk X4S R7800
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] PERCPU: Embedded 11 pages/cpu @dda0c000 s13696 r8192 d23168 u45056
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 121920
[    0.000000] Kernel command line:
[    0.000000] Bootloader command line (ignored): console=ttyHSL1,115200n8
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 479364K/491520K available (4273K kernel code, 247K rwdata, 664K rodata, 220K init, 211K bss, 12156K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xde800000 - 0xff800000   ( 528 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xde000000   ( 480 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0208000 - 0xc06da77c   (4938 kB)
[    0.000000]       .init : 0xc06db000 - 0xc0712000   ( 220 kB)
[    0.000000]       .data : 0xc0712000 - 0xc074ffc0   ( 248 kB)
[    0.000000]        .bss : 0xc0752000 - 0xc0786fc0   ( 212 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: dg_timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 305801671480 ns
[    0.000009] sched_clock: 32 bits at 6MHz, resolution 160ns, wraps every 343597383600ns
[    0.000021] Switching to timer-based delay loop, resolution 160ns
[    0.000206] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.50 BogoMIPS (lpj=62500)
[    0.000229] pid_max: default: 32768 minimum: 301
[    0.000330] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000345] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000950] CPU: Testing write buffer coherency: ok
[    0.001261] Setting up static identity map for 0x42208280 - 0x422082d8
[    0.004300] Brought up 2 CPUs
[    0.004317] SMP: Total of 2 processors activated (25.00 BogoMIPS).
[    0.004328] CPU: All CPU(s) started in SVC mode.
[    0.015071] VFP support v0.3: implementor 51 architecture 64 part 4d variant 2 rev 0
[    0.015248] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.015279] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.015368] pinctrl core: initialized pinctrl subsystem
[    0.016643] NET: Registered protocol family 16
[    0.017903] DMA: preallocated 2048 KiB pool for atomic coherent allocations
[    0.041453] cpuidle: using governor ladder
[    0.072468] cpuidle: using governor menu
[    0.087608] qcom_rpm 108000.rpm: RPM firmware 3.0.16777364
[    0.126783] pps_core: LinuxPPS API ver. 1 registered
[    0.126798] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.126831] PTP clock support registered
[    0.127809] clocksource: Switched to clocksource dg_timer
[    0.129508] NET: Registered protocol family 2
[    0.130073] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.130113] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.130164] TCP: Hash tables configured (established 4096 bind 4096)
[    0.130212] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.130235] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.130415] NET: Registered protocol family 1
[    0.131629] No memory allocated for crashlog
[    0.138628] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.138642] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.140856] io scheduler noop registered
[    0.140871] io scheduler deadline registered (default)
[    0.142319] 1b500000.pci supply vdda not found, using dummy regulator
[    0.142414] 1b500000.pci supply vdda_phy not found, using dummy regulator
[    0.142486] 1b500000.pci supply vdda_refclk not found, using dummy regulator
[    0.142964] PCI host bridge /soc/pci@1b500000 ranges:
[    0.143000]    IO 0x0fe00000..0x0fefffff -> 0x0fe00000
[    0.143030]   MEM 0x08000000..0x0fdfffff -> 0x08000000
[    0.164969] qcom-pcie 1b500000.pci: PCI host bridge to bus 0000:00
[    0.164992] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.165010] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff] (bus address [0xfe00000-0xfefffff])
[    0.165026] pci_bus 0000:00: root bus resource [mem 0x08000000-0x0fdfffff]
[    0.165539] PCI: bus0: Fast back to back transfers disabled
[    0.167287] PCI: bus1: Fast back to back transfers disabled
[    0.167564] pci 0000:00:00.0: BAR 8: assigned [mem 0x08000000-0x081fffff]
[    0.167587] pci 0000:01:00.0: BAR 0: assigned [mem 0x08000000-0x081fffff 64bit]
[    0.167691] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.167712] pci 0000:00:00.0:   bridge window [mem 0x08000000-0x081fffff]
[    0.168475] 1b700000.pci supply vdda not found, using dummy regulator
[    0.168564] 1b700000.pci supply vdda_phy not found, using dummy regulator
[    0.168638] 1b700000.pci supply vdda_refclk not found, using dummy regulator
[    0.169103] PCI host bridge /soc/pci@1b700000 ranges:
[    0.169134]    IO 0x31e00000..0x31efffff -> 0x31e00000
[    0.169153]   MEM 0x2e000000..0x31dfffff -> 0x2e000000
[    0.203633] qcom-pcie 1b700000.pci: PCI host bridge to bus 0001:00
[    0.203651] pci_bus 0001:00: root bus resource [bus 00-ff]
[    0.203666] pci_bus 0001:00: root bus resource [mem 0x2e000000-0x31dfffff]
[    0.204124] PCI: bus0: Fast back to back transfers disabled
[    0.205869] PCI: bus1: Fast back to back transfers disabled
[    0.206266] pci 0001:00:00.0: BAR 8: assigned [mem 0x2e000000-0x2e1fffff]
[    0.206288] pci 0001:01:00.0: BAR 0: assigned [mem 0x2e000000-0x2e1fffff 64bit]
[    0.206389] pci 0001:00:00.0: PCI bridge to [bus 01]
[    0.206409] pci 0001:00:00.0:   bridge window [mem 0x2e000000-0x2e1fffff]
[    0.210382] gsbi 16300000.gsbi: GSBI port protocol: 6 crci: 0
[    0.211480] gsbi 1a200000.gsbi: GSBI port protocol: 3 crci: 0
[    0.212553] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.215273] msm_serial 16340000.serial: msm_serial: detected port #0
[    0.215385] msm_serial 16340000.serial: uartclk = 1843200
[    0.215448] 16340000.serial: ttyMSM0 at MMIO 0x16340000 (irq = 169, base_baud = 115200) is a MSM
[    0.215485] msm_serial: console setup on port #0
[    0.857064] console [ttyMSM0] enabled
[    0.861946] msm_serial: driver initialized
[    0.871916] loop: module loaded
[    1.376516] qcom-nandc 1ac00000.nand: failure submitting descs for command 144
[    1.879630] qcom-nandc 1ac00000.nand: failure submitting descs for command 144
[    1.879666] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xa1
[    1.885741] nand: AMD/Spansion NAND 128MiB 1,8V 8-bit
[    1.892346] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.897209] Scanning device for bad blocks
[    2.409678] qcom-nandc 1ac00000.nand: failed to copy last codeword
[    2.409714] nand_bbt: can't scan flash and build the RAM-based BBT
[    2.414869] qcom-nandc: probe of 1ac00000.nand failed with error -110
[    2.421584] spi_qup 1a280000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[    2.428584] m25p80 spi32766.0: unrecognized JEDEC id bytes: 00,  0,  0
[    2.434553] m25p80: probe of spi32766.0 failed with error -2
[    2.441568] libphy: Fixed MDIO Bus: probed
[    2.447159] libphy: GPIO Bitbanged MDIO: probed
[    2.472915] switch0: Atheros AR8337 rev. 2 switch registered on gpio-0
[    3.305424] stmmac - user ID: 0x10, Synopsys ID: 0x37
[    3.305448]  Ring mode enabled
[    3.309514]  DMA HW capability register supported
[    3.312399]  Enhanced/Alternate descriptors
[    3.317172]  Enabled extended descriptors
[    3.321224]  RX Checksum Offload Engine supported (type 2)
[    3.325335]  TX Checksum insertion supported
[    3.330780]  Wake-Up On Lan supported
[    3.335145] eth%d: device MAC address b0:39:56:97:cb:c4
[    3.338780]  Enable RX Mitigation via HW Watchdog Timer
[    3.344988] stmmac - user ID: 0x10, Synopsys ID: 0x37
[    3.349033]  Ring mode enabled
[    3.354151]  DMA HW capability register supported
[    3.357103]  Enhanced/Alternate descriptors
[    3.361880]  Enabled extended descriptors
[    3.365870]  RX Checksum Offload Engine supported (type 2)
[    3.370111]  TX Checksum insertion supported
[    3.375418]  Wake-Up On Lan supported
[    3.379926] eth%d: device MAC address b0:39:56:97:cb:c3
[    3.383406]  Enable RX Mitigation via HW Watchdog Timer
[    3.389144] i2c /dev entries driver
[    3.394303] gcc-ipq806x 900000.clock-controller: tsens calibration failed
[    3.397920] Speed bin: 0
[    3.404133] PVS bin: 4
[    3.407093] cpuidle: enable-method property 'qcom,kpss-acc-v1' found operations
[    3.408982] cpuidle: enable-method property 'qcom,kpss-acc-v1' found operations
[    3.416157] sdhci: Secure Digital Host Controller Interface driver
[    3.423407] sdhci: Copyright(c) Pierre Ossman
[    3.429656] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.435968] L2 @ QSB rate. Forcing new rate.
[    3.439923] L2 @ 384000 KHz
[    3.444115] CPU0 @ 800000 KHz
[    3.446515] CPU1 @ QSB rate. Forcing new rate.
[    3.449787] CPU1 @ 384000 KHz
[    3.455830] NET: Registered protocol family 10
[    3.458354] NET: Registered protocol family 17
[    3.461418] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    3.466112] 8021q: 802.1Q VLAN Support v1.8
[    3.478669] Registering SWP/SWPB emulation handler
[    3.486375] cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table for cpu:0, -19
[    3.487987] cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table for cpu:1, -19
[    3.495976] hctosys: unable to open rtc device (rtc0)
[    3.510636] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    3.510657] Please append a correct "root=" boot option; here are the available partitions:
[    3.517098] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    3.525262] CPU1: stopping
[    3.533590] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.182 #0
[    3.536277] Hardware name: Qualcomm (Flattened Device Tree)
[    3.542450] Function entered at [<c0220838>] from [<c021d3f8>]
[    3.547735] Function entered at [<c021d3f8>] from [<c03c1f90>]
[    3.553640] Function entered at [<c03c1f90>] from [<c021fa80>]
[    3.559453] Function entered at [<c021fa80>] from [<c0209474>]
[    3.565272] Function entered at [<c0209474>] from [<c020a594>]
[    3.571087] Exception stack(0xdd471f80 to 0xdd471fc8)
[    3.576932] 1f80: 00000001 00000000 00000000 c020b440 dd470000 c0714480 c062069c 00000000
[    3.582056] 1fa0: c070e224 dd471fd8 00000000 c0710108 1d309000 dd471fd0 c021a168 c021a16c
[    3.590193] 1fc0: 60000013 ffffffff
[    3.598340] Function entered at [<c020a594>] from [<c021a16c>]
[    3.601643] Function entered at [<c021a16c>] from [<c02610cc>]
[    3.607545] Function entered at [<c02610cc>] from [<4220952c>]
[    3.613364] Rebooting in 1 seconds..

In these days I'm thinking this forum is populated with a lot of gentlemen, in the real meaning of the word. I would be flattened by such gift, and yes, I could try and solder the NAND you could send me. But let's remember other things are faulty, and that attempt easily falls in the therapeutic persistence. We might discover the SoC has some faulty portions, and start from scratch, again.
I'd rather ask you something else, before:
is there a way to instruct U-Boot to launch a precise load order for the partitions in NAND (like we do with USBboot)? This way, if uboot knows where our system is located, and it fails miserably, we know something is wrong with NAND, and not with partitions and controller. I dare saying, only because the nand seems totally fine, whilst the qcom-nandcontroller declares failures.
My two cents, as usually incompetent.

@hnyman, @sumo, if you know, the nand controller resides in the SoC, or where? Can a SoC have only a portion of its capabilities broken?
Can I benchmark portions of a SoC, through CLI and a USBboot, to better understand and locate a fault?

Not fully sure what you are after here. U-Boot so far can still properly load the kernel from NAND which is what it does. It's the kernel which later fails mounting stuff from NAND.

One could try dumping NAND pages from U-Boot but interpreting such dumps might be rather tricky. Anyway, in all of this one could still not really tell whether it's the NAND or SoC to blaim.

I don't think one can say that. After all the NAND can not be accessed without going through the controller.

Yes, it's integrated in the SoC.

Yes, sure. Most likely actually only some pinctrl stages with drivers, transceivers or such fail as those are directly exposed via balls/pins.

Sure, but like I mentioned earlier assessing whether or not the peripheral or SoC is to blaim is usually non-trivial. The easiest is usually to replace the peripheral and see whether that helps. With stuff like an SD card this is easy, while with soldered stuff this is much more involved.

1 Like

Very thorough, @sumo.
Not much room for hope, but very precise nonetheless.
So, no way to launch a stable usbboot, neither?
@wulfy23, your kernel usb loading images might be salvatious, perhaps. A way to shift storage from NAND to USB, if I got it right, with full LuCi?


To all the wonderful people who came and gifted some help, I just wanted to inform another R7800 is on its way to my home.
So we can toss this hassle, if we want. I still think the faulty one could be useful somehow, but I can't ask the world to hold till a solution is found.
Nonetheless, if any of you, more clever than me, comes up with an idea on a USBboot of full build for the faulty one, I'd be more more more than happy to attempt recovering it.

Big thanks to all of you. Besides being clever, you are all gentle folks, and I like to find such elegance nowadays. The world can be a beautiful place, and you're all doing already a lot, in this sense.

2 Likes

@bright_plastik please can you make a video of installation process. i checked on ytube, there is no video. thanks in advance :heart:

14+ months later?
You're probably very late to the party.

The installation is documented at https://openwrt.org/toh/netgear/r7800

1 Like