I believe, it is impossible to get GL.iNET's op24 sources, right?
How can I build a custom module with same vermagic then?
For example, current version 4.6.6 (mt-3000) made on OpenWRT's commit ebe7c5f1a3 of 24.10 branch, but even if I checkout and build default image, vermagic will differ from image I may download from gl.inet (5f888a243508bd63116c3c6987914d47-r1)
* pkg_hash_check_unresolved: cannot find dependency kernel (= 6.6.47~619a58e5e502dc9d8c11231596e812c6-r1) for kmod-helloworld
* pkg_hash_fetch_best_installation_candidate: Packages for kmod-helloworld found, but incompatible with the architectures configured
I need at least config.seed (config.buildinfo) file then, I think. Or any other way to build a module with same vermagic, maybe?
Also, is it possible to made custom GL.iNET UI module (not luci) for op24 firmware?
The GL SDK and UI not be made public, the firmware cannot be customized compiled with GL GUI. Can only be compiled based on OpenWRT open source with Luci.
Currently GL OP24 firmware is based on OP24.0.
What plugins do you need to install? HelloWorld?
This plugin is quite special, GL cannot provide technical support. Sorry.
But you can compile them yourself or Google can find the MT7981 compiled ipk packages.
Of cause not
This was just a sample of opkg error that indicates that module I built is not compatible with kernel from firmware you released.
This plugin is quite special, GL cannot provide technical support.
I do not ask for support of custom module, I can build OpenWRT kernel and module locally, all I need is only a config file that was used by you (on op24 firmware) to build a kernel to be able make kernel with the same VERMAGIC
OpenWRT releases provide this file with each public release, for example, I can install OpenWRT 23.05 on MT-3000 an build custom module using their published config file: https://downloads.openwrt.org/releases/23.05.5/targets/mediatek/filogic/config.buildinfo
I thought I'm smart, and I faked VERMAGIC to pass opkg check
But looks like this is not enough, and as a result I'm getting error when I'm trying to load my module: .gnu.linkonce.this_module section size must match the kernel's built struct module size at run time
Here is output of readelf -a of
my module:
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[23] .gnu.linkonc[...] PROGBITS 0000000000000000 0000b640
0000000000000280 0000000000000000 WA 0 0 64
[24] .rela.gnu.li[...] RELA 0000000000000000 00087698
0000000000000030 0000000000000018 I 48 23 8
Relocation section '.rela.gnu.linkonce.this_module' at offset 0x8a8f0 contains 2 entries:
Offset Info Type Sym. Value Sym. Name + Addend
000000000138 011800000101 R_AARCH64_ABS64 0000000000000000 init_module + 0
000000000258 00f800000101 R_AARCH64_ABS64 0000000000000000 cleanup_module + 0
any module from your firmware:
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[28] .gnu.linkonc[...] PROGBITS 0000000000000000 0000db80
00000000000004c0 0000000000000000 WA 0 0 64
[29] .rela.gnu.li[...] RELA 0000000000000000 00020060
0000000000000030 0000000000000018 I 39 28 8
Relocation section '.rela.gnu.linkonce.this_module' at offset 0x20060 contains 2 entries:
Offset Info Type Sym. Value Sym. Name + Addend
000000000138 012500000101 R_AARCH64_ABS64 0000000000000008 init_module + 0
000000000488 011300000101 R_AARCH64_ABS64 0000000000000000 cleanup_module + 0
Could you please share kernel configuration you used?
No. Kernel was compiled without any option to get configuration.
GL.iNET, Kernel is GPLv2, which basically means ‘if you distribute binaries, then you have to distribute sources to let anyone build a kernel by themself’.
I don't need their code (even if they have to open it by GPL rules). I need only configuration file that was used to build kernel, without configuration it is unable to compile any other module.
Thank you for reply, but if you read my messages carefully, you will see:
I already did this, but linkonce section of compiled module doesn't match with kernel from firmware. There are a lot of kernel options that affects this section size. This is why I need EXACTLY the same config of kernel that was used to build kernel.
Well... I bruteforced some config options and was able to match linkonce size, my module could be initialized, but It can not work since other function pointers are different too.
Gents, this shouldn't be THAT hard for users to extend firmware with own modules, why should we reverse engineer your firmware just to get SIMPLE CONFIG FILE? Try to be more open to community.
Honestly, I'm kind of tired of debricking my router after each 'test' compilation.
I don't know what else I should say to GL.iNET, please read about GPL:
While I'm still unable to get exactly the same VERMAGIC using this config (incomplete config or you are using some kernel modifications), finally after few hours of trying and numbers of recompiling I was able to make module I need work (I hope it will not crash in future :))
Please, include configuration in the future builds (using KERNEL_IKCONFIG compile option or separate file for download)
Looks like I have to beg you once again for few weeks...
Why it is so hard? Please share config, it helps people using packages you dont want to support.