Basic question
Hi,
Thanks to your reply erlier. I successfult compiled my device driver separatly as module.o and then ran a script to insmod into the kernel.
I have another basic question.
I have two PC systems. First one acts as my development system which I develope code using KDevelop running Red Hat linux (2.4.18). When I compile my application code (say app.0) and my device driver code (say module.o) then I FTP these files into my target system which is a scalled down single-board computer (with minimal RAM and disk) which runs linux 2.2.20.
Most of the time everything is O.K. However, when it comes to the device driver module (module.o), I get some kernel mismatch problems (obvisouly).
E.g. the file_operations struct in 2.2.20 is different to 2.4.18
My question is: How can I tell gcc or even within the module itself (e.g. KERNEL_VERSION) to compile for lower version kernel (i.e tell kernel 2.4.18 to compile for 2.2.20)
Regards
Nejhdeh Ghevondian
Quoted 3 lines · nejhdeh
My question is: How can I tell gcc or even within the module itself (e.g.
KERNEL_VERSION) to compile for lower version kernel (i.e tell kernel 2.4.18 to compile for 2.2.20)
You go to the 2.2.20 kernel tree and use 'make.' You can't move modules from one kernel to another, they're totally different programs!
Signature · 3 lines
bill davidsen <[email protected]> CTO, TMR Associates, Inc Doing interesting things with little computers since 1979.
Hi,
I have a question about fork() and messages..
For simplicity, I have a parent process that forks() two child processes (say pid1 & pid2).
How do I set priority levels of child1 vs child2. I want child1 to have a much higher priority level, since its going to read inputs from a serial device in the outside world?
Using basic signal calls say SIGUSR1, how can I communicate (without semaphores) between child1 and child2 through the parent? For instance if the child1 gets blocked forever trying to read the serial device then I want to notify the parent to kill child2??
Your time in this matter is greatly appreciated.
Quoted 3 lines
Regards
Nejhdeh Ghevondian