Compiling mt7996 module

Hello

I'm new in compiling Firmware fr OpenWRT.
I just want to compile a customized kmod-mt7996* module for my snapshot version.
The reason is that the Wi-Fi power is much too low. However, there are patches that adjust this.

How do I go about this?
I read that all modules are signed with the checksum of the .config file.
But I can't find the .config file with which the release was compiled. It's not in /proc/

What's the best way to proceed? Are there any instructions?

Thank you

search the forum for vermagic.

why would it be in /proc ?

Thank you for your replay.
I don't quite understand the vermagic thing. Is there a manual? Unfortunately, I can't find any. But do I understand correctly that you can use it to compile individual modules without compiling the entire firmware?

I did find the .config file to compile. Maybe I can do something with it.

There's an option to include the .config in /proc/config.gz or something similar.

don't think so, you're not really supposed to compile a single kmod, and add it later.

the kernel most likely need to be compiled, that's like 90% of the image building process.

was this a question ?

Probably start here: https://openwrt.org/docs/guide-developer/toolchain/buildsystem_essentials

You can build individual packages using the SDK, but kmods aren't normal packages and need the full buildroot system for compilation.

Okay thank you for your replays.

If I compile the firmare and install it without owut, the all installed packeges are gone.
Is there a way to keep the packages?

Select (=y) the packages you'd normally install at build-time.

You can use owut to generate the package list

$ owut list --format config
CONFIG_PACKAGE_bind-dig=y
CONFIG_PACKAGE_btop=y
CONFIG_PACKAGE_conntrack=y
CONFIG_PACKAGE_coreutils-od=y
CONFIG_PACKAGE_curl=y
...

Take that output from your router, tack it onto the end of .config in your build environment, do make defconfig and then your build will include all those packages in the image.

$ echo "CONFIG_PACKAGE_bind-dig=y
CONFIG_PACKAGE_btop=y
CONFIG_PACKAGE_conntrack=y
..." >> .config

Thanks for your advice. I'll try it out.

I try it to compile, but I get compiling errors. I try it with sources for v24.10.1 and the actual mtk-openwrt-feeds. A file is missing:

/home/xxxxx/src/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/linux-6.6.86/arch/arm64/boot/dts/mediatek//mt7988a-rfb-spim-nor.dtso:20.12-56.6: Warning (avoid_default_addr_size): /fragment@0/__overlay__/flash@0: Relying on default #address-cells value
/home/xxxxx/src/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/linux-6.6.86/arch/arm64/boot/dts/mediatek//mt7988a-rfb-spim-nor.dtso:20.12-56.6: Warning (avoid_default_addr_size): /fragment@0/__overlay__/flash@0: Relying on default #size-cells value
rm -f /home/xxxxx/src/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/image-mt7988a-rfb-spim-nor.dtbo.tmp
aarch64-openwrt-linux-musl-cpp -nostdinc -x assembler-with-cpp  -I/home/xxxxx/src/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/linux-6.6.86/arch/arm64/boot/dts/mediatek -I/home/xxxxx/src/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/linux-6.6.86/arch/arm64/boot/dts/mediatek/include -I/home/xxxxx/src/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/linux-6.6.86/include/ -I/home/xxxxx/src/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/linux-6.6.86/scripts/dtc/include-prefixes -undef -D__DTS__  -o /home/xxxxx/src/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/image-mt7988a-rfb-mxl86252.dtb.tmp /home/xxxxx/src/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/linux-6.6.86/arch/arm64/boot/dts/mediatek//mt7988a-rfb-mxl86252.dts
cc1: fatal error: /home/xxxxx/src/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/linux-6.6.86/arch/arm64/boot/dts/mediatek//mt7988a-rfb-mxl86252.dts: No such file or directory

Do I need this file, or can it comment out in the sourcecode?

I've now commented it out. The compilation then finish without errors. However, I'm now having other problems when I install the compiled version.

What I find strange, though, is that I find the upgrade image in the tmp folder of the build directory. Is this normal?

Sounds like a question for sdk supplier?

1 Like

I was able to compile the image without errors.
My conclusion is that the current mediatek feed isn't working. There are either compilation issues or the network isn't working after installation.
Also, not every patch that resets the low performance of some MT7996e to default values ​​works.

So, for me, this topic is closed. Thanks again for any suggestions.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.