Ipq806x NSS build (Netgear R7800 / TP-Link C2600 / Linksys EA8500)

I was going to try to limit a certain ip range, but the kernel is incompatible.

This issue happens when installation of a module from a different build is attempted. The kernel signature changes as modules are added/dropped in the build. That's why I avoid rebuilds, especially if it is just to add modules. I prefer to build all modules and check them into a repo so it is possible to go back to it for extras down the road.

Easiest solution might be to clone the latest repo from first post, modify the config to include any additional modules you might need (as modules if there are flash space concerns), build, and reflash.

Report: my Kernel 5.15 build is worked 43 days on R7800, very very good.

Target Platform	ipq806x/generic
Firmware Version	OpenWrt SNAPSHOT r22521-6f6ee0eb8c / LuCI Master git-23.093.56957-2145121
Kernel Version	5.15.105
Local Time	2023-05-21 17:30:30
Uptime	43d 14h 59m 43s

@ACwifidude , hi, the current 5.15 branch cannot use, many dependency errors.

This build can't install it, the kernel is different from the OpenWrt official version.

Alright... I wasn't going to push my wares but meh, here it goes.

Check this post. That's a full build of 22.03.5, with all modules. You should be able to install what you are after if you flash that one and either point to the repo or copy files from repo to router to install them manually.

There are a few comments on this thread about that build being iffy... could be. Further up you can find 22.03.4. I'm using both on C2600 routers with no issues.

Hi everybody.
I managed to build for my R7800 using OpenWrt 22.03 (Stable)from ACwifidude. Thanks a lof for your great work!
There is one thing I couldn’t figure out myself: I try to include dnsmasq-full. (I plan to use it with PBR.)
But the building process doesn’t complete and gives me errors:
Like for Example:

* check_data_file_clashes: Package dnsmasq-full wants to install file /home/xxxx/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-ipq806x/usr/share/dnsmasq/rfc6761.conf
        But that file is already provided by package  * dnsmasq

Obviously this is because I didn’t manage to exclude dnsmasq…
I tried

# Policy-Based Routing
CONFIG_PACKAGE_luci-app-pbr=y
CONFIG_PACKAGE_luci-i18n-pbr-en=y
CONFIG_PACKAGE_dnsmasq=n
CONFIG_PACKAGE_dnsmasq-full=y

with no success. (also =m / =y didn’t work)

Could somebody help me out with correct settings for my diffconfig to replace dnsmasq with dnsmasq-full? What am I doing wrong?
Many thanks in advance.

Many thanks for your work @ACwifidude ! I installed the NSS build on my ZyXEL NBG6817, it is working flawlessly.
And the speed is awesome trough PPPoE:

2 Likes

Did you try?

# CONFIG_PACKAGE_dnsmasq is not set

PD: the "#" is a must

1 Like

Thank you.
I have tried this - unfortunately with no success and the same error.

Try make menuconfig.

In the base packages area it is possible to set dnsmasq-full as built in (*) and dnsmasq as a module. That might do the trick.

With some poking around it may be possible to find the dependency that stops menuconfig to set dnsmasq to not build at all.

1 Like

Nice to hear.
Can you tell when you release it?

Thanks - this looked very promising at first, but also didn’t do the trick. Same error(s).
Seems to be a known problem...

You are right.

The workaround is to have both as modules for build to succeed and then use ImageBuilder. Alternatively, flash build which will have no resolver and, after scp'ing in the dnsmasq-full package, opkg install it.

Not pretty either way.

Have you tried removing after flashing and installing dnsmasq-full afterwards? Price to pay is a bit of flash space and change lost if you do a config reset... but this is the way to go for things like wpad.

1 Like

Thank you very much for looking into that.

Yes, not really what i was hoping for - but apparently the only options.

I think I will go with this approach. Perhaps this "issue" will be addressed in future.

Getting an error with building master on the "socinfo.c" file with a clean build tree. Probably something changed in master sometime after April 5th. I don't quite know how to fix it. Anybody have any thoughts on a fix for this section of the file?

Build Error:

make[5]: Entering directory '/home/HTPC/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/linux-5.15.112'
  CALL    scripts/atomic/check-atomics.sh
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC      drivers/soc/qcom/socinfo.o
drivers/soc/qcom/socinfo.c: In function 'qcom_socinfo_probe':
drivers/soc/qcom/socinfo.c:630:77: error: unknown escape sequence: '\040' [-Werror]
  630 |                                    qs->attr.revision, info->id, qs->info.fmt);
      |                                                                             ^
  AR      virt/lib/built-in.a
  AR      virt/built-in.a
  AS      arch/arm/lib/ashldi3.o
  AS      arch/arm/lib/ashrdi3.o
cc1: all warnings being treated as errors
  AS      arch/arm/lib/backtrace.o
make[8]: *** [scripts/Makefile.build:289: drivers/soc/qcom/socinfo.o] Error 1
make[7]: *** [scripts/Makefile.build:552: drivers/soc/qcom] Error 2
make[6]: *** [scripts/Makefile.build:552: drivers/soc] Error 2
make[5]: *** [Makefile:1906: drivers] Error 2

Section of the file involved:

static int qcom_socinfo_probe(struct platform_device *pdev)
{
	struct qcom_socinfo *qs;
	struct socinfo *info;
	size_t item_size;

	info = qcom_smem_get(QCOM_SMEM_HOST_ANY, SMEM_HW_SW_BUILD_ID,
			      &item_size);
	if (IS_ERR(info)) {
		dev_err(&pdev->dev, "Couldn't find socinfo\n");
		return PTR_ERR(info);
	}

	qs = devm_kzalloc(&pdev->dev, sizeof(*qs), GFP_KERNEL);
	if (!qs)
		return -ENOMEM;

	qs->attr.family = "IPQ";
	qs->attr.machine = socinfo_machine(&pdev->dev,
					   le32_to_cpu(info->id));
	qs->attr.soc_id = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%u",
					 le32_to_cpu(info->id));
	qs->attr.revision = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%u.%u",
					   SOCINFO_MAJOR(le32_to_cpu(info->ver)),
					   SOCINFO_MINOR(le32_to_cpu(info->ver)));
	if (offsetof(struct socinfo, serial_num) <= item_size)
		qs->attr.serial_number = devm_kasprintf(&pdev->dev, GFP_KERNEL,
							"%u",
							le32_to_cpu(info->serial_num));

	qs->soc_dev = soc_device_register(&qs->attr);
	if (IS_ERR(qs->soc_dev))
		return PTR_ERR(qs->soc_dev);

	pr_info("CPU: %s, SoC Version: %s\ id: %d fmt: %x\n", qs->attr.machine,
                                   qs->attr.revision, info->id, qs->info.fmt);

	socinfo_debugfs_init(qs, info, item_size);

	/* Feed the soc specific unique data into entropy pool */
	add_device_randomness(info, item_size);

	platform_set_drvdata(pdev, qs);

	return 0;
}

All warnings are now being treated as errors, which I think is the reason for that one...

The problem seems to be caused by the backslash in pr_info being followed by a space, which isn't a valid escape code (at least that's what the experts on google tell me :slight_smile: )

I'm no sure what the original code was trying to do, but I simply removed the backslash which solved this specific issue. Unfortunately I've got a whole bunch of other issues that aren't simple fixes, but they relate to nginx, so hopefully won't be a problem for most...

1 Like

Didn't get master built today but went ahead and built an image based off the new 23.05 branch (basically the same as master currently). Feel free to try it, I posted it as a link in the 1st post of this thread.

4 Likes

remove backslash
SoC Version: %s\ id to SoC Version: %s id

1 Like

or use \t which is a tab:
SoC Version: %s\t id to SoC Version: %s id

1 Like

question as i prepare to migrate from 22.03 to 23.05:

are we DSA yet or is ipq806x still switchdev