Re: Error while compiling hello module using make

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

 



On 9/28/05, Jim Bauer <jfbauer@xxxxxxx> wrote:
> On Tuesday 27 September 2005 16:17, abhi raj wrote:
> > I have just started on a project for writing a driver for an ethernet card
> > .i have started following the book Linux device driver by Rubini, 3rd
> > edition . I got the program samples from their website . I tried using make
> > command ,got the following error :
> >
>
> > [root@localhost chap1]# ls
> > hello.c hello.o Makefile
> > //
>
> Only one source file here
>
>
> > # called from kernel build system: just declare what our modules are
> > obj-m := hello.o hellop.o seq.o jit.o jiq.o sleepy.o complete.o \
> > silly.o faulty.o kdatasize.o kdataalign.o
>
> But you are trying to build all these obj files.
> Where are all these suppose to be built from?
>

And this is the reason for error in compilation !!! as only hello.c is
in your directory so hello.o will be compiled but other .c files for
making corresponding .o files (which you mentioned in the Makefile)
isn't there so its giving error file not found .....

just remove all .o files from obj-m line ..... except hello.o if you
need/have only hello.c to be compiled


--
Fawad Lateef

--
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