Re: protecting source code in 2.6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> What we intend to do is, distribute the os interface module (osint.c)
> with
> source code and the device interface module as object code or library.
> The
> user will compile the os interface module on the target box and link it
> with the device interface module to generate the .ko (loadable module).
> 
> We are not very sure of how to achieve this. 
> Please help us address this issue.

Not a popolar topic on this mailing list..

>From a technical point of view what you need to do is simple.

You just need to distribute it as an external module, and provide the
dev.o file as part of this.
The dev.o file must be named 'dev.o_shipped'

Then you need a makefile like this:
obj-m := jinu.o
jinu-y := dev.o osinit.o

You can add a few more trick to enable use of plain make - see
article about external modules on the kernel page on lwn.net a few weeks ago.

What you need to compile the external module is simply:
make -C $KERNELSRC M=$PWD

Where KERNELSRC is a kernel with 'make module_prepare' executed.

	Sam

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux