Re: --recheck option
Le jeudi 05 juillet 2012 14:19:54, yannubu...@gmail.com a écrit : A) Which are the situations where the --recheck option of grub-install must NOT be used? In my experience (grub legacy, linux boot with /dev/hd* device names, years ago), I had to play with device map to be able to reorder boot device priority (or plug HDDs in a different PATA layout, I don't remember precisely). I could edit the map to fit the intended layout change, grub (without --recheck) just followed, and machine could boot just fine. Nowadays I don't have to care about this, thanks to UUIDs everywhere instead of dev paths. -- Vincent Pelletier ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: Mouse support in GRUB
Le samedi 01 octobre 2011 15:39:12, Tirtha Chatterjee a écrit : So I wish to work on implementing mouse support for GRUB. I've attached the result of my early fidling with grub on sparc. Yeah, once I got grub to load, I made a serial msmouse work instead of working on things like actually getting it to boot any OS. It most certainly won't be applying cleanly on current code, and it is highly unlikely that I rebase it myself. This adds 2 modules to grub, each with a single command. Both modules require ieee1275, and were only tested on sparc. One opens a serial port and moves a mouse cursor on screen. It doesn't integrate with anything (no event system...). The other draws a mandelbrot fractal (this is off-topic, but it was in the same patch...). More seriously, I feel the only value in this patch is in the ieee1275 wrappers for framebuffer entrypoints. If anyone feels like integrating any chunk, please do. I had signed the copyright assignment back then, so you can consider the FSF own copyright on that patch already, as far as I'm concerned. -- Vincent Pelletier Index: commands/ieee1275/mandelbrot.c === RCS file: commands/ieee1275/mandelbrot.c diff -N commands/ieee1275/mandelbrot.c --- /dev/null 1 Jan 1970 00:00:00 - +++ commands/ieee1275/mandelbrot.c 25 Aug 2005 09:05:09 - @@ -0,0 +1,145 @@ +/* mandelbrot.c - Draws a nice Manldebrot fractal. */ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2005 Free Software Foundation, Inc. + * + * GRUB is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include grub/rescue.h +#include grub/dl.h +#include grub/misc.h +#include grub/machine/kernel.h +#include grub/ieee1275/ieee1275.h +#include grub/ieee1275/fb.h +#include grub/ieee1275/fbprops.h + +#ifndef GRUB_EMBED +static grub_err_t +grub_cmd_mandelbrot (struct grub_arg_list *state __attribute__ ((unused)), + int argc, char **argv) +#else /* GRUB_EMBED */ +static void +grub_cmd_mandelbrot (int argc, char *argv[]) +#endif /* ! GRUB_EMBED */ +{ + grub_ieee1275_ihandle_t screen; + grub_ieee1275_phandle_t pscreen; + const unsigned int nmax = 25; + unsigned int n, x, y, w, h, a; + const double xmin = -2.5, xmax = 2.5, ymin = -2, ymax = 2; + double dx, dy, rz, iz, tz, rc, ic; + unsigned char *fb, tmp[4]; + char *device; + grub_ssize_t actual; + + if(argc == 1) +device = argv[0]; + else +device = screen; + grub_printf(Using device %s...\n,device); + if (!grub_ieee1275_open (device, screen)) +{ + grub_ieee1275_finddevice (device, pscreen); + h = grub_ieee1275_fb_height (pscreen); + w = grub_ieee1275_fb_width (pscreen); + grub_printf(w=%d h=%d\n,w,h); + grub_ieee1275_get_property (pscreen,address,tmp,sizeof(tmp),actual); + fb = (unsigned char *) grub_ieee1275_decode_int_4(tmp); +// fb = (unsigned char *) grub_ieee1275_fb_addr (pscreen); + grub_printf (Framebuffer is at %p.\nClearing screen...\n, fb); + for (a = 0; a w * h; a++) +fb[a] = 0; + for (a = 0; a 256; a++) /* Fill palette with shades of gray. */ +grub_ieee1275_setcolor (screen, a, a, a, a); + dx = (xmax - xmin) / w; + dy = (ymax - ymin) / h; + for (x = 0; x w; x++) +{ + rc = xmin + x * dx; + for (y = 0; y h; y++) +{ + ic = ymin + y * dy; + rz = 0; + iz = 0; + for (n = 1; n nmax; n++) +{ + tz = rz * rz - iz * iz + rc; + iz = 2 * rz * iz + ic; + rz = tz; + if (rz * rz + iz * iz = 4) +{ + fb[x+w*y] = (n*255/nmax) % 256; + n = nmax; +} +} + if (rz * rz + iz * iz 4) +fb[x+w*y]=255; +} +} +#if 0 + grub_ieee1275_close (screen); /* If screen is closed, it goes black. */ +#endif +} + grub_printf(Finished !\n); +#ifndef GRUB_EMBED + return 0; +#endif /* ! GRUB_EMBED */ +} + + +#ifdef GRUB_EMBED +void +grub_mandelbrot_init (void) +{ + grub_rescue_register_command (mandelbrot, grub_cmd_mandelbrot, +Draws a fractal.); +} + +void +grub_mandelbrot_fini
Re: Your contributions to grub.enbug.org
Le jeudi 31 mars 2011 21:17:10, vous avez écrit : would you agree to consider that your contributor agreement covers wiki as well? Sure, no problem. -- Vincent Pelletier ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH 0/10]: Respin of sparc patches.
Le Saturday 07 March 2009 11:37:36 Robert Millan, vous avez écrit : I'm not sure how many of us are experienced with sparc (Vincent? Who else?). I wouldn't call me experienced, except if it only means that I did experimentation with that arch :) . I'm very interested to see proper sparc support completed/merged. Your effort is much appreciated. +1 -- Vincent Pelletier signature.asc Description: This is a digitally signed message part. ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH 7/7]: Get cob-webs out of sparc64-ieee1275.rmk
Le Wednesday 04 March 2009 03:15:39 David Miller, vous avez écrit : There is no way anyone tried to build the sparc target in years :-) Literaly years. More than 3 I think. I gave it a try ~2 1/2 years ago, and started writing a patch... And gave up. Thanks a lot for taking care of this. I had a very fun time discovering sparc64 as I wrote it, and I stopped before making anything usable. I hope you won't find too much bad code (sorry about that cache flush). I guess I'll fire up my good ol' ultra 10 to celebrate this :) . -- Vincent Pelletier signature.asc Description: This is a digitally signed message part. ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: Floating point usage
Le Thursday 05 June 2008 17:12:26 Jan Kleinsorge, vous avez écrit : Given that GRUB is linked against it. Which is likely as it is a necessity when compiling with gcc. ...except if -nostdlib is given to gcc, which is the case in grub2. For the bootloader part at least, grub-emu is another question. And there is an except to this except: If -lgcc is specified it will be used, and it is for the following archs, as far as I can see: - powerpc-ieee1275 - i386-linuxbios - i386-ieee1275 So half the supported archs don't need libgcc, I think it's enough to try avoiding that dependency. -- Vincent Pelletier signature.asc Description: This is a digitally signed message part. ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: contradiction in boot/i386/pc/boot.S
On Jan 9, 2008 12:48 AM, Vincent Pelletier [EMAIL PROTECTED] wrote: within the next 2 months Gah. next 2 weeks. Vincent Pelletier ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: contradiction in boot/i386/pc/boot.S
On Jan 9, 2008 12:37 AM, Robert Millan [EMAIL PROTECTED] wrote: On Tue, Jan 08, 2008 at 05:57:16PM -0500, Pavel Roskin wrote: That's something I'll rather not do without seeing the original bug reports. Same here. Maybe Okuji will know.. I have a box with this bug - sadly, I will not be able to reach it within the next 2 months - so I can test various proposals if provided with patches :) . IIRC originaly this fix was dropped from gub to grub2, and I re-raised the issue. But that's all, I don't think I touched the code. Vincent Pelletier ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
[non-finalised patch] reiserfs handling
Hi. Attached is my work on reiserfs handling. As I don't plan to work on it anytime soon, and as I was advised on IRC, I port it here, in case someone want to use it as a base. It does not follow the coding style, some part looks quite ugly (big hex constants as bitmasks, grub_reiserfs_get_item and grub_reiserfe_iterate_dir functions), has old commented out code (grub_reiserfs_read) and some debug printfs commented out (grub_reiserfe_iterate_dir), conditionaly compiled (GRUB_REISERFS_DEBUG), or always available. As such, it was good enough to read tens of megabyte big files on a reiserfs 3.5 disk image on a PPC32 box. It handles symlinks as such, and showed no read errors as far as I could tell. It was only tested in grub-emu, and never on a live system. To build grub2 with reiserfs module, add this file in the fs folder and add a reference to this file in conf/*.rmk files . Sorry for not finishing that work. -- Vincent Pelletier /* reiserfs.c - ReiserFS versions up to 3.6 */ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* TODO: implement journal handling (ram replay) implement symlinks support support items bigger than roughly (blocksize / 4) * blocksize !! that goes for directories aswell, size in such case is metadata size. test tail packing direct files validate partition label position */ #warning TODO : journal, tail packing (?) // #define GRUB_REISERFS_KEYV2_BITFIELD // #define GRUB_REISERFS_DEBUG // #define GRUB_REISERFS_JOURNALING // #define GRUB_HEXDUMP #include grub/err.h #include grub/file.h #include grub/mm.h #include grub/misc.h #include grub/disk.h #include grub/dl.h #include grub/types.h #include grub/fshelp.h #define MIN(a, b) (((a)(b))?(a):(b)) #define MAX(a, b) (((a)(b))?(a):(b)) #define REISERFS_SUPER_BLOCK_OFFSET 0x1 #define REISERFS_MAGIC_LEN 12 #define REISERFS_MAGIC_STRING ReIsEr2Fs\0\0\0 /* If the 3rd bit of an item state is set, then it's visible. */ #define GRUB_REISERFS_VISIBLE_MASK ((grub_uint16_t)0x04) #define REISERFS_MAX_LABEL_LENGTH 16 #define REISERFS_LABEL_OFFSET 0x64 #define S_IFLNK 0xA000 #ifndef GRUB_UTIL static grub_dl_t my_mod; #endif enum grub_reiserfs_item_type { GRUB_REISERFS_STAT, GRUB_REISERFS_DIRECTORY, GRUB_REISERFS_DIRECT, GRUB_REISERFS_INDIRECT, GRUB_REISERFS_ANY, /* Matches both _DIRECT and _INDIRECT when searching. */ GRUB_REISERFS_UNKNOWN }; struct grub_reiserfs_superblock { grub_uint32_t block_count; grub_uint32_t block_free_count; grub_uint32_t root_block; grub_uint32_t journal_block; grub_uint32_t journal_device; grub_uint32_t journal_original_size; grub_uint32_t journal_max_transaction_size; grub_uint32_t journal_block_count; grub_uint32_t journal_max_batch; grub_uint32_t journal_max_commit_age; grub_uint32_t journal_max_transaction_age; grub_uint16_t block_size; grub_uint16_t oid_max_size; grub_uint16_t oid_current_size; grub_uint16_t state; grub_uint8_t magic_string[REISERFS_MAGIC_LEN]; grub_uint32_t function_hash_code; grub_uint16_t tree_height; grub_uint16_t bitmap_number; grub_uint16_t version; grub_uint16_t reserved; grub_uint32_t inode_generation; } __attribute__ ((packed)); #ifdef GRUB_REISERFS_JOURNALING #error Journaling not yet supported. struct grub_reiserfs_journal_header { grub_uint32_t last_flush_uid; grub_uint32_t unflushed_offset; grub_uint32_t mount_id; } __attribute__ ((packed)); struct grub_reiserfs_transaction_header { grub_uint32_t id; grub_uint32_t len; grub_uint32_t mount_id; char *data; char checksum[12]; } __attribute__ ((packed)); #endif struct grub_reiserfs_stat_item_v1 { grub_uint16_t mode; grub_uint16_t hardlink_count; grub_uint16_t uid; grub_uint16_t gid; grub_uint32_t size; grub_uint32_t atime; grub_uint32_t mtime; grub_uint32_t ctime; grub_uint32_t rdev; grub_uint32_t first_direct_byte; } __attribute__ ((packed)); struct grub_reiserfs_stat_item_v2 { grub_uint16_t mode; grub_uint16_t reserved; grub_uint32_t hardlink_count; grub_uint64_t size; grub_uint32_t uid; grub_uint32_t gid; grub_uint32_t atime; grub_uint32_t mtime; grub_uint32_t ctime; grub_uint32_t blocks; grub_uint32_t
Re: How to generate .mk files from .rmk file ?
Le vendredi 16 mars 2007 08:02, Jerone Young a écrit : Exactly how do you generate a .mk file from the .rmk files. What is the ruby command line to do this? From the root of the working copy: ./autogen.sh -- Vincent Pelletier pgp7bb7IhPmCS.pgp Description: PGP signature ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH] Fix build of sparc64 port implement setjmp/longjmp
Hi. Here is a (mostly) maintainance patch for sparc64 port. It only fixes the build and implements setjmp/longjmp so that one can jump to rescue mode. It also builds the linux loader module, but the boot is known to fail on my box (some disk access error at OF level when reading the linux kernel image). I prefer to post the patch for validation before commiting, it's been too long I haven't post to go on my own :) . (changelog is in the diff :p ). -- Vincent Pelletier ? include/grub/sparc64/ieee1275/loader.h Index: ChangeLog === RCS file: /sources/grub/grub2/ChangeLog,v retrieving revision 1.341 diff -u -p -r1.341 ChangeLog --- ChangeLog 21 Feb 2007 23:25:09 - 1.341 +++ ChangeLog 4 Mar 2007 12:32:07 - @@ -1,3 +1,70 @@ +2007-03-01 Vincent Pelletier [EMAIL PROTECTED] + + * THANKS: Update my mail address. + * conf/sparc64-ieee1275.rmk: Include conf/common.mk. + (COMMON_ASFLAGS): Build sparc64 binary. + (COMMON_LDFLAGS): Updated to gcc-style flags. + (grub_mkimage_SOURCES): Commented out. + (pkgdata_MODULES): Removed fat.mod, ufs.mod, ext2.mod, minix.mod, + hfs.mod, jfs.mod, hello.mod, font.mod, ls.mod, boot.mod, cmp.mod, + cat.mod, terminal.mod, fshelp.mod, amiga.mod, apple.mod, pc.mod, + loopback.mod, help.mod, sun.mod, configfile.mod, search.mod, + gzio.mod, xfs.mod, affs.mod, sfs.mod, acorn.mod. Added _linux.mod + and linux.mod. + (kernel_elf_LDFLAGS): Prepend common flags. Updated to gcc-style + flags. + (_linux_mod_SOURCES, _linux_mod_CFLAGS, _linux_mod_LDFLAGS) + (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Uncomment. + (grub_script.tab.c, grub_script.tab.h, grub_modules_init.lst) + (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS) + (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS) + (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS) + (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS) + (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS) + (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES) + (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES) + (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES) + (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES) + (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES) + (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES) + (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES) + (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES) + (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES) + (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS) + (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS) + (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS) + (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS) + (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS) + (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS) + (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG) + (pc_mod_SOURCES, pc_mod_CFLAGS, pc_mod_LDFLAGS, sun_mod_SOURCES) + (sun_mod_CFLAGS, sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS) + (loopback_mod_SOURCES, loopback_mod_CFLAGS, loopback_mod_LDFLAGS) + (default_mod_SOURCES, default_mod_CFLAGS, default_mod_LDFLAGS) + (timeout_mod_SOURCES, timeout_mod_CFLAGS, timeout_mod_LDFLAGS) + (configfile_mod_SOURCES, configfile_mod_CFLAGS) + (configfile_mod_LDFLAGS, search_mod_SOURCES, search_mod_CFLAGS) + (search_mod_LDFLAGS, gzio_mod_SOURCES, gzio_mod_CFLAGS) + (gzio_mod_LDFLAGS, test_mod_SOURCES, test_mod_CFLAGS) + (test_mod_LDFLAGS): Removed. + * conf/sparc64-ieee1275.mk: Regenerate. + * include/grub/elf.h (ELF64_R_TYPE_DATA, ELF64_R_TYPE_ID) + (ELF64_R_TYPE_INFO): New macros. + * include/grub/sparc64/setjmp.h: Include grub/types.h. + (grub_jmp_buf): Update definition. + * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Use + ELF64_R_TYPE_ID macro. Explicited bitmasks and casts. Fixed + R_SPARC_WDISP30 relocation checks and updated its error message. + Added support for R_SPARC_13 and R_SPARC_OLO10 relocations. + * kern/sparc64/ieee1275/init.c (grub_claim_heap): New function. + (grub_machine_fini): Call `grub_ieee1275_exit'. + * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Update call + to `grub_ieee1275_next_property'. Remove uneeded variable. + (grub_available_iterate): New function. + * normal/main.c: Explicit grub_exit_env alignment. + * normal/sparc64/setjmp.S (grub_setjmp, grub_longjmp): Implement. + * include/grub/sparc64/ieee1275/loader.h: New file. + 2007-02-21 Hollis Blanchard [EMAIL PROTECTED] * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed. Index: THANKS === RCS file: /sources/grub/grub2/THANKS,v retrieving revision 1.18 diff -u -p -r1.18 THANKS --- THANKS 25 Nov 2006 03:21:29 - 1.18 +++ THANKS 4 Mar 2007 12:32:07 - @@ -26,7 +26,7 @@ Tristan Gingold [EMAIL PROTECTED] Tsuneyoshi Yasuo [EMAIL PROTECTED] Vesa Jaaskelainen [EMAIL PROTECTED
Re: GRUB2 - testing report, hppa support?
Le mardi 05 décembre 2006 20:46, Yoshinori K. Okuji a écrit : Oh, btw, it's HIGHLY confusing that disks start at 0, partitions at 1. Could you please fix it and make it consequently? either hd1,1 or hd0,0, but not hd0,1 or hd1,0. No. It is consistent with most operating systems, so less confusing to the user. GRUB Legacy used 0-based counting for partitions, and I have received an uncountable number of complaints. Thus it is really a bad idea to make GRUB inconsistent against other systems. But by changing the numbering, we void both the learning effort of the people who knows and the answering effort they spent with people who don't know. At least, that's my position regarding to the change. By changing it we might both face the complaints of the people - like me :) - who think the two numberings are inconsistent and the people who would have anyway complained about starting from 0, because disks are still numbered from 0... We may also face complaints from the people who already complained about starting from 0 - and eventually accepted it - and who will have to learn again now... -- Vincent Pelletier pgpn0Z55olpS8.pgp Description: PGP signature ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: ping (update-grub2)
Le lundi 27 novembre 2006 18:00, Robert Millan a écrit : No comments? Are you interested in getting this into the main grub tree? In my opinion, since update-grub needs a rewrite it's a good oportunity to merge this now and unify grub.cfg generation across distributions (something that wasn't possible with the old update-grub because of copyright issues). That said, if you don't like the idea then we could proceed adding it in debian, but that might close the door to merging in the future (maintaining the script in debian ourselves implies accepting contributions from many people without any paperwork arrangements). Personally, the way update-grub works on all my applicable debian installs suits me perfectly. But as Declan said, it's bad to overwrite the file... I wonder if it could become just a generation of a file which would be included (or not) by the main config file. If that main config file does not exist at all, it could be generated - unless we consider that a user might want not to have a config file at all. I don't know if the current scripting allows this, I haven't put an eye on it for a looong time. Another idea, which I just had while writing this mail : What about putting the .d directory in /boot(/grub) and implementing a mechanism in grub to be able to handle such configuration directory ? My idea is about multi-OS (multi-distro, whatever) users, which have to privilege one among and merge the boot possibilities - by hand most probably. If this offers a common way of storing boot entries, it can solve that problem. In my idea, I would go even further by suggesting a non grub-specific way of doing so, allowing to switch bootloaders which would support such configuration layouts. But I guess few people are ready to spend much effort in making boot loaders compatible one with the other... -- Vincent Pelletier pgpP3rFKXucnz.pgp Description: PGP signature ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Reiserfs v3 support for grub 2 (alpha version)
Here is attached the latest working version of reiserfs handling. What it does : - Recognises the partition type - Read the partition label (needs confirmation of the label position) - List directory content (see limitations) - Read file content (see limitations) Limitations : - Item (file dir) size limited to one indirection block. Readable size is a bit less than number_of_contiguous_indirect_pointers * block_size, which means at most 16MB on a 8192 bytes/block reiserfs, 4MB on a 4096 bytes/block, etc. - No symlink support : although the symlinks can be read, they are read as a text file containing a path, nothing more. - No journal playback - Alpha version : will potentially leak memory, be slow, not suitable for your needs, not tested with all kinds of reiserfs options versions... Play with^W^WUse it at your own risks - risks which should be limited to wasting time because no write is ever done to the partition, of course. Ah, and it's not always 80-columns wordwrapped, other than that the coding style should be respected. This will be fixed in the final version. -- Vincent Pelletier /* reiserfs.c - ReiserFS versions up to 3.6 */ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* TODO: implement journal handling (ram replay) implement symlinks support support items bigger than roughly (blocksize / 4) * blocksize !! that goes for directories aswell, size in such case is metadata size. test tail packing direct files validate partition label position */ #warning TODO : symlinks, journal, support for items larger than (blocksize^2)/4, tail packing // #define GRUB_REISERFS_KEYV2_BITFIELD // #define GRUB_REISERFS_DEBUG // #define GRUB_REISERFS_JOURNALING #include grub/err.h #include grub/file.h #include grub/mm.h #include grub/misc.h #include grub/disk.h #include grub/dl.h #include grub/types.h #include grub/fshelp.h #define MIN(a, b) (((a)(b))?(a):(b)) #define REISERFS_SUPER_BLOCK_OFFSET 0x1 #define REISERFS_MAGIC_LEN 12 #define REISERFS_MAGIC_STRING ReIsEr2Fs\0\0\0 /* If the 3rd bit of an item state is set, then it's visible. */ #define GRUB_REISERFS_VISIBLE_MASK ((grub_uint16_t)0x04) #define REISERFS_MAX_LABEL_LENGTH 16 #define REISERFS_LABEL_OFFSET 0x64 enum grub_reiserfs_item_type { GRUB_REISERFS_STAT, GRUB_REISERFS_DIRECTORY, GRUB_REISERFS_DIRECT, GRUB_REISERFS_INDIRECT, GRUB_REISERFS_ANY, /* Matches both _DIRECT and _INDIRECT when searching. */ GRUB_REISERFS_UNKNOWN }; struct grub_reiserfs_superblock { grub_uint32_t block_count; grub_uint32_t block_free_count; grub_uint32_t root_block; grub_uint32_t journal_block; grub_uint32_t journal_device; grub_uint32_t journal_original_size; grub_uint32_t journal_max_transaction_size; grub_uint32_t journal_block_count; grub_uint32_t journal_max_batch; grub_uint32_t journal_max_commit_age; grub_uint32_t journal_max_transaction_age; grub_uint16_t block_size; grub_uint16_t oid_max_size; grub_uint16_t oid_current_size; grub_uint16_t state; grub_uint8_t magic_string[REISERFS_MAGIC_LEN]; grub_uint32_t function_hash_code; grub_uint16_t tree_height; grub_uint16_t bitmap_number; grub_uint16_t version; grub_uint16_t reserved; grub_uint32_t inode_generation; } __attribute__ ((packed)); #ifdef GRUB_REISERFS_JOURNALING #error Journaling not yet supported. struct grub_reiserfs_journal_header { grub_uint32_t last_flush_uid; grub_uint32_t unflushed_offset; grub_uint32_t mount_id; } __attribute__ ((packed)); struct grub_reiserfs_transaction_header { grub_uint32_t id; grub_uint32_t len; grub_uint32_t mount_id; char *data; char checksum[12]; } __attribute__ ((packed)); #endif struct grub_reiserfs_stat_item_v1 { grub_uint16_t mode; grub_uint16_t hardlink_count; grub_uint16_t uid; grub_uint16_t gid; grub_uint32_t size; grub_uint32_t atime; grub_uint32_t mtime; grub_uint32_t ctime; grub_uint32_t rdev; grub_uint32_t first_direct_byte; } __attribute__ ((packed)); struct grub_reiserfs_stat_item_v2 { grub_uint16_t mode; grub_uint16_t reserved; grub_uint32_t hardlink_count; grub_uint64_t size; grub_uint32_t uid; grub_uint32_t gid; grub_uint32_t atime; grub_uint32_t mtime
Re: play.c
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 New version of my patch. I think I followed all the given advices. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFDjNCnibN+MXHkAogRAtK8AJ4rInXMoWqirdCWUwkrchz1hhAWXACfetNg t9XlC2XS4zLj08Tf6A2HHzyIPwMFAUOM0KcURCgpFDKO1REC0rwAnifHHB66WIvU wL5TGVG7yAyONtADAKC02lDTu8C178IVqV2ejfWdsAi4WQ== =4UJg -END PGP SIGNATURE- Index: commands/i386/pc/play.c === RCS file: commands/i386/pc/play.c diff -N commands/i386/pc/play.c --- /dev/null 1 Jan 1970 00:00:00 - +++ commands/i386/pc/play.c 29 Nov 2005 22:03:58 - @@ -0,0 +1,228 @@ +/* play.c - command to play a tune */ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2005 Free Software Foundation, Inc. + * + * GRUB is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* Lots of this file is borrowed from GNU/Hurd generic-speaker driver. */ + +#include grub/normal.h +#include grub/dl.h +#include grub/arg.h +#include grub/file.h +#include grub/disk.h +#include grub/term.h +#include grub/misc.h + +/* Read a byte from a port. */ +static inline unsigned char +inb (unsigned short port) +{ + unsigned char value; + asm volatile (inb%w1, %0 : =a (value) : Nd (port)); + return value; +} + +/* Write a byte to a port. */ +static inline void +outb (unsigned short port, unsigned char value) +{ + asm volatile (outb %b0, %w1 : : a (value), Nd (port)); +} + +/* The speaker port. */ +#define SPEAKER 0x61 + +/* If 0, follow state of SPEAKER_DATA bit, otherwise enable output + from timer 2. */ +#define SPEAKER_TMR2 0x01 + +/* If SPEAKER_TMR2 is not set, this provides direct input into the + speaker. Otherwise, this enables or disables the output from the + timer. */ +#define SPEAKER_DATA 0x02 + +/* The PIT channel value ports. You can write to and read from them. + Do not mess with timer 0 or 1. */ +#define PIT_COUNTER_0 0x40 +#define PIT_COUNTER_1 0x41 +#define PIT_COUNTER_2 0x42 + +/* The frequency of the PIT clock. */ +#define PIT_FREQUENCY 0x1234dd + +/* The PIT control port. You can only write to it. Do not mess with + timer 0 or 1. */ +#define PIT_CTRL 0x43 +#define PIT_CTRL_SELECT_MASK 0xc0 +#define PIT_CTRL_SELECT_0 0x00 +#define PIT_CTRL_SELECT_1 0x40 +#define PIT_CTRL_SELECT_2 0x80 + +/* Read and load control. */ +#define PIT_CTRL_READLOAD_MASK 0x30 +#define PIT_CTRL_COUNTER_LATCH 0x00 /* Hold timer value until read. */ +#define PIT_CTRL_READLOAD_LSB 0x10 /* Read/load the LSB. */ +#define PIT_CTRL_READLOAD_MSB 0x20 /* Read/load the MSB. */ +#define PIT_CTRL_READLOAD_WORD 0x30 /* Read/load the LSB then the MSB. */ + +/* Mode control. */ +#define PIT_CTRL_MODE_MASK 0x0e + +/* Interrupt on terminal count. Setting the mode sets output to low. + When counter is set and terminated, output is set to high. */ +#define PIT_CTRL_INTR_ON_TERM 0x00 + +/* Programmable one-shot. When loading counter, output is set to + high. When counter terminated, output is set to low. Can be + triggered again from that point on by setting the gate pin to + high. */ +#define PIT_CTRL_PROGR_ONE_SHOT 0x02 + +/* Rate generator. Output is low for one period of the counter, and + high for the other. */ +#define PIT_CTRL_RATE_GEN 0x04 + +/* Square wave generator. Output is low for one half of the period, + and high for the other half. */ +#define PIT_CTRL_SQUAREWAVE_GEN 0x06 + +/* Software triggered strobe. Setting the mode sets output to high. + When counter is set and terminated, output is set to low. */ +#define PIT_CTRL_SOFTSTROBE 0x08 + +/* Hardware triggered strobe. Like software triggered strobe, but + only starts the counter when the gate pin is set to high. */ +#define PIT_CTRL_HARDSTROBE 0x0a + +/* Count mode. */ +#define PIT_CTRL_COUNT_MASK 0x01 +#define PIT_CTRL_COUNT_BINARY 0x00 /* 16-bit binary counter. */ +#define PIT_CTRL_COUNT_BCD 0x01 /* 4-decade BCD counter. */ + +#define T_REST ((short) 0) +#define T_FINE ((short) -1) + +struct note +{ + short pitch; + short duration; +}; + +static void +beep_off (void) +{ + unsigned char status; + + status = inb (SPEAKER); + outb (SPEAKER, status ~(SPEAKER_TMR2 | SPEAKER_DATA)); +} + +static void +beep_on (short pitch) +{ + unsigned char status
Re: Video subsystem draft
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sat, 26 Nov 2005 02:28:53 +0200 Vesa Jääskeläinen [EMAIL PROTECTED] wrote: Yoshinori K. Okuji wrote: If you want to improve it, feel free to do it. It is our own format. But I think the byte order was set conveniently. Byte order is currently exactly the same as in .hex file :) It has minor issue with widechar fonts (char width 1). It like contains two different font data. First there is first half of like normal 8x16 font and then there is second half. My idea would be to store bitmap in scanlines instead of character blocks so I can take whole character width and draw that. By the way, there is already a font format handled by IEEE1275 frame buffercards. - From the standard : set-font ( addr width height advance min-char #glyphs -- ) Set the current font as specified. So I think they can handle arbitrary-sized glyphs. I can't find the font data definition, but as default-font returns all those values for the default font, reverse engineering will be a matter of minutes. If the font format you want to design could be compatible with ths one, it would be a pleasure to port it to sparc :) - and probably the same for PPC. By the way, I think we should start a discussion on the API common to all architectures for framebuffer handling. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFDiCCXFEQoKRQyjtURAryjAJ9Xppf3KxB4aYi8m5V1Xzta6fB5XgCeJXwE lVa4Lay3OgE/JF3WHBqfZ0k= =RJLt -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger T�l�chargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
play.c
Hi. Here is the play command, along with some songs. 2005-11-05 Vincent Pelletier [EMAIL PROTECTED] * commands/i386/pc/play.c: New file. * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod. (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New macros. Vincent Pelletier Index: commands/i386/pc/play.c === RCS file: commands/i386/pc/play.c diff -N commands/i386/pc/play.c --- /dev/null 1 Jan 1970 00:00:00 - +++ commands/i386/pc/play.c 5 Nov 2005 14:06:00 - @@ -0,0 +1,248 @@ +/* play.c - command to play a tune */ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2003 Free Software Foundation, Inc. + * + * GRUB is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* Lots of this file is borowed from GNU/Hurd generic-speaker driver */ + +#include grub/normal.h +#include grub/dl.h +#include grub/arg.h +#include grub/file.h +#include grub/disk.h +#include grub/term.h +#include grub/misc.h + +/* Read a byte from a port. */ +static inline unsigned char +inb (unsigned short port) +{ + unsigned char value; + + asm volatile (inb%w1, %0 : =a (value) : Nd (port)); + asm volatile (outb %%al, $0x80 : : ); + + return value; +} + +/* Write a byte to a port. */ +static inline void +outb (unsigned short port, unsigned char value) +{ + asm volatile (outb %b0, %w1 : : a (value), Nd (port)); + asm volatile (outb %%al, $0x80 : : ); +} + +/* The speaker port. */ +#define SPEAKER0x61 + +/* If 0, follow state of SPEAKER_DATA bit, otherwise enable output + from timer 2. */ +#define SPEAKER_TMR2 0x01 + +/* If SPEAKER_TMR2 is not set, this provides direct input into the + speaker. Otherwise, this enables or disables the output from the + timer. */ +#define SPEAKER_DATA 0x02 + +/* The PIT channel value ports. You can write to and read from them. + Do not mess with timer 0 or 1. */ +#define PIT_COUNTER_0 0x40 +#define PIT_COUNTER_1 0x41 +#define PIT_COUNTER_2 0x42 + +/* The frequency of the PIT clock. */ +#define PIT_FREQUENCY 0x1234dd + +/* The PIT control port. You can only write to it. Do not mess with + timer 0 or 1. */ +#define PIT_CTRL 0x43 +#define PIT_CTRL_SELECT_MASK 0xc0 +#define PIT_CTRL_SELECT_0 0x00 +#define PIT_CTRL_SELECT_1 0x40 +#define PIT_CTRL_SELECT_2 0x80 + +/* Read and load control. */ +#define PIT_CTRL_READLOAD_MASK 0x30 +#define PIT_CTRL_COUNTER_LATCH 0x00/* Hold timer value until read. */ +#define PIT_CTRL_READLOAD_LSB 0x10/* Read/load the LSB. */ +#define PIT_CTRL_READLOAD_MSB 0x20/* Read/load the MSB. */ +#define PIT_CTRL_READLOAD_WORD 0x30/* Read/load the LSB then the MSB. */ + +/* Mode control. */ +#define PIT_CTRL_MODE_MASK 0x0e + +/* Interrupt on terminal count. Setting the mode sets output to low. + When counter is set and terminated, output is set to high. */ +#define PIT_CTRL_INTR_ON_TERM 0x00 + +/* Programmable one-shot. When loading counter, output is set to + high. When counter terminated, output is set to low. Can be + triggered again from that point on by setting the gate pin to + high. */ +#define PIT_CTRL_PROGR_ONE_SHOT0x02 + +/* Rate generator. Output is low for one period of the counter, and + high for the other. */ +#define PIT_CTRL_RATE_GEN 0x04 + +/* Square wave generator. Output is low for one half of the period, + and high for the other half. */ +#define PIT_CTRL_SQUAREWAVE_GEN0x06 + +/* Software triggered strobe. Setting the mode sets output to high. + When counter is set and terminated, output is set to low. */ +#define PIT_CTRL_SOFTSTROBE0x08 + +/* Hardware triggered strobe. Like software triggered strobe, but + only starts the counter when the gate pin is set to high. */ +#define PIT_CTRL_HARDSTROBE0x0a + +/* Count mode. */ +#define PIT_CTRL_COUNT_MASK0x01 +#define PIT_CTRL_COUNT_BINARY 0x00/* 16-bit binary counter. */ +#define PIT_CTRL_COUNT_BCD 0x01/* 4-decade BCD counter. */ + +#define T_REST ((short) 0) +#define T_FINE ((short) -1) + +struct note { + short pitch; + short duration; +}; + +static void +beep_off (void
Re: play.c
Yoshinori K. Okuji wrote: I point out some stylish mistakes. For once that I have the Changelog entry right :) . You must put the starting brace character on next line: Please don't waste your time giving an example when it's that trivial, or please do it in the diff file directly... The lines are folded incorrectly. I also corrected the lines length where needed. Vincent Pelletier Index: commands/i386/pc/play.c === RCS file: commands/i386/pc/play.c diff -N commands/i386/pc/play.c --- /dev/null 1 Jan 1970 00:00:00 - +++ commands/i386/pc/play.c 5 Nov 2005 14:06:00 - @@ -0,0 +1,251 @@ +/* play.c - command to play a tune */ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2005 Free Software Foundation, Inc. + * + * GRUB is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* Lots of this file is borowed from GNU/Hurd generic-speaker driver */ + +#include grub/normal.h +#include grub/dl.h +#include grub/arg.h +#include grub/file.h +#include grub/disk.h +#include grub/term.h +#include grub/misc.h + +/* Read a byte from a port. */ +static inline unsigned char +inb (unsigned short port) +{ + unsigned char value; + + asm volatile (inb%w1, %0 : =a (value) : Nd (port)); + asm volatile (outb %%al, $0x80 : : ); + + return value; +} + +/* Write a byte to a port. */ +static inline void +outb (unsigned short port, unsigned char value) +{ + asm volatile (outb %b0, %w1 : : a (value), Nd (port)); + asm volatile (outb %%al, $0x80 : : ); +} + +/* The speaker port. */ +#define SPEAKER0x61 + +/* If 0, follow state of SPEAKER_DATA bit, otherwise enable output + from timer 2. */ +#define SPEAKER_TMR2 0x01 + +/* If SPEAKER_TMR2 is not set, this provides direct input into the + speaker. Otherwise, this enables or disables the output from the + timer. */ +#define SPEAKER_DATA 0x02 + +/* The PIT channel value ports. You can write to and read from them. + Do not mess with timer 0 or 1. */ +#define PIT_COUNTER_0 0x40 +#define PIT_COUNTER_1 0x41 +#define PIT_COUNTER_2 0x42 + +/* The frequency of the PIT clock. */ +#define PIT_FREQUENCY 0x1234dd + +/* The PIT control port. You can only write to it. Do not mess with + timer 0 or 1. */ +#define PIT_CTRL 0x43 +#define PIT_CTRL_SELECT_MASK 0xc0 +#define PIT_CTRL_SELECT_0 0x00 +#define PIT_CTRL_SELECT_1 0x40 +#define PIT_CTRL_SELECT_2 0x80 + +/* Read and load control. */ +#define PIT_CTRL_READLOAD_MASK 0x30 +#define PIT_CTRL_COUNTER_LATCH 0x00/* Hold timer value until read. */ +#define PIT_CTRL_READLOAD_LSB 0x10/* Read/load the LSB. */ +#define PIT_CTRL_READLOAD_MSB 0x20/* Read/load the MSB. */ +#define PIT_CTRL_READLOAD_WORD 0x30/* Read/load the LSB then the MSB. */ + +/* Mode control. */ +#define PIT_CTRL_MODE_MASK 0x0e + +/* Interrupt on terminal count. Setting the mode sets output to low. + When counter is set and terminated, output is set to high. */ +#define PIT_CTRL_INTR_ON_TERM 0x00 + +/* Programmable one-shot. When loading counter, output is set to + high. When counter terminated, output is set to low. Can be + triggered again from that point on by setting the gate pin to + high. */ +#define PIT_CTRL_PROGR_ONE_SHOT0x02 + +/* Rate generator. Output is low for one period of the counter, and + high for the other. */ +#define PIT_CTRL_RATE_GEN 0x04 + +/* Square wave generator. Output is low for one half of the period, + and high for the other half. */ +#define PIT_CTRL_SQUAREWAVE_GEN0x06 + +/* Software triggered strobe. Setting the mode sets output to high. + When counter is set and terminated, output is set to low. */ +#define PIT_CTRL_SOFTSTROBE0x08 + +/* Hardware triggered strobe. Like software triggered strobe, but + only starts the counter when the gate pin is set to high. */ +#define PIT_CTRL_HARDSTROBE0x0a + +/* Count mode. */ +#define PIT_CTRL_COUNT_MASK0x01 +#define PIT_CTRL_COUNT_BINARY 0x00/* 16-bit binary counter. */ +#define PIT_CTRL_COUNT_BCD 0x01/* 4-decade BCD counter. */ + +#define T_REST ((short) 0) +#define T_FINE ((short) -1) + +struct note
Re: play.c
On Sat, 5 Nov 2005 23:23:25 +0100 Samuel Thibault [EMAIL PROTECTED] wrote: Hollis Blanchard, le Sat 05 Nov 2005 16:17:33 -0600, a écrit : BTW, thank for your comments, I'll send another version tomorrow. Can you describe how the PIT is related to the speaker? That's the way one can make the speaker beep without having to keep cpu busy with typically-440-Hz outs. One just asks the PIT to do it for us in the background. To beep, a square generator is set to the right frequency, and then a bit allows the pulses to go to the actual buzzer. I'm wondering if this code could mostly work on PPC platforms that have PC-like peripherals. It depends on whether the PIT is linked to the speaker like on PC. I think there is really little chance it works (ie. without writing a sound-card driver). Vincent Pelletier PS: trying sylpheed claws gtk2 ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger T�l�chargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: singleboot
Paul Tarjan wrote: I've been wanting for quite some time a method to be in linux, and reboot into windows for just this one time and keep linux as my default boot. What about : default saved title windows root ... makeactive chainloader +1 title linux root ... kernel ... initrd ... savedefault boot Then you can select windows and it will only boot once in windows (as long as you don't select it again sometime). Another solution would be, if your bios can do that, to define disk boot order as : windows disk linux disk Then if the windows disk is plugged in, it will not even run grub but directly the windows bootloader. If nothing is plugged in place of the windows drive, it will just skip and boot grub on the second. I'm not sure I got your request right : Do you want to physically remove the boot entry so no one can use it later ? Do you want it to be 100% automatic (like used as some remote automation) ? Vincent Pelletier signature.asc Description: OpenPGP digital signature ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [GRUB1] Accessibility: Add beep support
Yoshinori K. Okuji wrote: It is funny that something written only for fun can be very useful. Sadly I think nobody will find my framebuffer Mandelbrot of any use ;) . I think I'll add (f)scanf functions in a library module as you suggested, so tunes can be passed as arguments in a human (or voice-synthesis) readable form. Might be something like : play tempo tone duration [tone duration [...]] and play file I don't know much about the music conventions/standards, I'll dig a bit so I can make something once for all and quickly discoverable. About grub 1 policy, yes I meant my patch would be for grub 2. Vincent Pelletier signature.asc Description: OpenPGP digital signature ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: Sparc bootblock [Was: SFS breaks PPC build ]
Bart Grantham wrote: - have it verify that the file at the configured sector(s) is an ELF file Quite easy if we stick to the header signature. - follow through and make sure it properly boots an ELF image (right now it only gets it into memory) I think there are 2 ways : -write your own Forth ELF relocating code (might be fun, but beside that...) -have the init-program command do this work for you, which require you to load the image where boot net loads it (or maybe other commands, but for now I only know about boot net as it is the only way to currently boot grub2 on sparc64 ;) ). - verify that the code works on PPC, and if not, try to make it work so that there's a unified bootblock [not sure if this is reasonable as I'm not as familiar with how PPC OF boots... how similiar is it to Sparc?] I think this one can't be done without making the FCode grow quite big. - same for sparc32 I would be interested if the port could be unified in 32bits. For now I built it 64bits - don't ask why :) - but if a 32bits build can work both on sparc32 and sparc64, I think it would be great for maintenance. Vincent Pelletier signature.asc Description: OpenPGP digital signature ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH] DL support on usparc cls disabling when debugging
Hi. Finally, I send this dl.c patch. I'll send a separate patch for the .mk .rmk files, because I have a lot of dust in those files. I also joined a patch to disable cls when setting a debug level, and some changes to parse such arguments before any initialisation, so error messages won't get cleaned by a cls in early boot. 2005-10-12 Vincent Pelletier [EMAIL PROTECTED] * kern/sparc64/dl.c (grub_arch_dl_check_header): Use sparcv9 ELF header values. grub_arch_dl_relocate_symbols) : Implement 64 bits relocations. * kern/term.c (grub_cls): Return without clearing screen if debug is set. * kern/sparc64/ieee1275/init.c (grub_machine_init): Read environment variables before anything else. Index: kern/sparc64/dl.c === RCS file: /cvsroot/grub/grub2/kern/sparc64/dl.c,v retrieving revision 1.1 diff -u -p -r1.1 dl.c --- kern/sparc64/dl.c 21 Aug 2005 18:42:55 - 1.1 +++ kern/sparc64/dl.c 12 Oct 2005 17:34:00 - @@ -30,9 +30,9 @@ grub_arch_dl_check_header (void *ehdr) Elf64_Ehdr *e = ehdr; /* Check the magic numbers. */ - if (e-e_ident[EI_CLASS] != ELFCLASS32 + if (e-e_ident[EI_CLASS] != ELFCLASS64 || e-e_ident[EI_DATA] != ELFDATA2MSB - || e-e_machine != EM_PPC) + || e-e_machine != EM_SPARCV9) return grub_error (GRUB_ERR_BAD_OS, invalid arch specific ELF magic); return GRUB_ERR_NONE; @@ -83,53 +83,53 @@ grub_arch_dl_relocate_symbols (grub_dl_t rel max; rel++) { - Elf64_Xword *addr; + Elf64_Word *addr; Elf64_Sym *sym; - grub_uint64_t value; + Elf64_Addr value; if (seg-size rel-r_offset) return grub_error (GRUB_ERR_BAD_MODULE, reloc offset is out of the segment); - addr = (Elf64_Xword *) ((char *) seg-addr + rel-r_offset); + addr = (Elf64_Word *) ((char *) seg-addr + rel-r_offset); sym = (Elf64_Sym *) ((char *) symtab -+ entsize * ELF32_R_SYM (rel-r_info)); - - /* On the PPC the value does not have an explicit - addend, add it. */ ++ entsize * ELF64_R_SYM (rel-r_info)); + value = sym-st_value + rel-r_addend; - switch (ELF32_R_TYPE (rel-r_info)) + switch (ELF64_R_TYPE (rel-r_info)) { - case R_PPC_ADDR16_LO: - *(Elf64_Half *) addr = value; - break; - - case R_PPC_REL24: - { - Elf64_Sxword delta = value - (Elf64_Xword) addr; - - if (delta 6 6 != delta) - return grub_error (GRUB_ERR_BAD_MODULE, Relocation overflow); - *addr = (*addr 0xfc03) | (delta 0x3fc); - break; - } - - case R_PPC_ADDR16_HA: - *(Elf64_Half *) addr = (value + 0x8000) 16; - break; - - case R_PPC_ADDR32: - *addr = value; - break; - - case R_PPC_REL32: - *addr = value - (Elf64_Xword) addr; - break; - + case R_SPARC_32: /* 3 V-word32 */ +if (value 0x) + return grub_error (GRUB_ERR_BAD_MODULE, + Address out of 32 bits range); +*addr = value; +break; + case R_SPARC_WDISP30: /* 7 V-disp30 */ +if (((value - (Elf64_Addr) addr) 0x) +((value - (Elf64_Addr) addr) 0x +!= 0x)) + return grub_error (GRUB_ERR_BAD_MODULE, + Displacement out of 30 bits range); +*addr = (*addr 0xC000) | + (((grub_int32_t) ((value - (Elf64_Addr) addr) 2)) + 0x3FFF); +break; + case R_SPARC_HI22: /* 9 V-imm22 */ +if (((grub_int32_t) value) 0xFF) + return grub_error (GRUB_ERR_BAD_MODULE, + High address out of 22 bits range); +*addr = (*addr 0xFFC0) | ((value 10) 0x3F); +break; + case R_SPARC_LO10: /* 12 T-simm13 */ +*addr = (*addr 0xFC00) | (value 0x3FF
Re: [PATCH] DL support on usparc cls disabling when debugging
Timothy Baldwin wrote: With a bad gnupg signature here. Probably because of the mailing list signature... signature.asc Description: OpenPGP digital signature ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
[BUG] Sparc64 rescue mode
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Here is the output I get with ls on my U10 : grub rescue ls (disk) (disk3) (disk2) Can't read disk label. Can't open disk label package (disk1) (disk0) (ide) (floppy) Can't read disk label. Can't open disk label package (disk) [...] I see 3 bugs : - -It loops forever - -The device list contains devices it shouldn't contain (ide at least) - -It makes OpenBoot throw errors - but I'm not sure which device actualy makes it cry, maybe is net behind those. Does it also happen on ppc ? Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDDXm/FEQoKRQyjtURAk2VAJ9woPYDcirSaIEAq2iIXi3eH8E7AwCdGt24 DbthuwlwWd0cpr1cXe/w9xM= =52PS -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Mouse support
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I added basic mouse support for ieee1275. It's really, really basic : - -Only works with serial mice - -Only works with Microsoft 2 buttons protocol (might work for 3 buttons without wheel) - -One has to set the serial speed from OpenFirmware command line - -I only use what the mouse give me : button pushed or not, x y deltas (nothing like [double] click handling). - -For some reason, the mouse is very choppy, like 3 updates per second, and it sometimes has strange moves - but I guess the second is because it's an old, old retired mouse. And for now it doesn't return (I should add a key press detection or something...). I'm writing a clean patch to add both Mandelbrot mousetest commands - IEEE1275 only for now. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDDYB4FEQoKRQyjtURAqxKAJ9hwo0cIZ9VNgZQjg0uiS6hrAkziwCgiJ7H r5h6IFSQ1F11PhdAhbBfF3Q= =kJDp -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH] Framebuffer ieee1275 support test commands
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Here is my patch to add support for framebuffer on IEEE1275 machines, a fractal drawing test program, and a mouse test program. Framebuffer support includes : -setting the palette colours -drawing a rectangle filled with a colour -drawing a rectangular image (may have some width height limitations, I had some glitches when I used a non-power-of-2 width) -grabbing a rectangular image from screen (not tested) -getting the framebuffer address (the function I provide doesn't work for some strange reason... Should be a cast problem somewhere. Mandelbrot command uses a workaround until I find the problem). Mandelbrot draws directly in the framebuffer memory. It returns, but doesn't restore the colours. It calculates the fractal, so it uses fixed point operations (double). As I said in a previous mail, mouse support is very limited - but it just works :). Mouse support is actualy 100% handled by mousetest.c. It understands Microsoft 2 buttons mouse protocol. Once started, the mousetest command doesn't exits (except if there is an init error). The rectangle on the top left corner of the screen shows the data received (3 bytes, first top, msb on the left). The format is described in mouse(4), coloured for better readability : red : left mouse button green : right moue button yellow : y axis blue : x axis That command uses the (draw,fill)-rectangle functions, so the framebuffer must have them (my Creator3D doesn't). Usage : mousetest [screen_device mouse_device] default : mousetest screen mouse Please tell me if it doesn't build on PPC as modules (Marco : It's not the patch I sent you, I improved it a bit.) and if it doesn't work. Marco told me he was only getting a grey image with Mandelbrot. 2005-08-25 Vincent Pelletier [EMAIL PROTECTED] * commands/ieee1275/mandelbrot.c: New file. * commands/ieee1275/mousetest.c: Likewise. * include/grub/ieee1275/fb.h: Likewise. * include/grub/ieee1275/fbprops.h: Likewise. * video/ieee1275/fb.c: Likewise. * video/ieee1275/fbprops.c: Likewise. * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add mandelbrot.mod, mousetest.mod and fb.mod. (mandelbrot.mod): New module. (mousetest.mod): Likewise. (fb.mod): Likewise. * conf/sparc64-ieee1275.rmk: Likewise. (grubof_HEADERS, grubof_SOURCES): Add needed files to statically link the commands. (grubof_CFLAGS): Add -DGRUB_EMBED to make commands build as embedded and rescue commands. * kern/sparc64/ieee1275/init.c: Handle the commands initialisation and finish when embedded. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDDZsxFEQoKRQyjtURAgtTAJ9qclafmsNNvgVkC1r8jvhP7kDZYQCX koq32EYbF4X0teVkqhCQmg0= =TF0X -END PGP SIGNATURE- mandel_mouse.diff Description: audio/mp3 ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Graphic calls portability
00 00 00 4b height 00 00 04 b0 width00 00 06 40 edid_data00 ff ff ff ff ff ff 00 26 cd 18 19 ef d0 fb 02 no_edid_blks 00 00 00 01 device_type display name SUNW,ffb Now the point of my mail : Couldn't we make a common interface for all graphic calls, so the graphic commands would be in /commands ? The needed commands would be the ones already defined in video/i386/pc/vbe.c with those changes : - -Add a function to list the available framebuffers - -Allow to specify the framebuffer to open - -Add a framebuffer handles (like file handles) for later use in framebuffer functions Exact prototypes to be defined, but if someone works on them, please consider 64 bits archs :) . Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDDChrFEQoKRQyjtURAiYmAJ46x+0T+8UNjC3slKm9dewKLVR70QCfaFpq lSi9S3+h8zlc7UpwI3eUa/0= =Nhdh -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: Graphic calls portability
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marco Gerards wrote: -Add a framebuffer handles (like file handles) for later use in framebuffer functions Can you explain this? You mean we need an object for this? Just something like the return value of the open() C function, so the driver. What makes 64 bits archs special? Framebuffer address will be 64bits, handles might not be 32 bits... All the usual portability stuff. Don't use int instead of grub_size_t for example. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDDFMsFEQoKRQyjtURArrfAKCek8sivIdhrwxVcR4tux9urE5t9QCdE4pX XgTkdM4fJ8QUfocFdSttc+k= =lvtN -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: backtrace support
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Vincent Guffens wrote: This is a problem because I would say that it breaks compilation for other architectures. I think that the other architectures should have a function grub_backtrace() that does nothing, or even better that really does print a backtrace(). However, I don't know how to do it and I can't test it anyway. For sparc64-ieee1275, there is a ctrace command in open firmware which does that work. grub_backtrace() could do a grub_ieee1275_interpret(ctrace,NULL); then grub_ieee1275_exit(); To make ctrace work the ELF has to be unstripped - for now I hardcoded it in conf/sparc64-ieee1275.rmk. To my experience, -O1 produces an easier to understand ASM than -O0 (sparc64-ieee1275 allows to run in step-by-step or breakpoint mode) because -O0 does really dumb things that is very verbose in ASM line number. But I don't know in details what -O1 does, and if it has drawbacks in optimisation (I think about local functions). I hope this backtrace will be usefull, but not too much ! I have already found a use for it : I can't make vbetest work, it fails with out of range pointer. I hope it will be committed soon. Oh, by the way, I'm trying to implement the OpenFirmware framebuffer primitives - for now with no luck - so we can have it on ieee1275 ports. There are lots of FCODE examples on Google, but all for PPC. My current problem is how to allocate memory for the framebuffer itself, and how to pass the address to frame_buffer_adr (the usual FCODE way to store a value), if possible without using grub_ieee1275_interpret. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDCtRfFEQoKRQyjtURArwAAJ0QJ9cOK7WTW40UKVdf5O12vU9x5ACfcmXC wmVVj2BJem/7hlyZ4boBMp8= =lCgj -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
sparc64 port
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I fixed the sparc64 port. Current status is : rescue mode works, it can only be netbooted, no module support, no utils (grub-emu, grub-install,...) I separate the Changelog in 2 parts, one for the changes I made that could interfere with the other ports (sparc_common.diff), and another for the added files (sparc64_files.tar.bz2). It should add only needed files directories. I added /* FIXME (sparc64). */ in each file that contains hard-coded values that might not be appropriate for sparc64 port. They come from powerpc port but I don't know what to set instead. Could be in files I don't use yet (like setjmp.h). 2005-08-20 Vincent Pelletier [EMAIL PROTECTED] * configure.ac: Add support for sparc64 host with ieee1275 firmware. * configure: Generated from configure.ac. * disk/ieee1275/ofdisk.c (grub_ofdisk_open): use grub_ssize_t instead of int. (grub_ofdisk_read): Likewise. (grub_ofdisk_open): Use %p to print pointer values, and cast the pointers as (void *) to remove a warning. (grub_ofdisk_close): Likewise. (grub_ofdisk_read): Likewise. * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never returns, so make it return void to remove a warning. * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit): Corresponding prototype change. * kern/mm.c (grub_mm_init_region): Use %p to print pointer values, and cast the pointers as (void *) to remove a warning. (grub_mm_dump): Likewise. 2005-08-20 Vincent Pelletier [EMAIL PROTECTED] * boot/sparc64: New directory. * boot/sparc64/ieee1275: New directory. * boot/sparc64/ieee1275/cmain.c: New file. * conf/sparc64-ieee1275.mk: New file. * conf/sparc64-ieee1275.rmk: New file. * include/grub/sparc64: New directory. * include/grub/sparc64/setjmp.h: New file. * include/grub/sparc64/types.h: New file. * include/grub/sparc64/ieee1275: New directory. * include/grub/sparc64/ieee1275/console.h: New file. * include/grub/sparc64/ieee1275/ieee1275.h: New file. * include/grub/sparc64/ieee1275/kernel.h: New file. * include/grub/sparc64/ieee1275/time.h: New file. * kern/sparc64: New directory. * kern/sparc64/cache.c: New file. * kern/sparc64/dl.c: New file. * kern/sparc64/ieee1275: New directory. * kern/sparc64/ieee1275/init.c: New file. * kern/sparc64/ieee1275/openfw.c: New file. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDBxa3FEQoKRQyjtURArmEAJ45AqBteOR4vSto4ssu/jl5NwosXQCgsio/ m9dBbZzRGeKT5mqEcr7/Zr4= =mU/+ -END PGP SIGNATURE- sparc64_common.diff Description: audio/mp3 sparc64_files.tar.bz2 Description: application/bzip ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: sparc64 port
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yoshinori K. Okuji wrote: On Saturday 20 August 2005 13:40, Vincent Pelletier wrote: * boot/sparc64/ieee1275/cmain.c: New file. This is wrong. Corrected. * kern/sparc64/cache.c: New file. The contents of this file is strange. Why don't you simply include grub/cache.h? Done. 2005-08-20 Vincent Pelletier [EMAIL PROTECTED] * configure.ac: Add support for sparc64 host with ieee1275 firmware. * configure: Generated from configure.ac. * disk/ieee1275/ofdisk.c (grub_ofdisk_open): use grub_ssize_t instead of int. (grub_ofdisk_read): Likewise. (grub_ofdisk_open): Use %p to print pointer values, and cast the pointers as (void *) to remove a warning. (grub_ofdisk_close): Likewise. (grub_ofdisk_read): Likewise. * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never returns, so make it return void to remove a warning. * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit): Corresponding prototype change. * kern/mm.c (grub_mm_init_region): Use %p to print pointer values, and cast the pointers as (void *) to remove a warning. (grub_mm_dump): Likewise. 2005-08-20 Vincent Pelletier [EMAIL PROTECTED] * conf/sparc64-ieee1275.mk: New file. * conf/sparc64-ieee1275.rmk: Likewise. * include/grub/sparc64/setjmp.h: Likewise. * include/grub/sparc64/types.h: Likewise. * include/grub/sparc64/ieee1275/console.h: Likewise. * include/grub/sparc64/ieee1275/ieee1275.h: Likewise. * include/grub/sparc64/ieee1275/kernel.h: Likewise. * include/grub/sparc64/ieee1275/time.h: Likewise. * kern/sparc64/cache.c: Likewise. * kern/sparc64/dl.c: Likewise. * kern/sparc64/ieee1275/init.c: Likewise. * kern/sparc64/ieee1275/openfw.c: Likewise. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDBzdMFEQoKRQyjtURApAOAKCrh0SBed8sT+RdIxjSg4md23rkrACbBOTj xya2F+fAkszTpaD9eieLgrk= =6Cqh -END PGP SIGNATURE- sparc64_common.diff Description: audio/mp3 sparc64_files.tar.bz2 Description: application/bzip ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: sparc64 port
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marco Gerards wrote: Please start sentences with an uppercase letter, same for the other entries. Oops. Some files are not GPL'ed (cache.c, for example). The copyright years are not always correct, like that of ieee1275.h (you wrote it, so it should be (C) 2005 only). (bis repetita). Can't openfw.c be shared? I think it can be... I think too. The worse it that both powerpc and sparc versions are conflicting : both have been modified since I originally extracted the powerpc version. Going to resolve the problems, and I'll patch a common version to be checked in before my port. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDB0dHFEQoKRQyjtURAnYFAJ0e23MrnkEiDua5dsDuzcrF4DNKkQCfeMu1 vrwwuyXQ/rB1tOtJSNF2J+A= =AZqu -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: vesafb terminal for testing.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yoshinori K. Okuji wrote: A pluggable menu might sound good, but it's not so easy to maintain multiple menu interfaces. I think we should only maintain some kind of API interface with an example module, and let the community develop on it if it finds it interesting. like CSS in HTML. I like the CSS idea. From-menu edition of the CSS sound to me as a requirement, to avoid rebooting each time a change is made. It could be at first with read-only from device, and maybe a hard-copy print function. The HTML would be grub.cfg, but the CSS ? Another file ? In the same ? We might need to improve the grub.cfg format to handle something like css classes. Even if we don't implement class support in our graphic menu, I bet users will be happy to find it supported when writing their module. On the other hand, the worse is better rule would say that if the grub.cfg format is too bad, the users will write another that would best fit their needs. It might be good to separate menu definition from environment initialisation, in case the first gets redesigned they wouldn't have to care about the second. USB mouse support [...] Vesa On the IEEE1275 point of view, I saw framebuffer graphic primitives in the standard, so it *should* be easy too. And on my sun, there is a mouse device in the OB tree. Marco Gerards wrote: Right, but it would be the best if we think now and design the interfaces. Maybe should we design a test-case. I'm thinking of 2~3 buttons bouncing around the screen, with selection click events handled (including tab, return, space). That would test : - -drawing - -timer events (I think it's worth the implementation) and their regularity among different systems - -user interaction Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDAYwDFEQoKRQyjtURAi83AJ99xcSmesFJL9zdC5jwiH+Pc8SiEACfeDyd 96z51HGlPugXg65G1aPhMoI= =6hcN -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: vesafb terminal for testing.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marco Gerards wrote: Perhaps we can get help and suggestions from designers instead of programmers. Perhaps we can contact Ubuntu, they have designers. Perhaps a KDE or gnome team? Gnoppix has a really nice - Grub legacy - graphic menu, so I think it is a good idea to contact Ubuntu. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDAY2zFEQoKRQyjtURAks9AKCShtAFEucHj+7pmRgGfWovid18DgCgojWL okb6IjD7sSMqdf2vMI5s2Rc= =13m2 -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: GRUB 1.90 is released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Vernon Mauery wrote: I am seeing unaligned pointer messages when I use grub2 on /dev/hda2. If I type 'root (hd0,2)', I get 'unaligned pointer 0x7ff94' and if I type 'insmod (hd0,2)/boot/grub/mulitboot.mod', I get 'unaligned pointer 0x7ff64'. Sounds like a file system handling bug. What FS are you using on (hd0,2) ? By the way, (hd0,2) is hda3 not hda2. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC+jd+FEQoKRQyjtURAi/QAKCBJa8GBCR1YQTI8/6Plt3a1x8KUgCgiere NOzSOH1SkQo93APSRigdMNw= =kcAQ -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: savannah
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yoshinori K. Okuji wrote: And they are still talking about LILO vs. GRUB? Completely off-topic. Who on the earth understands your post? *sigh* They are asking for a popularity poll between LILO and GRUB. And they also report some problems they had with grub legacy : - -software raid (not straightforward with grub) - -the usual problems with stage 1[.5] not finding stage 2 (fixed by the grub 2 rescue command line) - -lilo -R-like functionality (what's that ? an automatic fallback when kernel can't be read ?) to make remote kernel changes safer. What comes up is also that most users just keep the default bootloader from their distro. And grub seems to be the default bootloader in a growing number of distributions. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC+D3IFEQoKRQyjtURAj4UAJ4kUyc40DUiAxVc0ge9CO+cMp9eBQCbBQR2 XfC+tG2FX2uqsVZZDaFt/ds= =txlx -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH] sparc64 (common specific files)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Vincent Pelletier wrote: One more sparc64 specific file. Now that the configure file has been updated on the server, the changes are more visible. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC1MQcFEQoKRQyjtURAsckAJsFzSJbF8rj+mK/aca0e39hoKfN3QCcDiPI CyBhCKHD6f82gSIuWBDVf50= =h1m7 -END PGP SIGNATURE- Index: configure === RCS file: /cvsroot/grub/grub2/configure,v retrieving revision 1.15 diff -u -p -r1.15 configure --- configure 12 Jul 2005 22:36:43 - 1.15 +++ configure 13 Jul 2005 07:29:21 - @@ -1397,6 +1397,7 @@ host_os=`echo $ac_cv_host | sed 's/^\([^ case $host_cpu in i[3456]86) host_cpu=i386 ;; powerpc) ;; + sparc64) ;; *) { { echo $as_me:$LINENO: error: unsupported CPU type 5 echo $as_me: error: unsupported CPU type 2;} { (exit 1); exit 1; }; } ;; @@ -1405,6 +1406,7 @@ esac case $host_cpu-$host_vendor in i386-*) host_vendor=pc ;; powerpc-*) host_vendor=ieee1275 ;; + sparc64-*) host_vendor=ieee1275 ;; *) { { echo $as_me:$LINENO: error: unsupported machine type 5 echo $as_me: error: unsupported machine type 2;} { (exit 1); exit 1; }; } ;; ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
[PATCHv2] FIXME: These should be dynamically obtained from a terminal.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Vincent Pelletier wrote: Warning : terms other than console.c vga.c will be broken by this patch, as long as they don't have the function. It's fixed in this patch for sparc64 port (see sparc_getwh.diff, which is a diff between term/powerpc and term/sparc64). I think the same code can be used for ppc. It also contains the grub_getwh function I forgot in the previous patch. 2005-07-13 Vincent Pelletier [EMAIL PROTECTED] * include/grub/term.h: (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT): Redefined to use grub_getwh. (struct grub_term): New field named getwh. (grub_getwh): New exported prototype. * kern/term.c : (grub_getwh): New function. * term/i386/pc/console.c: (grub_console_getwh): New function. (grub_console_term): New field and new initial value. * term/i386/pc/vga.c: (grub_vga_getwh): New function. (grub_vga_term): New field and new initial value. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC1NNnFEQoKRQyjtURAtibAJoDv9ya6nHL1JHkyIxLfWOeC8paaQCfcO9K fRM2BWoPzNOCr2NMZ+P3z9I= =g1su -END PGP SIGNATURE- diff -rupN powerpc/ieee1275/ofconsole.c sparc64/ieee1275/ofconsole.c --- powerpc/ieee1275/ofconsole.c2005-06-21 04:33:52.0 +0200 +++ sparc64/ieee1275/ofconsole.c2005-07-13 10:18:46.0 +0200 @@ -120,7 +120,7 @@ static int grub_ofconsole_readkey (int *key) { char c; - int actual = 0; + grub_ssize_t actual = 0; grub_ieee1275_read (stdin_ihandle, c, 1, actual); @@ -207,6 +207,49 @@ grub_ofconsole_getxy (void) return ((grub_curr_x - 1) 8) | grub_curr_y; } +static grub_uint16_t +grub_ofconsole_getwh (void) +{ + grub_ieee1275_ihandle_t config; + char *val; + grub_ssize_t lval; + static grub_uint8_t w, h; + + if (w h) /* Once we have them, don't ask them again. */ +{ + if (! grub_ieee1275_open (/config, config) + config != -1) +{ + if (! grub_ieee1275_get_property_length (config, screen-#columns, + lval) lval != -1) +{ + val = grub_malloc (lval); + if (! grub_ieee1275_get_property (config, screen-#columns, +val, lval, 0)) +w = (grub_uint8_t) grub_strtoul (val, val + lval, 10); + grub_free (val); +} + if (! grub_ieee1275_get_property_length (config, screen-#rows, + lval) lval != -1) +{ + val = grub_malloc (lval); + if (! grub_ieee1275_get_property (config, screen-#rows, +val, lval, 0)) +h = (grub_uint8_t) grub_strtoul (val, val + lval, 10); + grub_free (val); +} +} +} + + /* XXX: Default values from OpenBoot on my U10. */ + if (! w) +w = 80; + if (! h) +h = 34; + + return (w 8) | h; +} + static void grub_ofconsole_gotoxy (grub_uint8_t x, grub_uint8_t y) { @@ -222,6 +265,8 @@ static void grub_ofconsole_cls (void) { /* Clear the screen. */ + if (grub_env_get (nocls)) +return; grub_ofconsole_writeesc (\e[2J); grub_gotoxy (0, 0); } @@ -241,8 +286,8 @@ grub_ofconsole_refresh (void) static grub_err_t grub_ofconsole_init (void) { - char data[4]; - grub_size_t actual; + unsigned char data[4]; + grub_ssize_t actual; int col; if (grub_ieee1275_get_property (grub_ieee1275_chosen, stdout, data, @@ -287,6 +332,7 @@ static struct grub_term grub_ofconsole_t .checkkey = grub_ofconsole_checkkey, .getkey = grub_ofconsole_getkey, .getxy = grub_ofconsole_getxy, +.getwh = grub_ofconsole_getwh, .gotoxy = grub_ofconsole_gotoxy, .cls = grub_ofconsole_cls, .setcolorstate = grub_ofconsole_setcolorstate, Index: include/grub/term.h === RCS file: /cvsroot/grub/grub2/include/grub/term.h,v retrieving revision 1.7 diff -u -p -r1.7 term.h --- include/grub/term.h 19 Feb 2005 20:56:07 - 1.7 +++ include/grub/term.h 12 Jul 2005 19:55:33 - @@ -71,9 +71,9 @@ grub_term_color_state; /* Menu-related geometrical constants. */ -/* FIXME: These should be dynamically obtained from a terminal. */ -#define GRUB_TERM_WIDTH80 -#define GRUB_TERM_HEIGHT 25 +/* FIXME: Ugly way to get them form terminal. */ +#define GRUB_TERM_WIDTH ((grub_getwh()0xFF00)8) +#define GRUB_TERM_HEIGHT(grub_getwh()0xFF) /* The number of lines of GRUB version... at the top. */ #define GRUB_TERM_INFO_HEIGHT 1 @@ -142,6 +142,9 @@ struct grub_term /* Get a character. */ int (*getkey) (void); + /* Get the screen size. The return value is ((Width 8) | Height). */ + grub_uint16_t (*getwh) (void); + /* Get the cursor position. The return
Re: [PATCH] sparc64 (common specific files)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Something I forgot in previous patch : prototype change for grub_get_rtc in utils/misc.c . Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC1NcTFEQoKRQyjtURAlWWAKC0HdHIZCfNqjbl2j685m2hI8o5XwCgnI1Y /qedbKjsWGY6qLlvLi+N2lg= =35nJ -END PGP SIGNATURE- Index: util/misc.c === RCS file: /cvsroot/grub/grub2/util/misc.c,v retrieving revision 1.13 diff -u -p -r1.13 misc.c --- util/misc.c 27 Feb 2005 21:19:06 - 1.13 +++ util/misc.c 13 Jul 2005 08:27:22 - @@ -254,7 +254,7 @@ grub_stop (void) exit (1); } -grub_uint32_t +grub_uintn_t grub_get_rtc (void) { struct timeval tv; ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: sparc64 port : diffs to powerpc branches
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marco Gerards wrote: In that case the usparc port needs a GRUB_IEEE1275_FLAG_... to indicate it is not possible to change colors or that it works differently. Good idea. Perhaps... Can you put the bug report on the wiki so we will not forget about it? Done. Btw, I hope my wiki clean up (pages full of links) is ok. I wondered if it was worth the noise it made in the change log... You did not load ext2 as a module, but linked it into the binary. I assume you did not use grub-mkimage yet... Oh, I thought you meant it was used to add them statically in grubof. Ok, cool. I am looking forwards to that patch. I think patches should be applied in this order : - - Apply file moving patch for ieee1275 common files. - - Apply the general patchs I sent (so we have a clean status to add the sparc64 port, like grub_get_rtc prototype change, the already-applied mm.c patch to correct behaviour on 64 bits archs, ...) - - Finally apply the sparc64 specific adds (should be only file additions at this step, excepts for changes in configure[.ac] and ChangeLog :) ). Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC1XxRFEQoKRQyjtURAgciAKCYAeqt7PGpx85WOj0iciC4P49FLwCffFMe wwtEclilaG6A8+SUUO4KIGQ= =NR2U -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH] sparc64 (common specific files)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marco Gerards wrote: This change is not required. We can better leave it as it was. So you'll have not to apply a part of the first patch in this thread, because this one fixes an error in grub emu because I changed a prototype in the first patch. I insist though that the time should be kept with the most precision/value range we could give it. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC1YFZFEQoKRQyjtURAu7iAKC04QsYgkYqDvckx0d/NX0BLoG/xwCggjNp 7M82LzstyIaa2kUm0TxpLIQ= =uDB5 -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [FILE] Tune generation tool
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marco Gerards wrote: Perhaps `contrib/util/i386/' or so? Good idea. I am not sure if it has to enter CVS, but I have no objections against it. Can you add the copyright header and copyright years before it is committed? Sure. Do I send a patch or the bare files ? I'll also check the formatting guidelines are followed in my code ;) . Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC1YMpFEQoKRQyjtURAk52AJ9lju/FXYU3J0SCnBVvgyJ8SwiiowCeOtcw XYTZYl0cEEmItC2DDvs2oek= =64vf -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [FILE] Play command
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marco Gerards wrote: Cool! Won't it be nice to use a user readable fileformat? It is not a requirement from my side, just a suggestion. :) It might require some [f|s]scanf function, and I don't think it is welcome in the core just because it is used in such peripheral function. I thought first about using such format, because it's way easier to edit... But I finally resigned. Maybe a fscanf function could be added in this module, then moved in the core if it turns out to be useful. This should be 2002, 2004, 2005 if I am not mistaken. The years 2002, 2004 for the Hurd code and 2005 for your changes. I do not know where 2003 comes from. Grub cat command I think :) . I sadly don't pay much attention to the sources header :$ . Is it possible to share this code? We need it for VGA and now for play, we will need it more often for other code which we will write in the future. Maybe could they be added to kern/i386/pc/startup.S . Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC1YK+FEQoKRQyjtURAqE7AJ4oZWUXEHGGUn4S/vRTC8TCG5CkYQCePphj TR+SdKebKNI7KusrtHCJo6I= =qRrY -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH] sparc64 (common specific files)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marco Gerards wrote: For which reason? But if it should be more precise, it should be a grub_uint64_t. If the architecture give us a 32 bit number, we won't invent the remaining 32 bits... On the other hand, if the architecture give us 64 significant bits, why loosing 32 of them through a cast ? Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC1ZJnFEQoKRQyjtURAs6jAJ9u1dHXeKxPUNgb+jNThMhBWTTopwCeK2u/ PFzGcGVncu6IxqUcBp/kmxk= =PyOQ -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [FILE] Tune generation tool
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marco Gerards wrote: Both are fine for me. Here it is. Merged everything in the c file to be cleaner. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC1Zo2FEQoKRQyjtURAiZ1AJwKWv+yVysANtUG3+Z1cBwnzYCWUwCgsDHa 3m8e/Vi+mvD34UtTcKCukPo= =s0Qh -END PGP SIGNATURE- /* gentunes.c -- Generates tune files for Grub 2 play command. */ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 2005 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include stdio.h /* The 12th root of 2. Sort of. */ #define T_TEMP_SCALE 1.0594630943592952645 #define T_DOWN_ONE_HALF(x) ((short) (x / T_TEMP_SCALE)) #define T_UP_ONE_HALF(x) ((short) (x * T_TEMP_SCALE)) #define T_DOWN_ONE_OCTAVE(x) ((short) (x / 2)) #define T_UP_ONE_OCTAVE(x) ((short) (x * 2)) #define T_REST ((short) 0) #define T_FINE ((short) (-1)) /* Notes ranging from C to B in octaves 2 to 6. German (?) notation and GNU/Hurd notation supported. */ /* A little reminder for those who, like me, only know the do, re, mi... (Italian ?) names : B si A la G sol F fa E mi D re C do */ #define T_b_3 T_UP_ONE_OCTAVE (T_b_2) #define T_b_F_3 T_UP_ONE_OCTAVE (T_b_F_2) #define T_a_S_3 T_b_F_3 #define T_a_3 T_UP_ONE_OCTAVE (T_a_2) #define T_a_F_3 T_UP_ONE_OCTAVE (T_a_F_2) #define T_g_S_3 T_a_F_3 #define T_g_3 T_UP_ONE_OCTAVE (T_g_2) #define T_g_F_3 T_f_S_3 #define T_f_S_3 T_UP_ONE_OCTAVE (T_f_S_2) #define T_f_3 T_UP_ONE_OCTAVE (T_f_2) #define T_e_3 T_UP_ONE_OCTAVE (T_e_2) #define T_e_F_3 T_UP_ONE_OCTAVE (T_e_F_2) #define T_d_S_3 T_e_F_3 #define T_d_3 T_UP_ONE_OCTAVE (T_d_2) #define T_d_F_3 T_c_S_3 #define T_c_S_3 T_UP_ONE_OCTAVE (T_c_S_2) #define T_c_3 T_UP_ONE_OCTAVE (T_c_2) #define B6 T_b_3 #define BF6 T_b_F_3 #define AS6 T_a_S_3 #define A6 T_a_3 #define AF6 T_a_F_3 #define GS6 T_g_S_3 #define G6 T_g_3 #define GF6 T_g_F_3 #define FS6 T_f_S_3 #define F6 T_f_3 #define E6 T_e_3 #define EF6 T_e_F_3 #define DS6 T_d_S_3 #define D6 T_d_3 #define DF6 T_d_F_3 #define CS6 T_c_S_3 #define C6 T_c_3 #define T_b_2 T_UP_ONE_OCTAVE (T_b_1) #define T_b_F_2 T_UP_ONE_OCTAVE (T_b_F_1) #define T_a_S_2 T_b_F_2 #define T_a_2 T_UP_ONE_OCTAVE (T_a_1) #define T_a_F_2 T_UP_ONE_OCTAVE (T_a_F_1) #define T_g_S_2 T_a_F_2 #define T_g_2 T_UP_ONE_OCTAVE (T_g_1) #define T_g_F_2 T_f_S_2 #define T_f_S_2 T_UP_ONE_OCTAVE (T_f_S_1) #define T_f_2 T_UP_ONE_OCTAVE (T_f_1) #define T_e_2 T_UP_ONE_OCTAVE (T_e_1) #define T_e_F_2 T_UP_ONE_OCTAVE (T_e_F_1) #define T_d_S_2 T_e_F_2 #define T_d_2 T_UP_ONE_OCTAVE (T_d_1) #define T_d_F_2 T_c_S_2 #define T_c_S_2 T_UP_ONE_OCTAVE (T_c_S_1) #define T_c_2 T_UP_ONE_OCTAVE (T_c_1) #define B5 T_b_2 #define BF5 T_b_F_2 #define AS5 T_a_S_2 #define A5 T_a_2 #define AF5 T_a_F_2 #define GS5 T_g_S_2 #define G5 T_g_2 #define GF5 T_g_F_2 #define FS5 T_f_S_2 #define F5 T_f_2 #define E5 T_e_2 #define EF5 T_e_F_2 #define DS5 T_d_S_2 #define D5 T_d_2 #define DF5 T_d_F_2 #define CS5 T_c_S_2 #define C5 T_c_2 #define T_b_1 T_UP_ONE_HALF (T_b_F_1) #define T_b_F_1 T_UP_ONE_HALF (T_a_1) #define T_a_S_1 T_b_F_1 #define T_a_1 ((short) (440)) #define T_a_F_1 T_DOWN_ONE_HALF (T_a_1) #define T_g_S_1 T_a_F_1 #define T_g_1 T_DOWN_ONE_HALF (T_a_F_1) #define T_g_F_1 T_f_S_1 #define T_f_S_1 T_DOWN_ONE_HALF (T_g_1) #define T_f_1 T_DOWN_ONE_HALF (T_f_S_1) #define T_e_1 T_DOWN_ONE_HALF (T_f_1) #define T_e_F_1 T_DOWN_ONE_HALF (T_e_1) #define T_d_S_1 T_e_F_1 #define T_d_1 T_DOWN_ONE_HALF (T_e_F_1) #define T_d_F_1 T_c_S_1 #define T_c_S_1 T_DOWN_ONE_HALF (T_d_1) #define T_c_1 T_DOWN_ONE_HALF (T_c_S_1) #define B4 T_b_1 #define BF4 T_b_F_1 #define AS4 T_a_S_1 #define A4 T_a_1 #define AF4 T_a_F_1 #define GS4 T_g_S_1 #define G4 T_g_1 #define GF4 T_g_F_1 #define FS4 T_f_S_1 #define F4 T_f_1 #define E4 T_e_1 #define EF4 T_e_F_1 #define DS4 T_d_S_1 #define D4 T_d_1 #define DF4 T_d_F_1 #define CS4 T_c_S_1 #define C4 T_c_1 #define T_b T_DOWN_ONE_OCTAVE (T_b_1) #define T_b_F T_DOWN_ONE_OCTAVE (T_b_F_1) #define T_a_S T_b_F #define T_a T_DOWN_ONE_OCTAVE (T_a_1) #define T_a_F
Re: [PATCH] Huge changes in mm.c
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marco Gerards wrote: So with this change all problems are fixed? In that case this patch needs to be committed. No I can read files from an ext2 partition on sparc64. What's the next step ? :) Loading modules ? I don't know exactly how to make a disk bootable, but I think I'll keep net boot for now. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC08h3FEQoKRQyjtURAk/nAJ9zuuGSoXlhimNQ7X9o9CZYX766BACdEaga ZTBLcL9L4XWm24t6gbldSII= =QCgU -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
[FILE] Play command
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Here is the play command source code and some tunes. I don't submit a patch since I'm not sure where it will (and where the tunes will) go. With Marco we thought about contrib/i386/pc/play.c Ancestors of this code are: GNU/Hurd Grub 2 cat command Grub 2 vga for inb outb Contributors for the tunes: FSF_Song I_Feel_Pretty Indiana_Jones_Theme Summertime : GNU/Hurd Beverly Hills Cop. Star Trek: The next Generation : Marco Gerards Tetris_Theme : me Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC1BuHFEQoKRQyjtURAtfnAJ0Z6EyHKmArEvcGMa7ioMu66zbFZgCglHXy actaxo6QqQaFx/UfMrvtC+Q= =C1S1 -END PGP SIGNATURE- /* play.c - command to play a tune */ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 2003 Free Software Foundation, Inc. * * GRUB is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GRUB; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Lots of this file is borowed from GNU/Hurd generic-speaker driver */ #include grub/normal.h #include grub/dl.h #include grub/arg.h #include grub/file.h #include grub/disk.h #include grub/term.h #include grub/misc.h /* Read a byte from a port. */ static inline unsigned char inb (unsigned short port) { unsigned char value; asm volatile (inb%w1, %0 : =a (value) : Nd (port)); asm volatile (outb %%al, $0x80 : : ); return value; } /* Write a byte to a port. */ static inline void outb (unsigned short port, unsigned char value) { asm volatile (outb %b0, %w1 : : a (value), Nd (port)); asm volatile (outb %%al, $0x80 : : ); } /* The speaker port. */ #define SPEAKER 0x61 /* If 0, follow state of SPEAKER_DATA bit, otherwise enable output from timer 2. */ #define SPEAKER_TMR2 0x01 /* If SPEAKER_TMR2 is not set, this provides direct input into the speaker. Otherwise, this enables or disables the output from the timer. */ #define SPEAKER_DATA 0x02 /* The PIT channel value ports. You can write to and read from them. Do not mess with timer 0 or 1. */ #define PIT_COUNTER_0 0x40 #define PIT_COUNTER_1 0x41 #define PIT_COUNTER_2 0x42 /* The frequency of the PIT clock. */ #define PIT_FREQUENCY 0x1234dd /* The PIT control port. You can only write to it. Do not mess with timer 0 or 1. */ #define PIT_CTRL 0x43 #define PIT_CTRL_SELECT_MASK 0xc0 #define PIT_CTRL_SELECT_0 0x00 #define PIT_CTRL_SELECT_1 0x40 #define PIT_CTRL_SELECT_2 0x80 /* Read and load control. */ #define PIT_CTRL_READLOAD_MASK 0x30 #define PIT_CTRL_COUNTER_LATCH 0x00 /* Hold timer value until read. */ #define PIT_CTRL_READLOAD_LSB 0x10 /* Read/load the LSB. */ #define PIT_CTRL_READLOAD_MSB 0x20 /* Read/load the MSB. */ #define PIT_CTRL_READLOAD_WORD 0x30 /* Read/load the LSB then the MSB. */ /* Mode control. */ #define PIT_CTRL_MODE_MASK 0x0e /* Interrupt on terminal count. Setting the mode sets output to low. When counter is set and terminated, output is set to high. */ #define PIT_CTRL_INTR_ON_TERM 0x00 /* Programmable one-shot. When loading counter, output is set to high. When counter terminated, output is set to low. Can be triggered again from that point on by setting the gate pin to high. */ #define PIT_CTRL_PROGR_ONE_SHOT 0x02 /* Rate generator. Output is low for one period of the counter, and high for the other. */ #define PIT_CTRL_RATE_GEN 0x04 /* Square wave generator. Output is low for one half of the period, and high for the other half. */ #define PIT_CTRL_SQUAREWAVE_GEN 0x06 /* Software triggered strobe. Setting the mode sets output to high. When counter is set and terminated, output is set to low. */ #define PIT_CTRL_SOFTSTROBE 0x08 /* Hardware triggered strobe. Like software triggered strobe, but only starts the counter when the gate pin is set to high. */ #define PIT_CTRL_HARDSTROBE 0x0a /* Count mode. */ #define PIT_CTRL_COUNT_MASK 0x01 #define PIT_CTRL_COUNT_BINARY 0x00 /* 16-bit binary counter. */ #define PIT_CTRL_COUNT_BCD 0x01 /* 4-decade BCD counter. */ #define T_REST ((short) 0) #define T_FINE ((short) -1) struct note { short pitch; short duration; }; static void beep_off (void) { unsigned char status; status = inb (SPEAKER) ~(SPEAKER_TMR2 | SPEAKER_DATA); outb (SPEAKER, status); } static void beep_on (short pitch) { unsigned char status; unsigned int counter; if (pitch 20
Re: rmll - grub2 presentation
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yoshinori K. Okuji wrote: Good news. Is Jeff active now? I haven't seen him hacking these days... He was moving the last days, so he hasn't much time. And a good news marco already knows : I finally made the OpenBoot calls work \o/ ! The problem was in the struct used to send args receive return values. It must contain fields of the same size, which is 32 bits on ppc and 64 on usparc. So now it works with long long as field type. So, I'm glad to announce the very first time some grub 2 related work booted on an usparc : ok load net Boot device: /[EMAIL PROTECTED],0/[EMAIL PROTECTED],1/[EMAIL PROTECTED],1 File and args: 5800 ok init-program testType 'go' to resume ok go Program terminated I call the following functions: _start : grub_ofconsole_init() : grub_ieee1275_finddevice (/chosen, chosen) grub_ieee1275_get_property (chosen, stdout, data, sizeof data, actual) grub_ieee1275_get_property (chosen, stdin, data, sizeof data, actual) ieee1275_write(stdout_ihandle,test,4,wrote); ieee1275_enter(); //hence the Type 'go' to resume ieee1275_exit(); //hence the Program terminated So I think I can say OB calls work, have they argument(s) and or return value(s) or not ! Time to go (for the last day) to the LSM now :). Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCz2p+FEQoKRQyjtURArPuAKCwOLP8ZSyHNK7nxnwS5bvKuYUlZQCfaFd8 UTof30pCDuP9ZrHhrwFwRdk= =k0TW -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: rmll - grub2 presentation
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yoshinori K. Okuji wrote: Sorry. This sounds funny. If you want to test it, you can download an i386 core.img here : http://www.sysif.net/~vincent/grub2/core.img (built with *.mod) And some other related things around it : $ l grub2/ total 92 - -rw-r--r-- 1 vincent vincent 5376 2005-07-05 12:35 common.h - -rw-r--r-- 1 vincent vincent 63372 2005-07-05 12:33 core.img - -rw-r--r-- 1 vincent vincent 9103 2005-07-05 12:35 main.c drwxr-xr-x 2 vincent vincent 4096 2005-07-05 12:35 songs common.h main.c are used to convert the songs (hard-coded in main.c) into files readable by the play command. $ l grub2/songs/ total 28 - -rw-r--r-- 1 vincent vincent 216 2005-07-05 12:35 Beverly Hills Cop. - -rw-r--r-- 1 vincent vincent 188 2005-07-05 12:35 FSF_Song - -rw-r--r-- 1 vincent vincent 144 2005-07-05 12:35 I_Feel_Pretty - -rw-r--r-- 1 vincent vincent 228 2005-07-05 12:35 Indiana_Jones_Theme - -rw-r--r-- 1 vincent vincent 152 2005-07-05 12:35 Star Trek: The Next Generation - -rw-r--r-- 1 vincent vincent 224 2005-07-05 12:35 Summertime - -rw-r--r-- 1 vincent vincent 736 2005-07-05 12:35 Tetris_Theme The songs have to be grub2-readable : on a floppy, on a partition... Would it enter the grub 2 cvs if I send a patch ? Or maybe another project or cvs branch could be started, containing less-interesting modules like this one. somebody might port it to other architectures About porting (not especially play command), Marco introduced me to Jeff Bailey, and we will start porting grub 2 to usparc (aka sparc 64, aka sparc v9) architecture. I discussed with some #hurdfr people at the LSM and they were interested in such port (Manuel Menal told me l4 works on usparc :) ). As a reminder of the current port status : - - argument-less commands (like exit) work - - others lead to Fast Data Access MMU Miss Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCzonUFEQoKRQyjtURAt5tAJ0X+7Z6cQ827q7n/x0DUb2WiF6m8ACeJIvH p2Ox7SQJmRprLuW4PUr43Hs= =p2A2 -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [Bulk] [PATCH] Small unicode problem fix in normal/menu.c
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yoshinori K. Okuji wrote: My feeling is that it is not convenient to use pointers. Right. My first idea was to use a struct as return type : struct coords { unsigned char x; unsigned char y; }; So it becomes : if (grub_getxy () .x) Or maybe a struct of bitfields... I feel structs as being cleaner to use compared to shifts. If someday we have a terminal that exceeds 255 chars in one or both dimensions, we wouldn't have to grep grub_getxy () to find the shifts... Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCyjDWFEQoKRQyjtURAg5+AKCv+0nJXOMzaiiQ/+ePXVAOhuvvlgCeN88f 40Oy4FUN5ihK0USgAUl7ypE= =M1Xj -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH] Small unicode problem fix in normal/menu.c
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yoshinori K. Okuji wrote: You can check in this patch, but this is not the right thing to do. So I prefer not checking it in. I had the idea to start a Unicode debate on how to handle this. My first idea would be : unsigned int grub_putcode(...); unsigned int grub_putchar(...); Ignoring the return value would make those function act as they do now. Reading it would give the number of char actualy displayed on screen. 0 = Unicode char incomplete (for putchar only, for putcode might be invalid Unicode if applies) 1 = one char written 2 = a char as wide as 2 usual chars (I think I read somewhere it exists) (and so on) I was also wondering about the font format. Does any editor exists ? Or is it taken from an existing format ? I'm dying to see Japanese chars on grub menu while playing the tetris theme :] . Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCyu8zFEQoKRQyjtURAiSiAJ98YnZTCJhAFs0nJPj94PNu0tEDCgCgjvmt cal3c1Ca97j3+ARVBoL9vrg= =6pce -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger T\xE9l\xE9chargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: rmll - grub2 presentation
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yoshinori K. Okuji wrote: I won't go Oh no :( . I was planning to make a surprise : I've implemented last night a play command in grub that plays on the standard buzzer a tune read from an on-disk file. I grabbed some code from hurd's generic-speaker driver, and some from grub 2 itself (outb, inb, used skeleton of 'cat' command). I have 7 tunes this far, most taken from the hurd file :) : FSF song Indiana Jones theme I Feel Pretty Summertime Star Trek: The Next Generation Beverly Hills Cop. Tetris theme - home-made from a mid file I had the idea when I was talking with Marco who reminded me his idea about a tetris module for grub. I asked if the tetris theme would be played while gaming, and I realized that it was possible, because of the internal speaker... To handle the note length, I use grub_get_rtc, so it would be easy to do something else while waiting for the timeout (like handling tetris blocs :) ) Now I don't know if it is pertinent to submit it as a patch... On the one hand, there is no space to loose, and making it a module would make it noticeable. On the other hand, having the FSF song as an easter egg (and maybe others) could be fun. Another problem would be the portability. Although the hurd code says it can be used in a wide range of architectures, I think the won't like my inb outb... Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCyuz9FEQoKRQyjtURAvbiAKCovyHF5rWviJhDwcSg+R2JJxN8fwCeNDgZ ZtmDemX9tQiq1aI+T0AQjRM= =LVNE -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [Bulk] [PATCH] Small unicode problem fix in normal/menu.c
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 About the grub_getxy function... Wouldn't it be better to change it ? ncurses-like (not macros !) : void grub_getyx (unsigned int y, unsigned int x) void grub_getmaxyx (unsigned int y, unsigned int x) /* to get the term size */ Any comment ? Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCyUuKFEQoKRQyjtURAvbHAJ956t5IBtaSiMsVeJTYtfbTyk2RcgCfcfiB J7BWr/ReX2enuBh4DUSe4a0= =lSNu -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: FIXME: These should be dynamically obtained from a terminal.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yoshinori K. Okuji wrote: We need to call grub_getwh only once. Possibly in grub_menu_init_page. So we have to redesign the way sizes are computed to use something else than macros. BTW, is the VGA terminal working well? Since Marco changed the mode to 0x10 from 0x12, the screen is a bit smaller than before, and I'm not sure if the menu entry editor works with this. It wasn't working, and that's why I started studying the getwh idea :) . There is one line missing at the bottom of the screen, so when it's initialy drawn (frame + comments) it scrolls up one line. Then, when entries are drawn, they are drawn at the right absolute place, so one line below the top of the menu. Maybe see you tomorr^Wtoday at the LSM :). Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCycP7FEQoKRQyjtURAvB6AJwMZ1ppB3e+sVxF0o2933WjFunNvgCfcaj0 ZpJw03aghGX1VP4v81oLvkc= =7FD8 -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [Bulk] Boot from SCSI, chainload to IDE?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jago Pearce wrote: Therefore the next drive MBR should be (hd1,0) but that does work if I chainload to that. The next whole drive (containing the MBR) should be (hd1). (hd1,0) is the first partition on it. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCx5XmFEQoKRQyjtURAjRLAJ4/HWJV+IR/r+VYs2DCE1R/uDm1GgCfY60R 2NpaP8i6pENZQrJmR+Gnomk= =qLF0 -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH] Tiny command line fix
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Here is a patch that fixes backspace ('\b') acting as delete (ctrl-d) when at beginning of line. 2005-07-03 Vincent Pelletier [EMAIL PROTECTED] * normal/comandline.c (grub_cmdline_get): Don't fallback on ctrl-d when backspace is pressed at beginning of line. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCx7JCFEQoKRQyjtURAsUJAJ9JC9RdJsh5cxiJR1nFK2KReRxbRwCfQhzQ WG4cnT+fPtV5BIJfCZrcNN4= =eaKt -END PGP SIGNATURE- Index: normal/cmdline.c === RCS file: /cvsroot/grub/grub2/normal/cmdline.c,v retrieving revision 1.14 diff -u -p -r1.14 cmdline.c --- normal/cmdline.c8 Mar 2005 01:01:06 - 1.14 +++ normal/cmdline.c3 Jul 2005 09:31:59 - @@ -717,6 +717,8 @@ grub_cmdline_get (const char *prompt, ch lpos--; cl_set_pos (); } + else +break; /* fall through */ case 4: /* Ctrl-d */ ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
FIXME: These should be dynamically obtained from a terminal.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm trying to fix that thing. I'm only working on the i386 part, because I have no ppc. Here is how I plan to do it (almost done, but I have some questions) : - -add an asm function to get the current vga mode without changing it (or maybe a global var to keep the current vga mode) - -add a field in struct grub_term - -implement this function in different terminal handlers - -implement grub_getwh - -redefine GRUB_TERM_WIDTH GRUB_TERM_HEIGHT macros to use grub_getwh Here are my questions : Should we foresee, in vga mode, that the user might someday choose his vga mode ? Should we redefine all the macros we use to draw the menu to be less intensive on grub_getwh ? In the attached patch, the vga function is disabled, because for now the asm function does not work (returns always 0). As I'm really not familiar with x86 asm, I think I had something wrong adapting from grub_vga_set_mode. nb: I only give the patch as draft, a preview of what I'm working on. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCyFNXFEQoKRQyjtURAtHIAKCDMtJhev1Z0mXvFm2Rg8p49rk4aQCgl2UR C3TbKukpU4T4dHFIjyTv6hI= =wg2h -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [Bulk] FIXME: These should be dynamically obtained from a terminal.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Vincent Pelletier wrote: In the attached patch, *cough* *cough* Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCyFXJFEQoKRQyjtURAjFRAKCyEeBiF6HDVeeFajmy8oGfVWIrvQCfUiCG hX6z+XtVX9llG10YKEi6t7A= =tmOI -END PGP SIGNATURE- Index: include/grub/term.h === RCS file: /cvsroot/grub/grub2/include/grub/term.h,v retrieving revision 1.7 diff -u -p -r1.7 term.h --- include/grub/term.h 19 Feb 2005 20:56:07 - 1.7 +++ include/grub/term.h 3 Jul 2005 20:34:40 - @@ -72,8 +72,10 @@ grub_term_color_state; /* Menu-related geometrical constants. */ /* FIXME: These should be dynamically obtained from a terminal. */ -#define GRUB_TERM_WIDTH80 -#define GRUB_TERM_HEIGHT 25 +/*#define GRUB_TERM_WIDTH 80 +#define GRUB_TERM_HEIGHT 25*/ +#define GRUB_TERM_WIDTH ((grub_getwh()0xFF00)8) +#define GRUB_TERM_HEIGHT(grub_getwh()0xFF) /* The number of lines of GRUB version... at the top. */ #define GRUB_TERM_INFO_HEIGHT 1 @@ -142,6 +144,9 @@ struct grub_term /* Get a character. */ int (*getkey) (void); + /* Get the screen size. The return value is ((Width 8) | Height). */ + grub_uint16_t (*getwh) (void); + /* Get the cursor position. The return value is ((X 8) | Y). */ grub_uint16_t (*getxy) (void); @@ -183,6 +188,7 @@ void EXPORT_FUNC(grub_putchar) (int c); void EXPORT_FUNC(grub_putcode) (grub_uint32_t code); int EXPORT_FUNC(grub_getkey) (void); int EXPORT_FUNC(grub_checkkey) (void); +grub_uint16_t EXPORT_FUNC(grub_getwh) (void); grub_uint16_t EXPORT_FUNC(grub_getxy) (void); void EXPORT_FUNC(grub_gotoxy) (grub_uint8_t x, grub_uint8_t y); void EXPORT_FUNC(grub_cls) (void); Index: include/grub/i386/pc/vga.h === RCS file: /cvsroot/grub/grub2/include/grub/i386/pc/vga.h,v retrieving revision 1.3 diff -u -p -r1.3 vga.h --- include/grub/i386/pc/vga.h 4 Apr 2004 13:46:01 - 1.3 +++ include/grub/i386/pc/vga.h 3 Jul 2005 20:34:40 - @@ -25,6 +25,9 @@ /* Set the video mode to MODE and return the previous mode. */ unsigned char EXPORT_FUNC(grub_vga_set_mode) (unsigned char mode); +/* Return the current video mode. */ +unsigned char EXPORT_FUNC(grub_vga_get_mode) (void); + /* Return a pointer to the ROM font table. */ unsigned char *EXPORT_FUNC(grub_vga_get_font) (void); Index: kern/term.c === RCS file: /cvsroot/grub/grub2/kern/term.c,v retrieving revision 1.7 diff -u -p -r1.7 term.c --- kern/term.c 4 Apr 2004 13:46:02 - 1.7 +++ kern/term.c 3 Jul 2005 20:34:44 - @@ -213,6 +213,12 @@ grub_checkkey (void) } grub_uint16_t +grub_getwh (void) +{ + return (grub_cur_term-getwh) (); +} + +grub_uint16_t grub_getxy (void) { return (grub_cur_term-getxy) (); Index: kern/i386/pc/startup.S === RCS file: /cvsroot/grub/grub2/kern/i386/pc/startup.S,v retrieving revision 1.13 diff -u -p -r1.13 startup.S --- kern/i386/pc/startup.S 4 Apr 2004 13:46:02 - 1.13 +++ kern/i386/pc/startup.S 3 Jul 2005 20:34:44 - @@ -1570,6 +1570,28 @@ FUNCTION(grub_vga_set_mode) /* + * unsigned char grub_vga_get_mode (void) + */ +FUNCTION(grub_vga_get_mode) + pushl %ebp + pushl %ebx + + callprot_to_real + .code16 + /* get current mode */ + xorw%bx, %bx + movb$0x0f, %ah + int $0x10 + + DATA32 callreal_to_prot + .code32 + + popl%ebx + popl%ebp + ret + + +/* * unsigned char *grub_vga_get_font (void) */ FUNCTION(grub_vga_get_font) Index: term/i386/pc/console.c === RCS file: /cvsroot/grub/grub2/term/i386/pc/console.c,v retrieving revision 1.5 diff -u -p -r1.5 console.c --- term/i386/pc/console.c 15 Feb 2005 00:07:01 - 1.5 +++ term/i386/pc/console.c 3 Jul 2005 20:34:45 - @@ -20,6 +20,7 @@ #include grub/machine/console.h #include grub/term.h #include grub/types.h +#include grub/misc.h grub_uint8_t grub_console_cur_color = 0x7; static grub_uint8_t grub_console_standard_color = 0x7; @@ -74,6 +75,12 @@ grub_console_putchar (grub_uint32_t c) grub_console_real_putchar (c); } +static grub_uint16_t +grub_console_getwh (void) +{ + return (80 8) | 25; /* FIXME: Always true ? */ +} + static void grub_console_setcolorstate (grub_term_color_state state) { @@ -107,6 +114,7 @@ static struct grub_term grub_console_ter .putchar = grub_console_putchar, .checkkey = grub_console_checkkey, .getkey = grub_console_getkey, +.getwh = grub_console_getwh, .getxy = grub_console_getxy, .gotoxy = grub_console_gotoxy, .cls = grub_console_cls
Re: [Bulk] Re: [Bulk] Re: [PATCH] grub2: commands/cmp.c: grub_cmd_cmp()
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I haven't changed the BUFFER_SIZE (512). Please do if you think it is appropriate. 2005-06-29 Vincent Pelletier [EMAIL PROTECTED] * commands/cmp.c (BUFFER_SIZE): New macro. (grub_cmd_cmp): Close the right file at the right time. Compare only data just read. Don't report files of different size as identical. Dynamically allocate buffers. Move variable declarations at the beginning of function. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCxmozFEQoKRQyjtURAhgIAJ9lR04VeEhMHnnTe1KJVorjRMzCbwCfYXDT 7qkbXSTMF7bGi8gaxS35/RI= =N0Ed -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH v2] commands/cmp.c: grub_cmd_cmp()
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 (hum) Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCxnFnFEQoKRQyjtURAp6rAJ9bk6yTKM+px9Ikh+4ByzT+Q01c/gCeLVJ1 3YHNI5TDbln9u0Aoz5i9R4M= =jdzU -END PGP SIGNATURE- Index: cmp.c === RCS file: /cvsroot/grub/grub2/commands/cmp.c,v retrieving revision 1.2 diff -u -p -r1.2 cmp.c --- cmp.c 4 Apr 2004 13:46:00 - 1.2 +++ cmp.c 2 Jul 2005 10:10:40 - @@ -23,13 +23,21 @@ #include grub/arg.h #include grub/misc.h #include grub/file.h +#include grub/mm.h + +#define BUFFER_SIZE 512 static grub_err_t grub_cmd_cmp (struct grub_arg_list *state __attribute__ ((unused)), int argc, char **args) { - grub_file_t file1; - grub_file_t file2; + grub_err_t err; + grub_ssize_t rd1, rd2; + grub_uint32_t pos; + grub_file_t file1 = 0; + grub_file_t file2 = 0; + char *buf1 = 0; + char *buf2 = 0; if (argc != 2) return grub_error (GRUB_ERR_BAD_ARGUMENT, two arguments required); @@ -37,16 +45,9 @@ grub_cmd_cmp (struct grub_arg_list *stat grub_printf (Compare `%s' and `%s':\n, args[0], args[1]); - file1 = grub_file_open (args[0]); - if (! file1) -return grub_errno; - - file2 = grub_file_open (args[1]); - if (! file2) -{ - grub_file_close (file2); - return grub_errno; -} + if (! (file1 = grub_file_open (args[0]) ) || + ! (file2 = grub_file_open (args[1]) ) ) +goto cleanup; if (grub_file_size (file1) != grub_file_size (file2)) grub_printf (Differ in size: %d [%s], %d [%s]\n, @@ -55,44 +56,48 @@ grub_cmd_cmp (struct grub_arg_list *stat else { - char buf1[512]; - char buf2[512]; - grub_ssize_t rd1, rd2; - grub_uint32_t pos = 0; - + pos = 0; + + if (! (buf1 = (char *) grub_malloc (BUFFER_SIZE) ) || + ! (buf2 = (char *) grub_malloc (BUFFER_SIZE) ) ) +goto cleanup; do { int i; - rd1 = grub_file_read (file1, buf1, 512); - rd2 = grub_file_read (file2, buf2, 512); + rd1 = grub_file_read (file1, buf1, BUFFER_SIZE); + rd2 = grub_file_read (file2, buf2, BUFFER_SIZE); if (rd1 != rd2) - return 0; + goto cleanup; - for (i = 0; i 512; i++) + for (i = 0; i rd2; i++) { if (buf1[i] != buf2[i]) { grub_printf (Differ at the offset %d: 0x%x [%s], 0x%x [%s]\n, i + pos, buf1[i], args[0], buf2[i], args[1]); - - grub_file_close (file1); - grub_file_close (file2); - return 0; + goto cleanup; } } - pos += 512; + pos += BUFFER_SIZE; } while (rd2); + grub_printf (The files are identical.\n); } - grub_file_close (file1); - grub_file_close (file2); - - grub_printf (The files are identical.\n); +cleanup: + err=grub_errno; + if (buf1) +grub_free (buf1); + if (buf2) +grub_free (buf2); + if (file1) +grub_file_close (file1); + if (file2) +grub_file_close (file2); - return 0; + return err; } ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH] use grub_size_t instead of int in kern/misc.c
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 New version of the patch, made after a discussion with Okuji on irc. The ftoa changes in previous version of this patch might be done later, if someone confirms they are ok. 2005-07-02 Vincent Pelletier [EMAIL PROTECTED] * kern/misc.c (grub_strncpy, grub_strncat, grub_strncmp, grub_strncasecmp): Changed argument type from int to grub_size_t. (grub_printf, grub_vprintf, grub_vsprintf, grub_sprintf): Changed return type from int to grub_size_t. (grub_strncasecmp): Make return value to also ignore case when we reach the end of one string. * include/grub/mish.h (grub_strncpy, grub_strncat, grub_strncmp, grub_strncasecmp, grub_printf, grub_vprintf, grub_sprintf, grub_vsprintf): Updated prototypes to match changes in kern/misc.c. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCxtBHFEQoKRQyjtURAsq3AKCTag1s0aqOATkdK54LYJ/K+ZQY2gCfeljo Hiim/wgZjTV6Og9HTwMjItQ= =UWpE -END PGP SIGNATURE- Index: kern/misc.c === RCS file: /cvsroot/grub/grub2/kern/misc.c,v retrieving revision 1.20 diff -u -p -r1.20 misc.c --- kern/misc.c 23 Jun 2005 23:13:57 - 1.20 +++ kern/misc.c 2 Jul 2005 17:29:05 - @@ -63,7 +63,7 @@ grub_strcpy (char *dest, const char *src } char * -grub_strncpy (char *dest, const char *src, int c) +grub_strncpy (char *dest, const char *src, grub_size_t c) { char *p = dest; @@ -101,7 +101,7 @@ grub_strcat (char *dest, const char *src } char * -grub_strncat (char *dest, const char *src, int c) +grub_strncat (char *dest, const char *src, grub_size_t c) { char *p = dest; @@ -115,11 +115,11 @@ grub_strncat (char *dest, const char *sr return dest; } -int +grub_size_t grub_printf (const char *fmt, ...) { va_list ap; - int ret; + grub_size_t ret; va_start (ap, fmt); ret = grub_vprintf (fmt, ap); @@ -145,10 +145,10 @@ grub_real_dprintf(const char *file, cons } } -int +grub_size_t grub_vprintf (const char *fmt, va_list args) { - int ret; + grub_size_t ret; ret = grub_vsprintf (0, fmt, args); grub_refresh (); @@ -191,9 +191,9 @@ grub_strcmp (const char *s1, const char } int -grub_strncmp (const char *s1, const char *s2, int c) +grub_strncmp (const char *s1, const char *s2, grub_size_t c) { - int p = 1; + grub_size_t p = 1; while (*s1 *s2 p c) { @@ -209,9 +209,9 @@ grub_strncmp (const char *s1, const char } int -grub_strncasecmp (const char *s1, const char *s2, int c) +grub_strncasecmp (const char *s1, const char *s2, grub_size_t c) { - int p = 1; + grub_size_t p = 1; while (grub_tolower (*s1) grub_tolower (*s2) p c) { @@ -223,7 +223,7 @@ grub_strncasecmp (const char *s1, const p++; } - return (int) *s1 - (int) *s2; + return (int) grub_tolower (*s1) - (int) grub_tolower (*s2); } char * @@ -517,11 +517,11 @@ grub_ftoa (char *str, double f, int roun return str; } -int +grub_size_t grub_vsprintf (char *str, const char *fmt, va_list args) { char c; - int count = 0; + grub_size_t count = 0; auto void write_char (unsigned char ch); auto void write_str (const char *s); auto void write_fill (const char ch, int n); @@ -729,11 +729,11 @@ grub_vsprintf (char *str, const char *fm return count; } -int +grub_size_t grub_sprintf (char *str, const char *fmt, ...) { va_list ap; - int ret; + grub_size_t ret; va_start (ap, fmt); ret = grub_vsprintf (str, fmt, ap); Index: include/grub/misc.h === RCS file: /cvsroot/grub/grub2/include/grub/misc.h,v retrieving revision 1.13 diff -u -p -r1.13 misc.h --- include/grub/misc.h 9 May 2005 01:47:37 - 1.13 +++ include/grub/misc.h 2 Jul 2005 17:29:05 - @@ -32,10 +32,10 @@ void *EXPORT_FUNC(grub_memmove) (void *dest, const void *src, grub_size_t n); char *EXPORT_FUNC(grub_strcpy) (char *dest, const char *src); -char *EXPORT_FUNC(grub_strncpy) (char *dest, const char *src, int c); +char *EXPORT_FUNC(grub_strncpy) (char *dest, const char *src, grub_size_t c); char *EXPORT_FUNC(grub_stpcpy) (char *dest, const char *src); char *EXPORT_FUNC(grub_strcat) (char *dest, const char *src); -char *EXPORT_FUNC(grub_strncat) (char *dest, const char *src, int c); +char *EXPORT_FUNC(grub_strncat) (char *dest, const char *src, grub_size_t c); /* Prototypes for aliases. */ void *EXPORT_FUNC(memmove) (void *dest, const void *src, grub_size_t n); @@ -43,8 +43,8 @@ void *EXPORT_FUNC(memcpy) (void *dest, c int EXPORT_FUNC(grub_memcmp) (const void *s1, const void *s2, grub_size_t n); int EXPORT_FUNC(grub_strcmp) (const char *s1, const char *s2); -int EXPORT_FUNC(grub_strncmp) (const char *s1, const char *s2, int c); -int EXPORT_FUNC(grub_strncasecmp) (const char *s1, const char *s2, int c); +int EXPORT_FUNC(grub_strncmp) (const char *s1, const
Re: [Bulk] Re: Broken A20 gate handling (about GPL FSF copyright assignment)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ludovic Drolez wrote: Moreover, IMHO, it makes no sense trying to rewrite such low level functions, since there are not hundreds ways of writing it ! There are at least 2 ways : 1) copy-paste code 2) read specs, implement them - following the directions FSF paper gives. The result might be the same code, but the way to get it matters too. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCxYDKFEQoKRQyjtURAp88AJ0QJz0OxVUvPDuG7EbhFbPbnzlvpgCaA8Nx yUepxKehU3lUW8IV1g+LSMM= =iAdr -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [Bulk] Re: [PATCH] grub2: commands/cmp.c: grub_cmd_cmp()
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marco Gerards wrote: I think BUFFER_SIZE would be a better name. Another size can be used. Perhaps it is better to use a bigger buffer size? As we read from a block device, I think the best size would be a multiple of the block size... But yes, it could be named buffer size. And it could even be dynamicaly allocated, to prevent using too much space on stack. Huh? Some remains from a change-and-undo... I'll send a new patch with a correct changelog :). Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCw8j8FEQoKRQyjtURApAVAKCUiOSXjhRmv5Sy/Hkct/9rqZjapwCeNZws iYms73xiAlh3TMEgfIoctA4= =+ko/ -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH] grub2: commands/cmp.c: grub_cmd_cmp()
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Vincent Pelletier wrote: nb: I haven't tested these changes beyond make, but I think they are trivial enough to be trusted... My baaad... There were 2 bugs left : - -If the file size isn't a multiple of 512 bytes, we would read non-initialised or non-updated memory (so it only affects results on files whom size is 512) - -The files are identical. is displayed when file size differ (was corrected in Wanderley's version) Reminds me Hagakure : Matters of small concern should be considered seriously. I'm not sure if it is right to add a macro definition for block size, and wether the name is good. 2005-06-29 Vincent Pelletier [EMAIL PROTECTED] * commands/cmp.c (grub_cmd_cmp): Close the right file at the right time. Compare only data just read. Don't report files of different size as identical. (BLOCK_SIZE): New macro. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCwsVfFEQoKRQyjtURApNOAKC4bO41ca3vX/m64aIy4hIvjIwW1QCgmbyg AIn3yvP072FMa0LlDFo1CYM= =o8fq -END PGP SIGNATURE- Index: commands/cmp.c === RCS file: /cvsroot/grub/grub2/commands/cmp.c,v retrieving revision 1.2 diff -u -p -r1.2 cmp.c --- commands/cmp.c 4 Apr 2004 13:46:00 - 1.2 +++ commands/cmp.c 29 Jun 2005 15:47:36 - @@ -24,6 +24,8 @@ #include grub/misc.h #include grub/file.h +#define BLOCK_SIZE 512 + static grub_err_t grub_cmd_cmp (struct grub_arg_list *state __attribute__ ((unused)), int argc, char **args) @@ -44,54 +46,53 @@ grub_cmd_cmp (struct grub_arg_list *stat file2 = grub_file_open (args[1]); if (! file2) { - grub_file_close (file2); + grub_file_close (file1); return grub_errno; } if (grub_file_size (file1) != grub_file_size (file2)) -grub_printf (Differ in size: %d [%s], %d [%s]\n, -grub_file_size (file1), args[0], -grub_file_size (file2), args[1]); +{ + grub_printf (Differ in size: %d [%s], %d [%s]\n, + grub_file_size (file1), args[0], + grub_file_size (file2), args[1]); +} else { - char buf1[512]; - char buf2[512]; + char buf1[BLOCK_SIZE]; + char buf2[BLOCK_SIZE]; grub_ssize_t rd1, rd2; grub_uint32_t pos = 0; do { int i; - rd1 = grub_file_read (file1, buf1, 512); - rd2 = grub_file_read (file2, buf2, 512); + rd1 = grub_file_read (file1, buf1, BLOCK_SIZE); + rd2 = grub_file_read (file2, buf2, BLOCK_SIZE); if (rd1 != rd2) - return 0; + goto cleanup; - for (i = 0; i 512; i++) + for (i = 0; i rd1; i++) { if (buf1[i] != buf2[i]) { grub_printf (Differ at the offset %d: 0x%x [%s], 0x%x [%s]\n, i + pos, buf1[i], args[0], buf2[i], args[1]); - - grub_file_close (file1); - grub_file_close (file2); - return 0; + goto cleanup; } } - pos += 512; + pos += BLOCK_SIZE; } while (rd2); + grub_printf (The files are identical.\n); } +cleanup: grub_file_close (file1); grub_file_close (file2); - grub_printf (The files are identical.\n); - return 0; } ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH] dprintf implementation
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yoshinori K. Okuji wrote: | Actually, strstr is not appropriate, because it does not consider word | boundaries. I think I'll write some function to find a word in a string... There is an algorithm I would like to test. | Strings are much better because of the flexibility. I agree now that I exactly understand what you were talking about :). I'm working on it. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCHlhCFEQoKRQyjtURAhcoAJ9JSnbFh4jon7SNRbPMs52WcpR6lwCcD5qJ zDVkYGnPV6kL0DJR/4bg9FQ= =BTYg -END PGP SIGNATURE- ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH] dprintf implementation
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello. I haven't worked on grub2 for 2 weeks now, sorry. Here is the dprintf function I worked on 2 weeks ago, which I fixed this evening. Vincent Pelletier 2005-02-21 Vincent Pelletier [EMAIL PROTECTED] * include/grub/misc.h (grub_dprintf): New macro. (grub_real_dprintf): New prototype. * kern/misc.c (grub_real_dprintf): New function. Index: kern/misc.c === RCS file: /cvsroot/grub/grub2/kern/misc.c,v retrieving revision 1.18 diff -u -p -r1.18 misc.c - --- kern/misc.c 19 Feb 2005 20:56:07 - 1.18 +++ kern/misc.c 21 Feb 2005 20:38:38 - @@ -128,6 +128,18 @@ grub_printf (const char *fmt, ...) ~ return ret; ~ } +void +grub_real_dprintf(const char *file, const int line, const char *title, + const char *fmt, ...) +{ + va_list args; + + grub_printf (%s,%d (%s): , file, line, title); + va_start (args, fmt); + grub_vprintf (fmt, args); + va_end (args); +} + ~ int ~ grub_vprintf (const char *fmt, va_list args) ~ { Index: include/grub/misc.h === RCS file: /cvsroot/grub/grub2/include/grub/misc.h,v retrieving revision 1.12 diff -u -p -r1.12 misc.h - --- include/grub/misc.h 29 Jan 2005 22:01:53 - 1.12 +++ include/grub/misc.h 21 Feb 2005 20:38:38 - @@ -26,6 +26,7 @@ ~ #include grub/symbol.h ~ #include grub/err.h +#define grub_dprintf(title,fmt,args...) grub_real_dprintf(__FILE__,__LINE__,title,fmt,args); ~ /* XXX: If grub_memmove is too slow, we must implement grub_memcpy. */ ~ #define grub_memcpy(d,s,n)grub_memmove ((d), (s), (n)) @@ -58,6 +59,10 @@ char *EXPORT_FUNC(grub_strndup) (const c ~ void *EXPORT_FUNC(grub_memset) (void *s, int c, grub_size_t n); ~ grub_size_t EXPORT_FUNC(grub_strlen) (const char *s); ~ int EXPORT_FUNC(grub_printf) (const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); +void EXPORT_FUNC(grub_real_dprintf) (const char *file, + const int line, + const char *title, + const char *fmt, ...) __attribute__ ((format (printf, 4, 5))); ~ int EXPORT_FUNC(grub_vprintf) (const char *fmt, va_list args); ~ int EXPORT_FUNC(grub_sprintf) (char *str, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); ~ int EXPORT_FUNC(grub_vsprintf) (char *str, const char *fmt, va_list args); -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCGkzqFEQoKRQyjtURAokmAJ9Mirp8xseh2AwUJOl+tykvKm/lHgCeM07L 2pNw3UbeFYot+LOR4vDFWH4= =+3BC -END PGP SIGNATURE- ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel