Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KMFg0-0008Rd-Ej for mharc-grub-devel@gnu.org; Fri, 25 Jul 2008 01:17:12 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KMFfx-0008Oa-Gq for grub-devel@gnu.org; Fri, 25 Jul 2008 01:17:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KMFfw-0008MX-1d for grub-devel@gnu.org; Fri, 25 Jul 2008 01:17:08 -0400 Received: from [199.232.76.173] (port=52594 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KMFfv-0008MH-SG for grub-devel@gnu.org; Fri, 25 Jul 2008 01:17:07 -0400 Received: from web31604.mail.mud.yahoo.com ([68.142.198.150]:40662) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KMFfv-0006OS-Dg for grub-devel@gnu.org; Fri, 25 Jul 2008 01:17:07 -0400 Received: (qmail 45910 invoked by uid 60001); 25 Jul 2008 05:17:06 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=qGk0PiGXqpwQFMRp3Oh8PNqlwf+bkx4b1XmrKwYpmWM/KE4MTJ0MCOFWM0sWfGERKo+fCBIwkxTnzQrRwnGFW6KaOJK733qGRXOZ+o0GVI9/COiK6DBTe9xz/yp5kJ5ZgGxirw81PQ6l5Lo+Mo7//C3eweNM3QMOrxW+8Ki0dbM=; Received: from [202.62.94.130] by web31604.mail.mud.yahoo.com via HTTP; Thu, 24 Jul 2008 22:17:06 PDT X-Mailer: YahooMailRC/1042.48 YahooMailWebService/0.7.218 Date: Thu, 24 Jul 2008 22:17:06 -0700 (PDT) From: Viswesh S To: grub-devel@gnu.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1763333016-1216963026=:45608" Message-ID: <414717.45608.qm@web31604.mail.mud.yahoo.com> X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) Subject: Linking X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2008 05:17:10 -0000 --0-1763333016-1216963026=:45608 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi,=0AI am quite new to grub2 anf I find some issue in make of grub2=0AI mo= dify the hello module by adding a new file a.c, with a function test() in i= t.=0AI call the function test from hello entry point - grub_cmd_hello()=0AW= hen I do a make, I get the error that =0Atest in hello is not defined=0Amak= e: *** [moddep.lst] Error 1=0A=0AI have modified the conf/common.mk accordi= ngly as shown below.=0A# For hello.mod.=0Ahello_mod_SOURCES =3D hello/hello= .c=C2=A0hello/a.c=0ACLEANFILES +=3D hello.mod mod-hello.o mod-hello.c pre-h= ello.o hello_mod-hello_hello.o=C2=A0hello_mod-hello_a.o und-hello.lst=0Aifn= eq ($(hello_mod_EXPORTS),no)=0ACLEANFILES +=3D def-hello.lst=0ADEFSYMFILES = +=3D def-hello.lst=0Aendif=0AMOSTLYCLEANFILES +=3D hello_mod-hello_hello.d= =C2=A0 hello_mod-hello_a.d=0AUNDSYMFILES +=3D und-hello.lst=0Ahello.mod: pr= e-hello.o mod-hello.o=0A=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -rm -f $= @=0A=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $(TARGET_CC) $(hello_mod_LDF= LAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^=0A=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R= .note -R .comment $@=0Apre-hello.o: $(hello_mod_DEPENDENCIES) hello_mod-he= llo_hello.o=C2=A0hello_mod-hello_a.o=0A=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 -rm -f $@=0A=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $(TARGET_CC) = $(hello_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ hello_mod-hello_hell= o.o=0Amod-hello.o: mod-hello.c=0A=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -c -o= $@ $<=0Amod-hello.c: moddep.lst genmodsrc.sh=0A=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 sh $(srcdir)/genmodsrc.sh 'hello' $< > $@ || (rm -f $@; exi= t 1)=0Aifneq ($(hello_mod_EXPORTS),no)=0Adef-hello.lst: pre-hello.o=0A=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $(NM) -g --defined-only -P -p $< | = sed 's/^\([^ ]*\).*/\1 hello/' > $@=0Aendif=0Aund-hello.lst: pre-hello.o=0A= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 echo 'hello' > $@=0A=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@=0Ahe= llo_mod-hello_hello.o: hello/hello.c $(hello/hello.c_DEPENDENCIES)=0A=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $(TARGET_CC) -Ihello -I$(srcdir)/hello= $(TARGET_CPPFLAGS)=C2=A0 $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -MD -c -o $@= $<=0A-include hello_mod-hello_hello.d=0Ahello_mod-hello_a.o: hello/a.c $(h= ello/a.c_DEPENDENCIES)=0A=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $(TARGE= T_CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS)=C2=A0 $(TARGET_CFLAGS) $= (hello_mod_CFLAGS) -MD -c -o $@ $<=0A-include hello_mod-hello_a.d=0A=0ACLEA= NFILES +=3D cmd-hello_mod-hello_hello.lst fs-hello_mod-hello_hello.lst=0ACO= MMANDFILES +=3D cmd-hello_mod-hello_hello.lst=0AFSFILES +=3D fs-hello_mod-h= ello_hello.lst=0Acmd-hello_mod-hello_hello.lst: hello/hello.c $(hello/hello= .c_DEPENDENCIES) gencmdlist.sh=0A=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= set -e;=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $(TARG= ET_CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hell= o_mod_CFLAGS) -E $<=C2=A0=C2=A0=C2=A0 | sh $(srcdir)/gencmdlist.sh hello > = $@ || (rm -f $@; exit 1)=0Acmd-hello_mod-hello_a.lst: hello/a.c $(hello/a.c= _DEPENDENCIES) gencmdlist.sh=0A=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 s= et -e;=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $(TARGET= _CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hello_= mod_CFLAGS) -E $<=C2=A0=C2=A0=C2=A0 | sh $(srcdir)/gencmdlist.sh hello > $@= || (rm -f $@; exit 1)=0A=0Afs-hello_mod-hello_hello.lst: hello/hello.c $(h= ello/hello.c_DEPENDENCIES) genfslist.sh=0A=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 set -e;=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 $(TARGET_CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS) $(TARGET_CFLA= GS) $(hello_mod_CFLAGS) -E $<=C2=A0=C2=A0=C2=A0 | sh $(srcdir)/genfslist.sh= hello > $@ || (rm -f $@; exit 1)=0Afs-hello_mod-hello_a.lst: hello/a.c $(h= ello/a.c_DEPENDENCIES) genfslist.sh=0A=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 set -e;=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = $(TARGET_CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) = $(hello_mod_CFLAGS) -E $<=C2=A0=C2=A0=C2=A0 | sh $(srcdir)/genfslist.sh hel= lo > $@ || (rm -f $@; exit 1)=0A=0ACould anyone let me know whether I need = to do anything more.=0AViswesh=0A=0A=0A Explore your hobbies and inter= ests. Go to http://in.promos.yahoo.com/groups/ --0-1763333016-1216963026=:45608 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi,
=0A
 
=0A
I am quite new to grub2 anf = I find some issue in make of grub2
=0A
 
=0A
I modif= y the hello module by adding a new file a.c, with a function test() in it.<= /DIV>=0A
 
=0A
I call the function test from hello entry = point - grub_cmd_hello()
=0A
 
=0A
When I do a make,= I get the error that
=0A
 
=0A
test in hello is no= t defined
make: *** [moddep.lst] Error 1
=0A
 
= =0A
I have modified the conf/common.mk accordingly as shown below.=0A
 
=0A
# For hello.mod.
hello_mod_SOURCES =3D hello/hello.c hell= o/a.c
CLEANFILES +=3D hello.mod mod-hello.o mod-hel= lo.c pre-hello.o hello_mod-hello_hello.o hello_mod-hello_a.o und-hello.lst
ifneq ($(hel= lo_mod_EXPORTS),no)
CLEANFILES +=3D def-hello.lst
DEFSYMFILES +=3D de= f-hello.lst
endif
MOSTLYCLEANFILES +=3D hello_mod-hello_hello.d = hello_mod-hello_a.d
UNDSYMFILES +=3D und-hello.lst
=0A
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 $@
=0A
pre-hello.o: $(hello_mod_DEPENDENCIES) hello_mod-hello_hello.o = hello_mod-hello_a.o<= BR>        -rm -f $@
  &nbs= p;     $(TARGET_CC) $(hello_mod_LDFLAGS) $(TARGET_LDFLA= GS) -Wl,-r,-d -o $@ hello_mod-hello_hello.o
=0A
mod-hello.o: mod-hello.c
      =   $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hello_mod_CFLAGS)= -c -o $@ $<
=0A
mod-hello.c: modd= ep.lst genmodsrc.sh
        sh $(srcd= ir)/genmodsrc.sh 'hello' $< > $@ || (rm -f $@; exit 1)
= =0A
ifneq ($(hello_mod_EXPORTS),no)
def-hello.= lst: pre-hello.o
        $(NM) -g --d= efined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 hello/' > $@
endif
=0A
und-hello.lst: pre-hello.o
&nbs= p;       echo 'hello' > $@
  =       $(NM) -u -P -p $< | cut -f1 -d' ' >>= ; $@
=0A
hello_mod-hello_hello.o: hel= lo/hello.c $(hello/hello.c_DEPENDENCIES)
     &= nbsp;  $(TARGET_CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS) = $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -MD -c -o $@ $<
-include hello_= mod-hello_hello.d
=0A
hel= lo_mod-hello_a.o: hello/a.c $(hello/a.c_DEPENDENCIES)
   =      $(TARGET_CC) -Ihello -I$(srcdir)/hello $(TARGET_CP= PFLAGS)  $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -MD -c -o $@ $<
-i= nclude hello_mod-hello_a.d
=0A

CLEANFILES +=3D cmd-hello_mod-hello_hello.lst fs-hello_mod-hell= o_hello.lst
COMMANDFILES +=3D cmd-hello_mod-hello_hello.lst
FSFILES += =3D fs-hello_mod-hello_hello.lst
=0A
= cmd-hello_mod-hello_hello.lst: hello/hello.c $(hello/hello.c_DEPENDENCIES) = gencmdlist.sh
        set -e; &n= bsp;         $(TARGET_CC) -Ihello -= I$(srcdir)/hello $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -E= $<    | sh $(srcdir)/gencmdlist.sh hello > $@ || (rm = -f $@; exit 1)
=0A
cmd-he= llo_mod-hello_a.lst: hello/a.c $(hello/a.c_DEPENDENCIES) gencmdlist.sh
&= nbsp;       set -e;    &n= bsp;      $(TARGET_CC) -Ihello -I$(srcdir)/hello $= (TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -E $<  =   | sh $(srcdir)/gencmdlist.sh hello > $@ || (rm -f $@; exit 1)
=0A

fs-hello_mod-hello= _hello.lst: hello/hello.c $(hello/hello.c_DEPENDENCIES) genfslist.sh
&nb= sp;       set -e;    &nbs= p;      $(TARGET_CC) -Ihello -I$(srcdir)/hello $(T= ARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -E $<  &n= bsp; | sh $(srcdir)/genfslist.sh hello > $@ || (rm -f $@; exit 1)
=
=0A
fs-hello_mod-hello_a.lst: h= ello/a.c $(hello/a.c_DEPENDENCIES) genfslist.sh
    =     set -e;        &= nbsp;  $(TARGET_CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS) $(TAR= GET_CFLAGS) $(hello_mod_CFLAGS) -E $<    | sh $(srcdir)/g= enfslist.sh hello > $@ || (rm -f $@; exit 1)
=0A
Could anyone let me = know whether I need to do anything more.
=0A
 
=0A
Viswesh
=0A=0A=0A=0A
Unlimited freedom, unlimited= storage. Get it now --0-1763333016-1216963026=:45608--