[uClinux-dev] How to load kernel modules in C

Fabrice Gautier Fabrice_Gautier at sdesigns.com
Fri Mar 14 17:57:17 EST 2003


Thats what i'm already doing. But i want to eliminate the external program.

-- 
Fabrice Gautier, 
Fabrice_Gautier at sdesigns.com


> -----Original Message-----
> From: Kendrick Hamilton [mailto:hamilton at sedsystems.ca]
> Sent: Friday, March 14, 2003 6:25 AM
> To: Uclinux-Dev (E-mail)
> Subject: Re: [uClinux-dev] How to load kernel modules in C
> 
> 
> Fabrice,
> 	all you need to do is use the system function call.
> 
> 	system("/sbin/insmod mymodule");
> This will vfork and exec a shell which then executes the 
> insmod. If you
> want to eliminate the shell startup from the code, do the 
> vfork and exec
> in your program.
> Kendrick
> 
> On Thu, 13 Mar 2003, Fabrice Gautier wrote:
> 
> > Hi,
> >
> > Is there somewhere some non-GPL C code to load a kernel module ?
> >
> > Right now I'm calling an external insmod program (busybox) 
> to load a kernel
> > module but i would like to include the C functions that 
> does that directly
> > in my program. But since busybox is GPL i cannot just take 
> the busybox
> > insmod code and include it in this non-GPL program.
> >
> > So i'm looking for either:
> > a) Some code with a friendly license (like a BSD or similar).
> > b) Some documentation that explains the kernel API used to 
> load a module. (I
> > could look at the busybox code, to understand the kernel 
> APIs, but i feel
> > the result would probably be too much like the GPL code, 
> and be considered a
> > derviative work...)
> >
> > Thanks
> >
> > --
> > Fabrice Gautier,
> > Fabrice_Gautier at sdesigns.com
> > _______________________________________________
> > uClinux-dev mailing list
> > uClinux-dev at uclinux.org
> > http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> > This message was resent by uclinux-dev at uclinux.org
> >
> 
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org
> 




More information about the uClinux-dev mailing list