All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Linking
@ 2008-07-25 14:33 Viswesh S
  2008-07-25 15:12 ` Linking Colin D Bennett
  0 siblings, 1 reply; 11+ messages in thread
From: Viswesh S @ 2008-07-25 14:33 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 2083 bytes --]

Suppose I am adding a new command,so should I create a new file for that command and modify only the command,rmk accordingly?
All the other files get autogenerated by autogen.sh ?
Is this sufficient ?
Viswesh



----- Original Message ----
From: Colin D Bennett <colin@gibibit.com>
To: grub-devel@gnu.org
Sent: Friday, 25 July, 2008 7:31:28 PM
Subject: Re: Linking

On Fri, 25 Jul 2008 03:22:57 -0700 (PDT)
Viswesh S <viswesh_vichu@yahoo.com> wrote:

> The reason for hello to be put in a directory because it is a module
> and not a simple command.Understood myself

Actually, no.  Every C source file in the 'commands' directory is
currently a module itself.

I think the reason that 'hello.mod' is separated out is to make it
easier to see that there is only one source file as part of 'hello.mod'.

Regards,
Colin


> ----- Original Message ----
> From: Viswesh S <viswesh_vichu@yahoo.com>
> To: The development of GRUB 2 <grub-devel@gnu.org>
> Sent: Friday, 25 July, 2008 3:44:48 PM
> Subject: Re: Linking
> 
> 
> Hi,
>  
> So if I add a module or add a new command,which are the files which I
> should modify in general and which all gets generated automatically. 
> Is this somewhere documented ?
>  
> Why is it that hello command is put in a separate directory, while
> lspci is put inside the commands directory. 
> Is there a specific reason for this.
>  
>  
> Viswesh
> 
> 
> 
> ----- Original Message ----
> From: Pavel Roskin <proski@gnu.org>
> To: grub-devel@gnu.org
> Sent: Friday, 25 July, 2008 11:59:21 AM
> Subject: Re: Linking
> 
> Quoting Viswesh S <viswesh_vichu@yahoo.com>:
> 
> > Hi Pavel,
> > Could you please attach the modified file ?
> > Viswesh
> 
> No, I'm just giving you an idea what you may be doing wrong.
> 


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel



      Share files, take polls, and make new friends - all under one roof. Go to http://in.promos.yahoo.com/groups/

[-- Attachment #2: Type: text/html, Size: 3546 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Linking
@ 2008-07-25 10:22 Viswesh S
  2008-07-25 14:01 ` Linking Colin D Bennett
  0 siblings, 1 reply; 11+ messages in thread
From: Viswesh S @ 2008-07-25 10:22 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 1415 bytes --]

The reason for hello to be put in a directory because it is a module and not a simple command.Understood myself



----- Original Message ----
From: Viswesh S <viswesh_vichu@yahoo.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Sent: Friday, 25 July, 2008 3:44:48 PM
Subject: Re: Linking


Hi,
 
So if I add a module or add a new command,which are the files which I should modify in general and which all gets generated automatically.
 
Is this somewhere documented ?
 
Why is it that hello command is put in a separate directory, while lspci is put inside the commands directory.
 
Is there a specific reason for this.
 
 
Viswesh



----- Original Message ----
From: Pavel Roskin <proski@gnu.org>
To: grub-devel@gnu.org
Sent: Friday, 25 July, 2008 11:59:21 AM
Subject: Re: Linking

Quoting Viswesh S <viswesh_vichu@yahoo.com>:

> Hi Pavel,
> Could you please attach the modified file ?
> Viswesh

No, I'm just giving you an idea what you may be doing wrong.

-- 
Regards,
Pavel Roskin


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

________________________________
Bring your gang together. Do your thing. Find your favourite Yahoo! Group.


      Forgot the famous last words? Access your message archive online at http://in.webmessenger.yahoo.com/

[-- Attachment #2: Type: text/html, Size: 2726 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Linking
@ 2008-07-25 10:14 Viswesh S
  0 siblings, 0 replies; 11+ messages in thread
From: Viswesh S @ 2008-07-25 10:14 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 992 bytes --]

Hi,
So if I add a module or add a new command,which are the files which I should modify in general and which all gets generated automatically.
Is this somewhere documented ?
Why is it that hello command is put in a separate directory, while lspci is put inside the commands directory.
Is there a specific reason for this.
Viswesh



----- Original Message ----
From: Pavel Roskin <proski@gnu.org>
To: grub-devel@gnu.org
Sent: Friday, 25 July, 2008 11:59:21 AM
Subject: Re: Linking

Quoting Viswesh S <viswesh_vichu@yahoo.com>:

> Hi Pavel,
> Could you please attach the modified file ?
> Viswesh

No, I'm just giving you an idea what you may be doing wrong.

-- 
Regards,
Pavel Roskin


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel



      Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

[-- Attachment #2: Type: text/html, Size: 1846 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Linking
@ 2008-07-25  6:06 Viswesh S
  2008-07-25  6:29 ` Linking Pavel Roskin
  0 siblings, 1 reply; 11+ messages in thread
From: Viswesh S @ 2008-07-25  6:06 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 698 bytes --]

Hi Pavel,
Could you please attach the modified file ?
Viswesh



----- Original Message ----
From: Pavel Roskin <proski@gnu.org>
To: grub-devel@gnu.org
Sent: Friday, 25 July, 2008 11:05:49 AM
Subject: Re: Linking

Quoting Viswesh S <viswesh_vichu@yahoo.com>:

> I have modified the conf/common.mk accordingly as shown below.

It's a generated file.  Please modify conf/common.rmk instead and run  
autogen.sh.

-- 
Regards,
Pavel Roskin


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel



      Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/

[-- Attachment #2: Type: text/html, Size: 1524 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Linking
@ 2008-07-25  5:17 Viswesh S
  2008-07-25  5:35 ` Linking Pavel Roskin
  0 siblings, 1 reply; 11+ messages in thread
From: Viswesh S @ 2008-07-25  5:17 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 3708 bytes --]

Hi,
I am quite new to grub2 anf I find some issue in make of grub2
I modify the hello module by adding a new file a.c, with a function test() in it.
I call the function test from hello entry point - grub_cmd_hello()
When I do a make, I get the error that 
test in hello is not defined
make: *** [moddep.lst] Error 1

I have modified the conf/common.mk accordingly as shown below.
# For hello.mod.
hello_mod_SOURCES = hello/hello.c hello/a.c
CLEANFILES += hello.mod mod-hello.o mod-hello.c pre-hello.o hello_mod-hello_hello.o hello_mod-hello_a.o und-hello.lst
ifneq ($(hello_mod_EXPORTS),no)
CLEANFILES += def-hello.lst
DEFSYMFILES += def-hello.lst
endif
MOSTLYCLEANFILES += hello_mod-hello_hello.d  hello_mod-hello_a.d
UNDSYMFILES += und-hello.lst
hello.mod: pre-hello.o mod-hello.o
        -rm -f $@
        $(TARGET_CC) $(hello_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
        $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-hello.o: $(hello_mod_DEPENDENCIES) hello_mod-hello_hello.o hello_mod-hello_a.o
        -rm -f $@
        $(TARGET_CC) $(hello_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ hello_mod-hello_hello.o
mod-hello.o: mod-hello.c
        $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -c -o $@ $<
mod-hello.c: moddep.lst genmodsrc.sh
        sh $(srcdir)/genmodsrc.sh 'hello' $< > $@ || (rm -f $@; exit 1)
ifneq ($(hello_mod_EXPORTS),no)
def-hello.lst: pre-hello.o
        $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 hello/' > $@
endif
und-hello.lst: pre-hello.o
        echo 'hello' > $@
        $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
hello_mod-hello_hello.o: hello/hello.c $(hello/hello.c_DEPENDENCIES)
        $(TARGET_CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS)  $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -MD -c -o $@ $<
-include hello_mod-hello_hello.d
hello_mod-hello_a.o: hello/a.c $(hello/a.c_DEPENDENCIES)
        $(TARGET_CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS)  $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -MD -c -o $@ $<
-include hello_mod-hello_a.d

CLEANFILES += cmd-hello_mod-hello_hello.lst fs-hello_mod-hello_hello.lst
COMMANDFILES += cmd-hello_mod-hello_hello.lst
FSFILES += fs-hello_mod-hello_hello.lst
cmd-hello_mod-hello_hello.lst: hello/hello.c $(hello/hello.c_DEPENDENCIES) gencmdlist.sh
        set -e;           $(TARGET_CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -E $<    | sh $(srcdir)/gencmdlist.sh hello > $@ || (rm -f $@; exit 1)
cmd-hello_mod-hello_a.lst: hello/a.c $(hello/a.c_DEPENDENCIES) gencmdlist.sh
        set -e;           $(TARGET_CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -E $<    | sh $(srcdir)/gencmdlist.sh hello > $@ || (rm -f $@; exit 1)

fs-hello_mod-hello_hello.lst: hello/hello.c $(hello/hello.c_DEPENDENCIES) genfslist.sh
        set -e;           $(TARGET_CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -E $<    | sh $(srcdir)/genfslist.sh hello > $@ || (rm -f $@; exit 1)
fs-hello_mod-hello_a.lst: hello/a.c $(hello/a.c_DEPENDENCIES) genfslist.sh
        set -e;           $(TARGET_CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -E $<    | sh $(srcdir)/genfslist.sh hello > $@ || (rm -f $@; exit 1)

Could anyone let me know whether I need to do anything more.
Viswesh


      Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/

[-- Attachment #2: Type: text/html, Size: 6046 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Linking
@ 2001-06-18  3:59 Anil Kumar
  2001-05-18  4:11 ` Linking Keith Owens
  0 siblings, 1 reply; 11+ messages in thread
From: Anil Kumar @ 2001-06-18  3:59 UTC (permalink / raw)
  To: Linux Kernel

How do i link the kernel functions such as test_ans_set functions with my
applications.
thanks,
anil



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

end of thread, other threads:[~2008-07-25 15:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-25 14:33 Linking Viswesh S
2008-07-25 15:12 ` Linking Colin D Bennett
  -- strict thread matches above, loose matches on Subject: below --
2008-07-25 10:22 Linking Viswesh S
2008-07-25 14:01 ` Linking Colin D Bennett
2008-07-25 10:14 Linking Viswesh S
2008-07-25  6:06 Linking Viswesh S
2008-07-25  6:29 ` Linking Pavel Roskin
2008-07-25  5:17 Linking Viswesh S
2008-07-25  5:35 ` Linking Pavel Roskin
2001-06-18  3:59 Linking Anil Kumar
2001-05-18  4:11 ` Linking Keith Owens

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.