* Need help in taking part in the development of GRUB...
@ 2009-12-31 10:51 Usman Ajmal
2009-12-31 11:53 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 2+ messages in thread
From: Usman Ajmal @ 2009-12-31 10:51 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 2832 bytes --]
Hi all,
I downloaded the Grub's code from
here<http://grub.sourcearchive.com/documentation/0.97-1ubuntu9/files.html>.
Then just for testing I put following lines of code in grub/main.c. What I
wanted is to have "#Here I come..." string appended at the end of
/boot/grub/menu.lst. But I got stuck while compiling the source code. I
don't know what have I missed...
.
> .
> .
> int main (int argc, char **argv)
> {
> /* My modification... */
> FILE * grubMenuFile;
> grubMenuFile = fopen ("/boot/grub/menu.lst","w");
> if (grubMenuFile!=NULL)
> {
> fputs ("#Here I come...",grubMenuFile);
> fclose (grubMenuFile);
> }
>
> /* End-My modification... */
>
> int c;
> int hold = 0;
>
> /* First of all, call sync so that all in-core data is scheduled to be
> actually written to disks. This is very important because GRUB does
> not use ordinary stdio interface but raw devices. */
> sync ();
> .
> .
> .
>
Then after saving main.c I configured the package and when i ran 'make', I
got:
make all-recursive
> make[1]: Entering directory `/home/toros/Desktop/grub-0.97'
> Making all in netboot
> make[2]: Entering directory `/home/toros/Desktop/grub-0.97/netboot'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory `/home/toros/Desktop/grub-0.97/netboot'
> Making all in stage2
> make[2]: Entering directory `/home/toros/Desktop/grub-0.97/stage2'
> make all-am
> make[3]: Entering directory `/home/toros/Desktop/grub-0.97/stage2'
> make[3]: Nothing to be done for `all-am'.
> make[3]: Leaving directory `/home/toros/Desktop/grub-0.97/stage2'
> make[2]: Leaving directory `/home/toros/Desktop/grub-0.97/stage2'
> Making all in stage1
> make[2]: Entering directory `/home/toros/Desktop/grub-0.97/stage1'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory `/home/toros/Desktop/grub-0.97/stage1'
> Making all in lib
> make[2]: Entering directory `/home/toros/Desktop/grub-0.97/lib'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory `/home/toros/Desktop/grub-0.97/lib'
> Making all in grub
> make[2]: Entering directory `/home/toros/Desktop/grub-0.97/grub'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory `/home/toros/Desktop/grub-0.97/grub'
> Making all in util
> make[2]: Entering directory `/home/toros/Desktop/grub-0.97/util'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory `/home/toros/Desktop/grub-0.97/util'
> Making all in docs
> make[2]: Entering directory `/home/toros/Desktop/grub-0.97/docs'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory `/home/toros/Desktop/grub-0.97/docs'
> make[2]: Entering directory `/home/toros/Desktop/grub-0.97'
> make[2]: Leaving directory `/home/toros/Desktop/grub-0.97'
> make[1]: Leaving directory `/home/toros/Desktop/grub-0.97'
>
[-- Attachment #2: Type: text/html, Size: 4154 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Need help in taking part in the development of GRUB...
2009-12-31 10:51 Need help in taking part in the development of GRUB Usman Ajmal
@ 2009-12-31 11:53 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2009-12-31 11:53 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 3838 bytes --]
Usman Ajmal wrote:
> Hi all,
>
> I downloaded the Grub's code from here
> <http://grub.sourcearchive.com/documentation/0.97-1ubuntu9/files.html>.
> Then just for testing I put following lines of code in grub/main.c.
> What I wanted is to have "#Here I come..." string appended at the end
> of /boot/grub/menu.lst. But I got stuck while compiling the source
> code. I don't know what have I missed...
Grub Legacy is dead for us. GRUB2's source code is much easier to
understand and contributions to it are actually useful.
>
> .
> .
> .
> int main (int argc, char **argv)
> {
> /* My modification... */
> FILE * grubMenuFile;
> grubMenuFile = fopen ("/boot/grub/menu.lst","w");
> if (grubMenuFile!=NULL)
> {
> fputs ("#Here I come...",grubMenuFile);
> fclose (grubMenuFile);
> }
>
> /* End-My modification... */
>
You shouldn't use any stdio in grub (it works in grub-util but won't in
grub on boot). Actually writing facilities in any grub are rudimentary
by design to avoid any danger of filesystem corruption
>
> int c;
> int hold = 0;
>
> /* First of all, call sync so that all in-core data is scheduled
> to be
> actually written to disks. This is very important because
> GRUB does
> not use ordinary stdio interface but raw devices. */
> sync ();
> .
> .
> .
>
>
> Then after saving main.c I configured the package and when i ran
> 'make', I got:
>
> make all-recursive
> make[1]: Entering directory `/home/toros/Desktop/grub-0.97'
> Making all in netboot
> make[2]: Entering directory `/home/toros/Desktop/grub-0.97/netboot'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory `/home/toros/Desktop/grub-0.97/netboot'
> Making all in stage2
> make[2]: Entering directory `/home/toros/Desktop/grub-0.97/stage2'
> make all-am
> make[3]: Entering directory `/home/toros/Desktop/grub-0.97/stage2'
> make[3]: Nothing to be done for `all-am'.
> make[3]: Leaving directory `/home/toros/Desktop/grub-0.97/stage2'
> make[2]: Leaving directory `/home/toros/Desktop/grub-0.97/stage2'
> Making all in stage1
> make[2]: Entering directory `/home/toros/Desktop/grub-0.97/stage1'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory `/home/toros/Desktop/grub-0.97/stage1'
> Making all in lib
> make[2]: Entering directory `/home/toros/Desktop/grub-0.97/lib'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory `/home/toros/Desktop/grub-0.97/lib'
> Making all in grub
> make[2]: Entering directory `/home/toros/Desktop/grub-0.97/grub'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory `/home/toros/Desktop/grub-0.97/grub'
> Making all in util
> make[2]: Entering directory `/home/toros/Desktop/grub-0.97/util'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory `/home/toros/Desktop/grub-0.97/util'
> Making all in docs
> make[2]: Entering directory `/home/toros/Desktop/grub-0.97/docs'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory `/home/toros/Desktop/grub-0.97/docs'
> make[2]: Entering directory `/home/toros/Desktop/grub-0.97'
> make[2]: Leaving directory `/home/toros/Desktop/grub-0.97'
> make[1]: Leaving directory `/home/toros/Desktop/grub-0.97'
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-31 11:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-31 10:51 Need help in taking part in the development of GRUB Usman Ajmal
2009-12-31 11:53 ` Vladimir 'φ-coder/phcoder' Serbinenko
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.