Re: protecting source code in 2.6

From: Sam Ravnborg (sam_at_ravnborg.org)
Date: 05/20/04

  • Next message: Ingo Molnar: "Re: overlaping printk"
    Date:	Thu, 20 May 2004 16:08:09 +0200
    To: "Jinu M." <jinum@esntechnologies.co.in>
    
    

    > 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
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Ingo Molnar: "Re: overlaping printk"

    Relevant Pages

    • Re: protecting source code in 2.6
      ... > We are developing a block device driver on linux-2.6.x kernel. ... > to distribute our driver as sum of source code and librabry/object code. ... > and the device interface module. ...
      (Linux-Kernel)
    • protecting source code in 2.6
      ... We are developing a block device driver on linux-2.6.x kernel. ... We have divided the source code into two parts. ... and the device interface module. ... The device interface module on the other ...
      (Linux-Kernel)
    • protecting source code in 2.6
      ... We are developing a block device driver on linux-2.6.x kernel. ... We have divided the source code into two parts. ... and the device interface module. ... The device interface module on the other ...
      (Linux-Kernel)
    • Re: protecting source code in 2.6
      ... > to distribute our driver as sum of source code and librabry/object code. ... > and the device interface module. ... The device interface module on the other ...
      (Linux-Kernel)
    • Re: protecting source code in 2.6
      ... > to distribute our driver as sum of source code and librabry/object code. ... > and the device interface module. ... The device interface module on the other ...
      (Linux-Kernel)