Re: [patch] printf long format
Hollis Blanchard [EMAIL PROTECTED] writes: Debugging a partition map bug, I was adding more grub_dprintf messages... and re-discovered that our printf doesn't handle e.g. %lx format strings (yet gcc requires these when printing longs). Isn't that hexadecimal? * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string contains `l' modifier, get a long from va_arg(). You forgot the first line... Please make sure the date you use is the date you check in. With your previous commit something went wrong. if (*fmt *fmt =='-') { rightfill = 1; fmt++; } - + p = (char *) fmt; /* Read formatting parameters. */ Please watch out for such stuff. I know it is annoying... The patch looks fine to me. Thanks, Marco ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
How to create boot CDROM with GRUB2
I went through the steps with configure and make and install into a prefix of ~/pkgs/local with the end result being : [EMAIL PROTECTED]:~/pkgs/local$ find . -ls 1959654 drwxr-xr-x 5 dclarke users4096 Jun 21 18:13 . 1959664 drwxr-xr-x 3 dclarke users4096 Jun 21 18:10 ./share 1959674 drwxr-xr-x 3 dclarke users4096 Jun 21 18:10 ./share/grub 1959684 drwxr-xr-x 2 dclarke users4096 Jun 21 18:10 ./share/grub/powerpc-ieee1275 1959698 -rw-r--r-- 1 dclarke users5892 Jun 21 18:10 ./share/grub/powerpc-ieee1275/_linux.mod 1959704 -rw-r--r-- 1 dclarke users1868 Jun 21 18:10 ./share/grub/powerpc-ieee1275/linux.mod 1959748 -rw-r--r-- 1 dclarke users6564 Jun 21 18:10 ./share/grub/powerpc-ieee1275/fat.mod 195975 12 -rw-r--r-- 1 dclarke users8940 Jun 21 18:10 ./share/grub/powerpc-ieee1275/ufs.mod 1959768 -rw-r--r-- 1 dclarke users6500 Jun 21 18:10 ./share/grub/powerpc-ieee1275/ext2.mod 1959778 -rw-r--r-- 1 dclarke users6312 Jun 21 18:10 ./share/grub/powerpc-ieee1275/minix.mod 1959788 -rw-r--r-- 1 dclarke users7628 Jun 21 18:10 ./share/grub/powerpc-ieee1275/hfs.mod 1959798 -rw-r--r-- 1 dclarke users8116 Jun 21 18:10 ./share/grub/powerpc-ieee1275/jfs.mod 195980 36 -rw-r--r-- 1 dclarke users 36424 Jun 21 18:10 ./share/grub/powerpc-ieee1275/normal.mod 1959814 -rw-r--r-- 1 dclarke users1316 Jun 21 18:10 ./share/grub/powerpc-ieee1275/hello.mod 1959824 -rw-r--r-- 1 dclarke users3128 Jun 21 18:10 ./share/grub/powerpc-ieee1275/font.mod 1959838 -rw-r--r-- 1 dclarke users5540 Jun 21 18:10 ./share/grub/powerpc-ieee1275/ls.mod 1959844 -rw-r--r-- 1 dclarke users1400 Jun 21 18:10 ./share/grub/powerpc-ieee1275/boot.mod 1959854 -rw-r--r-- 1 dclarke users2252 Jun 21 18:10 ./share/grub/powerpc-ieee1275/cmp.mod 1959864 -rw-r--r-- 1 dclarke users2020 Jun 21 18:10 ./share/grub/powerpc-ieee1275/cat.mod 1959874 -rw-r--r-- 1 dclarke users2300 Jun 21 18:10 ./share/grub/powerpc-ieee1275/terminal.mod 1959884 -rw-r--r-- 1 dclarke users3124 Jun 21 18:10 ./share/grub/powerpc-ieee1275/fshelp.mod 1959894 -rw-r--r-- 1 dclarke users2876 Jun 21 18:10 ./share/grub/powerpc-ieee1275/amiga.mod 1959904 -rw-r--r-- 1 dclarke users2704 Jun 21 18:10 ./share/grub/powerpc-ieee1275/apple.mod 1959914 -rw-r--r-- 1 dclarke users4024 Jun 21 18:10 ./share/grub/powerpc-ieee1275/pc.mod 1959924 -rw-r--r-- 1 dclarke users1404 Jun 21 18:10 ./share/grub/powerpc-ieee1275/suspend.mod 1959938 -rw-r--r-- 1 dclarke users4300 Jun 21 18:10 ./share/grub/powerpc-ieee1275/loopback.mod 1959944 -rw-r--r-- 1 dclarke users2460 Jun 21 18:10 ./share/grub/powerpc-ieee1275/help.mod 1959954 -rw-r--r-- 1 dclarke users1276 Jun 21 18:10 ./share/grub/powerpc-ieee1275/reboot.mod 1959964 -rw-r--r-- 1 dclarke users1320 Jun 21 18:10 ./share/grub/powerpc-ieee1275/halt.mod 1959974 -rw-r--r-- 1 dclarke users2940 Jun 21 18:10 ./share/grub/powerpc-ieee1275/sun.mod 1959984 -rw-r--r-- 1 dclarke users1604 Jun 21 18:10 ./share/grub/powerpc-ieee1275/default.mod 1959994 -rw-r--r-- 1 dclarke users1596 Jun 21 18:10 ./share/grub/powerpc-ieee1275/timeout.mod 1960004 -rw-r--r-- 1 dclarke users1512 Jun 21 18:10 ./share/grub/powerpc-ieee1275/configfile.mod 1960014 -rw-r--r-- 1 dclarke users 325 Jun 21 18:10 ./share/grub/powerpc-ieee1275/moddep.lst 1960024 -rw-r--r-- 1 dclarke users 334 Jun 21 18:10 ./share/grub/powerpc-ieee1275/command.lst 1960034 drwxr-xr-x 2 dclarke users4096 Jun 21 18:10 ./bin 196004 456 -rwxr-xr-x 1 dclarke users 462473 Jun 21 18:10 ./bin/grub-emu 196005 76 -rwxr-xr-x 1 dclarke users 71158 Jun 21 18:10 ./bin/grub-mkimage 2145854 drwxr-xr-x 2 dclarke users4096 Jun 21 18:10 ./sbin [EMAIL PROTECTED]:~/pkgs/local$ uname -a Linux debian 2.6.8-pegasos #1 Wed Aug 18 16:40:30 CEST 2004 ppc GNU/Linux My system is a PowerPC based unit with open firmware. In fact it is a GENESI ODW unit thus : http://www.pegasosppc.com/odw.php There is no floppy device but I guess I could attach one somehow. What I need to do is install the GRUB2 bootloader on this unit but I would prefer to have it on a bootable CDROM first. Is there any clear way to achieve this ? Dennis Clarke [EMAIL PROTECTED] ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [patch] printf long format
On Jun 22, 2005, at 6:05 AM, Marco Gerards wrote: Hollis Blanchard [EMAIL PROTECTED] writes: Debugging a partition map bug, I was adding more grub_dprintf messages... and re-discovered that our printf doesn't handle e.g. %lx format strings (yet gcc requires these when printing longs). Isn't that hexadecimal? Yes... but that's not the point. * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string contains `l' modifier, get a long from va_arg(). You forgot the first line... Please make sure the date you use is the date you check in. With your previous commit something went wrong. Sorry about that... if (*fmt *fmt =='-') { rightfill = 1; fmt++; } - + p = (char *) fmt; /* Read formatting parameters. */ Please watch out for such stuff. I know it is annoying... You have made this comment a few times now. Please understand: I do watch out for this stuff, apparently more carefully than other committers. I am removing whitespace from an otherwise blank line. I am not saying I will never accidentally check in errant whitespace, but you can see that this is a correction, not an accident. -Hollis ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: How to create boot CDROM with GRUB2
Dennis Clarke [EMAIL PROTECTED] writes: Hi Dennis, My system is a PowerPC based unit with open firmware. In fact it is a GENESI ODW unit thus : http://www.pegasosppc.com/odw.php There is no floppy device but I guess I could attach one somehow. What I need to do is install the GRUB2 bootloader on this unit but I would prefer to have it on a bootable CDROM first. Is there any clear way to achieve this ? GRUB 2 works on the Pegasos II, but I have never tested booting form CDROM. What I usually do is creating an open firmware binary and loading that from the open firmware console. If the CDROM can be accessed from open firmware and you are able to open the binary it will work. Perhaps there is a pegasos specific way to automatically load this binary, but I don't know of a way to do this. To create this PPC specific binary you can read the wiki page: http://www.autistici.org/grub/moin.cgi/TestingOnPowerPC For the pegasos you need to add amiga.mod so GRUB can access your RDB partitions. -- Marco ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: How to create boot CDROM with GRUB2
On Jun 22, 2005, at 8:55 AM, Dennis Clarke wrote: I went through the steps with configure and make and install into a prefix of ~/pkgs/local with the end result being : [EMAIL PROTECTED]:~/pkgs/local$ find . -ls 1959654 drwxr-xr-x 5 dclarke users4096 Jun 21 18:13 . 1959664 drwxr-xr-x 3 dclarke users4096 Jun 21 18:10 ./share 1959674 drwxr-xr-x 3 dclarke users4096 Jun 21 18:10 ./share/grub 1959684 drwxr-xr-x 2 dclarke users4096 Jun 21 18:10 ./share/grub/powerpc-ieee1275 1959698 -rw-r--r-- 1 dclarke users5892 Jun 21 18:10 ./share/grub/powerpc-ieee1275/_linux.mod 1959704 -rw-r--r-- 1 dclarke users1868 Jun 21 18:10 ./share/grub/powerpc-ieee1275/linux.mod 1959748 -rw-r--r-- 1 dclarke users6564 Jun 21 18:10 ./share/grub/powerpc-ieee1275/fat.mod 195975 12 -rw-r--r-- 1 dclarke users8940 Jun 21 18:10 ./share/grub/powerpc-ieee1275/ufs.mod 1959768 -rw-r--r-- 1 dclarke users6500 Jun 21 18:10 ./share/grub/powerpc-ieee1275/ext2.mod 1959778 -rw-r--r-- 1 dclarke users6312 Jun 21 18:10 ./share/grub/powerpc-ieee1275/minix.mod 1959788 -rw-r--r-- 1 dclarke users7628 Jun 21 18:10 ./share/grub/powerpc-ieee1275/hfs.mod 1959798 -rw-r--r-- 1 dclarke users8116 Jun 21 18:10 ./share/grub/powerpc-ieee1275/jfs.mod 195980 36 -rw-r--r-- 1 dclarke users 36424 Jun 21 18:10 ./share/grub/powerpc-ieee1275/normal.mod 1959814 -rw-r--r-- 1 dclarke users1316 Jun 21 18:10 ./share/grub/powerpc-ieee1275/hello.mod 1959824 -rw-r--r-- 1 dclarke users3128 Jun 21 18:10 ./share/grub/powerpc-ieee1275/font.mod 1959838 -rw-r--r-- 1 dclarke users5540 Jun 21 18:10 ./share/grub/powerpc-ieee1275/ls.mod 1959844 -rw-r--r-- 1 dclarke users1400 Jun 21 18:10 ./share/grub/powerpc-ieee1275/boot.mod 1959854 -rw-r--r-- 1 dclarke users2252 Jun 21 18:10 ./share/grub/powerpc-ieee1275/cmp.mod 1959864 -rw-r--r-- 1 dclarke users2020 Jun 21 18:10 ./share/grub/powerpc-ieee1275/cat.mod 1959874 -rw-r--r-- 1 dclarke users2300 Jun 21 18:10 ./share/grub/powerpc-ieee1275/terminal.mod 1959884 -rw-r--r-- 1 dclarke users3124 Jun 21 18:10 ./share/grub/powerpc-ieee1275/fshelp.mod 1959894 -rw-r--r-- 1 dclarke users2876 Jun 21 18:10 ./share/grub/powerpc-ieee1275/amiga.mod 1959904 -rw-r--r-- 1 dclarke users2704 Jun 21 18:10 ./share/grub/powerpc-ieee1275/apple.mod 1959914 -rw-r--r-- 1 dclarke users4024 Jun 21 18:10 ./share/grub/powerpc-ieee1275/pc.mod 1959924 -rw-r--r-- 1 dclarke users1404 Jun 21 18:10 ./share/grub/powerpc-ieee1275/suspend.mod 1959938 -rw-r--r-- 1 dclarke users4300 Jun 21 18:10 ./share/grub/powerpc-ieee1275/loopback.mod 1959944 -rw-r--r-- 1 dclarke users2460 Jun 21 18:10 ./share/grub/powerpc-ieee1275/help.mod 1959954 -rw-r--r-- 1 dclarke users1276 Jun 21 18:10 ./share/grub/powerpc-ieee1275/reboot.mod 1959964 -rw-r--r-- 1 dclarke users1320 Jun 21 18:10 ./share/grub/powerpc-ieee1275/halt.mod 1959974 -rw-r--r-- 1 dclarke users2940 Jun 21 18:10 ./share/grub/powerpc-ieee1275/sun.mod 1959984 -rw-r--r-- 1 dclarke users1604 Jun 21 18:10 ./share/grub/powerpc-ieee1275/default.mod 1959994 -rw-r--r-- 1 dclarke users1596 Jun 21 18:10 ./share/grub/powerpc-ieee1275/timeout.mod 1960004 -rw-r--r-- 1 dclarke users1512 Jun 21 18:10 ./share/grub/powerpc-ieee1275/configfile.mod 1960014 -rw-r--r-- 1 dclarke users 325 Jun 21 18:10 ./share/grub/powerpc-ieee1275/moddep.lst 1960024 -rw-r--r-- 1 dclarke users 334 Jun 21 18:10 ./share/grub/powerpc-ieee1275/command.lst 1960034 drwxr-xr-x 2 dclarke users4096 Jun 21 18:10 ./bin 196004 456 -rwxr-xr-x 1 dclarke users 462473 Jun 21 18:10 ./bin/grub-emu 196005 76 -rwxr-xr-x 1 dclarke users 71158 Jun 21 18:10 ./bin/grub-mkimage 2145854 drwxr-xr-x 2 dclarke users4096 Jun 21 18:10 ./sbin Keep in mind that so far we have not been using make install. That said, what is the problem you're pointing out here? That the grubof executable itself is missing? (As more people start using this, we really need to rename grubof before we become stuck with that name forever.) [EMAIL PROTECTED]:~/pkgs/local$ uname -a Linux debian 2.6.8-pegasos #1 Wed Aug 18 16:40:30 CEST 2004 ppc GNU/Linux My system is a PowerPC based unit with open firmware. In fact it is a GENESI ODW unit thus : http://www.pegasosppc.com/odw.php There is no floppy device but I guess I could attach one somehow. What I need to do is install the GRUB2 bootloader on this unit but I would prefer to have it on a bootable CDROM first. Is there any clear way to achieve this ? Have you seen this page? If not, it should get you
Re: [patch] printf long format
On Wednesday 22 June 2005 16:33, Hollis Blanchard wrote: You have made this comment a few times now. Please understand: I do watch out for this stuff, apparently more carefully than other committers. I am removing whitespace from an otherwise blank line. I am not saying I will never accidentally check in errant whitespace, but you can see that this is a correction, not an accident. Why does Marco complain about this? Because of the readability of a patch? In this case, the option --ignore-space-change to diff would help you... Okuji ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [patch] printf long format
On Wednesday 22 June 2005 18:24, Marco Gerards wrote: With --ignore-space-change you sometimes miss changes that were made on purpose. OK, then how about --ignore-blank-lines? Personally I do not care about including space changes in a patch. But if you really hate it, I believe that we should define a rule here, like always removing trailing spaces. Honestly speaking, I'd like to say, Don't care too much. Okuji ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [patch] printf long format
Yoshinori K. Okuji [EMAIL PROTECTED] writes: On Wednesday 22 June 2005 18:24, Marco Gerards wrote: With --ignore-space-change you sometimes miss changes that were made on purpose. OK, then how about --ignore-blank-lines? Personally I do not care about including space changes in a patch. But if you really hate it, I believe that we should define a rule here, like always removing trailing spaces. Honestly speaking, I'd like to say, Don't care too much. In that case I will just stop nagging, unless blank lines are changed in files that do not have other changes or when it makes a patch really hard to read. Is that fine for you? Thanks, Marco ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [patch] printf long format
On Wednesday 22 June 2005 20:09, Marco Gerards wrote: In that case I will just stop nagging, unless blank lines are changed in files that do not have other changes or when it makes a patch really hard to read. Is that fine for you? No problem. BTW, is there any way to have Emacs to remove trailing space when saving? As far as I know, this is possible with before_save_hook, but this requires modifying .emacs. Instead, I'd like to specify this within source files like this: /* * Local variables: * delete-trailing-whitespace: t * End: */ I guess not possible at the moment... Okuji ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [patch] printf long format
Yoshinori K. Okuji [EMAIL PROTECTED] writes: On Wednesday 22 June 2005 20:09, Marco Gerards wrote: In that case I will just stop nagging, unless blank lines are changed in files that do not have other changes or when it makes a patch really hard to read. Is that fine for you? No problem. BTW, is there any way to have Emacs to remove trailing space when saving? As far as I know, this is possible with before_save_hook, but this requires modifying .emacs. Instead, I'd like to specify this within source files like this: /* * Local variables: * delete-trailing-whitespace: t * End: */ I guess not possible at the moment... Why not? I don't have any objections to changing my .emacs either. Thanks, Marco ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [patch] printf long format
On Wednesday 22 June 2005 22:14, Marco Gerards wrote: Why not? Because I don't know how to do it. If you know, let me know. I don't have any objections to changing my .emacs either. I do not want to change .emacs only for GRUB 2. Since .emacs is a global configuration, this affects other projects, and I do not like this. Okuji ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
free magic is broken
Hi, I have made a small test program that uses the memory management of grub2 to manage an allocated buffer and I can reproduce the free magic is broken problem with it. I have prepared a small web page with some details as it is a little bit long to explain here. See it there if you want more information: http://www.auto.ucl.ac.be/~guffens/grub2_netboot/free_magic_broken.html I propose the following patch to fix this problem. This patch will modify the mm code of grub2 only when the problem would occur in subsequent call to grub_free: diff -ru grub2/kern/mm.c grub2_free_magic_broken/kern/mm.c --- grub2/kern/mm.c 2005-01-20 18:25:39.0 +0100 +++ grub2_free_magic_broken/kern/mm.c 2005-06-22 22:59:58.660577232 +0200 @@ -298,6 +298,10 @@ p-next-magic = 0; p-size += p-next-size; p-next = p-next-next; + if (q-magic != GRUB_MM_FREE_MAGIC) { + r-first = p; + return; + } } if (q + q-size == p) -- Vincent Guffens UCL/CESAME +32 10 47 80 30 Euler Building A017 ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel