Author Topic: Can anyone help introduce the compile strategy of such linux module with CB?  (Read 7067 times)

Offline 198710

  • Multiple posting newcomer
  • *
  • Posts: 32
Code
#define MODULE
#include <linux/module.h>

int init_module(void)
{
    printk("<1>Hello World!\n");
    return 0;
}

void cleanup_module(void)
{
    printk("<1>Goodbye!\n");
}

Is there any settings for this sample code in "build-option" or "properties"?

Offline koso

  • Multiple posting newcomer
  • *
  • Posts: 58
I think there is no integrated support. You will have to create custom Makefile, and configure C::B project to use it instead of standard build practice. Also there is posibility to add some post-compile scripts, which can install this module.

Also you will have to set search directories, so the code-completion plugin can find those kernel header files and parse them for symbols.