Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 683 Bytes

File metadata and controls

29 lines (21 loc) · 683 Bytes

Build Basic Kernel

  • MACROs
    • __init & __exit
    • module_init() & module_exit()
  • Basic Makefile
  • Install and Remove
  • MACRO
    • module_param()
  • Install and pass parameter from command line
  • Licensing and module description
    • MODULE_LICENSE()
    • MODULE_DESCRIPTION()
    • MODULE_AUTHOR()

Export Symbol

A module wants to export a symbol (i.e. function or global variable)

  • MACROs
    • EXPORT_SYMBOL()
    • EXPORT_SYMBOL_GPL() (only the kernrl who also uses GPL license can use the exported symbol)

A symbol must be exported at the global part of the code.