This is a discussion on Writing and compiling kernel modules within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> Hi All, I'm trying to port a kernel module from solaris to HP-UX. At this point, I'm testing on ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi All, I'm trying to port a kernel module from solaris to HP-UX. At this point, I'm testing on 11.11, but will try other systems when (if) I'm successful. I've downloaded the dummynet tree, and play with it now. 2 questions come to mind: 1. Can I somehow use gcc to compile a kernel module/driver? All refernces say I should use the HP ANSI-C compiler, but I wonder if anybody has managed to use gcc. If so, what are the correct flags? 2. I need to write a "misc" module. All the examples I found are for either a driver or a STREAMS module. Any ideas? TIA, Gali |
| |||
| Gali Work <galinews@gmail.com> wrote: > I'm trying to port a kernel module from solaris to HP-UX. At this > point, I'm testing on 11.11, but will try other systems when (if) > I'm successful. > I've downloaded the dummynet tree, and play with it now. 2 questions > come to mind: From where did you get dummynet? If from ftp.cup.hp.com, keep in mind that dummynet is not exactly meant to be an exemplar of kernel modules > 1. Can I somehow use gcc to compile a kernel module/driver? All > refernces say I should use the HP ANSI-C compiler, but I wonder if > anybody has managed to use gcc. If so, what are the correct flags? My personal advice would be "Don't even go there." The HP-UX kernel is compiled with the HP compilers. You'd need to find some rather precise translations of all the kernel-specific-and-probably-poorly-documented-if-at-all options. > 2. I need to write a "misc" module. All the examples I found are for > either a driver or a STREAMS module. Any ideas? What do you mean by a "misc" module? I gather you've already gone through the DDG and all that online stuff? rick jones -- Process shall set you free from the need for rational thought. these opinions are mine, all mine; HP might not want them anyway... feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH... |
| |||
| Thanks, Rick for the quick reply. > > I've downloaded the dummynet tree, and play with it now. 2 questions > > come to mind: > > From where did you get dummynet? If from ftp.cup.hp.com, keep in mind > that dummynet is not exactly meant to be an exemplar of kernel modules > Yes, I know, I'm just trying to gather as many examples as possible. If you have any other input to recommend, please do. > My personal advice would be "Don't even go there." The HP-UX kernel > is compiled with the HP compilers. You'd need to find some rather > precise translations of all the > kernel-specific-and-probably-poorly-documented-if-at-all options. I suspected that, but wanted to check with others, just in case I was wrong. I will take your word (and buy the compiler). > What do you mean by a "misc" module? I gather you've already gone > through the DDG and all that online stuff? I'm referring to HP's "Developing DLKM" issue 1.0 (and other sources as well): "Miscellaneous modules can implement any feature within the kernel". I know it uses mod_misc_opt for its mod_operations structure, but that's pretty much all I know. I'll keep reading, but I'd love to see a working sample... Thanks again. |
| ||||
| Gali Work <galinews@gmail.com> wrote: > I suspected that, but wanted to check with others, just in case I was > wrong. I will take your word (and buy the compiler). You might wait a bit longer for usenet propagation to reach folks who may have actually tried gcc for UX kernel, but yeah, having the actual HP compiler will probably make life much happier. There may be some way via the developer stuff to get a discount - at least it would be worth checking. >> What do you mean by a "misc" module? I gather you've already gone >> through the DDG and all that online stuff? > I'm referring to HP's "Developing DLKM" issue 1.0 (and other sources as > well): "Miscellaneous modules can implement any feature within the > kernel". I know it uses mod_misc_opt for its mod_operations structure, > but that's pretty much all I know. I'll keep reading, but I'd love to > see a working sample... Ah, well, that's gone _well_ past my expereince base rick -- firebug n, the idiot who tosses a lit cigarette out his car window these opinions are mine, all mine; HP might not want them anyway... feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH... |