Hi,
Just a quick follow-up about the MISSING_MODULE() error when compiling the csinfo module.
On 23/04/2021 02:10, Leo Yan wrote:
I've read in the discovery.md from CSAL that they can be extracted by reading the ROM table of my Cortex-A53, but I'm doing/understanding something wrong. I cross-compiled the CSAL library and the csinfo-folder (which btw only compiled after inserting "MODULE_LICENSE("");" into the csinfo.c file). Then I copied the resulting csinfo.ko to my Hikey620 where I tried "sudo make" and it returned: Load CoreSight reporting module... expect "Resource temporarily unavailable" insmod csinfo.ko insmod: ERROR: could not insert module csinfo.ko: Resource temporarily unavailable Makefile:17: recipe for target 'load' failed make: *** [load] Error 1 If I understood correctly, that is intended, but should also give me the base address of the ROM-table afterward. But there was no other output. I do have CONFIG_DEVMEM enabled. I tried "sudo insmod csinfo.ko". directly as well, with the same result.
Looking at the code it appears that the output is printk(KERN_INFO ... ) Check the printk level is correct on your system.
It's good to use "dmesg" to check the kernel log, so it might give more hints for why fails to load kernel module. The compiling faiure with "MODULE_LICENSE" is weird, it's better to go back to check if have specified correctly for the kernel path?
I've looked a little into it, and I think the error is caused by a Linux patch [1], that requires all modules to include a license tag. Since csinfo.c doesn't have one, I think that's the issue. Does making the csinfo module with the newest Linux kernel version work on your end?
[1] https://patchwork.kernel.org/project/linux-kbuild/patch/20201201103418.67585...
Regards,
Dominik