Build for Netgear R7800

Hi, after good amount of stable operation I experienced random crash tonight, here's the pstore output. As advised last time it was crashing a lot I switched from layer_cake to piece_of_cake and it has been stable since. No offloading is active, neither are any of the startup commands to curb the cpu scaling as it wasn't giving me any trouble last few months.

Running r20058-7370479224
cat /sys/fs/pstore/dmesg-ramoops-0 https://o.o5.ddns.net/nA5x0
cat /sys/fs/pstore/dmesg-ramoops-1 https://o.o5.ddns.net/7o0ip

The whole output mostly reads as Klingon to me, but as a layman seeing this under kernel panic

<4>[919126.686474] [<c03075e4>] (arch_cpu_idle) from [<c034e9a0>] (do_idle+0x244/0x2a4)
<4>[919126.693847] [<c034e9a0>] (do_idle) from [<c034ecbc>] (cpu_startup_entry+0x1c/0x20)

wouldn't it mean the cpu scaling to idle is the cuplrit?

seeing similar output on master, r22064:

<4>[247304.826028] Exception stack(0xc146df58 to 0xc146dfa0)
<4>[247304.833581] df40:                                                       18b4e756 00000000
<4>[247304.838709] df60: 00000001 c0314a80 00000001 c0e04f28 c146c000 00000000 00000000 ffffe000
<4>[247304.846956] df80: 00000000 c0e04f5c c0ec0e80 c146dfa8 c030761c c0307620 60000013 ffffffff
<4>[247304.855199] [<c0300b7c>] (__irq_svc) from [<c0307620>] (arch_cpu_idle+0x44/0x50)
<4>[247304.863445] [<c0307620>] (arch_cpu_idle) from [<c0354988>] (do_idle+0x25c/0x2bc)
<4>[247304.870997] [<c0354988>] (do_idle) from [<c0354d0c>] (cpu_startup_entry+0x1c/0x20)
<4>[247304.878461] [<c0354d0c>] (cpu_startup_entry) from [<42301570>] (0x42301570)

@hnyman
I saw in your script that you changed that line echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor to echo 20 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor so I wondered if you add all those lines in the script, does it mean this setting is automatically enable in our build and it starts at boot?

 echo 600000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
 echo 600000 > /sys/devices/system/cpu/cpufreq/policy1/scaling_min_freq
 echo 20 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
 echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold

If so, I dont have to add those lines in my rc.local?

hi @hnyman

a few quick questions for you

  1. can you pls reupload the scripts and patches for 19.07 pls? as i want to stick with 19.07 atm but need some updates

  2. wanna clean some stuff since it's about 22G in size but i am not familiar with the dir structures yet. so how do i clean the directory while leaving those builds untouched? eg to retain the toolchains binary built during the compilation so that next time when i run your scripts, it wont start over again by re-download/recompile everything?

  3. i want to update a few packages which is not available on openwrt yet like busybox and tor. is it the proper way to follow the guide from openwrt by exporting the toolchians directories and compile them manually will do?

thanks a lot

I uploaded my last builds of 19.07, 18.06 and 17.01 ...

Regarding clean, you probably want "make clean", but as also the toolchain versions do change, you might also do "make dirclean" every few months, so that tools and toolchain do get rebuilt (and old versions are removed).

No idea what you exactly mean regarding packages and "exporting toolchains"...

thanks for reuploading the files man

what i meant regarding exporting toochain path was, as i found on the internet that if i want to build static build for a particular package i have to export the toolchains path but most of them were failed according to them. so i think i would better to compile them in the env you provided

btw, i have tried to complie tor-0.4.7.13 with your 21.x sources (existing is 0.4.7.10), and replaced all "tor-0.4.7.10" with "tor-0.4.7.13" under feeds/packages.index, together with latest sources downloaded under build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/tor-full/. then i issued
make build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/tor-full/tor-0.4.7.13
but it returned:
make: build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/tor-full/' is up to date
even i removed all tor ipks etc. i thought it would recompile the new sources supplied but no. i then issued make again but it ignored my tor-0.4.7.13 changes and downloaded and recomplied tor-0.4.7.10 again. so the default version must be fetched again

so may i ask, what should i do to update a package manually with latest sources in this case where the version on openwrt is not updated? ie to override the default version?

and, how do i prevent cleaning the toolchain binary? ie i want to save the toolchain binary compiled elsewhere, and when needed, i just point to the binary i have saved before within your env without recompiling the toolchain again. just like supplying a toolchain path for rebuilding

Just edit the OpenWrt Makefile for the package and update it with the correct new version info, sha256 hash etc.

Do not run "make dirclean" or "make distclean".

I have never done that, so no help from me. (You should be able to download the SDK from the OpenWrt download repo, though.)

ok got it. i have spent some time reading the doc and i have a clearer picture now

one final question, how can i avoid the key/signature not matched thing when i wanna install or update a package via opkg web ui with a custom build afterward, say getting kmod_ipt_xxx etc?

You can't.

In practice, it is pretty hard to install kmods to private builds. You need to compile the modules at the same time as the firmware itself.

ok thanks a lot

4 posts were merged into an existing topic: Netgear R7800 exploration (IPQ8065, QCA9984)

Hello

anybody using this firmware on NBG6817 ?
Thanks

No, because I only compile this for R7800.

Hey hnyman, thanks for your work on these devices, it has been amazing!

I have a request: banip seems to be working again with the new firewall. Could you include it back in your build, or is there something speaking against it? It is a very helpful tool, and I was sad to see it go for a while with the transition.

Thank you! :slight_smile:

I can re-enable it in the next build.

1 Like

hello @hnyman :slight_smile: thanks for offering your build.

I've used an older version of your build for some time and flashed to your latest master-r22362-68883278ab-20230321 via TFTP. So I did a complete flash from scratch without keeping any settings.

So without changing anything I've connected my R7800 via LAN cable:

modem <-> router <-> PC

When doing a speedtest I only get aroung 100mbit when the router is in between.

If I go modem <-> PC I get the full 300mbit.

I've changed and checked the cables (they are all fine because connecting them between modem and PC I always get 300mbit), I've reflashed your build etc but I can't figure why I only get 100mbit.

Do you or anyone else know what could be wrong here or where to look at?

Thank you.

SQM enabled with limited speed?

1 Like

In LuCi -> Network -> SQM QoS "Enable this SQM instance" is not selected. So SQM is off.

I tried the newest build on my R7800 and it got stuck on a bootloop. I tried using the .img on the upgrade and i tried straight TFTP. What am i doing wrong.

Note quite sure about what you have done. Instead of saying ".img" just sspecify the image type, "factory" or "sysupgrade"... (The ending has no real relevance.)

  • factory.img image is meant to be used with OEM firmware's flashing routine or the TFTP recovery in the bootloader
  • sysupgrade.bin is meant to be used by the OpnWrt sysupgrade routine to sysupgrade to a new OpenWrt version.

Assuming that you have used the correct image, there are some possibilities:

Having a serial connection and being able to see the boot process would help you a lot in debugging.

Ps. the newest image from week ago works just fine:

 -----------------------------------------------------
 OpenWrt SNAPSHOT, r22387-47de2c6862
 -----------------------------------------------------
root@router1:~#