(Probable Lubomir is subscribed but just in case sending the mail to
him, he made originally the Wiki page and is hosting the patch.)
I just tried that GRUB in qemu debugging with GDB stuff.
The Stuff on that Wiki page is a bit outdated.
I'm not that familiar with such things but maybe I can try to fix this
myself.
Attached is the grub2-gdb.diff updated to current SVN version.
I don't have any webspace to host it.
I have compiled grub2 with CFLAGS="-g3 -O0"
gdb shows:
GNU gdb 6.8-debian
[copyright stuff]
This GDB was configured as "x86_64-linux-gnu".
0x00008c1e in grub_console_getkey ()
Function "grub_dl_add" not defined.
/home/fz/grub/grub2.svn/.gdbinit:78: Error in sourced command file:
No breakpoint number 0.
(gdb) bt
#0 0x00008c1e in grub_console_getkey ()
#1 0x81400006 in ?? ()
#2 0x02060000 in ?? ()
#3 0xff0080ff in ?? ()
#4 0x00000000 in ?? ()
Index: kern/main.c
===================================================================
--- kern/main.c (Revision 1742)
+++ kern/main.c (Arbeitskopie)
@@ -106,6 +106,9 @@
grub_print_error ();
}
+void
+main (void) __attribute__ ((alias("grub_main")));
+
/* The main routine. */
void
grub_main (void)
Index: genmk.rb
===================================================================
--- genmk.rb (Revision 1742)
+++ genmk.rb (Arbeitskopie)
@@ -101,10 +101,11 @@
mod_obj = mod_src.suffix('o')
defsym = 'def-' + @name.suffix('lst')
undsym = 'und-' + @name.suffix('lst')
+ exec = @name.suffix('elf')
mod_name = File.basename(@name, '.mod')
symbolic_name = mod_name.sub(/\.[^\.]*$/, '')
- "CLEANFILES += [EMAIL PROTECTED] #{mod_obj} #{mod_src} #{pre_obj} #{objs_str} #{undsym}
+ "CLEANFILES += [EMAIL PROTECTED] #{mod_obj} #{mod_src} #{pre_obj} #{objs_str} #{undsym} #{exec}
ifneq ($(#{prefix}_EXPORTS),no)
CLEANFILES += #{defsym}
DEFSYMFILES += #{defsym}
@@ -112,11 +113,14 @@
MOSTLYCLEANFILES += #{deps_str}
UNDSYMFILES += #{undsym}
[EMAIL PROTECTED]: #{pre_obj} #{mod_obj} $(TARGET_OBJ2ELF)
[EMAIL PROTECTED]: #{exec}
-rm -f $@
+ $(OBJCOPY) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $^ $@
+
+#{exec}: #{pre_obj} #{mod_obj} $(TARGET_OBJ2ELF)
+ -rm -f $@
$(TARGET_CC) $(#{prefix}_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ #{pre_obj} #{mod_obj}
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
- $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
#{pre_obj}: $(#{prefix}_DEPENDENCIES) #{objs_str}
-rm -f $@
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel