[RFC] Platform information services

2008-08-13 Thread Javier Martín
Hi there everybody, I'm opening the RFC because I want to add some kind of infrastructure to retrieve the address of system/platform structures. I will explain myself: my use case is in i386-pc and for the drivemap module, in which a function installs a TSR int13h handler. This requires the functi

Re: [PATCH] kern/err.c + disk/raid.c error handling fixes

2008-08-13 Thread Robert Millan
On Thu, Aug 14, 2008 at 12:39:16AM +0200, Felix Zielcke wrote: > --- util/err.c(Revision 0) > +++ util/err.c(Revision 0) > @@ -0,0 +1,41 @@ > +/* err.c - util error printing routine */ > +/* > + * GRUB -- GRand Unified Bootloader > + * Copyright (C) 2002,2005,2007 Free Software

Re: [PATCH] kern/err.c + disk/raid.c error handling fixes

2008-08-13 Thread Felix Zielcke
Am Donnerstag, den 14.08.2008, 00:39 +0200 schrieb Felix Zielcke: > > This time dear Marco I didn't bother to read through the changelog, it > might be still not perfect and I'm even tired now. I should have better gone to bed instead of making quickly a patch for this. Well 2nd try now. I forgot

Re: [PATCH] kern/err.c + disk/raid.c error handling fixes

2008-08-13 Thread Felix Zielcke
Am Mittwoch, den 13.08.2008, 23:50 +0200 schrieb Robert Millan: > If we can't do this in kern/err.c (although I really think it'd be simpler), > adding a new util/err.c that can be used by grub-probe but not grub-mkimage > would solve this. Seems like I'm sometime really just too fast. I should st

Re: [PATCH] Drivemap module

2008-08-13 Thread Javier Martín
Ok, making a mixup reply... El mié, 13-08-2008 a las 17:14 +0200, Robert Millan escribió: > On Wed, Aug 13, 2008 at 04:28:24PM +0200, Javier Martín wrote: > > > > > > I don't think this MODNAME approach is a bad idea per se [1][2], but if we > > > are to do it, IMHO this should really be done gl

RE: [PATCH] add pkzip support for gzio

2008-08-13 Thread Gregg C Levine
Hello! Perhaps. But then again perhaps the crew from PKWare might also have been confusing the issue. That's what comes from the problem of presenting software via a clone who only knows how to present things, not properly explain them. I do know that we should call the module simply zip and suppo

Re: [PATCH] kern/err.c + disk/raid.c error handling fixes

2008-08-13 Thread Robert Millan
On Wed, Aug 13, 2008 at 10:31:36PM +0200, Felix Zielcke wrote: > > Yes this change is no problem, grub-probe now compiles fine > But grub-mkimage not: > > grub_mkimage-util_misc.o: In function `grub_print_error': > /home/fz/grub/grub2.svn/util/misc.c:315: undefined reference to > `grub_error_pop

Re: [PATCH] add support for GRUB_GFXMODE variable

2008-08-13 Thread Marco Gerards
Hi, Felix Zielcke <[EMAIL PROTECTED]> writes: > seems like nobody responded to this one :) > > Am Donnerstag, den 31.07.2008, 17:35 +0200 schrieb Felix Zielcke: >> Here's a patch to add a GRUB_GFXMODE variable for update-grub >> to set the gfxmode. >> >> >> 2008-07-31 Felix Zielcke <[EMAIL P

Re: [PATCH] add support for GRUB_GFXMODE variable

2008-08-13 Thread Felix Zielcke
Hello, seems like nobody responded to this one :) Am Donnerstag, den 31.07.2008, 17:35 +0200 schrieb Felix Zielcke: > Here's a patch to add a GRUB_GFXMODE variable for update-grub > to set the gfxmode. > > > 2008-07-31 Felix Zielcke <[EMAIL PROTECTED]> > > * util/update-grub.i

Re: [PATCH] kern/err.c + disk/raid.c error handling fixes

2008-08-13 Thread Felix Zielcke
Am Mittwoch, den 13.08.2008, 22:31 +0200 schrieb Felix Zielcke: > Am Mittwoch, den 13.08.2008, 11:47 +0200 schrieb Marco Gerards: > > Felix Zielcke <[EMAIL PROTECTED]> writes: > > > > > On Tue, Aug 12, 2008 at 11:42:58PM +0200, Marco Gerards wrote: > > >> > * kern/err.c [GRUB_UTIL]: Includ

Re: [PATCH] kern/err.c + disk/raid.c error handling fixes

2008-08-13 Thread Felix Zielcke
Am Mittwoch, den 13.08.2008, 11:47 +0200 schrieb Marco Gerards: > Felix Zielcke <[EMAIL PROTECTED]> writes: > > > On Tue, Aug 12, 2008 at 11:42:58PM +0200, Marco Gerards wrote: > >> > * kern/err.c [GRUB_UTIL]: Include . > > > >> Please don't do this. Why do you want this? > > > > It's nee

Re: [PATCH] decouple mmap parsing and implement Multiboot mmap in the loader

2008-08-13 Thread Robert Millan
On Wed, Aug 13, 2008 at 07:52:59PM +0200, Marco Gerards wrote: > > #include > > #include > > +#include /* For struct grub_mmap_entry, which is > > also > > + needed by Multiboot. */ > > Isn't it better to split the header file? This seems like a hack. T

Re: [RFC] change grub_print_error to use stderr for the utils

2008-08-13 Thread Felix Zielcke
Am Mittwoch, den 13.08.2008, 20:41 +0200 schrieb Marco Gerards: > So what do you propose? :-) You lost me midway since you change > subjects a bit often ;( Oh sorry for that this time I only changed [PATCH] to [RFC] but yeah this whole topic isn't in one subject :( But the important things I alr

Re: grub-setup fails with "error message = file not found"

2008-08-13 Thread Edward Allcutt
Robert Millan wrote: On Wed, Aug 13, 2008 at 01:04:14PM -0400, Edward Allcutt wrote: Robert Millan wrote: I suggest you allow GRUB to embed core.img instead by adding a BIOS boot partitition using Parted. We still need to trace down the problem with blocklists, but this will tell us whether th

Re: [RFC] change grub_print_error to use stderr for the utils

2008-08-13 Thread Marco Gerards
Felix Zielcke <[EMAIL PROTECTED]> writes: > Hello, > > Am Mittwoch, den 13.08.2008, 11:38 +0200 schrieb Marco Gerards: >> > 2008-08-12 Felix Zielcke <[EMAIL PROTECTED]> >> > >> > * kern/err.c [GRUB_UTIL]: Include . >> > (grub_print_error) [GRUB_UTIL]: Use fprintf (stderr, ...)

Re: grub-setup fails with "error message = file not found"

2008-08-13 Thread Edward Allcutt
Robert Millan wrote: On Wed, Aug 13, 2008 at 11:53:27AM -0400, Edward Allcutt wrote: [2] http://dev.teamgleim.com/~emallcut/grub2/sda.mbr.gz [3] http://dev.teamgleim.com/~emallcut/grub2/sda1.gz Those scattered pieces of disk are not very useful. My suspicion is that grub-setup has trashed you

Re: [PATCH] decouple mmap parsing and implement Multiboot mmap in the loader

2008-08-13 Thread Marco Gerards
Hi, Robert Millan <[EMAIL PROTECTED]> writes: > And here we go *AGAIN*, this time not forgetting to include all files in the > patch. [...] > Index: include/grub/i386/pc/init.h > === > --- include/grub/i386/pc/init.h (revisio

[RFC] change grub_print_error to use stderr for the utils

2008-08-13 Thread Felix Zielcke
Hello, Am Mittwoch, den 13.08.2008, 11:38 +0200 schrieb Marco Gerards: > > 2008-08-12 Felix Zielcke <[EMAIL PROTECTED]> > > > > * kern/err.c [GRUB_UTIL]: Include . > > (grub_print_error) [GRUB_UTIL]: Use fprintf (stderr, ...) instead > > of > > grub_printf. > > If t

Re: grub-setup fails with "error message = file not found"

2008-08-13 Thread Robert Millan
On Wed, Aug 13, 2008 at 01:04:14PM -0400, Edward Allcutt wrote: > Robert Millan wrote: > >On Wed, Aug 13, 2008 at 11:53:27AM -0400, Edward Allcutt wrote: > >>[1] http://dev.teamgleim.com/~emallcut/grub2/grub-setup.log > > > >>grub-setup: info: will leave the core image on the filesystem > > > >The

Re: grub-setup fails with "error message = file not found"

2008-08-13 Thread Robert Millan
On Wed, Aug 13, 2008 at 11:53:27AM -0400, Edward Allcutt wrote: > [2] http://dev.teamgleim.com/~emallcut/grub2/sda.mbr.gz > [3] http://dev.teamgleim.com/~emallcut/grub2/sda1.gz Those scattered pieces of disk are not very useful. My suspicion is that grub-setup has trashed your GPT metadata. Can

Re: grub-setup fails with "error message = file not found"

2008-08-13 Thread Edward Allcutt
Robert Millan wrote: On Wed, Aug 13, 2008 at 11:53:27AM -0400, Edward Allcutt wrote: [1] http://dev.teamgleim.com/~emallcut/grub2/grub-setup.log grub-setup: info: will leave the core image on the filesystem The blocklist approach should still work, but it's not recommended. I was actually u

Re: grub-setup fails with "error message = file not found"

2008-08-13 Thread Robert Millan
On Wed, Aug 13, 2008 at 11:53:27AM -0400, Edward Allcutt wrote: > [1] http://dev.teamgleim.com/~emallcut/grub2/grub-setup.log > grub-setup: info: will leave the core image on the filesystem The blocklist approach should still work, but it's not recommended. I suggest you allow GRUB to embed core

Re: [PATCH] Drivemap module

2008-08-13 Thread Marco Gerards
Robert Millan <[EMAIL PROTECTED]> writes: [...] >> > This is a lot of code being added to kernel, and space in kernel is highly >> > valuable. >> > >> > Would the same functionality work if put inside a module? >> For the reasons discussed above in the loader.h snippet, I don't think >> so: the

grub-setup fails with "error message = file not found"

2008-08-13 Thread Edward Allcutt
I initially reported this as Debian bug #494589 [0] Felix Zielcke asked me to forward this report to this mailing list. Reproduced with latest upstream SVN (rebuilt r1802 today). Failing command: grub-setup -vv --directory=/boot/grub --device-map=/boot/grub/device.map '(hd0)' >grub-setup.log 2

Re: [PATCH] Home-End keys in menu

2008-08-13 Thread Carles Pina i Estany
Hello, I reply in this message a different things. On Aug/13/2008, Robert Millan wrote: > On Wed, Aug 13, 2008 at 01:38:27PM +0200, Javier Martín wrote: > > El mié, 13-08-2008 a las 12:50 +0200, Robert Millan escribió: > > > On Wed, Aug 13, 2008 at 12:15:37PM +0200, Marco Gerards wrote: > > > >

Re: [PATCH] Drivemap module

2008-08-13 Thread Robert Millan
On Wed, Aug 13, 2008 at 04:28:24PM +0200, Javier Martín wrote: > > > > I don't think this MODNAME approach is a bad idea per se [1][2], but if we > > are to do it, IMHO this should really be done globally for consistency, and > > preferably separately from this patch. > > > > [1] But I'd use a co

Re: [PATCH] Drivemap module

2008-08-13 Thread Marco Gerards
Hi, Javier Martín <[EMAIL PROTECTED]> writes: > El mié, 13-08-2008 a las 15:00 +0200, Robert Millan escribió: >> Hi, >> >> Marco asked me to review this. > So he finally got fed up of me... Understandable ^^ No, but I am not as qualified regarding the BIOS as Robert is, except for general remar

Re: [PATCH] Drivemap module

2008-08-13 Thread Javier Martín
El mié, 13-08-2008 a las 15:00 +0200, Robert Millan escribió: > Hi, > > Marco asked me to review this. So he finally got fed up of me... Understandable ^^ > I haven't followed the earlier discussion, > so if I say or ask something that was discussed before, please bear with me > and just point

Re: [PATCH] Drivemap module

2008-08-13 Thread Robert Millan
On Wed, Aug 13, 2008 at 02:16:25PM +0200, Javier Martín wrote: > +static grub_err_t > +revparse_biosdisk(const grub_uint8_t dnum, const char **output) Ah, and please separate function names from parenthesis ;-) -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide

Re: [PATCH] Drivemap module

2008-08-13 Thread Robert Millan
Hi, Marco asked me to review this. I haven't followed the earlier discussion, so if I say or ask something that was discussed before, please bear with me and just point me to that. On Wed, Aug 13, 2008 at 02:16:25PM +0200, Javier Martín wrote: > + > +#define MODNAME "drivemap" > + > [...] > +

Re: Idea: use menu hook to implement the savedefault command

2008-08-13 Thread Robert Millan
On Wed, Aug 13, 2008 at 02:11:54PM +0200, Javier Martín wrote: > El mié, 13-08-2008 a las 13:48 +0200, Robert Millan escribió: > > On Wed, Aug 13, 2008 at 01:36:44PM +0200, Javier Martín wrote: > > > It might be unnecessarily complex, yes. What about a C#-delegate-like > > > approach? e.g.: > > >

Re: [PATCH] Drivemap module

2008-08-13 Thread Javier Martín
El mié, 13-08-2008 a las 12:13 +0200, Marco Gerards escribió: > Javier Martín <[EMAIL PROTECTED]> writes: > > > In this reply-to-myself hoping to keep the thread continuity, I put > > forth the new "version 7" of the patch with the following changes: > > > > - A new switch -s/--swap has been imp

Re: Idea: use menu hook to implement the savedefault command

2008-08-13 Thread Javier Martín
El mié, 13-08-2008 a las 13:48 +0200, Robert Millan escribió: > On Wed, Aug 13, 2008 at 01:36:44PM +0200, Javier Martín wrote: > > It might be unnecessarily complex, yes. What about a C#-delegate-like > > approach? e.g.: > > > > function myhook() { > > save_env > > } > > While in the process of

Re: Idea: use menu hook to implement the savedefault command

2008-08-13 Thread Robert Millan
On Wed, Aug 13, 2008 at 01:36:44PM +0200, Javier Martín wrote: > It might be unnecessarily complex, yes. What about a C#-delegate-like > approach? e.g.: > > function myhook() { > save_env > } While in the process of designing interfaces, finding inspiration in patent encumbered technologies is

Re: [PATCH] Home-End keys in menu

2008-08-13 Thread Robert Millan
On Wed, Aug 13, 2008 at 01:38:27PM +0200, Javier Martín wrote: > El mié, 13-08-2008 a las 12:50 +0200, Robert Millan escribió: > > On Wed, Aug 13, 2008 at 12:15:37PM +0200, Marco Gerards wrote: > > > Hi, > > > > > > Carles Pina i Estany <[EMAIL PROTECTED]> writes: > > > > > > [...] > > > > > > >

Re: [PATCH] Home-End keys in menu

2008-08-13 Thread Javier Martín
El mié, 13-08-2008 a las 12:50 +0200, Robert Millan escribió: > On Wed, Aug 13, 2008 at 12:15:37PM +0200, Marco Gerards wrote: > > Hi, > > > > Carles Pina i Estany <[EMAIL PROTECTED]> writes: > > > > [...] > > > > > 2008-08-06 Carles Pina i Estany <[EMAIL PROTECTED]> > > > > > > * menu/norma

Re: Idea: use menu hook to implement the savedefault command

2008-08-13 Thread Javier Martín
El mié, 13-08-2008 a las 12:31 +0200, Marco Gerards escribió: > Bean <[EMAIL PROTECTED]> writes: > > > Hi, > > > > Now it's possible to implement savedefault with load_env and save_env, > > but the problem is we need to add it to every menuitem, it's tedious > > process, and new item don't get it

Re: [PATCH] Home-End keys in menu

2008-08-13 Thread Marco Gerards
Robert Millan <[EMAIL PROTECTED]> writes: > On Wed, Aug 13, 2008 at 12:15:37PM +0200, Marco Gerards wrote: >> Hi, >> >> Carles Pina i Estany <[EMAIL PROTECTED]> writes: >> >> [...] >> >> > 2008-08-06 Carles Pina i Estany <[EMAIL PROTECTED]> >> > >> >* menu/normal.c (run_menu): Add Home an

Re: [PATCH] Home-End keys in menu

2008-08-13 Thread Robert Millan
On Wed, Aug 13, 2008 at 12:15:37PM +0200, Marco Gerards wrote: > Hi, > > Carles Pina i Estany <[EMAIL PROTECTED]> writes: > > [...] > > > 2008-08-06 Carles Pina i Estany <[EMAIL PROTECTED]> > > > > * menu/normal.c (run_menu): Add Home and End keys in grub-menu. > > > This looks fine to m

Re: Idea: use menu hook to implement the savedefault command

2008-08-13 Thread Marco Gerards
Bean <[EMAIL PROTECTED]> writes: > Hi, > > Now it's possible to implement savedefault with load_env and save_env, > but the problem is we need to add it to every menuitem, it's tedious > process, and new item don't get it automatically. > > I'm thinking about using menu hook to solve this. I can t

Re: [PATCH] Do not mess with libc's prototypes

2008-08-13 Thread Marco Gerards
[EMAIL PROTECTED] writes: > Due to some more breakage, here's some more patch: > > According to POSIX memmove and memcpy can actually be macros or whatever > (IIRC). We'd better not play with those in code that uses libc's headers > and is to be linked with libc. > > 2008-08-08 Lubomir Rintel <[

Re: [PATCH] Warning fixes

2008-08-13 Thread Marco Gerards
Hi, Pavel Roskin <[EMAIL PROTECTED]> writes: > I've fixed the trivial stuff, but this may require comments. I'll be > mostly offline for the next 3 weeks, so if it's OK, please apply it for > me. > > ChangeLog: > > * disk/ata.c (grub_ata_pciinit): Mark pciid unused. Oh, I changed this, so

Re: [PATCH] New command checktime

2008-08-13 Thread Marco Gerards
Hi, Bean <[EMAIL PROTECTED]> writes: > > Oh, please take a look at my other post "Idea: implementation of the > password command", it sugguest to implement password with hooks, for > example, reading $GET_PASSWORD would prompt the user for password and > return the encrypted form. > > BTW, I'm t

Re: [PATCH] Home-End keys in menu

2008-08-13 Thread Marco Gerards
Hi, Carles Pina i Estany <[EMAIL PROTECTED]> writes: [...] > 2008-08-06 Carles Pina i Estany <[EMAIL PROTECTED]> > > * menu/normal.c (run_menu): Add Home and End keys in grub-menu. This looks fine to me at first sight. Do others have problems with this? Otherwise it can be committed.

Re: [PATCH] Drivemap module

2008-08-13 Thread Marco Gerards
Javier Martín <[EMAIL PROTECTED]> writes: > In this reply-to-myself hoping to keep the thread continuity, I put > forth the new "version 7" of the patch with the following changes: > > - A new switch -s/--swap has been implemented, so that running > "drivemap -s hd0 hd1" is equivalent to issuing

Re: [PATCH] Split of raid scan code

2008-08-13 Thread Marco Gerards
Bean <[EMAIL PROTECTED]> writes: > On Tue, Aug 12, 2008 at 4:30 AM, Robert Millan <[EMAIL PROTECTED]> wrote: >> On Tue, Aug 12, 2008 at 04:24:26AM +0800, Bean wrote: >>> - disk/lvm.c disk/raid.c grub_probe_init.c >>> + disk/lvm.c disk/raid.c disk/mdraid_linux.c grub_probe_init.c >> >> Hi,

Re: [PATCH] add pkzip support for gzio

2008-08-13 Thread Marco Gerards
"Gregg Levine" <[EMAIL PROTECTED]> writes: > On Mon, Aug 11, 2008 at 1:22 PM, Marco Gerards <[EMAIL PROTECTED]> wrote: >> Hi, >> >> "y.volta" <[EMAIL PROTECTED]> writes: >> >>> i've made a little patch for pkziped ( deflate mode ) file. by >>> using this, we can have both gunzip and pkunzip su

Re: Idea: Use extended blocklist format to support installing to raid device.

2008-08-13 Thread Marco Gerards
Robert Millan <[EMAIL PROTECTED]> writes: > On Tue, Aug 12, 2008 at 05:20:54PM +0800, Bean wrote: >> >> Hi, >> >> Right, but we can't get rid of it totally. For example, if they don't >> reserve enough space at the beginning of disk, there is no way to >> install grub2 without blocklist. And, so

Re: Is romfs supported in Grub2

2008-08-13 Thread Marco Gerards
"y.volta" <[EMAIL PROTECTED]> writes: > romfs is useful for me, so is there any existing mod or functions > existed in current Grub2? > > if no, i'd like to add this mod to Grub2 from previous Grub0.97 patch. Who owns the copyright? BTW, GRUB 2 and GRUB Legacy filesystem code are *VERY* differen

Re: [PATCH] kern/err.c + disk/raid.c error handling fixes

2008-08-13 Thread Marco Gerards
Felix Zielcke <[EMAIL PROTECTED]> writes: > On Tue, Aug 12, 2008 at 11:42:58PM +0200, Marco Gerards wrote: >> > * kern/err.c [GRUB_UTIL]: Include . > >> Please don't do this. Why do you want this? > > It's needed for fprintf, and fprintf is only useful for GRUB_UTIL. I understood that.

Re: [PATCH] kern/err.c + disk/raid.c error handling fixes

2008-08-13 Thread Marco Gerards
Robert Millan <[EMAIL PROTECTED]> writes: > On Tue, Aug 12, 2008 at 11:42:58PM +0200, Marco Gerards wrote: >> > [GRUB_UTIL] (grub_print_error): Use fprintf (stderr, ...) >> > instead of >> > grub_printf. >> >> Why? >> >> It would be better to make a util/misc.c:grub_print

Re: [PATCH] change grub_print_error to use stderr for the utils

2008-08-13 Thread Marco Gerards
Felix Zielcke <[EMAIL PROTECTED]> writes: > Here's now the patch Robert requested. > grub_print_error shouldn't use stdout for the utils. > > Why? > > # grub-install /dev/sda > Unknown extra argument `Unsupported'. > > This is with Bean's or mine lastest RAID patch. > /dev/sda isn't on a raid at a

Re: [PATCH] change grub_print_error to use stderr for the utils

2008-08-13 Thread Marco Gerards
Felix Zielcke <[EMAIL PROTECTED]> writes: > Am Dienstag, den 12.08.2008, 17:41 +0200 schrieb Robert Millan: >> On Tue, Aug 12, 2008 at 05:30:15PM +0200, Felix Zielcke wrote: >> > >> > 2008-08-12 Felix Zielcke <[EMAIL PROTECTED]> >> > >> > * kern/err.c [GRUB_UTIL]: Include . >> >

Re: [PATCH] Enable grub_cpu_idle for i386 to halt the CPU

2008-08-13 Thread Marco Gerards
David Fries <[EMAIL PROTECTED]> writes: > Enable grub_cpu_idle for i386 to halt the CPU and modify the menu code > to make use of it. This will save power when booting. > Or maybe I should say it will keep the CPU from running so hot when > the timer is counting down. > > It isn't safe to call ha

Re: Idea: implementation of the password command

2008-08-13 Thread Marco Gerards
Hi, Bean <[EMAIL PROTECTED]> writes: > First of all, we can store the encrypted password in a variable, like > PASSWORD. It's better to store it in grubenv. as it is more flexible, > and also allows the user to change it from the grub environment. I am not sure if this is what we want. It might

Re: [PATCH] grub-mkelfimage

2008-08-13 Thread Marco Gerards
Robert Millan <[EMAIL PROTECTED]> writes: > If there are no objections, I will check this in soon. Looks fine to me. Didn't you break the ability to cross compile for PPC on x86 along the way? -- Marco ___ Grub-devel mailing list Grub-devel@gnu.org