R7800 with corrupted firmware image and faulty LAN. Gosh

Fantastic. :stuck_out_tongue:

Yes! It does, but I'll need some help, as I never used this command.

There you go. Unfortunately, that stock vendor U-Boot is utterly broken, but what did we expect.

First, prepare your USB drive. As it does not have any regular load commands you can't use a regular file system, but rather we dd our stuff to the drive:

[user@host ~]$ wget -c https://downloads.openwrt.org/releases/21.02.2/targets/ipq806x/generic/openwrt-21.02.2-ipq806x-generic-netgear_r7800-initramfs-uImage
[user@host ~]$ sudo dd if=openwrt-21.02.2-ipq806x-generic-netgear_r7800-initramfs-uImage of=/dev/sda bs=2M
[sudo] password for user: 
2+1 records in
2+1 records out
5871028 bytes (5.9 MB, 5.6 MiB) copied, 7.31178 s, 803 kB/s
[user@host ~]$ sync

Now, plug that thing into your R7800, not directly, mind you, that would be too easy. One has to use a powered USB hub.

1 Like

Gotcha :pray:. Running this on a terminal formats the drive in a way that the R7800 can read? No other formatting needed?

No, but be super careful not to overwrite any other drive! And yesh, all data on that drive will be lost...

1 Like

Well, while I can now load the initramfs from U-Boot any attempt to boot it so far ends in no further output after starting kernel.

(IPQ) # usb start
(Re)start USB...
USB0:   Register 2000240 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
USB1:   Register 2000240 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
(IPQ) # usb read $loadaddr 0x0 0x2ccb

USB read: device 0 block # 0, count 11467 ... 11467 blocks read: OK
(IPQ) # setenv bootargs console=ttyMSM0,115200n8
(IPQ) # bootm
   Image Name:   ARM OpenWrt Linux-5.4.179
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5870964 Bytes = 5.6 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 ...

Not sure, maybe that vendor U-Boot really does not allow this...

I know, but luckily I have it. :sweat_smile:

I just tried to launch the board from usb...and...still kernel panic.

(IPQ) # usbboot dev 0
error reading partinfo...try to boot raw

Loading from USB device 0, partition 1: Name: Raw  Type: U-Boot
BUG: failure at xhci-ring.c:489/abort_td()!
BUG!
resetting ...

Resetting with watch dog!


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

 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 OpenWrt Linux-5.4.154
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2750052 Bytes = 2.6 MiB
   Load Address: 42208000
   Entry Point:  42208000
Automatic boot of image at addr 0x44000000 ...
   Image Name:   ARM OpenWrt Linux-5.4.154
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2750052 Bytes = 2.6 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 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 SMP Sun Oct 24 09:01:35 2021
[    0.000000] CPU: ARMv7 Processor [512f04d0] revision 0 (ARMv7), cr=10c5787d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt: Machine model: Netgear Nighthawk X4S R7800
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 15 pages/cpu s30220 r8192 d23028 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 121800
[    0.000000] Kernel command line:
[    0.000000] Bootloader command line (ignored): console=ttyHSL1,115200n8
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 474824K/491520K available (6268K kernel code, 196K rwdata, 920K rodata, 1024K init, 240K bss, 16696K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    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 0xc0b00c18 with crng_init=0
[    0.000000] clocksource: dg_timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 305801671480 ns
[    0.000008] sched_clock: 32 bits at 6MHz, resolution 160ns, wraps every 343597383600ns
[    0.000024] Switching to timer-based delay loop, resolution 160ns
[    0.000260] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.50 BogoMIPS (lpj=62500)
[    0.000279] pid_max: default: 32768 minimum: 301
[    0.000485] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000503] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001554] CPU: Testing write buffer coherency: ok
[    0.002678] Setting up static identity map for 0x42300000 - 0x42300060
[    0.002857] rcu: Hierarchical SRCU implementation.
[    0.003344] smp: Bringing up secondary CPUs ...
[    0.005268] smp: Brought up 1 node, 2 CPUs
[    0.005282] SMP: Total of 2 processors activated (25.00 BogoMIPS).
[    0.005293] CPU: All CPU(s) started in SVC mode.
[    0.015580] VFP support v0.3: implementor 51 architecture 64 part 4d variant 2 rev 0
[    0.015727] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.015755] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.015905] pinctrl core: initialized pinctrl subsystem
[    0.017038] NET: Registered protocol family 16
[    0.017325] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.018660] cpuidle: using governor ladder
[    0.018727] cpuidle: using governor menu
[    0.049762] usbcore: registered new interface driver usbfs
[    0.049841] usbcore: registered new interface driver hub
[    0.049907] usbcore: registered new device driver usb
[    0.049970] pps_core: LinuxPPS API ver. 1 registered
[    0.049982] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.050022] PTP clock support registered
[    0.050831] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.052049] clocksource: Switched to clocksource dg_timer
[    0.052904] thermal_sys: Registered thermal governor 'step_wise'
[    0.055319] NET: Registered protocol family 2
[    0.055482] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.056348] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.056391] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.056435] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.056488] TCP: Hash tables configured (established 4096 bind 4096)
[    0.056589] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.056622] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.056865] NET: Registered protocol family 1
[    0.056918] PCI: CLS 0 bytes, default 64
[    0.058221] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.065165] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.065181] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.102524] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.104609] qcom-pcie 1b500000.pci: 1b500000.pci supply vdda not found, using dummy regulator
[    0.104758] qcom-pcie 1b500000.pci: 1b500000.pci supply vdda_phy not found, using dummy regulator
[    0.104882] qcom-pcie 1b500000.pci: 1b500000.pci supply vdda_refclk not found, using dummy regulator
[    0.105149] qcom-pcie 1b500000.pci: host bridge /soc/pci@1b500000 ranges:
[    0.105221] qcom-pcie 1b500000.pci:    IO 0x0fe00000..0x0fefffff -> 0x0fe00000
[    0.105259] qcom-pcie 1b500000.pci:   MEM 0x08000000..0x0fdfffff -> 0x08000000
[    0.327501] qcom-pcie 1b500000.pci: Link up
[    0.327664] qcom-pcie 1b500000.pci: PCI host bridge to bus 0000:00
[    0.327688] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.327709] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff] (bus address [0xfe00000-0xfefffff])
[    0.327727] pci_bus 0000:00: root bus resource [mem 0x08000000-0x0fdfffff]
[    0.327790] pci 0000:00:00.0: [17cb:0101] type 01 class 0xff0000
[    0.327957] pci 0000:00:00.0: supports D1
[    0.327975] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.332160] PCI: bus0: Fast back to back transfers disabled
[    0.332641] pci 0000:01:00.0: [168c:0046] type 00 class 0x028000
[    0.332996] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
[    0.334143] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.338501] PCI: bus1: Fast back to back transfers disabled
[    0.338588] pci 0000:00:00.0: BAR 8: assigned [mem 0x08000000-0x081fffff]
[    0.338614] pci 0000:01:00.0: BAR 0: assigned [mem 0x08000000-0x081fffff 64bit]
[    0.338743] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    0.338767] pci 0000:00:00.0:   bridge window [mem 0x08000000-0x081fffff]
[    0.339757] pcieport 0000:00:00.0: AER: enabled with IRQ 36
[    0.340332] qcom-pcie 1b700000.pci: 1b700000.pci supply vdda not found, using dummy regulator
[    0.340461] qcom-pcie 1b700000.pci: 1b700000.pci supply vdda_phy not found, using dummy regulator
[    0.340599] qcom-pcie 1b700000.pci: 1b700000.pci supply vdda_refclk not found, using dummy regulator
[    0.340858] qcom-pcie 1b700000.pci: host bridge /soc/pci@1b700000 ranges:
[    0.340923] qcom-pcie 1b700000.pci:    IO 0x31e00000..0x31efffff -> 0x31e00000
[    0.340961] qcom-pcie 1b700000.pci:   MEM 0x2e000000..0x31dfffff -> 0x2e000000
[    0.569548] qcom-pcie 1b700000.pci: Link up
[    0.569711] qcom-pcie 1b700000.pci: PCI host bridge to bus 0001:00
[    0.569731] pci_bus 0001:00: root bus resource [bus 00-ff]
[    0.569747] pci_bus 0001:00: root bus resource [mem 0x2e000000-0x31dfffff]
[    0.569801] pci 0001:00:00.0: [17cb:0101] type 01 class 0xff0000
[    0.569952] pci 0001:00:00.0: supports D1
[    0.569967] pci 0001:00:00.0: PME# supported from D0 D1 D3hot
[    0.574208] PCI: bus0: Fast back to back transfers disabled
[    0.574562] pci 0001:01:00.0: [168c:0046] type 00 class 0x028000
[    0.574941] pci 0001:01:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
[    0.576177] pci 0001:01:00.0: PME# supported from D0 D3hot D3cold
[    0.576480] pci 0001:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0001:00:00.0 (capable of 4.000 Gb/s with 5 GT/s x1 link)
[    0.580604] PCI: bus1: Fast back to back transfers disabled
[    0.580681] pci 0001:00:00.0: BAR 8: assigned [mem 0x2e000000-0x2e1fffff]
[    0.580704] pci 0001:01:00.0: BAR 0: assigned [mem 0x2e000000-0x2e1fffff 64bit]
[    0.580836] pci 0001:00:00.0: PCI bridge to [bus 01-ff]
[    0.580856] pci 0001:00:00.0:   bridge window [mem 0x2e000000-0x2e1fffff]
[    0.581767] pcieport 0001:00:00.0: AER: enabled with IRQ 38
[    0.584432] L2 @ QSB rate. Forcing new rate.
[    0.584673] L2 @ 384000 KHz
[    0.584861] CPU0 @ 800000 KHz
[    0.584873] CPU1 @ QSB rate. Forcing new rate.
[    0.585004] CPU1 @ 384000 KHz
[    0.588774] gsbi 16300000.gsbi: GSBI port protocol: 6 crci: 0
[    0.591018] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.593617] msm_serial 16340000.serial: msm_serial: detected port #0
[    0.593673] msm_serial 16340000.serial: uartclk = 7372800
[    0.593747] 16340000.serial: ttyMSM0 at MMIO 0x16340000 (irq = 39, base_baud = 460800) is a MSM
[    0.593787] msm_serial: console setup on port #0
[    1.383212] printk: console [ttyMSM0] enabled
[    1.388200] msm_serial: driver initialized
[    1.397581] loop: module loaded
[    1.399180] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xa1
[    1.399534] nand: AMD/Spansion S34MS01G2
[    1.406252] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.410142] 8 fixed-partitions partitions found on MTD device qcom_nand.0
[    1.417493] Creating 8 MTD partitions on "qcom_nand.0":
[    1.424371] 0x000000000000-0x000000c80000 : "qcadata"
[    1.434609] random: fast init done
[    1.450929] 0x000000c80000-0x000001180000 : "APPSBL"
[    1.460180] 0x000001180000-0x000001200000 : "APPSBLENV"
[    1.461988] 0x000001200000-0x000001340000 : "art"
[    1.467300] 0x000001340000-0x000001480000 : "artbak"
[    1.472065] 0x000001480000-0x000001880000 : "kernel"
[    1.481653] 0x000001880000-0x000007900000 : "ubi"
[    1.640952] 0x000007900000-0x000008000000 : "reserve"
[    1.655039] libphy: ipq8064_mdio_bus: probed
[    1.670274] switch0: Atheros AR8337 rev. 2 switch registered on 37000000.mdio-mii
[    2.518706] ar8327: qca,phy-rgmii-en is not specified
[    2.519293] libphy: Fixed MDIO Bus: probed
[    2.523563] ipq806x-gmac-dwmac 37200000.ethernet: IRQ eth_wake_irq not found
[    2.526738] ipq806x-gmac-dwmac 37200000.ethernet: IRQ eth_lpi not found
[    2.534780] ipq806x-gmac-dwmac 37200000.ethernet: PTP uses main clock
[    2.540908] ipq806x-gmac-dwmac 37200000.ethernet: User ID: 0x10, Synopsys ID: 0x37
[    2.546966] ipq806x-gmac-dwmac 37200000.ethernet:    DWMAC1000
[    2.554416] ipq806x-gmac-dwmac 37200000.ethernet: DMA HW capability register supported
[    2.560158] ipq806x-gmac-dwmac 37200000.ethernet: RX Checksum Offload Engine supported
[    2.567968] ipq806x-gmac-dwmac 37200000.ethernet: COE Type 2
[    2.575841] ipq806x-gmac-dwmac 37200000.ethernet: TX Checksum insertion supported
[    2.581597] ipq806x-gmac-dwmac 37200000.ethernet: Wake-Up On Lan supported
[    2.589056] ipq806x-gmac-dwmac 37200000.ethernet: Enhanced/Alternate descriptors
[    2.595834] ipq806x-gmac-dwmac 37200000.ethernet: Enabled extended descriptors
[    2.603363] ipq806x-gmac-dwmac 37200000.ethernet: Ring mode enabled
[    2.610327] ipq806x-gmac-dwmac 37200000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    2.617487] ipq806x-gmac-dwmac 37400000.ethernet: IRQ eth_wake_irq not found
[    2.625282] ipq806x-gmac-dwmac 37400000.ethernet: IRQ eth_lpi not found
[    2.632451] ipq806x-gmac-dwmac 37400000.ethernet: PTP uses main clock
[    2.638860] ipq806x-gmac-dwmac 37400000.ethernet: User ID: 0x10, Synopsys ID: 0x37
[    2.645253] ipq806x-gmac-dwmac 37400000.ethernet:    DWMAC1000
[    2.652692] ipq806x-gmac-dwmac 37400000.ethernet: DMA HW capability register supported
[    2.658420] ipq806x-gmac-dwmac 37400000.ethernet: RX Checksum Offload Engine supported
[    2.666217] ipq806x-gmac-dwmac 37400000.ethernet: COE Type 2
[    2.674120] ipq806x-gmac-dwmac 37400000.ethernet: TX Checksum insertion supported
[    2.679861] ipq806x-gmac-dwmac 37400000.ethernet: Wake-Up On Lan supported
[    2.687303] ipq806x-gmac-dwmac 37400000.ethernet: Enhanced/Alternate descriptors
[    2.694083] ipq806x-gmac-dwmac 37400000.ethernet: Enabled extended descriptors
[    2.701560] ipq806x-gmac-dwmac 37400000.ethernet: Ring mode enabled
[    2.708672] ipq806x-gmac-dwmac 37400000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    2.715820] i2c /dev entries driver
[    2.725843] cpuidle: enable-method property 'qcom,kpss-acc-v1' found operations
[    2.726749] cpuidle: enable-method property 'qcom,kpss-acc-v1' found operations
[    2.734636] sdhci: Secure Digital Host Controller Interface driver
[    2.741225] sdhci: Copyright(c) Pierre Ossman
[    2.747566] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.754422] NET: Registered protocol family 10
[    2.759045] Segment Routing with IPv6
[    2.761975] NET: Registered protocol family 17
[    2.765802] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.770175] 8021q: 802.1Q VLAN Support v1.8
[    2.783206] Registering SWP/SWPB emulation handler
[    2.812908] qcom_rpm 108000.rpm: RPM firmware 3.0.16777364
[    2.826773] s1a: Bringing 0uV into 1050000-1050000uV
[    2.827057] s1a: supplied by regulator-dummy
[    2.830939] s1b: Bringing 0uV into 1050000-1050000uV
[    2.835382] s1b: supplied by regulator-dummy
[    2.840133] s2a: Bringing 0uV into 775000-775000uV
[    2.844568] s2a: supplied by regulator-dummy
[    2.848991] s2b: Bringing 0uV into 775000-775000uV
[    2.853599] s2b: supplied by regulator-dummy
[    2.867977] UBI: auto-attach mtd6
[    2.867997] ubi0: attaching mtd6
[    2.932257] random: crng init done
[    3.574662] ubi0: scanning is finished
[    3.584140] ubi0: attached mtd6 (name "ubi", size 96 MiB)
[    3.584160] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    3.588508] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    3.595361] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    3.602135] ubi0: good PEBs: 772, bad PEBs: 0, corrupted PEBs: 0
[    3.608969] ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
[    3.615217] ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 1635066095
[    3.622190] ubi0: available PEBs: 748, total reserved PEBs: 24, PEBs reserved for bad PEB handling: 20
[    3.631575] hctosys: unable to open rtc device¦[    3.646202] /dev/root: Can't open blockdev
[    3.646221] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    3.649180] Please append a correct "root=" boot option; here are the available partitions:
[    3.656815] 1f00           12800 mtdblock0
[    3.656817]  (driver?)
[    3.669055] 1f01            5120 mtdblock1
[    3.669058]  (driver?)
[    3.675637] 1f02             512 mtdblock2
[    3.675639]  (driver?)
[    3.682075] 1f03            1280 mtdblock3
[    3.682077]  (driver?)
[    3.688586] 1f04            1280 mtdblock4
[    3.688588]  (driver?)
[    3.695163] 1f05            4096 mtdblock5
[    3.695166]  (driver?)
[    3.701606] 1f06           98816 mtdblock6
[    3.701608]  (driver?)
[    3.708117] 1f07            7168 mtdblock7
[    3.708120]  (driver?)
[    3.714686] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    3.717078] CPU1: stopping
[    3.725319] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.4.154 #0
[    3.728004] Hardware name: Generic DT based system
[    3.734178] Function entered at [<c030f874>] from [<c030b870>]
[    3.738772] Function entered at [<c030b870>] from [<c0901b98>]
[    3.744587] Function entered at [<c0901b98>] from [<c030eaa0>]
[    3.750401] Function entered at [<c030eaa0>] from [<c05dd844>]
[    3.756219] Function entered at [<c05dd844>] from [<c0301a8c>]
[    3.762034] Exception stack(0xdd46bf18 to 0xdd46bf60)
[    3.767857] bf00:                                                       00000000 00000000
[    3.773002] bf20: 1ce5f000 dd9a0a80 dcc45800 00000000 dd99fe30 00000000 00000000 00000000
[    3.781164] bf40: dd8defe0 dd692980 00000015 dd46bf68 c0732088 c073208c 80000013 ffffffff
[    3.789297] Function entered at [<c0301a8c>] from [<c073208c>]
[    3.797452] Function entered at [<c073208c>] from [<c07324d4>]
[    3.803179] Function entered at [<c07324d4>] from [<c034acfc>]
[    3.808997] Function entered at [<c034acfc>] from [<c034b00c>]
[    3.814810] Function entered at [<c034b00c>] from [<423024cc>]
[    3.820632] Rebooting in 1 seconds..

What am I missing here? :man_facepalming: Maybe the uboot command I launch is wrong?

usbboot dev 0

These two hints tell me I'm doing something stupid.
@sumo, do you succeed running your R7800 from usb? What are your commands?

I realize I'm flooding my own thread...
I will try and replicate your endeavours, copying your commands...

(IPQ) # usb start
(Re)start USB...
USB0:   Register 2000240 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
USB1:   Register 2000240 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
(IPQ) # usb read $loadaddr 0x0 0x2ccb

USB read: device 0 block # 0, count 11467 ... 11467 blocks read: OK
(IPQ) # setenv bootargs console=ttyMSM0,115200n8
(IPQ) # bootm
   Image Name:   ARM OpenWrt Linux-5.4.179
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5870964 Bytes = 5.6 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 ...

...but it does not solve. I got stuck exactly like you. Do we have to set something in mtdparts maybe?

No, if they would be using any kind of a sane U-Boot it should just work at this point. Still checking...

This tiny and underpowered box has a proper uboot. It saved my ass, some time ago.


but I guess we're all after the beefy boxes with plenty of grunt, like the R7800... :man_shrugging:

BTW: usbboot actually does the same thing.

(IPQ) # usbboot $loadaddr 0:0
error reading partinfo...try to boot raw

Loading from USB device 0, partition 0: Name: Raw  Type: U-Boot
   Image Name:   ARM OpenWrt Linux-4.14.267
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4683547 Bytes = 4.5 MiB
   Load Address: 42208000
   Entry Point:  42208000
(IPQ) # bootm
   Image Name:   ARM OpenWrt Linux-4.14.267
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4683547 Bytes = 4.5 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 ...

Ahaha, I got it! One just needs to use 0x44000000 as the load address! However, that seems to fail with a recent initramfs as it is probably too big or something...

Just use the following image instead (dd it just as I explained further up).

https://downloads.openwrt.org/releases/19.07.9/targets/ipq806x/generic/openwrt-19.07.9-ipq806x-generic-netgear_r7800-initramfs-uImage

(IPQ) # usb start
(Re)start USB...
USB0:   Register 2000240 NbrPorts 2
Starting the controller
USB XHCI 1.00   
scanning bus 0 for devices... 3 USB Device(s) found
USB1:   Register 2000240 NbrPorts 2
Starting the controller
USB XHCI 1.00   
scanning bus 1 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
(IPQ) # usbboot 0x44000000 0:0
error reading partinfo...try to boot raw

Loading from USB device 0, partition 0: Name: Raw  Type: U-Boot
   Image Name:   ARM OpenWrt Linux-4.14.267
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4683547 Bytes = 4.5 MiB
   Load Address: 42208000
   Entry Point:  42208000
(IPQ) # bootm   
   Image Name:   ARM OpenWrt Linux-4.14.267
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4683547 Bytes = 4.5 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.14.267 (builder@buildhost) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r11405-2a3558b0de)) #0 SMP Wed Feb 16 20:47:59 2022

Good luck and enjoy.

Now off to some real complicated hacking...

5 Likes

Hi there...now, this is grotesque.
With @sumo help I'm able to run owrt from usb, and I can't measure the happiness for this pure CLI miracle.

At the same time, it is now 3 hours that I'm failing to do a simple thing:

move a local image, say Voxel's last firmware, from a FAT32 thumb drive (/dev/sdb1) to the /tmp folder, and just sysupgrade or mtd write it to the nand.
I really need a GUI, otherwise I'm lost. It is moment of truth. Please, take me by my hand, geeez.
Two o clock. Bed time now.

df
mount /dev/sdb1 /mnt/sdb1
cp /mnt/sdb1/bla /tmp/bla

sysupgrade -f /tmp/bla

Have a good night's sleep :bed:.

1 Like

And still no Ethernet I guess?

Just as simple as that. I'm such a fool...

LAN totally dead. WAN is working with hiccups. E.g: opkg update leads to "check your network settings and connectivity". This box has issues. Totally. But now it is a matter of principles...I have to defeat it, and get back to a GUI.
Thanks bro...happy hacking day.

Don't be too hard on yourself. After all, some of us have an MCS and do this kind of stuff as their daily bread and butter...

Boot the initramfs and fully explore what does and does not work before trying to install. The most common reason for Ethernet ports to fail is EMP damage from nearby lightning, which is prone to make all the hardware that may still work dodgy and unreliable. I don't see any practical use case for a router with no Ethernet and no wifi.

3 Likes

You can still use it as a wired router, if you attach two usb ethernet adapters.

Wouldn't do it myself, but if one would really want it up and running...