linux/kernel/module development: Difference between revisions

From Free Pascal wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 2: Line 2:
The purpose of this page is to give basic material to write Linux kernel modules using FPC. As Linux distributions may differ, most actions on installing packages are described for Debian distribution, on with author of this article is working. However, it may be very simple to translate this for other Linux distributions.
The purpose of this page is to give basic material to write Linux kernel modules using FPC. As Linux distributions may differ, most actions on installing packages are described for Debian distribution, on with author of this article is working. However, it may be very simple to translate this for other Linux distributions.


=Requrements=
=Requirements=
First of all, you need to have kernel headers packages installed
#First of all, you need to have FPC installed
apt-get install fp-compiler
Please notice that this will install fp-compiler and fp-units-rtl. The author of this page is using 2.2.0, but 2.0.4 is also working. However other versions were not tested an my not work, especially previous releases.
#you need to have kernel headers packages installed
apt-get install linux-headers-$(uname -r)
# Then you need make utility
apt-get install make
Please note that installing linux-headers-* will install automatically the required version of GCC and binutils.
 
=Kernel RTL=
It is obvious that when programming Linux kernel modules, one can not use the standard FPC RTL.

Revision as of 10:25, 5 October 2007

overview

The purpose of this page is to give basic material to write Linux kernel modules using FPC. As Linux distributions may differ, most actions on installing packages are described for Debian distribution, on with author of this article is working. However, it may be very simple to translate this for other Linux distributions.

Requirements

  1. First of all, you need to have FPC installed
apt-get install fp-compiler

Please notice that this will install fp-compiler and fp-units-rtl. The author of this page is using 2.2.0, but 2.0.4 is also working. However other versions were not tested an my not work, especially previous releases.

  1. you need to have kernel headers packages installed
apt-get install linux-headers-$(uname -r)
  1. Then you need make utility
apt-get install make

Please note that installing linux-headers-* will install automatically the required version of GCC and binutils.

Kernel RTL

It is obvious that when programming Linux kernel modules, one can not use the standard FPC RTL.