All of lore.kernel.org
 help / color / mirror / Atom feed
* Linking
@ 2008-07-25  5:17 Viswesh S
  2008-07-25  5:35 ` Linking Pavel Roskin
  2008-07-25 15:18 ` Remove conf/*.mk from svn (was: Re: Linking) Colin D Bennett
  0 siblings, 2 replies; 19+ 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] 19+ messages in thread
* Re: Remove conf/*.mk from svn
@ 2008-08-06  4:58 Viswesh S
  2008-08-06 14:56 ` Vesa Jääskeläinen
  0 siblings, 1 reply; 19+ messages in thread
From: Viswesh S @ 2008-08-06  4:58 UTC (permalink / raw)
  To: The development of GRUB 2

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

Hi,
I have a small suggestion.
Why cant we document in a small file, the procedures, or the dont's while adding modules or modifying grub2.A FAQ file may be.
That will help us in the long run.
Viswesh


----- Original Message ----
From: Felix Zielcke <fzielcke@z-51.de>
To: The development of GRUB 2 <grub-devel@gnu.org>
Sent: Tuesday, 5 August, 2008 9:25:43 PM
Subject: Re: Remove conf/*.mk from svn

Am Dienstag, den 05.08.2008, 17:48 +0200 schrieb Marco Gerards:

> 
> Actually, since ruby is required to generate these files, I guess we
> can better keep the .mk files.
> 

Just a little note from me:

The Debian package build depends already on ruby so this won't be a
problem for all Debian guys and especially not for Robert or me.

On Debian/Ubuntu you can just use 'apt-get build-dep grub2' and it
installs every package for you which you need to build grub2 so ruby
will be always needed/installed for the Debian package.

But well Debian isn't the only distribution and I don't know how others
deal with grub2 :)



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



      Download prohibited? No problem. CHAT from any browser, without download. Go to http://in.webmessenger.yahoo.com/

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

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

end of thread, other threads:[~2008-08-06 14:56 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-25  5:17 Linking Viswesh S
2008-07-25  5:35 ` Linking Pavel Roskin
2008-07-25 15:18 ` Remove conf/*.mk from svn (was: Re: Linking) Colin D Bennett
2008-07-25 18:41   ` Remove conf/*.mk from svn Christian Franke
2008-07-27  7:17     ` Pavel Roskin
2008-07-27 22:28       ` Christian Franke
2008-07-28 22:43         ` Pavel Roskin
2008-08-05 10:38         ` Marco Gerards
2008-07-25 20:43   ` Remove conf/*.mk from svn (was: Re: Linking) Robert Millan
2008-07-31 20:18     ` Yoshinori K. Okuji
2008-08-05 10:40   ` Remove conf/*.mk from svn Marco Gerards
2008-08-05 15:38     ` Vesa Jääskeläinen
2008-08-05 15:48       ` Marco Gerards
2008-08-05 12:02         ` Seeking for the start administrador02032
2008-08-05 15:55         ` Remove conf/*.mk from svn Felix Zielcke
2008-08-05 18:41         ` Javier Martín
2008-08-05 18:51           ` Colin D Bennett
  -- strict thread matches above, loose matches on Subject: below --
2008-08-06  4:58 Viswesh S
2008-08-06 14:56 ` Vesa Jääskeläinen

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.