Re: New to kernel programming

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

 



Hi Kousik,

Please refer "The Linux Kernel Module Programming Guide"
or http://tldp.org/LDP/lkmpg/2.6/html/

for clear understanding of the concept of Module Programming .



On Thu, Jul 16, 2009 at 2:14 PM, Kousik Maiti<maiti.kousik@xxxxxxxxx> wrote:
> Thanks Robert.
>
> On Thu, Jul 16, 2009 at 8:15 AM, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx>
> wrote:
>>
>> On Thu, 16 Jul 2009, Kousik Maiti wrote:
>>
>> > This is my makefile:
>> >
>> > ifeq    ($(KERNELRELAESE),)
>>                   ^^^^^^^  wrong
>> >
>> >         KERNELDIR ?= /lib/modules/$(shell uname -r)/build
>> >         PWD := $(shell pwd)
>> > .PHONY: module clean
>> >
>> > module:
>> >         $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
>> > clean:
>> >         rm -rf *.o *~ core .depend .*.cmd  *.mod.c .tmp_versions
>> > Module.symvers
>> > else
>> >         $(info Building with KERNELRELEASE = ${KERNELRELEASE})
>> >         # called from kernel build system: just declare what the modules
>> > are
>> >
>> >         obj-m :=        hi.o
>> > endif
>> > ~
>> > On Thu, Jul 16, 2009 at 6:17 AM, Nikolay N. Ivanov <nn@xxxxxxxx> wrote:
>> >       Hi Kousik.
>> >
>> > On Wed, Jul 15, 2009 at 11:13 PM, Kousik Maiti<maiti.kousik@xxxxxxxxx>
>> > wrote:
>> > > Hi list,
>> > > I am new to kernel programming. I want to create a module. For that
>> > I
>> >
>> > > >follow http://crashcourse.ca/wiki/index.php/Writing_your_first_kernel_modul
>> > e
>> > > .
>> > > When I run make command I got this message.
>> > > $make
>> > > make -C /lib/modules/2.6.28-11-generic/build
>> > M=/home/kousik/program/module
>> > > modules
>> > > make[1]: Entering directory
>> > `/usr/src/linux-headers-2.6.28-11-generic'
>> > >   Building modules, stage 2.
>> > >   MODPOST 0 modules
>> > > make[1]: Leaving directory
>> > `/usr/src/linux-headers-2.6.28-11-generic'
>> > > But there is no module means .ko file generated . Can anybody help
>> > me?
>> > > Thanks in advance.
>> >
>> > It seems like your Makefile is wrong. Can you show it?
>> >
>> > --
>> > Nikolay N. Ivanov
>> >
>> >
>> >
>> >
>> > --
>> > Kousik Maiti
>> > B.Tech
>> > Computer Science & Engineering
>> > RCC Institute of Information Technology
>> > Kolkata
>> >
>> >
>>
>> ========================================================================
>> Robert P. J. Day                               Waterloo, Ontario, CANADA
>>
>>        Linux Consulting, Training and Annoying Kernel Pedantry.
>>
>> Web page:                                          http://crashcourse.ca
>> Twitter:                                       http://twitter.com/rpjday
>> "Kernel Newbie Corner" column @ linux.com:          http://cli.gs/WG6WYX
>> ========================================================================
>
>
> --
> Kousik Maiti
> B.Tech
> Computer Science & Engineering
> RCC Institute of Information Technology
> Kolkata
>



-- 
Regards:
Vineet Agarwal

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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