[fpc-pascal] Re: Building kernel modules using fpc (for fun)

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Sun Jan 16 05:27:51 CET 2011


Paul Breneman wrote:
> Lukasz Sokol wrote:
>> Hey,
>>
>> take a look.
>>
>> I've basically removed all the calls that were referring to creating, 
>> reading
>> and writing the procfs file.
>>
>> Only left init_module and cleanup_module so I only left trivial Hello 
>> World and
>> Bye-bye messages.
>> In fact I think even that should be made par with current linux 
>> standard. But
>> that's for another few hours of fun ;)
>> Plus it prints the intro and outro messages in new lines ;)
>>
>> http://pastebin.com/9D9ye7Pt (contains both system.pas and 
>> kernel_module.pas)
>>
>> This builds and insmods and rmmods ;) still but need the 
>> kernel_module_info.c
>> file and Makefile from the original description.
>>
>> Amends and new ideas welcome.
> 
> This looks *very* interesting.

Indeed.

 > I'd like to add it (with *big* red flags and notes not to
 > try it on a production PC) to this page:
 > http://www.turbocontrol.com/helloworld.htm

Indeed. Note that the original author suggested that running it in a UML 
(User Mode Linux) guest would be appropriate, I've used UML in the past 
and found it very useful (although with comparatively slow disc access, 
and limited to x86).

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list