Re: GRUB2 - Please add support for 64-bit FreeBSD

2009-04-11 Thread Bean
On Sat, Apr 11, 2009 at 5:54 AM, Daniel Nebdal wrote: > Bean wrote: >> Hi, >> >> Please try the btx loader in /boot/loader, which I believe to be >> 32-bit even in amd64 freebsd. The btx loader is an a.out executable, >> grurb2 has supported for it already. > > Ah, just noticed I replied to this b

Re: GRUB2 - Please add support for 64-bit FreeBSD

2009-04-11 Thread Chip Panarchy
Hello Great, I can't wait! Please give it a go (that is, modifying the 32-bit GRUB2 module for FreeBSD to support 64-bit as well... or creating a separate module based on that) Thanks in advance, Panarchy On Sat, Apr 11, 2009 at 5:37 PM, Bean wrote: > On Sat, Apr 11, 2009 at 5:54 AM, Daniel N

[PATCH]: grub: Fix handling of long printf arguments on 64-bit.

2009-04-11 Thread David Miller
The grub printf code tries to treat 'long' and 'int' the same, that doesn't work on (most) 64-bit platforms. 2009-04-11 David S. Miller * kern/misc.c (grub_ltoa): New function. (grub_vsprintf): Use it to format 'long' integers. --- kern/misc.c | 35 +

[PATCH]: grub: Allow to control objcopy '-B' argument from foo.rmk files.

2009-04-11 Thread David Miller
This patch allows a platform to specify the image file output format, it also adds the --strip-unneeded option to the objcopy invocation as well. I've left the i386-pc.mk portion of this patch out of the posting, but rest assured I will check that part in once this gets an ACK :-) 2009-04-11 Da

[PATCH]: grub: Fix ofdisk disk cache corruption.

2009-04-11 Thread David Miller
The ieee1275 ofdisk driver doesn't use a unique value for disk->id so it's really easy to get disk corruption. I was able to see such corruption by simply booting grub from one disk and booting a Linux kernel from another, both of which were on the same disk controller. The solution implemented

[PATCH]: Fix fs modules on sparc64 build with newer gcc

2009-04-11 Thread David Miller
Newer versions of gcc emit references to libgcc internal functions __bswapsi2 and __bswapdi2 when building ufs and some other filesystem modules on sparc64. Unfortunately older versions of gcc lack these symbols in libgcc so we can't export them universally, we have to check for it using configur

[PATCH]: Add sparc64 boot block implementation.

2009-04-11 Thread David Miller
This adds the sparc64 boot block implementation for GRUB. There might end up being minor changes to this in the end, depending upon how we end up handling openfirmware path names. But by in large this is the final way the code will look. I've documented how these boot blocks work on several occa

[PATCH] bug fix for grub-pe2elf

2009-04-11 Thread Bean
Hi, When symbol name is 8 or less, pe store it as short name, which is not necessary null-terminated. This patch take that into account and append a null character at the end. diff --git a/util/grub-pe2elf.c b/util/grub-pe2elf.c index d703d33..a2504d2 100644 --- a/util/grub-pe2elf.c +++ b/util/gr

Re: [PATCH] Split of normal mode (version 2)

2009-04-11 Thread Yoshinori K. Okuji
On Saturday 11 April 2009 05:17:43 Bean wrote: > Hi, > > Another update for the patch: > > sync with svn r2074 > misc bug fixes > change build script for i386-efi, i386-coreboot, i386-ieee1275 and > x86_64-efi as well as i386-pc, grub-emu now builds properly for > i386-pc. > support the use of #! i

Re: [PATCH] Test command

2009-04-11 Thread Yoshinori K. Okuji
On Saturday 11 April 2009 07:18:59 phcoder wrote: > Rediffed. New changelog This time, I comment on all style problems. > diff --git a/commands/test.c b/commands/test.c > index a9c8281..2d8dedd 100644 > --- a/commands/test.c > +++ b/commands/test.c > @@ -21,33 +21,385 @@ > #include > #include

Re: [PATCH] Build system improvement

2009-04-11 Thread Yoshinori K. Okuji
On Saturday 11 April 2009 08:25:50 phcoder wrote: > I don't see any stoppers to merge this patch Personally, I don't like this so much. Is it so useful? Regards, Okuji > > Javier Martín wrote: > > This patch modifies several files in the build system (mainly common.rmk > > and genmk.rb) to reduc

Re: [PATCH] Preboot support

2009-04-11 Thread Yoshinori K. Okuji
On Saturday 11 April 2009 08:48:07 phcoder wrote: > Hello, here is the preboot hooks support. Apply on top of my bootmove > patch. They are very useful for patches like sendkey (my old patch that > I'll rediff), badram, acpi (2 patches in separate threads) or drivemap Some comments about the desig

Re: [PATCH] Fix target tool check logic

2009-04-11 Thread Yoshinori K. Okuji
On Saturday 11 April 2009 13:58:26 Pavel Roskin wrote: > Hello! > > I promised this patch long ago, but didn't have a chance to implement > and test it. This patch would help users test GRUB using > cross-compilers. Many users would prefer to compile native GRUB > utilities (grub-mkimage etc) but

Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit.

2009-04-11 Thread Yoshinori K. Okuji
On Saturday 11 April 2009 17:08:29 David Miller wrote: > The grub printf code tries to treat 'long' and 'int' the same, > that doesn't work on (most) 64-bit platforms. Right. Good finding. Regards, Okuji > > 2009-04-11 David S. Miller > > * kern/misc.c (grub_ltoa): New function. >

Re: [PATCH]: grub: Allow to control objcopy '-B' argument from foo.rmk files.

2009-04-11 Thread Yoshinori K. Okuji
On Saturday 11 April 2009 17:08:31 David Miller wrote: > This patch allows a platform to specify the image file output > format, it also adds the --strip-unneeded option to the objcopy > invocation as well. IIRC, --strip-unneeded was dangerous. > I've left the i386-pc.mk portion of this patch out

Re: [PATCH] bug fix for grub-pe2elf

2009-04-11 Thread Yoshinori K. Okuji
On Saturday 11 April 2009 18:29:00 Bean wrote: > Hi, > > When symbol name is 8 or less, pe store it as short name, which is not > necessary null-terminated. Oh, I didn't know that. Where is it documented? Regards, Okuji ___ Grub-devel mailing list Gru

Re: [PATCH]: grub: Allow to control objcopy '-B' argument from foo.rmk files.

2009-04-11 Thread David Miller
From: "Yoshinori K. Okuji" Date: Sat, 11 Apr 2009 19:23:23 +0900 > On Saturday 11 April 2009 17:08:31 David Miller wrote: >> This patch allows a platform to specify the image file output >> format, it also adds the --strip-unneeded option to the objcopy >> invocation as well. > > IIRC, --strip-u

Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit.

2009-04-11 Thread David Miller
From: "Yoshinori K. Okuji" Date: Sat, 11 Apr 2009 19:19:49 +0900 > On Saturday 11 April 2009 17:08:29 David Miller wrote: >> The grub printf code tries to treat 'long' and 'int' the same, >> that doesn't work on (most) 64-bit platforms. > > Right. Good finding. Committed. Thanks for reviewing.

Re: GRUB2 - Please add support for 64-bit FreeBSD

2009-04-11 Thread phcoder
I haven't looked in depth yet, but it's a bit more. the loader switches to amd64 and sets preliminary page translation Bean wrote: On Sat, Apr 11, 2009 at 5:54 AM, Daniel Nebdal wrote: Bean wrote: Hi, Please try the btx loader in /boot/loader, which I believe to be 32-bit even in amd64 freeb

Re: [PATCH] Build system improvement

2009-04-11 Thread phcoder
The problem is that build system creates a lot of output on progress and so the warnings are often not very visible Yoshinori K. Okuji wrote: On Saturday 11 April 2009 08:25:50 phcoder wrote: I don't see any stoppers to merge this patch Personally, I don't like this so much. Is it so useful?

Re: [PATCH] bug fix for grub-pe2elf

2009-04-11 Thread Bean
On Sat, Apr 11, 2009 at 6:24 PM, Yoshinori K. Okuji wrote: > On Saturday 11 April 2009 18:29:00 Bean wrote: >> Hi, >> >> When symbol name is 8 or less, pe store it as short name, which is not >> necessary null-terminated. > > Oh, I didn't know that. Where is it documented? Hi, Recently, I found

Re: [PATCH] Fix target tool check logic

2009-04-11 Thread Pavel Roskin
Quoting "Yoshinori K. Okuji" : "test -n" should be avoided. Maybe this is not necessary nowadays, but my old lesson was to use "test x$target_alias != x" instead for portability. Well, "!=" was not very portable, either, maybe. I believe both "-n" and "!=" are found in Autoconf sources that ar

Re: [PATCH] Split of normal mode (version 2)

2009-04-11 Thread Bean
On Sat, Apr 11, 2009 at 5:50 PM, Yoshinori K. Okuji wrote: > On Saturday 11 April 2009 05:17:43 Bean wrote: >> Hi, >> >> Another update for the patch: >> >> sync with svn r2074 >> misc bug fixes >> change build script for i386-efi, i386-coreboot, i386-ieee1275 and >> x86_64-efi as well as i386-pc,

[PATCH] Split #1: auto generate handler.lst

2009-04-11 Thread Bean
Hi, This patch generate handler.lst using the register functions. In normal.mod, it reads handler.lst and register commands like: terminal_output.gfxterm ... It also rename static function get_line in normal/main.c to grub_file_getline. -- Bean diff --git a/Makefile.in b/Makefile.in index d6e5

Re: [PATCH] Test command

2009-04-11 Thread phcoder
Updated. Same changelog + { + update_val (grub_strcmp (args[*argn], args[*argn + 2]) == 0); + (*argn) += 3; I myself feel that these parentheses are redundant, but I don't know how others think. For C programmers, it is well known that * has a very high priority. These

Re: [PATCH] Build system improvement

2009-04-11 Thread Colin D Bennett
Yoshinori K. Okuji wrote on Saturday 11 April 2009: > On Saturday 11 April 2009 08:25:50 phcoder wrote: > > I don't see any stoppers to merge this patch > > Personally, I don't like this so much. Is it so useful? Absolutely. I find it tedious to scroll back through thousands of lines of text ful

Re: [PATCH] Preboot support

2009-04-11 Thread phcoder
- Using an int value for the priority is quetionable. Very often, this style of priority system leads to chaos, because everyone picks up arbitrary numbers randomly. I prefer to define enums with a careful analysis. I will think about it. But the analysis is difficult because we don't know in ad

[PATCH] Split 3: boot script support

2009-04-11 Thread Bean
Hi, This patch allows grub-mkimage to embed a boot script in core.img, which would be executed by the rescue parser before switching to normal mode. -- Bean s3.diff Description: Binary data ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.

[PATCH] Split #4: text menu separation

2009-04-11 Thread Bean
Hi, This patch moves menu_text.c to menu/text/, and it changes grub_menu_viewer structure as handler. -- Bean diff --git a/conf/common.rmk b/conf/common.rmk index 00aff3d..fac3c1a 100644 --- a/conf/common.rmk +++ b/conf/common.rmk @@ -342,7 +342,7 @@ pkglib_MODULES += minicmd.mod extcmd.mod hell

Re: multiboot2

2009-04-11 Thread phcoder
Yoshinori K. Okuji wrote: On Tuesday 07 April 2009 10:18:30 phcoder wrote: Yoshinori K. Okuji wrote: 1) double the size of flags. 8 features per category seems to be few. I do not agree on this. As you can see, most bits are still undefined after over 10-year usage of the Multiboot Specificati

Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit.

2009-04-11 Thread phcoder
I do not agree with having separate grub_itoa/grub_ltoa/grub_lltoa in kernel where the size is critical. We should have only lltoa and use it in all contexts. I know because of divmod64 it's slower than ltoa or itoa but it's used only for output so speed isn't so important David Miller wrote:

mmap services

2009-04-11 Thread phcoder
Hello. Here is the patch to allow different mmap filtering. It naturally incorporates badram and also intercepts int12/15 so it works also with OS recieving mmap from BIOS. It's useful for intercepting any bios interrupts -- Regards Vladimir 'phcoder' Serbinenko diff --git a/ChangeLog b/Change

[PATCH] ACPI spoofing

2009-04-11 Thread phcoder
Hello, here is the patch to spoof ACPI tables. It's useful for developement and debugging but also for the end-users. Unfortunately many manufacturers ship ACPI tables that work well only with win. Fortunately now linux has an interpreter which workarounds most known bugs and has an ability to

[PATCH] remove BSD partition number from install_drive/grub_drive in grub-install

2009-04-11 Thread Felix Zielcke
Hi, on BSD grub-install thinks that you're wanting to do a cross-install when in fact you won't. The problem is that in install_drive the BSD partition number isn't removed before doing the cross-install check. I'm not sure if the regexp is okay so or if it could be better, but at least it works f

Re: [Design] nested partitions: Unify grub_partition and grub_disk

2009-04-11 Thread phcoder
Ping. Is it ok for me to implement it this way? phcoder wrote: I forgot to speak about another question: partition naming. I see 2 possibilities 1) purely numeric unified naming scheme. It means that (hd0,1,a) becomes (hd0,1,1) On one hand mixed number-letter scheme is similar to what freebsd us

Re: GRUB2 - Please add support for 64-bit FreeBSD

2009-04-11 Thread Chip Panarchy
Hello Okay, well I'm not really that well versed to understand what you are saying. However, I'd be eternally grateful if you were able to 'port' 32-bit FreeBSD for GRUB to 64-bit FreeBSD (for GRUB). Thanks in advance, Panarchy On Sat, Apr 11, 2009 at 9:50 PM, phcoder wrote: > I haven't looke

Re: [PATCH] remove BSD partition number from install_drive/grub_drive in grub-install

2009-04-11 Thread Chip Panarchy
Which BSD? On Sun, Apr 12, 2009 at 7:52 AM, Felix Zielcke wrote: > Hi, > > on BSD grub-install thinks that you're wanting to do a cross-install > when in fact you won't. > The problem is that in install_drive the BSD partition number isn't > removed before doing the cross-install check. > I'm not

Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit.

2009-04-11 Thread Pavel Roskin
On Sat, 2009-04-11 at 21:10 +0200, phcoder wrote: > I do not agree with having separate grub_itoa/grub_ltoa/grub_lltoa in > kernel where the size is critical. Nice catch! > We should have only lltoa and use it > in all contexts. I know because of divmod64 it's slower than ltoa or > itoa but i

Re: [PATCH]: Fix fs modules on sparc64 build with newer gcc

2009-04-11 Thread Pavel Roskin
On Sat, 2009-04-11 at 01:27 -0700, David Miller wrote: > Newer versions of gcc emit references to libgcc internal > functions __bswapsi2 and __bswapdi2 when building ufs and > some other filesystem modules on sparc64. > > Unfortunately older versions of gcc lack these symbols in > libgcc so we can

Re: [PATCH]: grub: Fix ofdisk disk cache corruption.

2009-04-11 Thread Pavel Roskin
On Sat, 2009-04-11 at 01:08 -0700, David Miller wrote: > The ieee1275 ofdisk driver doesn't use a unique value for > disk->id so it's really easy to get disk corruption. I was > able to see such corruption by simply booting grub from one > disk and booting a Linux kernel from another, both of whic

Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit.

2009-04-11 Thread Pavel Roskin
On Sat, 2009-04-11 at 01:08 -0700, David Miller wrote: > The grub printf code tries to treat 'long' and 'int' the same, > that doesn't work on (most) 64-bit platforms. > + n = (unsigned) (-((long) n)); "unsigned" means "unsigned int". You need "unsigned long" here. It's probably irrelevant