Build for Netgear R7800

No, it does not mean that. The build system kernel headers are needed in the toolchain build step. Not quite sure on the exact reason.
I stumbled upon that a few times years ago when I had updated kernel in my Ubuntu. so I added that line as a reminder. Lately I have not ran into that problem, but I only rarely re-build the whole toolchain.

Just test installing the headers, and hope that it helps.

(But the error comes after the build directory name mentions linux-5.4.42, so possibly my guess about the reason is wrong, as that would point to the current OpenwWrt kernel version instead of your Debian version.)

LOL this was the problem.
Thank you!
but it's me or the error message was never going to help to find the issue? :slight_smile:
now it's building flawlessly..

I'll have to remember to add zip and rsync to the hnyman's script :slight_smile:

It is in the message some lines above, you just did not include the important things. The only reason I hit this is because I use Docker to build it. rsync is always installed on any desktop Linux.

UPDATE: The actual error message is probably in a log file.

1 Like

Hello again! I bricked my R7800 by flashing the wrong firmware and now I'm not able to setup the tftp method. Would someone be so nice to help me with that?

I followed this

and this

to the best of my knowledge but I can't get it to work.

After disconnecting everything for a while it is now possible again to get into the tftp mode with the flashing white LED, I can ping the router and can connect via tftp but when I try to put the file with

atftp --option "mode octet" --option "timeout  60" --verbose --trace -p -l R7800-master-r13313-6934b20912-20200520-1850-factory.img 192.168.1.1

it says

tftp: error received from server <File has bad checksum>
tftp: aborting

I also tried by setting up the /srv/atftp/R7800-master-r13313-6934b20912-20200520-1850-factory.img and starting the atftpd.service.

Am I missing something? Could you shed some light on this?

That is wrong advice for you, not related to R7800 at all. R7800 operates the TFTP server and the PC needs to act as client. I added a note to that wiki article that there are both TFTP client and TFTP server based routers.

The TFTP recovery routine has worked for me dozens of times in R7800 (and WNDR3700). I am currently using tftpd64 client from Jounin, like said in that quote. It works.

No idea if that atftp works with R7800, but like I wrote in that quote above, I have noticed that some other TFTP tools failed to upload correctly (e.g. tftp2 from dd-wrt).

Note that the TFTP mode can be sometimes a bit tricky to get into, if you have not applied the pin early enough or you release the pin too early.

Turn the router off, press and hold the reset button, turn the router back on, wait until the power light starts blinking white, now release the reset button. Works 100%.

tftp
	connect 192.168.1.1
	mode binary
	put {image file}
	quit

Thanks for your help, but I got if fixed. As I'm a Linux user tftpd64 is not available to me. The solution was to flash the original Netgear firmware with

atftp --option "mode octet" --option "timeout  60" --verbose --trace -p -l .build/Nighthawk/R7800-V1.0.2.68.img 192.168.1.1

which then it didn't complain about the wrong checksum. To get onto the router I had to do another deep reset to make it reachable. (My former SSID appeared out of nothing, so I thought some old settings are used by the Netgear firmware). And indeed, from there I used the UI to upgrade with your OWRD firmware.img

FWIW, I've been running this build since you posted it, it seems to work pretty well, no real problems, just the log being spammed by some messages, but they don't seem to affect functionality.

[112585.397555] ath10k_pci 0000:01:00.0: received unexpected tx_fetch_ind event: in push mode
[125510.475607] ath10k_pci 0001:01:00.0: Invalid peer id 225 peer stats buffer
[127496.935767] ath10k_pci 0001:01:00.0: Invalid peer id 253 peer stats buffer
[196890.569663] ath10k_pci 0000:01:00.0: received unexpected tx_fetch_ind event: in push mode

Hopefully we'll see the builds on a regular basis now. Thank you for your work :slight_smile:

I've attempted to get the TFTP recovery to work on one of the R7800s I own, but I'm unable to get it working at all. I have the router connected to a hub in order to see when the link comes up, but it never does. Where do I go from here?

Did you try this ?

Yes. Although I have to wait until the power light blinks white slowly to release the reset button or it will change to blinking orange quickly. But like I said, the link light on the hub never turns on, so I'm not even sure if the router is bringing the interface up.

Other suggestions to try (in order)

  1. The other lan ports
  2. another network cable
  3. a different switch (if you truly have a hub and not a switch that could be causing the link negotiation to be slower)

The DHCP does not come up in the case. You need to set your PC to use a static IP: 129.168.1.2/255.255.255.0 and then tftp in the the router.

So far I have never heard about a case, where the TFTP mode does not come up if triggered properly. But there might be something special in your router, or the early part of the flash has got a bad sector, or something.

To find out more, you might need to open the case and attach a serial cable in order to see the boot sequence. (R7800 serial cable advice in wiki and in R7800 exploration thread's first few messages)

The bootloader's operations will be like this in the serial console, and it will show clearly if you manage to enter the TFTP recovery mode correctly:

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:dc:xxxxxxxx:e6
athrs17_reg_init: complete
athrs17_vlan_config ...done
S17c init  done
MAC2 addr:dc:xxxxxxxx:e5
eth0, eth1
Factory Reset Mode
The Router is in TFTP Server Firmware Recovery mode NOW!
Listening on Port : 69, IP Address: 192.168.1.1 ...
Upgrade Mode   Upgrade Mode
Rcv:
	.................................................................
	.................................................................

If you release the the reset button too early, it goes to Netgear factory reset mode.
If it is released correctly, there are these lines in the end:

The Router is in TFTP Server Firmware Recovery mode NOW!
Listening on Port : 69, IP Address: 192.168.1.1 ...
Upgrade Mode

Once you send the file with TFTP, there are these:

Rcv:
	.................................................................
	.................................................................

I've tried all ports on the router. None of them turn the light on the hub on to indicate that the interface is up.

Tried a couple

I'm beginning to think the ports on this router may be fried because the light indicating an active interface never comes on for any of the ports of the router (it does come on for the laptop I have plugged in). I have a switch lying around somewhere and I can try that later, but this hub has always worked.

I've been using a static IP (192.168.1.10/255.255.255.0 with a gateway of 192.168.1.1) and the hub is to force macOS to keep the interface active until the router's interface comes up, but the light on the hub that the router is plugged into never comes on.

I use a Mac and there is not need to use any hub: a LAN port is connected directly to the USB adapter.

Do not set gateway.

This is uncharted territory for me (I've been using OpenWRT for over 10 years and have never had to use a serial cable). I've done some reading on the wiki, but I'm not sure if I should buy a pre-made serial cable or what.

Easiest is a small USB-to-TTL adapter with cable. And select one that supports the 3.3V TTL power level, as 5V is too much. (Actually you only need ground, RX and TX, while the voltage pin does not need to be connected.)

Something like these: https://www.amazon.com/s?k=usb+to+ttl&i=electronics

1 Like

I just tried this again and when I do put R7800-owrt1907-r11086-ab7e9754df-20200525-0959-factory.img, it outputs ftp: sendto: Network is unreachable. The interface in the network preferences pane never turns green, either, which explains why I'm getting that error (and, yes, I've tried it over and over to make sure I'm not missing the tftp window).