grub2 debugging with gdb

2009-06-19 Thread jeff jeff
hi i need to add a few commands/modules to grub2 for our systems. i am trying to debug grub2 with gdb to ease the development cycle. for that purpose i have followed this excellent doc http://v3.sk/~lkundrak/grub2-gdb/howto.html after i applied the procedure described in the note, for some reason

Re:grub2 debugging with gdb

2009-06-19 Thread wangji
I have put the L Kundrak 's patches for grub2-gdb adjusted to svn revision -due to genmk.rb changes. It works well with qemu -s , for stepping into modules ...hello ! http://wjhowto.googlepages.com/grub2-r2300-2340-elfgdb.patch older svn are there too http://wjhowto.googlepages.com/grub2-r1742-2

Re: [PATCH] Remove root drive support

2009-06-19 Thread Robert Millan
On Tue, Jun 16, 2009 at 01:41:18AM +0200, Vladimir 'phcoder' Serbinenko wrote: > On Fri, Jun 12, 2009 at 10:45 PM, Pavel Roskin wrote: > > Root drive support is not actually used by the installer.  Root drive is > > superseded by grub_prefix with UUID, which is much more flexible, is > > already us

Re: Fw: gettext support

2009-06-19 Thread Robert Millan
On Thu, Jun 18, 2009 at 04:45:38PM +0200, Vladimir 'phcoder' Serbinenko wrote: > If you want I'll add compilation po to mo to build system. That would be very nice. The build system part looks like the part that would be easiest, but TBH I'm totally clueless on what would be the proper way to do

Re: Fw: gettext support

2009-06-19 Thread Robert Millan
On Thu, Jun 18, 2009 at 09:56:07PM +0100, Carles Pina i Estany wrote: > > > -Copy ca.mo to /usr/share/locale/ca/LC_MESSAGES/grub.mo > > > > Languages files should go to a subdir of $PREFIX. E.g. to > > $PREFIX/langs/$LANG.mo linux directories may be inaccessible > > Now the gettext modu

Re: Fw: gettext support

2009-06-19 Thread Vladimir 'phcoder' Serbinenko
On Fri, Jun 19, 2009 at 12:37 PM, Robert Millan wrote: > On Thu, Jun 18, 2009 at 09:56:07PM +0100, Carles Pina i Estany wrote: > > > > -Copy ca.mo to /usr/share/locale/ca/LC_MESSAGES/grub.mo > > > > > > Languages files should go to a subdir of $PREFIX. E.g. to > > > $PREFIX/langs/$LANG.mo

Re: [PATCH] bless command

2009-06-19 Thread Vladimir 'phcoder' Serbinenko
On Fri, Jun 19, 2009 at 8:08 AM, Peter Cros wrote: > Hi again, > > Could the hfspbless patch be updated and hopefully committted to provide > the hfspbless module as standard in grub2. > Attached to this e-mail and on my personal git repository in branch bless the rediff. I was thinking of addin

[RFC] Memory management

2009-06-19 Thread Vladimir 'phcoder' Serbinenko
Hello. As appeared multiple times grub2's memory management can't handle some problems. 1) First of all it manages grub_malloc and os_area separately which forces initialisation code to split memory into two parts. Let's take a case of initrd for linux and solaris both having size of 270 MiB. And a

Re: Fw: gettext support

2009-06-19 Thread Jordi Mallach
On Fri, Jun 19, 2009 at 12:37:47PM +0200, Robert Millan wrote: > > Now the gettext module will search in $prefix/locale/lang.mo, where lang > > is the variable that the user will setup in grub.cfg (e.g. ca for > > catalan) and $prefix is usually /boot/grub > Uhm I'm not sure I agree on this one. S

Re: Fw: gettext support

2009-06-19 Thread Vladimir 'phcoder' Serbinenko
On Fri, Jun 19, 2009 at 3:55 PM, Jordi Mallach wrote: > On Fri, Jun 19, 2009 at 12:37:47PM +0200, Robert Millan wrote: > > > Now the gettext module will search in $prefix/locale/lang.mo, where > lang > > > is the variable that the user will setup in grub.cfg (e.g. ca for > > > catalan) and $prefi

[PATCH] fix SigSegV and hang with grub-emu-usb

2009-06-19 Thread Vladimir 'phcoder' Serbinenko
Hello when testing grub-emu with USB support I stumbled across several problems 1) compile time warning of undefined grub_usb_libinit 2) When launched under normal user it crashed 3) When launched as superuser it hanged on ls Here is the fix. Formatting omitted for readability -- Regards Vladimir

Re: [PATCH] fix SigSegV and hang with grub-emu-usb

2009-06-19 Thread Pavel Roskin
On Fri, 2009-06-19 at 16:58 +0200, Vladimir 'phcoder' Serbinenko wrote: > Hello when testing grub-emu with USB support I stumbled across several > problems > 1) compile time warning of undefined grub_usb_libinit > 2) When launched under normal user it crashed > 3) When launched as superuser it ha

Re: [PATCH] fix building bug with --enable-grub-emu-usb

2009-06-19 Thread Pavel Roskin
On Wed, 2009-06-17 at 15:27 +0200, Vladimir 'phcoder' Serbinenko wrote: > Hello. This is a fix for problem in subject line. I believe this fix > to be correct and legitimate but as I don't know ruby well could > someone review it? If nobody knows ruby in depth I think we can commit > this even with

Re: [PATCH] fix SigSegV and hang with grub-emu-usb

2009-06-19 Thread Vladimir 'phcoder' Serbinenko
On Fri, Jun 19, 2009 at 5:20 PM, Pavel Roskin wrote: > On Fri, 2009-06-19 at 16:58 +0200, Vladimir 'phcoder' Serbinenko wrote: > > Hello when testing grub-emu with USB support I stumbled across several > problems > > 1) compile time warning of undefined grub_usb_libinit > > 2) When launched unde

Re: [PATCH] fix building bug with --enable-grub-emu-usb

2009-06-19 Thread Vladimir 'phcoder' Serbinenko
On Fri, Jun 19, 2009 at 5:46 PM, Pavel Roskin wrote: > On Wed, 2009-06-17 at 15:27 +0200, Vladimir 'phcoder' Serbinenko wrote: > > Hello. This is a fix for problem in subject line. I believe this fix > > to be correct and legitimate but as I don't know ruby well could > > someone review it? If no

Re: [PATCH] bless command

2009-06-19 Thread Pavel Roskin
On Fri, 2009-06-19 at 13:53 +0200, Vladimir 'phcoder' Serbinenko wrote: > Attached to this e-mail and on my personal git repository in branch > bless the rediff. I was thinking of adding ppc mac support but haven't > done it yet I think we can incorporate apple intel support without the > ppc cou

Re: [PATCH] bless command

2009-06-19 Thread Vladimir 'phcoder' Serbinenko
On Fri, Jun 19, 2009 at 6:15 PM, Pavel Roskin wrote: > On Fri, 2009-06-19 at 13:53 +0200, Vladimir 'phcoder' Serbinenko wrote: > > > Attached to this e-mail and on my personal git repository in branch > > bless the rediff. I was thinking of adding ppc mac support but haven't > > done it yet I th

Proposal for GNU indent compatibility

2009-06-19 Thread Pavel Roskin
Hello! In order to encourage developers to use proper indentation on the newly added code, I suggest that we accept the default style of GNU indent. That is, the space after "!" should not be needed. That's the only difference I'm aware of. Running indent on the code and then adding spaces after

Re: [PATCH] fix SigSegV and hang with grub-emu-usb

2009-06-19 Thread Pavel Roskin
On Fri, 2009-06-19 at 17:54 +0200, Vladimir 'phcoder' Serbinenko wrote: > I thought it was clear. Here is an explanation hunk by hunk: > diff --git a/disk/scsi.c b/disk/scsi.c > index 046dcb8..312d58a 100644 > --- a/disk/scsi.c > +++ b/disk/scsi.c > @@ -246,8 +246,9 @@ grub_scsi_open (const char *

Re: Proposal for GNU indent compatibility

2009-06-19 Thread Vladimir 'phcoder' Serbinenko
On Fri, Jun 19, 2009 at 6:37 PM, Pavel Roskin wrote: > Hello! > > In order to encourage developers to use proper indentation on the newly > added code, I suggest that we accept the default style of GNU indent. I agree with proposition > > That is, the space after "!" should not be needed. That

Re: Fw: gettext support

2009-06-19 Thread Vladimir 'phcoder' Serbinenko
On Thu, Jun 18, 2009 at 11:07 PM, Carles Pina i Estany wrote: > > Hi, > > On Jun/18/2009, Vladimir 'phcoder' Serbinenko wrote: > > > If you want I'll add compilation po to mo to build system. > > this would be very nice and speed up the process :-) > > As it's written in the TODO in grub/po, we ne

Re: [PATCH] fix SigSegV and hang with grub-emu-usb

2009-06-19 Thread Vladimir 'phcoder' Serbinenko
On Fri, Jun 19, 2009 at 6:52 PM, Pavel Roskin wrote: > OK, I understand you tried USB mass storage devices. > > I believe the paramount here is consistency. There are several places > in the code where grub_errno is returned. In one place, grub_error() is > returned. It's important to fix all

Re: [PATCH] fix SigSegV and hang with grub-emu-usb

2009-06-19 Thread Vladimir 'phcoder' Serbinenko
> >> I would check why it was needed. >> > It seems it's unnecessary. I removed them and it didn't generate any > warnings. Now I followed your recommendation and they build system with my > previous fixes picked it right > These definitions were used before grub-probe used grub_init_all and grub_f

Re: [2342] 2009-06-18 Vladimir Serbinenko

2009-06-19 Thread Christian Franke
Vladimir Serbinenko wrote: * configure.ac: remove a leftover AC_MSG_RESULT ... --- trunk/grub2/configure.ac2009-06-18 13:51:06 UTC (rev 2341) +++ trunk/grub2/configure.ac2009-06-18 14:02:23 UTC (rev 2342) @@ -308,7 +308,6 @@ AC_SUBST(TARGET_IMG_LDSCRIPT) AC_SUBST(TARGET_IMG_LDFL

Re: [2342] 2009-06-18 Vladimir Serbinenko

2009-06-19 Thread Pavel Roskin
On Fri, 2009-06-19 at 22:05 +0200, Christian Franke wrote: > This was the AC_MSG_RESULT(...) for the > AC_MSG_CHECKING([for option to link raw image]) > which is still present for the "$grub_cv_apple_target_cc" != "yes" case. > > I would suggest to move the AC_MSG_CHECKING outside the 'if > "$g

Re: [PATCH] fix SigSegV and hang with grub-emu-usb

2009-06-19 Thread Pavel Roskin
On Fri, 2009-06-19 at 20:44 +0200, Vladimir 'phcoder' Serbinenko wrote: > I see the standard is grub_error(). Let's do it for SCSI as > well. > > I don't understand what do you mean. grub_error () which don't come > from previous function You fixed some code in one place

Re: Proposal for GNU indent compatibility

2009-06-19 Thread Pavel Roskin
On Fri, 2009-06-19 at 19:01 +0200, Vladimir 'phcoder' Serbinenko wrote: > 8) Removed spaces before labels Oh, I missed that. I think we should follow GNU indent in the label placement as well. > it has put { on new line and without spacing > Perhaps something more. The patch would be 77280 line

Re: [PATCH] fix SigSegV and hang with grub-emu-usb

2009-06-19 Thread Vladimir 'phcoder' Serbinenko
On Fri, Jun 19, 2009 at 11:47 PM, Pavel Roskin wrote: > On Fri, 2009-06-19 at 20:44 +0200, Vladimir 'phcoder' Serbinenko wrote: > > > I see the standard is grub_error(). Let's do it for SCSI as > > well. > > > > I don't understand what do you mean. grub_error () which don't come

Re: Fw: gettext support

2009-06-19 Thread Carles Pina i Estany
Hi, On Jun/19/2009, Robert Millan wrote: > On Thu, Jun 18, 2009 at 09:56:07PM +0100, Carles Pina i Estany wrote: > > > > -Copy ca.mo to /usr/share/locale/ca/LC_MESSAGES/grub.mo > > > > > > Languages files should go to a subdir of $PREFIX. E.g. to > > > $PREFIX/langs/$LANG.mo linux direc

Re: Fw: gettext support

2009-06-19 Thread Carles Pina i Estany
Hi, On Jun/19/2009, Vladimir 'phcoder' Serbinenko wrote: > On Thu, Jun 18, 2009 at 11:07 PM, Carles Pina i Estany wrote: > > > > > Hi, > > > > On Jun/18/2009, Vladimir 'phcoder' Serbinenko wrote: > > > > > If you want I'll add compilation po to mo to build system. > > > > this would be very nice

Re: Fw: gettext support

2009-06-19 Thread Vladimir 'phcoder' Serbinenko
On Sat, Jun 20, 2009 at 1:13 AM, Carles Pina i Estany wrote: > > Hi, > > On Jun/19/2009, Vladimir 'phcoder' Serbinenko wrote: > > On Thu, Jun 18, 2009 at 11:07 PM, Carles Pina i Estany >wrote: > > > > > > > > Hi, > > > > > > On Jun/18/2009, Vladimir 'phcoder' Serbinenko wrote: > > > > > > > If yo