Tuesday, August 23, 2016

Adding customer code/module in Kernel source tree


For an embedded system, there's actually little or almost no reason to use loadable Kernel modules. On the other hand, it may turn insecure, if the system is a protected one, using encrypted data & key while live. Then a custom loadable module can dump the memory to grab the secret data/key from runtime environment.

Other than all these, probably, you wish to see something while booting your own custom Kernel. For example, you want - that well known hello_world program should print something on console while kernel is booting.

A simple google search for "hello_world kernel space program" will point you a lot of examples to preparation, write, linking, compiling, loading, checking and unloading that hello_world program as a module for Kernel.