Re: The assemble file under the driver folder can not be recognized when the driver is built as module

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

 



On Mon, Apr 10, 2006 at 06:16:56PM +0800, Aubrey wrote:
> I've written a framebuffer driver and put it under the folder
> "./drivers/video", it consists of two files" mydriver.c and myfun.S".

Why would you write a driver in assembly in the first place? That makes
it highly unportable, I bet you can't compile your driver for x86 and
ARM from the same source. There are only four drivers in the whole
kernel tree that have an assembly part, but those are so tied to their
platform (Acorn, Amiga) that they aren't portable anyway.

> When I build it into the kernel image, everything is ok.
> But when I build it as module, I got the following error message:
> ===========================================
> aubrey@linux:~/cvs/kernel/uClinux-dist> make V=1
> --------snip---------
> make -f scripts/Makefile.build obj=drivers/video
> make -f scripts/Makefile.build obj=drivers/video/backlight
> make[3]: *** No rule to make target `drivers/video/rgb2ycbcr.c',
> needed by `drivers/video/rgb2ycbcr.o'.  Stop.
> make[2]: *** [drivers/video] Error 2
> make[1]: *** [drivers] Error 2
> make[1]: Leaving directory `/home/aubrey/cvs/kernel/uClinux-dist/linux-2.6.x'
> make: *** [linux] Error 1
> ===========================================
> 
> Make ask me for ".c" file. But it's an assemble file indeed.
> Is it a bug of kernel script? (I'm using 2.6.16)

I haven't seen your Makefile so I can't see what's wrong, but see
drivers/scsi/arm/Makefile for an example.


Erik

-- 
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux