Kernel Newbies archive on lore.kernel.org
 help / color / Atom feed
* the same name of external kernel module as one of source file
@ 2020-05-05 13:39 Tomek The Messenger
  2020-05-05 13:47 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Tomek The Messenger @ 2020-05-05 13:39 UTC (permalink / raw)
  To: kernelnewbies

[-- Attachment #1.1: Type: text/plain, Size: 550 bytes --]

Hi
If I have something like this in makefile:
obj-m := reset-core.o
reset-core-y := reset-core-main.o reset-core-utils.o
then module is built OK.
If I have something like that:
 obj-m := reset-core.o
reset-core-y := reset-core.o reset-core-utils.o
then it is wrongly built.
So I will replace all source file characters '-' to '_' and I will have:
obj-m := reset-core.o
reset-core-y := reset_core.o reset_core_utils.o
and everything will be OK, but it is a bit frustrating that code rules me
instead of me rules code. Maybe there is another solution?

[-- Attachment #1.2: Type: text/html, Size: 725 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: the same name of external kernel module as one of source file
  2020-05-05 13:39 the same name of external kernel module as one of source file Tomek The Messenger
@ 2020-05-05 13:47 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2020-05-05 13:47 UTC (permalink / raw)
  To: Tomek The Messenger; +Cc: kernelnewbies

On Tue, May 05, 2020 at 03:39:11PM +0200, Tomek The Messenger wrote:
> Hi
> If I have something like this in makefile:
> obj-m := reset-core.o
> reset-core-y := reset-core-main.o reset-core-utils.o
> then module is built OK.
> If I have something like that:
>  obj-m := reset-core.o
> reset-core-y := reset-core.o reset-core-utils.o
> then it is wrongly built.
> So I will replace all source file characters '-' to '_' and I will have:
> obj-m := reset-core.o
> reset-core-y := reset_core.o reset_core_utils.o

Yes, because "reset-core" and "reset_core" are different.

> and everything will be OK, but it is a bit frustrating that code rules me
> instead of me rules code. Maybe there is another solution?

Nope, that's to be expected.

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 13:39 the same name of external kernel module as one of source file Tomek The Messenger
2020-05-05 13:47 ` Greg KH

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org
	public-inbox-index kernelnewbies

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git