* adding preprocessor defines in module makefiles
@ 2011-09-08 14:29 Christopher Harvey
2011-09-08 15:49 ` Mulyadi Santosa
2011-09-09 5:01 ` adding preprocessor defines in module makefiles Dave Hylands
0 siblings, 2 replies; 5+ messages in thread
From: Christopher Harvey @ 2011-09-08 14:29 UTC (permalink / raw)
To: kernelnewbies
Hi,
I'm trying to build a kernel module for fun, and I can't figure out a
clean way to add preprocessor defines that correspond to Kconfig values.
I'm trying to set CONFIG_SND_DEBUG specifically. My module has only one
file, and I've tried adding #define CONFIG_SND_DEBUG as the first line
in the .c file, but now I'm getting the following warning:
WARNING: "__snd_printk" [/home/chris/snd/snd-foo.ko] undefined!
I haven't compiled the kernel running on my system with the
CONFIG_SND_DEBUG option but I haven't been able to see a reason why that
should change anything for my module.
thanks,
Chris
^ permalink raw reply [flat|nested] 5+ messages in thread
* adding preprocessor defines in module makefiles
2011-09-08 14:29 adding preprocessor defines in module makefiles Christopher Harvey
@ 2011-09-08 15:49 ` Mulyadi Santosa
2011-09-08 15:52 ` PLEASE REMOVE ME FROM YOUR LIST Shehata, Shereef
2011-09-09 5:01 ` adding preprocessor defines in module makefiles Dave Hylands
1 sibling, 1 reply; 5+ messages in thread
From: Mulyadi Santosa @ 2011-09-08 15:49 UTC (permalink / raw)
To: kernelnewbies
Hi :)
On Thu, Sep 8, 2011 at 21:29, Christopher Harvey <chris@basementcode.com> wrote:
> Hi,
>
> I'm trying to build a kernel module for fun, and I can't figure out a
> clean way to add preprocessor defines that correspond to Kconfig values.
> I'm trying to set CONFIG_SND_DEBUG specifically. My module has only one
> file, and I've tried adding #define CONFIG_SND_DEBUG as the first line
> in the .c file, but now I'm getting the following warning:
> WARNING: "__snd_printk" [/home/chris/snd/snd-foo.ko] undefined!
Without looking at your modules' course, I think that's due to you
were using unexported symbol (in this case, kernel function)
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* PLEASE REMOVE ME FROM YOUR LIST
2011-09-08 15:49 ` Mulyadi Santosa
@ 2011-09-08 15:52 ` Shehata, Shereef
2011-09-09 2:43 ` Pei Lin
0 siblings, 1 reply; 5+ messages in thread
From: Shehata, Shereef @ 2011-09-08 15:52 UTC (permalink / raw)
To: kernelnewbies
FOR THE LIST OWNER, PLEASE REMOVE ME FROM YOUR LIST. I HAVE TRIED MANY TIMES AND IT KEEP REFUSING TO REMOVE MY EMAIL. All other lists's removal work except this one.
PLEASE REMOVE from your lisrt
shereef at ti.com
Best regards,
Shereef
-----Original Message-----
From: kernelnewbies-bounces@kernelnewbies.org [mailto:kernelnewbies-bounces at kernelnewbies.org] On Behalf Of Mulyadi Santosa
Sent: Thursday, September 08, 2011 10:49 AM
To: Christopher Harvey
Cc: kernelnewbies at kernelnewbies.org
Subject: Re: adding preprocessor defines in module makefiles
Hi :)
On Thu, Sep 8, 2011 at 21:29, Christopher Harvey <chris@basementcode.com> wrote:
> Hi,
>
> I'm trying to build a kernel module for fun, and I can't figure out a
> clean way to add preprocessor defines that correspond to Kconfig values.
> I'm trying to set CONFIG_SND_DEBUG specifically. My module has only one
> file, and I've tried adding #define CONFIG_SND_DEBUG as the first line
> in the .c file, but now I'm getting the following warning:
> WARNING: "__snd_printk" [/home/chris/snd/snd-foo.ko] undefined!
Without looking at your modules' course, I think that's due to you
were using unexported symbol (in this case, kernel function)
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 5+ messages in thread
* PLEASE REMOVE ME FROM YOUR LIST
2011-09-08 15:52 ` PLEASE REMOVE ME FROM YOUR LIST Shehata, Shereef
@ 2011-09-09 2:43 ` Pei Lin
0 siblings, 0 replies; 5+ messages in thread
From: Pei Lin @ 2011-09-09 2:43 UTC (permalink / raw)
To: kernelnewbies
2011/9/8 Shehata, Shereef <shereef@ti.com>:
> FOR THE LIST OWNER, PLEASE REMOVE ME FROM YOUR LIST. I HAVE TRIED MANY TIMES AND IT KEEP REFUSING TO REMOVE MY EMAIL. All other lists's removal work except this one.
>
> PLEASE REMOVE from your lisrt
> shereef at ti.com
>
Are you kidding me? Do you try to unsubscribe your email address from
below link?
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> Best regards,
> Shereef
>
>
> -----Original Message-----
> From: kernelnewbies-bounces at kernelnewbies.org [mailto:kernelnewbies-bounces at kernelnewbies.org] On Behalf Of Mulyadi Santosa
> Sent: Thursday, September 08, 2011 10:49 AM
> To: Christopher Harvey
> Cc: kernelnewbies at kernelnewbies.org
> Subject: Re: adding preprocessor defines in module makefiles
>
> Hi :)
>
> On Thu, Sep 8, 2011 at 21:29, Christopher Harvey <chris@basementcode.com> wrote:
>> Hi,
>>
>> I'm trying to build a kernel module for fun, and I can't figure out a
>> clean way to add preprocessor defines that correspond to Kconfig values.
>> I'm trying to set CONFIG_SND_DEBUG specifically. My module has only one
>> file, and I've tried adding #define CONFIG_SND_DEBUG as the first line
>> in the .c file, but now I'm getting the following warning:
>> WARNING: "__snd_printk" [/home/chris/snd/snd-foo.ko] undefined!
>
>
> Without looking at your modules' course, I think that's due to you
> were using unexported symbol (in this case, kernel function)
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
--
Best Regards
Lin
^ permalink raw reply [flat|nested] 5+ messages in thread
* adding preprocessor defines in module makefiles
2011-09-08 14:29 adding preprocessor defines in module makefiles Christopher Harvey
2011-09-08 15:49 ` Mulyadi Santosa
@ 2011-09-09 5:01 ` Dave Hylands
1 sibling, 0 replies; 5+ messages in thread
From: Dave Hylands @ 2011-09-09 5:01 UTC (permalink / raw)
To: kernelnewbies
Hi Christopher,
On Thu, Sep 8, 2011 at 7:29 AM, Christopher Harvey
<chris@basementcode.com> wrote:
> Hi,
>
> I'm trying to build a kernel module for fun, and I can't figure out a
> clean way to add preprocessor defines that correspond to Kconfig values.
> I'm trying to set CONFIG_SND_DEBUG specifically. My module has only one
> file, and I've tried adding #define CONFIG_SND_DEBUG as the first line
> in the .c file, but now I'm getting the following warning:
> WARNING: "__snd_printk" [/home/chris/snd/snd-foo.ko] undefined!
>
> I haven't compiled the kernel running on my system with the
> CONFIG_SND_DEBUG option but I haven't been able to see a reason why that
> should change anything for my module.
You need to set this in your config file (using make menuconfig or one
of the other variants) and quite probably rebuild the kernel with that
option set in order to ensure that snd_xxx functions are compiled into
the kernel.
Trying to defined CONFIG_xxx options will generally not work properly.
--
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-09-09 5:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-08 14:29 adding preprocessor defines in module makefiles Christopher Harvey
2011-09-08 15:49 ` Mulyadi Santosa
2011-09-08 15:52 ` PLEASE REMOVE ME FROM YOUR LIST Shehata, Shereef
2011-09-09 2:43 ` Pei Lin
2011-09-09 5:01 ` adding preprocessor defines in module makefiles Dave Hylands
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.