blob: fdfce8c7757bc88af2417877105b9e54123c9715 [file] [log] [blame] [raw]
diff -Naur grub-0.97_splash/stage2/builtins.c grub-0.97_chinese/stage2/builtins.c
--- grub-0.97_splash/stage2/builtins.c 2007-04-10 09:20:03.000000000 +0800
+++ grub-0.97_chinese/stage2/builtins.c 2007-04-11 17:36:42.000000000 +0800
@@ -65,6 +65,8 @@
int fallback_entries[MAX_FALLBACK_ENTRIES];
/* The number of current entry. */
int current_entryno;
+/* graphics file */
+char graphics_file[64];
/* The address for Multiboot command-line buffer. */
static char *mb_cmdline;
static char kernel_option_video[64];
@@ -393,7 +395,10 @@
blocklist_func,
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"blocklist FILE",
- "Print the blocklist notation of the file FILE."
+ "Print the blocklist notation of the file FILE.",
+ "blocklist FILE",
+ "\t´òÓ¡³öÎļþ FILE µÄ¡°¿éÇåµ¥¡±±í´ï·¨£¨¸Ã±í´ï·¨Ò²ÊǺϷ¨µÄ GRUB ÎļþÃû£¬"
+ "\n\t²¢ÇÒÍêÈ«µÈ¼ÛÓÚ FILE¡££©¡£"
};
#if ! defined(GRUB_UTIL) && ! defined (STAGE1_5)
@@ -1015,7 +1020,9 @@
boot_func,
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"boot",
- "Boot the OS/chain-loader which has been loaded."
+ "Boot the OS/chain-loader which has been loaded.",
+ "boot",
+ "\tÒýµ¼ÒѼÓÔصIJÙ×÷ϵͳ»òÉÈÇøÁ´Ê½¼ÓÔØÆ÷¡£"
};
#endif /* ! GRUB_UTIL */
@@ -1062,7 +1069,10 @@
"bootp [--with-configfile]",
"Initialize a network device via BOOTP. If the option `--with-configfile'"
" is given, try to load a configuration file specified by the 150 vendor"
- " tag."
+ " tag.",
+ "bootp [--with-configfile]",
+ "\tͨ¹ý BOOTP ³õÊÔ»¯ÍøÂçÉ豸¡£Èç¹ûʹÓÃÁË --with-configfile ²ÎÊý£¬´ËÃüÁî"
+ "\n\t½«»áÊÔͼȥ¼ÓÔØÒ»¸öÌض¨µÄÅäÖÃÎļþ¡£"
};
#endif /* ! GRUB_UTIL */
#endif /* SUPPORT_NETBOOT */
@@ -1214,6 +1224,13 @@
if (grub_isspace (c) || (c >= ' ' && c <= '~'))
grub_putchar (c);
else
+/* cat Chinese support begin */
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ grub_putchar (c);
+ else
+#endif
+/* cat Chinese support end here */
grub_putchar ('?');
if (quit_print)
break;
@@ -1230,7 +1247,9 @@
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"cat [--hex] [--skip=S] [--length=L] [--locate=STRING] FILE",
"Print the contents of the file FILE, or print the locations "
- "of the string STRING in FILE."
+ "of the string STRING in FILE.",
+ "cat [--hex] [--skip=S] [--length=L] [--locate=STRING] FILE",
+ "\tÏÔʾָ¶¨ÎļþµÄÄÚÈÝ£¬»òÕßÏÔʾÎļþÖÐÖ¸¶¨×Ö·û´®µÄλÖá£"
};
@@ -1282,7 +1301,11 @@
"cdrom --add-io-ports=P | --init | --stop",
"Initialise/stop atapi cdroms or set additional I/O ports for a possible atapi cdrom device."
" The high word of P specifies the base register of the control block registers, and"
- " the low word of P specifies the base register of the command block registers."
+ " the low word of P specifies the base register of the command block registers.",
+ "cdrom --add-io-ports=P | --init | --stop",
+ "\t³õʼ»¯»òÕßÍ£Ö¹ËùÓÐµÄ ATAPI CDROM É豸, »òÕßΪһ¸ö¿ÉÄÜµÄ ATAPI CDROM"
+ "\n\tÉ豸ÉèÖø½¼ÓµÄ IO ¶Ë¿Ú¡£P µÄ¸ß×ÖÖ¸¶¨É豸¿ØÖƼĴæÆ÷×éµÄ¶Ë¿Ú»ùÖ·£¬P µÄ"
+ "\n\tµÍ×ÖÖ¸¶¨É豸ÃüÁî¼Ä´æÆ÷×éµÄ¶Ë¿Ú»ùÖ·¡£"
};
#endif
@@ -2011,7 +2034,19 @@
" RAM boot file format. Use --disable-a20 if you wish to turn off"
" A20 when transferring control to the boot image."
" SL specifies length in bytes at the beginning of the image to be"
- " skipped when loading."
+ " skipped when loading.",
+ "chainloader [--force] [--load-segment=LS] [--load-offset=LO]"
+ " [--load-length=LL] [--skip-length=SL] [--boot-cs=CS] [--boot-ip=IP]"
+ " [--ebx=EBX] [--edx=EDX] [--sdi] [--enable-a20] FILE",
+ "\t¼ÓÔØÁ´Ê½¼ÓÔØÆ÷ FILE¡£ÈôÖ¸¶¨ÁË --force, ÔòÇ¿ÖƼÓÔضø²»¼ì²éµÚÒ»ÉÈÇø"
+ "\n\tβ²¿µÄºÏ·¨Òýµ¼±êÇ©(55 AA)ÊÇ·ñ´æÔÚ¡£LS:LO ÓÃÓÚÖ¸¶¨ÓбðÓÚ 0000:7C00"
+ "\n\tµÄÆô¶¯Ó³Ïñ¼ÓÔصØÖ·¡£LL ÓÃÓÚÖ¸¶¨Æô¶¯Ó³ÏñµÄ³¤¶È£¨ÔÚ 512 ×Ö½ÚÖÁ 640K"
+ "\n\tÖ®¼ä£©¡£SL ÓÃÓÚÖ¸¶¨×°ÈëÆô¶¯Ó³Ïñ֮ǰÐèÒª´ÓÓ³Ïñ¿ªÍ·Ìø¹ýµÄ³¤¶È£¨ÒÔ×Ö½Ú"
+ "\n\t¼ÆÊý£©¡£CS:IP ÓÃÓÚÖ¸¶¨ÈÃÆô¶¯Ó³Ïñ»ñµÃ¿ØÖÆÐèÒªÌøתµ½µÄµØÖ·¡£EBX/EDX"
+ "\n\t·Ö±ðÓÃÓÚÖ¸¶¨ÔÚÆô¶¯Ó³Ïñ»ñµÃ¿ØÖƵÄÄÇÒ»¿Ì EBX/EDX ¼Ä´æÆ÷Ó¦ÓеÄÖµ¡£ÓÃ"
+ "\n\t--sdi ¿ÉÒÔÇ¿ÖÆ°Ñ FILE µ±×÷ Windows XP µÄÒ»¸öÄÚ´æÆô¶¯Îļþ¸ñʽ(System"
+ "\n\tDeployment Image)À´¶Ô´ý(Çë²Î¿¼Î¢ÈíÏàÓ¦Îĵµ)¡£Èç¹ûÄãÏ£ÍûÔÚ¿ØÖÆ´«µÝ¸ø"
+ "\n\tÆô¶¯Ó³ÏñʱÇÐ¶Ï CPU µÄµØÖ·Ïß A20£¬¿ÉÒÔÓà --disable-a20 ²ÎÊý×öµ½¡£"
};
@@ -2100,7 +2135,9 @@
BUILTIN_MENU | BUILTIN_CMDLINE,
"cmp FILE1 FILE2",
"Compare the file FILE1 with the FILE2 and inform the different values"
- " if any."
+ " if any.",
+ "cmp FILE1 FILE2",
+ "\t±È½ÏÁ½¸öÎļþ, ²¢ÇÒ±¨¸æÁ½ÕßÖ®¼äµÄ²»Í¬µÄÐÅÏ¢¡£"
};
@@ -2234,7 +2271,17 @@
" cyan, red, magenta, brown, light-gray, dark-gray, light-blue,"
" light-green, light-cyan, light-red, light-magenta, yellow and white."
" But only the first eight names can be used for BG. You can prefix"
- " \"blink-\" to FG if you want a blinking foreground color."
+ " \"blink-\" to FG if you want a blinking foreground color.",
+ "color NORMAL [HIGHLIGHT]",
+ "\t¸Ä±ä²Ëµ¥µÄÑÕÉ«¡£Normal ÓÃÓÚÖ¸¶¨²Ëµ¥ÏîµÄδѡÖÐʱµÄÑÕÉ«£¬HIGHLIGHT Ôò"
+ "\n\tÓÃÓÚÖ¸¶¨²Ëµ¥ÏîµÄ±»Ñ¡ÖÐʱµÄÑÕÉ«¡£Èç¹ûÄãδָ¶¨ HIGHLIGHT É«£¬ÄÇôÎÒÃÇ"
+ "\n\t½«Ê¹Óà NORMAL µÄ·´É«Öµ¡£ÑÕÉ«ÖµµÄ¸ñʽÊÇ FG/BG¡£FG ºÍ BG ÊÇÑÕÉ«µÄ"
+ "\n\tÃû³Æ£¬ÈçÏ£ºblack(ºÚ), blue(À¶), green(ÂÌ), cyan(Çà), red(ºì),"
+ "\n\tmagenta(·Ûºì), brown(×Ø), light-gray(ÁÁ»Ò),dark-gray(°µ»Ò),"
+ "\n\tlight-blue(dzÀ¶), light-green(µ­ÂÌ), light-cyan(µ­Çà),"
+ "\n\tlight-red(Ã÷ºì), light-magenta(dzºì), yellow(»Æ) ºÍ white(°×)¡£"
+ "\n\t×¢Ò⣬BG µÄÖµÖ»ÄÜÊÇÇ°°Ë¸ö¡£ÁíÍ⣬ÈôÏëʹÓÃÉÁ˸µÄÇ°¾°É«£¬ÄãÔÚ FG Ç°"
+ "\n\tʹÓÃǰ׺ blink- ¼´¿É¡£"
};
@@ -2295,7 +2342,9 @@
configfile_func,
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"configfile FILE",
- "Load FILE as the configuration file."
+ "Load FILE as the configuration file.",
+ "configfile FILE",
+ "\t°ÑÎļþ FILE ×÷ΪÅäÖÃÎļþÁ¢¼´¼ÓÔØÖ´ÐУ¨Ö»Óе±¼ÓÔØʧ°Üʱ²Å·µ»Ø£©¡£"
};
@@ -2306,13 +2355,28 @@
if (debug)
{
debug = 0;
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ grub_printf (" ³ý´íģʽÒѹرÕ\n");
+ else
+ grub_printf (" Debug mode is turned off\n");
+#else
grub_printf (" Debug mode is turned off\n");
+#endif
}
else
{
debug = 1;
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ grub_printf (" ³ý´íģʽÒÑ´ò¿ª\n");
+ else
grub_printf (" Debug mode is turned on\n");
- }
+#else
+ grub_printf (" Debug mode is turned on\n");
+#endif
+
+ }
return 0;
}
@@ -2323,7 +2387,9 @@
debug_func,
BUILTIN_MENU | BUILTIN_CMDLINE,
"debug",
- "Turn on/off the debug mode."
+ "Turn on/off the debug mode.",
+ "debug",
+ "\t´ò¿ª/¹Ø±Õ DEBUG(µ÷ÊÔ¡¢³ý´í) ģʽ¡£"
};
@@ -2411,7 +2477,12 @@
" the key word `saved\' is specified, or to the entry number previously"
" saved in the specified file FILE. When FILE is specified, all subsequent"
" `savedefault\' commands will save default entry numbers into"
- " FILE."
+ " FILE.",
+ "default [NUM | `saved' | FILE]",
+ "\tÉèÖÃĬÈÏÆô¶¯µÄ²Ëµ¥Èë¿ÚÏîΪ NUM (0 ´ú±íµÚÒ»Ïî)£¬»òÕßÓÉ savedefault"
+ "\n\tËù±£´æµÄÈë¿ÚÏÈç¹ûÖ¸¶¨Á˹ؼü×Ö saved£©£¬»òÕßÏÈÇ°±£´æÔÚÎļþ FILE"
+ "\n\tÖеÄÈë¿ÚÏî¡£µ±Ö¸¶¨ÁË FILE ʱ£¬ºóÐøµÄ savedefault ÃüÁ½«°ÑÈë¿ÚÏî"
+ "\n\t±£´æµ½ FILE ÖС£"
#if 0
"default [NUM | `saved']",
"Set the default entry to entry number NUM (if not specified, it is"
@@ -2456,7 +2527,10 @@
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"device DRIVE DEVICE",
"Specify DEVICE as the actual drive for a BIOS drive DRIVE. This command"
- " can be used only in the grub shell."
+ " can be used only in the grub shell.",
+ "device DRIVE DEVICE",
+ "\tÖ¸¶¨ DEVICE ×÷Ϊ BIOS Çý¶¯Æ÷ DRIVE Ëù¶ÔÓ¦µÄʵ¼ÊÇý¶¯Æ÷¡£ÕâÌõÃüÁîÖ»ÓÃÓÚ"
+ "\n\t²Ù×÷ϵͳ Linux ϵÄÆô¶¯¹ÜÀí¹¤¾ß grub ÖУ¨Ëü½Ð×ö grub shell£©¡£"
};
#endif /* GRUB_UTIL */
@@ -2476,12 +2550,13 @@
dhcp_func,
BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST,
"dhcp",
- "Initialize a network device via DHCP."
+ "Initialize a network device via DHCP.",
+ "dhcp",
+ "\tͨ¹ý DHCP ³õÊÔ»¯ÍøÂçÉ豸¡£"
};
#endif /* SUPPORT_NETBOOT */
-
-static int terminal_func (char *arg, int flags);
+ static int terminal_func (char *arg, int flags);
#ifdef SUPPORT_GRAPHICS
@@ -2533,7 +2608,9 @@
splashimage_func,
BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST,
"splashimage FILE",
- "Load FILE as the background image when in graphics mode."
+ "Load FILE as the background image when in graphics mode.",
+ "splashimage FILE",
+ "\tͼÐÎģʽÏÂÔØÈë±³¾°Í¼Æ¬Îļþ¡£",
};
@@ -2563,7 +2640,10 @@
BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST,
"foreground RRGGBB",
"Sets the foreground color when in graphics mode."
- "RR is red, GG is green, and BB blue. Numbers must be in hexadecimal."
+ "RR is red, GG is green, and BB blue. Numbers must be in hexadecimal.",
+ "foreground RRGGBB",
+ "\tÉèÖÃͼÐÎģʽϵÄÇ°¾°É«¡£RR ´ú±íºìÉ«, GG ´ú±íÂÌÉ«, BB ´ú±íÀ¶É«¡£"
+ "\n\tÕâЩÊýÖµ¶¼ÊÇÓÃÊ®Áù½øÖÆÀ´±íʾµÄ¡£"
};
@@ -2592,7 +2672,10 @@
BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST,
"background RRGGBB",
"Sets the background color when in graphics mode."
- "RR is red, GG is green, and BB blue. Numbers must be in hexadecimal."
+ "RR is red, GG is green, and BB blue. Numbers must be in hexadecimal.",
+ "background RRGGBB",
+ "\tÉèÖÃͼÐÎģʽϵı³¾°É«¡£RR ´ú±íºìÉ«, GG ´ú±íÂÌÉ«, BB ´ú±íÀ¶É«¡£"
+ "\n\tÕâЩÊýÖµ¶¼ÊÇÓÃÊ®Áù½øÖÆÀ´±íʾµÄ¡£"
};
#endif /* SUPPORT_GRAPHICS */
@@ -2613,7 +2696,9 @@
clear_func,
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"clear",
- "Clear the screen"
+ "Clear the screen",
+ "clear",
+ "\tÇåÆÁÄ»¡£"
};
@@ -2655,7 +2740,9 @@
displayapm_func,
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"displayapm",
- "Display APM BIOS information."
+ "Display APM BIOS information.",
+ "displayapm",
+ "\tÏÔʾ APM BIOS µÄÏà¹ØÐÅÏ¢¡£"
};
@@ -2664,22 +2751,59 @@
displaymem_func (char *arg, int flags)
{
if (get_eisamemsize () != -1)
- grub_printf (" EISA Memory BIOS Interface is present\n");
+ {
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ grub_printf (" EISAÄÚ´æBIOS½Ó¿Ú´æÔÚ\n");
+ else
+ grub_printf (" EISA Memory BIOS Interface is present\n");
+#else
+ grub_printf (" EISA Memory BIOS Interface is present\n");
+#endif
+}
if (get_mmap_entry ((void *) SCRATCHADDR, 0) != 0
|| *((int *) SCRATCHADDR) != 0)
- grub_printf (" Address Map BIOS Interface is present\n");
-
- grub_printf (" Lower memory: %uK, "
+ {
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ {
+ grub_printf (" µØÖ·±ä»»BIOS½Ó¿Ú´æÔÚ\n");
+ grub_printf (" µÍ¶ËÄÚ´æ: %uK, "
+ "ÉÏλÄÚ´æ: %uK\n",
+ mbi.mem_lower, mbi.mem_upper);
+ }
+ else
+ {
+ grub_printf (" Address Map BIOS Interface is present\n");
+ grub_printf (" Lower memory: %uK, "
+ "Upper memory (to first chipset hole): %uK\n",
+ mbi.mem_lower, mbi.mem_upper);
+ }
+#else
+ grub_printf (" Address Map BIOS Interface is present\n");
+ grub_printf (" Lower memory: %uK, "
"Upper memory (to first chipset hole): %uK\n",
mbi.mem_lower, mbi.mem_upper);
+#endif
+}
if (mbi.flags & MB_INFO_MEM_MAP)
{
struct AddrRangeDesc *map = (struct AddrRangeDesc *) mbi.mmap_addr;
unsigned long end_addr = mbi.mmap_addr + mbi.mmap_length;
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ grub_printf (" [µØÖ·ÇøÓòÃèÊö·û"
+ "½ôËæÓÚ(ֵΪ64λ)]\n");
+ else
grub_printf (" [Address Range Descriptor entries "
"immediately follow (values are 64-bit)]\n");
+#else
+ grub_printf (" [Address Range Descriptor entries "
+ "immediately follow (values are 64-bit)]\n");
+#endif
+
while (end_addr > (unsigned long) map)
{
char *str;
@@ -2688,6 +2812,16 @@
str = "Usable RAM";
else
str = "Reserved";
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ grub_printf (" %s: »ùÖ·: 0x%x X 4GB + 0x%x,\n"
+ " ³¤¶È: 0x%x X 4GB + 0x%x ×Ö½Ú\n",
+ str,
+ (unsigned long) (map->BaseAddr >> 32),
+ (unsigned long) (map->BaseAddr & 0xFFFFFFFF),
+ (unsigned long) (map->Length >> 32),
+ (unsigned long) (map->Length & 0xFFFFFFFF));
+ else
grub_printf (" %s: Base Address: 0x%x X 4GB + 0x%x,\n"
" Length: 0x%x X 4GB + 0x%x bytes\n",
str,
@@ -2695,7 +2829,15 @@
(unsigned long) (map->BaseAddr & 0xFFFFFFFF),
(unsigned long) (map->Length >> 32),
(unsigned long) (map->Length & 0xFFFFFFFF));
-
+#else
+ grub_printf (" %s: Base Address: 0x%x X 4GB + 0x%x,\n"
+ " Length: 0x%x X 4GB + 0x%x bytes\n",
+ str,
+ (unsigned long) (map->BaseAddr >> 32),
+ (unsigned long) (map->BaseAddr & 0xFFFFFFFF),
+ (unsigned long) (map->Length >> 32),
+ (unsigned long) (map->Length & 0xFFFFFFFF));
+#endif
map = ((struct AddrRangeDesc *) (((int) map) + 4 + map->size));
}
}
@@ -2710,7 +2852,9 @@
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"displaymem",
"Display what GRUB thinks the system address space map of the"
- " machine is, including all regions of physical RAM installed."
+ " machine is, including all regions of physical RAM installed.",
+ "displaymem",
+ "\tÏÔʾ GRUB ËùÅжϵ½µÄµ±Ç°ÏµÍ³µÄÄÚ´æ·Ö²¼£¬°üÀ¨ËùÓÐÎïÀíÄÚ´æÇøÓò¡£"
};
@@ -2769,7 +2913,10 @@
BUILTIN_MENU | BUILTIN_CMDLINE,
"dump FROM TO",
"Dump the contents of the file FROM to the file TO. FROM must be"
- " a GRUB file and TO must be an OS file."
+ " a GRUB file and TO must be an OS file.",
+ "dump FROM TO",
+ "\tÏÔʾÖî¶àÎļþµÄÄÚÈÝ¡£×¢Ò⣬FROM ËùÖ¸¶¨µÄ±ØÐëÊÇÒ»¸ö GRUB Îļþ£¬TO Ëù"
+ "\n\tÖ¸¶¨µÄ±ØÐëÊÇÒ»¸ö²Ù×÷ϵͳÎļþ¡£ÕâÌõÃüÁîÖ»ÔÚ grub shell ÖвÅÓС£"
};
#endif /* GRUB_UTIL */
@@ -2916,7 +3063,11 @@
"embed STAGE1_5 DEVICE",
"Embed the Stage 1.5 STAGE1_5 in the sectors after MBR if DEVICE"
" is a drive, or in the \"bootloader\" area if DEVICE is a FFS partition."
- " Print the number of sectors which STAGE1_5 occupies if successful."
+ " Print the number of sectors which STAGE1_5 occupies if successful.",
+ "embed STAGE1_5 DEVICE",
+ "\tÈç¹ûÉ豸ÊǸöÇý¶¯Æ÷, Ôò½« Stage 1.5 ǶÈëµ½Ö÷Òýµ¼ÉÈÇøÖ®ºó. Èç¹ûÊÇ FFS"
+ "\n\t·ÖÇø, Ôò¿ÉǶÈëµ½¸ÃÉ豸µÄ¡°Òýµ¼´úÂ롱ÇøÖС£³É¹¦Ê±´òÓ¡³ö Stage 1.5 Ëù"
+ "\n\tÕ¼µÄÉÈÇøÊý¡£"
};
@@ -3014,7 +3165,10 @@
" errors, instead of waiting for the user to do anything, it"
" immediately starts over using the NUM entry (same numbering as the"
" `default' command). This obviously won't help if the machine"
- " was rebooted by a kernel that GRUB loaded."
+ " was rebooted by a kernel that GRUB loaded.",
+ "fallback NUM...",
+ "\t½øÈëÎÞÈ˸ÉÔ¤Æô¶¯Ä£Ê½£ºÈç¹ûĬÈÏÆô¶¯Èë¿ÚÏî³ö´íʧ°Ü£¬Á¢¼´ÓÃÈë¿ÚÏî NUM"
+ "\n\tÀ´Æô¶¯£¨ÕâÀïµÄ¡°Èë¿ÚÏÓë default ÃüÁîÖеġ°Èë¿ÚÏÒâÒåÏàͬ£©¡£"
#endif
};
@@ -3042,7 +3196,9 @@
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
#if 1
"commandline",
- "Enter command-line prompt mode."
+ "Enter command-line prompt mode.",
+ "commandline",
+ "\t½øÈëÃüÁîÐÐÌáʾ·û·½Ê½¡£"
#endif
};
@@ -3346,7 +3502,12 @@
" If the option --set-root is used and FILENAME is found on a device, then"
" stop the find immediately and set the device as new root."
" If the option --ignore-floppies is present, the search will bypass all"
- " floppies."
+ " floppies.",
+ "find [--set-root] [--ignore-floppies] FILENAME",
+ "\tÔÚËùÓзÖÇøÉϲéÕÒÎļþÃû, ²¢ÏÔʾ°üº¬¸ÃÎļþµÄÉ豸¡£Èç¹ûʹÓÃÁË"
+ "\n\t--set-root Ñ¡Ïî, ÄÇôµ±ÔÚij¸öÉ豸ÉÏÕÒµ½ FILENAME ʱ, Á¢¼´Í£Ö¹²éÕÒ,"
+ "\n\t²¢½«´ËÉ豸É趨ΪÐ嵀 root É豸¡£Èç¹ûÖ¸¶¨ÁË --ignore-floppies Ñ¡Ïî,"
+ "\n\tÄÇô²éÕÒ¹ý³Ì½«ÂÔ¹ýËùÓеÄÈíÅÌ¡£"
};
@@ -3374,7 +3535,9 @@
fstest_func,
BUILTIN_MENU | BUILTIN_CMDLINE,
"fstest",
- "Toggle filesystem test mode."
+ "Toggle filesystem test mode.",
+ "fstest",
+ "\tÇл»ÎļþϵͳµÄ¸ú×Ù²âÊÔģʽ¡£"
};
@@ -3478,7 +3641,10 @@
" the one of the heads, the one of the sectors and the one of the total"
" sectors are set to CYLINDER, HEAD, SECTOR and TOTAL_SECTOR,"
" respectively. If you omit TOTAL_SECTOR, then it will be calculated based"
- " on the C/H/S values automatically."
+ " on the C/H/S values automatically.",
+ "geometry DRIVE [CYLINDER HEAD SECTOR [TOTAL_SECTOR]]",
+ "\tÊä³öÇý¶¯Æ÷µÄÏà¹ØÐÅÏ¢. ÔÚ grub shell ÖÐ, Äã¿ÉÒÔÓÃÕâÌõÃüÁîÉèÖÃÇý¶¯Æ÷"
+ "\n\t²ÎÊýΪÈÎÒâÖµ¡£Èç¹ûÄãÊ¡ÂÔÁË×ÜÉÈÇøÊý, Ëü½«ÓÉ C/H/S µÄÖµ×Ô¶¯¼ÆËã³öÀ´¡£"
};
@@ -3502,7 +3668,10 @@
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"halt [--no-apm]",
"Halt your system. If APM is avaiable on it, turn off the power using"
- " the APM BIOS, unless you specify the option `--no-apm'."
+ " the APM BIOS, unless you specify the option `--no-apm'.",
+ "halt [--no-apm]",
+ "\t¹Ø±Õϵͳ¡£Èç¹ûAPM(¸ß¼¶µçÔ´¹ÜÀí)¹¦ÄÜ´æÔÚ£¬½«Ê¹Óà APM BIOS ¹Ø±Õϵͳ£¬"
+ "\n\t³ý·ÇÖ¸¶¨ÁË --no-apm Ñ¡Ïî¡£"
};
@@ -3587,13 +3756,25 @@
if (substring (arg, (*builtin)->name, 0) < 1)
{
char *doc = (*builtin)->long_doc;
-
+
/* At first, print the name and the short doc. */
- grub_printf ("%s: %s\n",
+ if ((*builtin)->short_doc)
+ grub_printf ("%s: %s\n",
(*builtin)->name, (*builtin)->short_doc);
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ {
+ if ((*builtin)->sc_long_doc)
+ grub_putstr ((*builtin)->sc_long_doc);
+ grub_putchar ('\n');
+ continue;
+ }
+#endif
+
/* Print the long doc. */
- while (*doc)
+ if (doc)
+ while (*doc)
{
int len = grub_strlen (doc);
//int i;
@@ -3630,7 +3811,9 @@
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"help [--all] [PATTERN ...]",
"Display helpful information about builtin commands. Not all commands"
- " aren't shown without the option `--all'."
+ " aren't shown without the option `--all'.",
+ "help [--all] [PATTERN ...]",
+ "\tÏÔʾÄÚ²¿ÃüÁîµÄ°ïÖúÐÅÏ¢¡£Òª²é¿´ËùÓÐÃüÁîµÄ°ïÖú£¬¿ÉʹÓà --all ²ÎÊý¡£"
};
@@ -3681,7 +3864,10 @@
"hide [PARTITION]",
"Hide PARTITION by setting the \"hidden\" bit in"
" its partition type code. The default partition is the current"
- " root device."
+ " root device.",
+ "hide [PARTITION]",
+ "\tͨ¹ýÔÚ·ÖÇøÀàÐÍÂëÉÏÉèÖá°Òþ²Ø¡±±êÖ¾£¬À´Òþ²Ø·ÖÇø PARTITION¡£"
+ "\n\tĬÈϵķÖÇøÊǵ±Ç°µÄ¸ùÉ豸¡£"
};
@@ -3694,7 +3880,14 @@
if (! eth_probe ())
{
- grub_printf ("No ethernet card found.\n");
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ grub_printf ("δ·¢ÏÖÍø¿¨.\n");
+ else
+ grub_printf ("No ethernet card found.\n");
+#else
+ grub_printf ("No ethernet card found.\n");
+#endif
errnum = ERR_DEV_VALUES;
return 1;
}
@@ -3735,7 +3928,10 @@
BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST,
"ifconfig [--address=IP] [--gateway=IP] [--mask=MASK] [--server=IP]",
"Configure the IP address, the netmask, the gateway and the server"
- " address or print current network configuration."
+ " address or print current network configuration.",
+ "ifconfig [--address=IP] [--gateway=IP] [--mask=MASK] [--server=IP]",
+ "\tÖ¸¶¨ IP µØÖ·, ×ÓÍøÑÚÂë, Íø¹ØºÍ·þÎñÆ÷µØÖ·¡£²»´ø²ÎÊýʱ£¬½«ÏÔʾµ±Ç°µÄ"
+ "\n\tÍøÂçÅäÖá£"
};
#endif /* SUPPORT_NETBOOT */
@@ -3764,7 +3960,10 @@
"impsprobe",
"Probe the Intel Multiprocessor Specification 1.1 or 1.4"
" configuration table and boot the various CPUs which are found into"
- " a tight loop."
+ " a tight loop.",
+ "impsprobe",
+ "\t̽²â Intel ¶à´¦ÀíÆ÷¹æ·¶ 1.1/1.4 ÅäÖÃ±í²¢Ê¹ËùÕÒµ½µÄ¸÷´¦ÀíÆ÷Æô¶¯½øÈë"
+ "\n\t±ÕÑ­»·¡£"
};
@@ -3795,7 +3994,9 @@
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"initrd FILE [ARG ...]",
"Load an initial ramdisk FILE for a Linux format boot image and set the"
- " appropriate parameters in the Linux setup area in memory."
+ " appropriate parameters in the Linux setup area in memory.",
+ "initrd FILE [ARG ...]",
+ "\t¼ÓÔØ Linux ¸ñʽµÄ³õʼ»¯ÐéÄâÅÌ, ²¢ÉèÖñØÒªµÄ²ÎÊý¡£"
};
@@ -4366,7 +4567,15 @@
" patched with the configuration filename REAL_CONFIG_FILE."
" If the option `--force-lba' is specified, disable some sanity checks"
" for LBA mode. If the option `--stage2' is specified, rewrite the Stage"
- " 2 via your OS's filesystem instead of the raw device."
+ " 2 via your OS's filesystem instead of the raw device.",
+ "install [--stage2=STAGE2_FILE] [--force-lba] STAGE1 [d] DEVICE STAGE2 [ADDR] [p] [CONFIG_FILE] [REAL_CONFIG_FILE]",
+ "\t°²×° STAGE1 µ½Ö¸¶¨É豸ÉÏ, °²×°¼ÓÔØ STAGE2 ÐèÒªµÄ¿éÁÐ±íµ½ STAGE2 ÉÏ¡£"
+ "\n\tÈç¹ûʹÓÃÁËÑ¡Ïî'd', STAGE1 ×ÜÊÇÊÔͼʹÓð²×° STAGE2 µÄÇý¶¯Æ÷, ¶ø²»ÊÇ"
+ "\n\tÆô¶¯ÅÌ¡£STAGE2 ½«¼ÓÔØÔÚÖ¸¶¨µØÖ·ÉÏ, Èç¹ûδÉùÃ÷µØÖ·, Ôò×Ô¶¯¼ì²â¡£Èç¹û"
+ "\n\tʹÓÃÁËÑ¡Ïî 'p' »ò¸ø³öÁËÅäÖÃÎļþ, ½«ÐÞ¸Ä STAGE2 µÄµÚÒ»¸öÊý¾Ý¿é, ÐÞÕý"
+ "\n\tʵ¼Ê Stage2 Æô¶¯Ê±Ê¹ÓõÄÅäÖÃÎļþλÖ᣶ÔÓÚ Stage 1.5, ¸ÃֵΪ Stage2"
+ "\n\tµÄ·¾¶¡£Èç¹û°²×°µÄÊÇ Stage1.5, ÇÒÖ¸¶¨ÁËʵ¼ÊÅäÖÃÎļþ, Ôò½«¸ÃÅäÖÃÎļþ"
+ "\n\t·¾¶Ð´Èë Stage2 ÖС£"
};
@@ -4409,7 +4618,9 @@
ioprobe_func,
BUILTIN_MENU | BUILTIN_CMDLINE,
"ioprobe DRIVE",
- "Probe I/O ports used for the drive DRIVE."
+ "Probe I/O ports used for the drive DRIVE.",
+ "ioprobe DRIVE",
+ "\tÕì²âÖ¸¶¨É豸µÄ I/O ¶Ë¿ÚºÅ¡£"
};
@@ -4521,7 +4732,13 @@
" to suggest what type of kernel to be loaded. TYPE must be either of"
" \"netbsd\", \"freebsd\", \"openbsd\", \"linux\", \"biglinux\" and"
" \"multiboot\". The option --no-mem-option tells GRUB not to pass a"
- " Linux's mem option automatically."
+ " Linux's mem option automatically.",
+ "kernel [--no-mem-option] [--type=TYPE] FILE [ARG ...]",
+ "\t³¢ÊÔÔØÈëÖ÷Òýµ¼Ó°ÏñÎļþ¡£ÆäËüÏ±»×÷ΪÄں˵ÄÃüÁîÐвÎÊý¶ø´«µÝ¸øÄںˡ£"
+ "\n\tʹÓôËÃüÁîÒÔÇ°£¬ÄÚºËËùÓõ½µÄÄ£¿éÓ¦¸Ã±»ÖØÐÂÔØÈë¡£²ÎÊý --type ÓÃÓÚ˵"
+ "\n\tÃ÷Äں˵ÄÀàÐÍ£¬°üÀ¨ netbsd, freebsd, openbsd, linux, biglinux ºÍ"
+ "\n\tmultiboot¡£²ÎÊý --no-mem-option ÓÃÓÚ˵Ã÷²»±Ø×Ô¶¯´«µÝ Linux µÄÄÚ´æ²Î"
+ "\n\tÊý¡£"
};
@@ -4544,7 +4761,9 @@
lock_func,
BUILTIN_MENU | BUILTIN_CMDLINE,
"lock",
- "Break a command execution unless the user is authenticated."
+ "Break a command execution unless the user is authenticated.",
+ "lock",
+ "\tÈç¹ûÓû§Î´±»ÈÏÖ¤£¬ÔòÖÕÖ¹ÃüÁîµÄÖ´ÐС£"
};
@@ -4565,7 +4784,9 @@
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"makeactive",
"Set the active partition on the root disk to GRUB's root device."
- " This command is limited to _primary_ PC partitions on a hard disk."
+ " This command is limited to _primary_ PC partitions on a hard disk.",
+ "makeactive",
+ "\t½« root É豸ÖÃΪ»î¶¯·ÖÇø¡£´ËÃüÁîÖ»ÄܶÔÓ²Å̵ġ°Ö÷¡±·ÖÇø½øÐвÙ×÷¡£"
};
@@ -6404,7 +6625,29 @@
" address RESERV in 512-byte-sectors and ending at the end of this mem"
" block(usually the end of physical mem). RD specifies the ramdisk number,"
" and can be a BIOS drive number. ADDR specifies the base address of the"
- " ramdisk image. SIZE specifies the size in bytes of the ramdisk image."
+ " ramdisk image. SIZE specifies the size in bytes of the ramdisk image.",
+ "map [--status] [--mem[=RESERV]] [--hook] [--unhook] [--rehook] [--floppies=M] [--harddrives=N] [--ram-drive=RD] [--rd-base=ADDR] [--rd-size=SIZE] [[--read-only] [--fake-write] [--unsafe-boot] [--disable-chs-mode] [--disable-lba-mode] [--heads=H] [--sectors-per-track=S] TO_DRIVE FROM_DRIVE]",
+ "\t¶ÔÉ豸½øÐÐÓ³Éä¡£Õâ¶ÔÓÚÉÈÇøÁ´Ê½Òýµ¼ÊǺÜÓÐÓõŦÄÜ£¬±ÈÈç DOS¡£ÕâÀĿ"
+ "\n\tµÄÇý¶¯Æ÷ TO_DRIVE ¿ÉÒÔÊÇÒ»¸ö´ÅÅÌÎļþ£¨×¢Ò⣬µ±Ã»ÓÐÖ¸¶¨ --mem ʱ£¬Õâ"
+ "\n\tÒªÇó´ÅÅÌÎļþÊÇÁ¬Ðø´æ·ÅÓÚ½éÖÊÖеġ£ÁíÍ⣬ÈôʹÓÃÁË --read-only ²ÎÊý,"
+ "\n\t¸Ã¹¦Äܽ«Ê¹·ÂÕæ´ÅÅÌ´¦ÓÚÖ»¶Á; ÈôʹÓÃÁË --fake-write ²ÎÊý£¬¸Ã¹¦Äܽ«Ê¹"
+ "\n\t·ÂÕæ´ÅÅÌ´¦ÓÚ¼Ùд£¬¼´¼òµ¥µØ·µ»Ø¡°Ð´È롱³É¹¦£¬µ«Êµ¼ÊÉϲ»Ö´ÐÐдÈë²Ù×÷;"
+ "\n\tÈôʹÓÃÁË --unsafe-boot ²ÎÊý£¬¸Ã¹¦Äܽ«Ê¹·ÂÕæ´ÅÅ̵ĵÚÒ»ÉÈÇø´¦ÓÚ¿Éд;"
+ "\n\t£¨Ä¬ÈÏʱ·ÂÕæ´ÅÅ̵ĵÚÒ»ÉÈÇø±»±£»¤£¬²»Äܾ­ÓÉ int13/AH=03h ¶øдÈ룩¡£"
+ "\n\tÈôʹÓÃÁË --disable-chs-mode ²ÎÊý£¬CHS ·ÃÎʹ¦Äܽ«±»½ûÓÃ; ÈôʹÓÃÁË"
+ "\n\t--disable-lba-mode ²ÎÊý£¬ LBA ·ÃÎʹ¦Äܽ«±»½ûÓÃ; H ºÍ S Ö¸¶¨ÁËÐéÄâ´Å"
+ "\n\tÅ̵ÄÎïÀí²ÎÊý¡£ÈôʹÓÃÁË --status, --hook, --unhook, --rehook,"
+ "\n\t--floppies, --harddrives, --ram-drive, --rd-base, --rd-size,"
+ "\n\t--memdisk-raw, --safe-mbr-hook, --int13-scheme Öî²ÎÊýÖ®Ò»£¬ÄÇôÆäËü"
+ "\n\tµÄÃüÁîÐвÎÊý½«±»ºöÂÔ¡£--floppies ÓÃÓÚÐÞ¸Ä BIOS Êý¾ÝÇø 0x410 ´¦µÄÈíÅÌ"
+ "\n\t¸öÊýλÓò¡£--harddrives ÓÃÓÚÐÞ¸Ä BIOS Êý¾ÝÇø 0x475 ´¦µÄÓ²Å̸öÊý×Ö½Ú¡£"
+ "\n\t--mem ²ÎÊýÖ¸¶¨Ê¹ÓÃÄÚ´æÀ´·ÂÕæ´ÅÅÌ£¨´Ëʱ TO_DRIVE ¿ÉÒÔÊÇ gzip ¸ñʽµÄѹ"
+ "\n\tËõÎļþ£©¡£--ram-drive ÓÃÓÚÐ޸Ĵú±íÄÚ´æÅÌµÄ BIOS ´ÅÅ̺ÅÂë¡£--rd-base"
+ "\n\tÖ¸¶¨ÄÚ´æÅ̵ÄÆðʼµØÖ·¡£--rd-size Ö¸¶¨ÄÚ´æÅ̵ĴóС£¨ÒÔ×Ö½Ú¼ÆÊý£©¡£Èç¹û"
+ "\n\tRESERV <= 0, ÄÇôÖÁÉÙ±£Áô (-RESERV * 512) ×Ö½ÚµÄÄÚ´æÓÃÀ´´æ·Å¸ÃÄÚ´æÅÌ"
+ "\n\tµÄÉÈÇøÊý¾Ý£»Èç¹û RESERV > 0, ¸ÃÄÚ´æÅ̽«ÆðʼÓÚ¾ø¶ÔÎïÀíµØÖ·"
+ "\n\t(RESERV * 512)£¬¶øÖÕÖ¹ÓÚ¸ÃÆðʼµØÖ·ËùÔÚµÄÁ¬ÐøÄÚ´æ¿éµÄ½áβ£¨Í¨³£µÈÓÚ»ò"
+ "\n\t½Ó½üÓÚÎïÀíÄÚ´æµÄ½á⣩¡£"
};
#endif /* ! GRUB_UTIL */
@@ -6463,7 +6706,9 @@
md5crypt_func,
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"md5crypt",
- "Generate a password in MD5 format."
+ "Generate a password in MD5 format.",
+ "md5crypt",
+ "\t²úÉúÒ»¸ö MD5 ¸ñʽµÄÃÜÂë¡£"
};
#endif /* USE_MD5_PASSWORDS */
@@ -6512,7 +6757,11 @@
" interpretation of the file contents is made, so users of this"
" command must know what the kernel in question expects). The"
" rest of the line is passed as the \"module command line\", like"
- " the `kernel' command."
+ " the `kernel' command.",
+ "module FILE [ARG ...]",
+ "\tΪ¶àÖØÆô¶¯Ó³Ïñ¸ñʽµÄÒýµ¼Ó³Ïñ¼ÓÔØÆô¶¯Ä£¿éÎļþ FILE£¨¶Ô¸ÃÎļþµÄÄÚÈݲ»"
+ "\n\t×÷ÈκνâÊÍ, Òò´ËʹÓÃÕâÌõÃüÁîµÄÓû§±ØÐëÁ˽âËùÌáµ½µÄÄÚºËÓ³ÏñµÄÒªÇ󣩡£"
+ "\n\tÆäÓà²ÎÊý×÷Ϊ¡°Ä£¿éÃüÁîÐС±´«µÝ, ¾ÍÏñ kernel ÃüÁîÄÇÑù¡£"
};
@@ -6542,7 +6791,9 @@
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"modulenounzip FILE [ARG ...]",
"The same as `module', except that automatic decompression is"
- " disabled."
+ " disabled.",
+ "modulenounzip FILE [ARG ...]",
+ "\tÓë¡°module¡±ÃüÁîÏàͬ, ²î±ðÊÇ GRUB ²»»á¶Ô FILE ½øÐÐ×Ô¶¯½âѹËõ¡£"
};
@@ -6574,7 +6825,10 @@
BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST,
"pager [FLAG]",
"Toggle pager mode with no argument. If FLAG is given and its value"
- " is `on', turn on the mode. If FLAG is `off', turn off the mode."
+ " is `on', turn on the mode. If FLAG is `off', turn off the mode.",
+ "pager [FLAG]",
+ "\tûÓвÎÊýʱ£¬Çл»Ò³Ä£Ê½¡£Èç¹ûʹÓÃÁË FLAG ²ÎÊý£¬ÄÇôËüΪ on ʱ¿ªÆô,"
+ "\n\tΪ off ʱ¹Ø±Õ¡£"
};
@@ -6696,7 +6950,10 @@
BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST,
"partnew PART TYPE START LEN",
"Create a primary partition at the starting address START with the"
- " length LEN, with the type TYPE. START and LEN are in sector units."
+ " length LEN, with the type TYPE. START and LEN are in sector units.",
+ "partnew PART TYPE START LEN",
+ "\t´´½¨Ò»¸öеÄÖ÷·ÖÇø¡£START ΪÆðʼÉÈÇøºÅ£¬LEN ΪÆä°üº¬µÄÉÈÇøÊý£¬TYPE"
+ "\n\tΪÆä·ÖÇøÀàÐÍ¡£"
};
@@ -6786,7 +7043,9 @@
parttype_func,
BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST,
"parttype PART TYPE",
- "Change the type of the partition PART to TYPE."
+ "Change the type of the partition PART to TYPE.",
+ "parttype PART TYPE",
+ "\t°ÑÖ¸¶¨·ÖÇø PART µÄ·ÖÇøÀàÐ͸ÄΪ TYPE¡£"
};
@@ -6860,7 +7119,13 @@
" instructions. You can also use it in the script section, in"
" which case it will ask for the password, before continueing."
" The option --md5 tells GRUB that PASSWD is encrypted with"
- " md5crypt."
+ " md5crypt.",
+ "password [--md5] PASSWD [FILE]",
+ "\tµ±Æä´¦Óڲ˵¥ÎļþµÄÊ×Ïîʱ£¬½«½ûÓÃËùÓеĽ»»¥Ê½²Ëµ¥±à¼­¹¦ÄÜ£¬°üÀ¨±à¼­"
+ "\n\t²Ëµ¥Ïî(`e')/½øÈëÃüÁîÐÐ(`c')¡£µ±ÕýÈ·ÊäÈëÃÜÂë(ÓÉ PASSWD Ö¸¶¨)ºó, ÔØÈë"
+ "\n\tеIJ˵¥Îļþ(ÓÉ FILE Ö¸¶¨)¡£Èç¹ûÄãûÓÐÖ¸¶¨ FILE ÏÄÇôÉÏÊö±»½ûÓÃ"
+ "\n\tµÄ¹¦Äܽ«±»ÆôÓÃÁË¡£µ±È»£¬ÄãÒ²¿ÉÒÔ½«´ËÃüÁîÓõ½Ä³¸ö²Ëµ¥ÏîÀÓÃÒÔÌá¸ß"
+ "\n\tϵͳ°²È«ÐÔ¡£²ÎÊý --md5 ˵Ã÷ÃÜÂë PASSWD ÊÇʹÓà md5crypt ¼ÓÃܵġ£"
};
@@ -6926,7 +7191,10 @@
pause_func,
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_NO_ECHO,
"pause [--wait=T] [MESSAGE ...]",
- "Print MESSAGE, then wait until a key is pressed or T seconds has passed."
+ "Print MESSAGE, then wait until a key is pressed or T seconds has passed.",
+ "pause [--wait=T] [MESSAGE ...]",
+ "\t´òÓ¡ÐÅÏ¢ MESSAGE£¬È»ºóµÈ´ý£¬Ö±µ½°´ÏÂÒ»¼ü£¬»òÕß T Ãë¹ýºó£¬ÃüÁî½áÊø£¬"
+ "\n\t¿ØÖÆ·µ»Øµ½ GRUB£¬¼ÌÐøÖ´ÐÐÏÂÒ»ÌõÃüÁî¡£"
};
@@ -6947,7 +7215,9 @@
quit_func,
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"quit",
- "Exit from the GRUB shell."
+ "Exit from the GRUB shell.",
+ "quit",
+ "\t´Ó GRUB ÃüÁîÐÐÖÐÍ˳ö¡£"
};
#else
/* quit */
@@ -7036,7 +7306,9 @@
quit_func,
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"quit [--disable-a20]",
- "Go back to DOS if GRUB was previously launched from DOS."
+ "Go back to DOS if GRUB was previously launched from DOS.",
+ "quit [--disable-a20]",
+ "\tÈç¹û GRUB ÏÈÇ°ÊÇ´Ó DOS Æô¶¯µÄ£¬¾Í·µ»Øµ½ DOS¡£"
};
#endif /* GRUB_UTIL */
@@ -7066,7 +7338,9 @@
rarp_func,
BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST,
"rarp",
- "Initialize a network device via RARP."
+ "Initialize a network device via RARP.",
+ "rarp",
+ "\tÓà RARP ³õʼ»¯ÍøÂçÉ豸¡£"
};
#endif /* ! GRUB_UTIL */
#endif /* SUPPORT_NETBOOT */
@@ -7093,7 +7367,9 @@
BUILTIN_MENU | BUILTIN_CMDLINE,
"read ADDR",
"Read a 32-bit value from memory at address ADDR and"
- " display it in hex format."
+ " display it in hex format.",
+ "read ADDR",
+ "\t´ÓÄÚ´æµÄÖ¸¶¨Î»ÖöÁÈ¡Ò»¸ö 32-bit µÄÖµ£¬²¢ÒÔÊ®Áù½øÖÆÐÎʽÏÔʾ³öÀ´¡£"
};
static int
@@ -7122,7 +7398,9 @@
write_func,
BUILTIN_MENU | BUILTIN_CMDLINE,
"write ADDR VAL",
- "Write a 32-bit value VAL to memory at address ADDR."
+ "Write a 32-bit value VAL to memory at address ADDR.",
+ "write ADDR VAL",
+ "\tдһ¸ö 32 λµÄÖµ VAL µ½ÄÚ´æµØÖ· ADDR¡£"
};
@@ -7142,7 +7420,9 @@
reboot_func,
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"reboot",
- "Reboot your system."
+ "Reboot your system.",
+ "reboot",
+ "\tÖØÆôϵͳ¡£"
};
#endif /* ! GRUB_UTIL */
@@ -7255,6 +7535,78 @@
return 0;
}
+#ifdef SUPPORT_GRAPHICS
+/* Chinese Support by Gandalf
+ * These codes used for defining a proper fontfile
+ */
+char fontfile[256];
+static int font_func (char *arg, int flags) {
+ //int i;
+
+ if (grub_strlen(arg) <= 0)
+ {
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ grub_printf("µ±Ç°×ÖÌåÎļþ: %s", fontfile);
+ else
+ grub_printf("Current font file is: %s", fontfile);
+#else
+ grub_printf("Current font file is: %s", fontfile);
+#endif
+ return 0;
+ }
+
+ while(arg[0]==' '||arg[0]=='\t') arg++;
+
+ if (strlen(arg) > 256)
+ return errnum = ERR_WONT_FIT;
+
+// if (flags == BUILTIN_CMDLINE) {
+ if (! grub_open(arg))
+ return 1;
+ grub_close();
+// }
+
+ strcpy(fontfile, arg);
+
+ /* get rid of TERM_NEED_INIT from the graphics terminal. */
+ for (i = 0; term_table[i].name; i++) {
+ if (grub_strcmp (term_table[i].name, "graphics") == 0) {
+ term_table[i].flags &= ~TERM_NEED_INIT;
+ break;
+ }
+ }
+
+ //graphics_set_splash (splashimage);
+
+ if (/* flags == BUILTIN_CMDLINE && */ graphics_inited) {
+ graphics_end();
+ if (! graphics_init())
+ return errnum = ERR_EXEC_FORMAT;
+ graphics_cls();
+ }
+
+ /* FIXME: should we be explicitly switching the terminal as a
+ * side effect here? */
+ terminal_func("graphics", flags);
+
+ return 0;
+}
+
+static struct builtin builtin_fontfile =
+{
+ "fontfile",
+ font_func,
+ BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
+ "fontfile FILE",
+ "Specify the Chinese Font File. "
+ "If you want display chinese character, please run"
+ "splashimage command later.",
+ "fontfile FILE",
+ "\tÖ¸¶¨ÖÐÎÄ×ÖÌåÎļþ£¬²¢Çл»µ½¼òÌåÖÐÎÄÏÔʾ·½Ê½¡£"
+};
+#endif /* SUPPORT_GRAPHICS */
+
static int
root_func (char *arg, int flags)
{
@@ -7276,7 +7628,13 @@
" optional HDBIAS parameter is a number to tell a BSD kernel"
" how many BIOS drive numbers are on controllers before the current"
" one. For example, if there is an IDE disk and a SCSI disk, and your"
- " FreeBSD root partition is on the SCSI disk, then use a `1' for HDBIAS."
+ " FreeBSD root partition is on the SCSI disk, then use a `1' for HDBIAS.",
+ "root [DEVICE [HDBIAS]]",
+ "\tÉèÖøù·ÖÇøΪָ¶¨É豸(DEVICE), È»ºó³¢ÊԹҽӸ÷ÖÇøÒԵõ½·ÖÇø´óС(ÓÃÓÚ"
+ "\n\tÔÚES:ESIÖд«µÝ, ÉÈÇøÁ´Ê½Æô¶¯·½Ê½ÒªÇóÕâÑù)¡£BSD Çý¶¯ÀàÐÍÓÃÓÚÆô¶¯ BSD"
+ "\n\tµÄºËÐÄÆô¶¯), ºÍÈ·¶¨ BSD ×Ó·ÖÇøËùÔÚµÄ PC ·ÖÇø¡£¿ÉÑ¡µÄ´ÅÅÌÆ«ÒƲÎÊý, ÓÃ"
+ "\n\tÓÚ BSD ºËÐÄÈ·¶¨ÓжàÉÙ¸ö¿ØÖÆÆ÷ÔÚµ±Ç°¿ØÖÆÆ÷Ç°¡£±ÈÈç, ¼ÙÉèͬʱÓÐÒ»¸ö"
+ "\n\tIDE ºÍ SCSI ÅÌ, ¶ø BSD ¸ù·ÖÇøÔÚ SCSI ÅÌÉÏ, ÄÇô´ÅÅÌÆ«ÒƾÍΪ 1¡£"
};
@@ -7297,7 +7655,12 @@
" is useful for when an OS is outside of the area of the disk that"
" GRUB can read, but setting the correct root device is still"
" desired. Note that the items mentioned in `root' which"
- " derived from attempting the mount will NOT work correctly."
+ " derived from attempting the mount will NOT work correctly.",
+ "rootnoverify [DEVICE [HDBIAS]]",
+ "\tÀàËÆÓÚ¡°root¡±Ö¸Áî, µ«²»³¢ÊԹҽӸ÷ÖÇø¡£ÕâÓÃÓÚÓÐЩ²Ù×÷ϵͳ°²×°ÔÚ"
+ "\n\tGRUB ÄÜ·ÃÎʵ½µÄ´ÅÅÌÇøÓòÖ®Í⣬»òÕßÆäÎļþϵͳ²»Äܱ» GRUB ʶ±ð³öÀ´£¬"
+ "\n\tµ«ÄãÈÔÈ»Ïë°ÑÕâ¸öÉ豸ǿÖÆÉèÖÃΪ root É豸µÄÇé¿ö¡£ËµÃ÷£ºÕâÑùÒ»À´£¬"
+ "\n\tÔ­À´ÔÚ root ÃüÁîÖг¢ÊÔ¹Ò½ÓµÄÄÇЩÏîÄ¿£¬ÏÖÔÚ½«²»Æð×÷ÓÃÁË¡£"
};
@@ -7633,7 +7996,13 @@
" `fallback' is used, next fallback entry is saved."
" If T is not 0, prompt the user to confirm the write operation by"
" pressing the Y key, and if no key-press detected within T seconds,"
- " the write will be discarded."
+ " the write will be discarded.",
+ "savedefault",
+ "\tÈç¹ûûÓÐÖ¸¶¨²ÎÊý£¬¾Í°Ñµ±Ç°²Ëµ¥Ïî±£´æΪĬÈϵÄÒýµ¼Ïî¡£Èç¹ûÖ¸¶¨Á˲ÎÊý"
+ "\n\tNUM£¬ÄÇô±£´æµÄ¾ÍÊÇËü¡£Èç¹ûÖ¸¶¨µÄÊǹؼü×Ö fallback£¬ÄÇô±£´æµÄÊÇ"
+ "\n\tfallback ÃüÁîËùÖ¸¶¨µÄ²Ëµ¥Ïî¡£Èç¹û T ²»ÊÇ 0£¬½«ÌáʾÓû§°´Ï Y ¼üÀ´"
+ "\n\tÈ·ÈÏдÅ̲Ù×÷£¬Èç¹ûÔÚ T ÃëÖ®ÄÚûÓа´¼ü£¬»òÕß°´¼ü²»ÊÇ Y£¬ÄÇôдÅ̱£´æ"
+ "\n\tµÄ²Ù×÷½«±»È¡Ïû¡£"
};
@@ -7785,7 +8154,13 @@
" PARITY is the type of parity, which is one of `no', `odd' and `even'."
" STOP is the length of stop bit(s). The option --device can be used only"
" in the grub shell, which specifies the file name of a tty device. The"
- " default values are COM1, 9600, 8N1."
+ " default values are COM1, 9600, 8N1.",
+ "serial [--unit=UNIT] [--port=PORT] [--speed=SPEED] [--word=WORD] [--parity=PARITY] [--stop=STOP] [--device=DEV]",
+ "\t³õʼ»¯Ò»¸ö´®¿ÚÉ豸¡£UNIT ÓÃÓÚÖ¸¶¨ÒªÊ¹ÓõĴ®¿ÚÉ豸(È磬0 == COM1);"
+ "\n\tPORT ÓÃÓÚÖ¸¶¨¶Ë¿ÚºÅ; SPEED ÓÃÓÚÖ¸¶¨Í¨Ñ¶µÄÊýÂÊ; WORD Ϊ×Ö³¤;"
+ "\n\tPARITY ΪÆæżÀàÐÍ(È¡ `no', `odd' ºÍ `even' Ö®Ò»µÄÖµ¡£); STOP ÊÇÍ£Ö¹"
+ "\n\tλµÄ³¤¶ÈÖµ; Ñ¡Ïî --device ½öÓÃÓÚÃüÁîÐÐģʽ£¬ÓÃÒÔÖ¸¶¨ tty É豸µÄÎļþ"
+ "\n\tÃû¡£Ä¬ÈÏÖµÊÇÕâÑùµÄ£¬COM1, 9600, 8N1¡£"
};
#endif /* SUPPORT_SERIAL */
@@ -8037,7 +8412,18 @@
" quote, doublequote, backquote, tilde, shift, backslash, bar, comma,"
" less, period, greater, slash, question, alt, space, capslock, FX (X"
" is a digit), and delete. If no argument is specified, reset key"
- " mappings."
+ " mappings.",
+ "setkey [TO_KEY FROM_KEY]",
+ "\t¸Ä±ä¼üÅÌÓ³Éä¹Øϵ¡£°ÑFROM_KEYÓ³ÉäΪTO_KEY¡£ÕâÀïµÄ¼ü±ØÐëÊÇ×Öĸ, Êý×Ö,"
+ "\n\tºÍÒÔÏÂÌØÊâ¼ü: escape(תÒå), exclam(!), at(@), numbersign(#),"
+ "\n\tdollar($), parenright[)], caret(^), ampersand(&), asterisk(*),"
+ "\n\tplus(+), percent(%), minus(-), underscore(_), equal(=),"
+ "\n\tparenleft[(], backspace(Í˸ñ), tab(ÖƱí), bracketleft([),"
+ "\n\tbraceleft({), bracketright(]), braceright(}), enter(»Ø³µ),"
+ "\n\tcontrol(¿ØÖÆ), semicolon(;), colon(:), quote('), doublequote(\"),"
+ "\n\tslash(/), backquote(`), tilde(~), shift(»»µµ), backslash(\\),"
+ "\n\tbar(|), comma(,), less(<), period(.), greater(>), question(?),"
+ "\n\talt(½»»¥), space(¿Õ¸ñ), capslock(´óд), Fx(¹¦Äܼü) ºÍ delete(ɾ³ý)¡£"
};
@@ -8367,7 +8753,14 @@
" doesn't work in LBA mode, specify the option `--force-lba'."
" If you install GRUB under the grub shell and you cannot unmount the"
" partition where GRUB images reside, specify the option `--stage2'"
- " to tell GRUB the file name under your OS."
+ " to tell GRUB the file name under your OS.",
+ "setup [--prefix=DIR] [--stage2=STAGE2_FILE] [--force-lba] INSTALL_DEVICE [IMAGE_DEVICE]",
+ "\t×Ô¶¯°²×° GRUB. ÕâÌõÃüÁîʹÓøüÁé»îµÄ install ÃüÁ GRUB °²×°µ½Ö¸¶¨"
+ "\n\tÉ豸ÉÏ¡£Èç¹û¸ø³öÁËÓ³ÏóÉ豸, ½«ÔÚ¸ÃÉ豸ѰÕÒ GRUB, ·ñÔòʹÓÃȱʡµÄ¸ùÉè"
+ "\n\t±¸¡£¸ùÉ豸¿ÉÓà root Ö¸ÁîÖ¸¶¨¡£Èç¹ûÄãÈ·ÈÏϵͳµÄ BIOS Ó¦¸ÃÖ§³Ö LBA Ä£"
+ "\n\tʽ, µ«ÊÇ GRUB ȴûÓй¤×÷ÓÚ¸Ãģʽ, ÔòÇëÖ¸¶¨ --force-lba ²ÎÊý¡£ÈçÈôÄã"
+ "\n\tÔÚÃüÁîÐÐÖÐÒÑ°²×°ÁËÒ»´Î GRUB, ¿ÉÊÇÄãÈ´ÎÞ·¨Ð¶ÔØ GRUB ³ÌÐòËùÔڵķÖÇø£¬"
+ "\n\tÇëÖ¸¶¨ `--stage2' ²ÎÊý¡£"
};
@@ -8565,7 +8958,16 @@
" If you specify --no-edit, the BASH-like editing feature will be disabled."
" If --timeout is present, this command will wait at most for SECS"
" seconds. The option --lines specifies the maximum number of lines."
- " The option --silent is used to suppress messages."
+ " The option --silent is used to suppress messages.",
+ "terminal [--dumb] [--no-echo] [--no-edit] [--timeout=SECS] [--lines=LINES] [--silent] [console] [serial] [hercules] [graphics]",
+ "\tÑ¡ÔñÒ»¸öÖնˡ£µ±Ö¸¶¨Á˶à¸öÖÕ¶ËÒÔºó, °´ÈÎÒâ¼ü·½¿É¼ÌÐø²Ù×÷¡£Èç¹û¿ØÖÆ"
+ "\n\t̨ºÍ´®¿Ú¶¼±»Ö¸¶¨ÁË, ÄÇôÄãÊ×ÏÈÔÚÆäÖа´Ï¼üÅ̵ÄÖն˽«±»Ê×ÏÈÑ¡ÖС£"
+ "\n\tÈç¹ûûÓÐÖ¸¶¨ÈκβÎÊý, ÄÇô´ËÃüÁÏÔʾ³öµ±Ç°µÄÖÕ¶ËÉèÖÃ; ²ÎÊý --dumb"
+ "\n\tÓÃÒÔÖ¸¶¨Ò»¸öÑÆÖÕ¶Ë, ·ñÔò¼´Îª vt100 ¼æÈÝÐÍ; ÈôʹÓÃÁË --no-echo ²ÎÊý,"
+ "\n\tÆÁÄ»ÉϽ«²»»á»ØÏÔÊäÈëµÄ×Ö·û; ÈôʹÓÃÁË --no-edit ²ÎÊý, the BASH-like"
+ "\n\tµÄ±à¼­¹¦Äܽ«±»½ûÓÃ; ÈôʹÓÃÁË --timeout ²ÎÊý, ¸ÃÃüÁµÈ´ýÊýÃëÖÓ(ÓÉ"
+ "\n\tSECS Ö¸¶¨); ¿ÉʹÓà --lines Ö¸¶¨×î´óµÄÐÐÊý; ¿ÉʹÓà --silent Ñ¡Ïî¹Ø±Õ"
+ "\n\tÏûÏ¢ÏÔʾ¡£"
};
#endif /* SUPPORT_SERIAL || SUPPORT_HERCULES || SUPPORT_GRAPHICS */
@@ -8681,7 +9083,13 @@
"Define the capabilities of your terminal. Use this command to"
" define escape sequences, if it is not vt100-compatible."
" You may use \\e for ESC and ^X for a control character."
- " If no option is specified, the current settings are printed."
+ " If no option is specified, the current settings are printed.",
+ "terminfo [--name=NAME --cursor-address=SEQ [--clear-screen=SEQ]"
+ " [--enter-standout-mode=SEQ] [--exit-standout-mode=SEQ]]",
+
+ "\tÖ¸¶¨Öն˵ŦÄÜ¡£Èç¹û´ËÖÕ¶ËΪ vt100 ¼æÈÝÐ͵ģ¬Ôò¿ÉÖ¸¶¨»»Âë˳Ðò(¼´Ê¹"
+ "\n\tÓà \\e ´ú±í ESC, ^X¡¡´ú±í¿ØÖÆÂë); ÔÚδ¸øÈκβÎÊýµÄÇé¿öÏ£¬½«¸ø³ö"
+ "\n\tµ±Ç°ÅäÖÃÐÅÏ¢¡£"
};
#endif /* SUPPORT_SERIAL */
@@ -8770,7 +9178,13 @@
" filepos=Y' reading has X and Y equal, then it is definitely"
" consistent, and very likely works correctly subject to a"
" consistent offset error. If this test succeeds, then a good next"
- " step is to try loading a kernel."
+ " step is to try loading a kernel.",
+ "testload FILE",
+ "\tÓü¸ÖÖ²»Í¬µÄ·½Ê½¶ÁÈ¡Îļþ FILE µÄÕû¸öÄÚÈݲ¢±È½ÏËüÃÇ£¬ÒÔ²âÊÔÎļþϵͳ"
+ "\n\t´úÂëµÄÕýÈ·ÐÔ¡£Êä³ö¿´ÆðÀ´»áÓеã¶ù»ìÂÒ£¬µ«ÊÇ£¬Èç¹ûûÓб¨¸æ´íÎ󣬶øÇÒ"
+ "\n\t×îºóµÄ¡°i=X, filepos=Y¡±ÖÐµÄ X ºÍ Y ÊÇÏàµÈµÄ»°£¬ÄÇô´úÂëÎÞÒÉÊÇ¿É¿¿"
+ "\n\tµÄ£¬¶øÇҺܿÉÄÜÕýÈ·ÎÞÎóµØ¹¤×÷¶ø²»»á³öÏÖ±ðµÄ²î´í¡£Èç¹û²âÊԳɹ¦£¬ÏÂÒ»"
+ "\n\t²½¾¡¿É³¢ÊÔ¼ÓÔØÒ»¸öÄںˡ£"
};
@@ -8889,7 +9303,9 @@
testvbe_func,
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"testvbe MODE",
- "Test the VBE mode MODE. Hit any key to return."
+ "Test the VBE mode MODE. Hit any key to return.",
+ "testvbe MODE",
+ "\t²âÊÔËùÖ¸¶¨ MODE µÄ VBE ģʽ¡£"
};
static inline unsigned long vbe_far_ptr_to_linear (unsigned long ptr)
@@ -9024,7 +9440,9 @@
setvbe_func,
BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST,
"setvbe MODE_3D",
- "Set the VBE mode MODE_3D(which is of the form 1024x768x32) for each subsequent kernel command-line."
+ "Set the VBE mode MODE_3D(which is of the form 1024x768x32) for each subsequent kernel command-line.",
+ "setvbe MODE_3D",
+ "\tΪºóÐøµÄÿ¸ö kernel ÃüÁîÐÐÉèÖà VBE ģʽ MODE_3D(ÀýÈç 1024x768x32)¡£"
};
@@ -9049,7 +9467,9 @@
tftpserver_func,
BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST,
"tftpserver IPADDR",
- "Override the TFTP server address."
+ "Override the TFTP server address.",
+ "tftpserver IPADDR",
+ "\tÖ¸¶¨ TFTP ·þÎñÆ÷µÄ IP µØÖ·¡£"
};
#endif /* SUPPORT_NETBOOT */
@@ -9125,7 +9545,10 @@
"unhide [PARTITION]",
"Unhide PARTITION by clearing the \"hidden\" bit in its"
" partition type code. The default partition is the current"
- " root device."
+ " root device.",
+ "unhide [PARTITION]",
+ "\tͨ¹ýÇå³ý·ÖÇøÀàÐÍÂëÉϵġ°Òþ²Ø¡±±êÖ¾£¬À´½â³ý¶Ô·ÖÇø PARTITION µÄÒþ²Ø¡£"
+ "\n\tĬÈϵķÖÇøÊǵ±Ç°µÄ¸ùÉ豸¡£"
};
@@ -9147,7 +9570,10 @@
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"uppermem KBYTES",
"Force GRUB to assume that only KBYTES kilobytes of upper memory are"
- " installed. Any system address range maps are discarded."
+ " installed. Any system address range maps are discarded.",
+ "uppermem KBYTES",
+ "\tÇ¿ÖÆ GRUB ³ÐÈÏϵͳÖÐÖ»°²×°ÁË (KBYTES) KB µÄÉÏλÄÚ´æ¡£ÂÔ¹ýÈκÎÐÎʽµÄ"
+ "\n\tϵͳÄÚ´æµØÖ·ÇøÓò²éÕÒ²½Öè¡£"
};
@@ -9245,7 +9671,9 @@
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"vbeprobe [MODE]",
"Probe VBE information. If the mode number MODE is specified, show only"
- " the information about only the mode."
+ " the information about only the mode.",
+ "vbeprobe [MODE]",
+ "\tÕì²â VBE µÄÐÅÏ¢¡£Èç¹ûÖ¸¶¨ÁËÒ»¸öģʽ MODE£¬Ôò½öÏÔʾÕâ¸öģʽµÄÐÅÏ¢¡£"
};
@@ -9291,6 +9719,7 @@
&builtin_fallback,
&builtin_find,
#ifdef SUPPORT_GRAPHICS
+ &builtin_fontfile, /* Chinese Support Function by Gandalf*/
&builtin_foreground,
#endif
&builtin_fstest,
diff -Naur grub-0.97_splash/stage2/char_io.c grub-0.97_chinese/stage2/char_io.c
--- grub-0.97_splash/stage2/char_io.c 2007-04-06 18:48:26.000000000 +0800
+++ grub-0.97_chinese/stage2/char_io.c 2007-04-11 17:36:42.000000000 +0800
@@ -325,8 +325,17 @@
{
cls ();
+#ifdef SUPPORT_GRAPHICS
+if (graphics_inited && ushFontReaded)
+ grub_printf ("GNU GRUB ÖÐÎÄ»¯°æ£Û°æ±¾ %s£Ý(%dK µÍ¶Ë / %dK ÉÏλ ÄÚ´æ)\n",
+ version_string, mbi.mem_lower, mbi.mem_upper);
+else
grub_printf ("GNU GRUB version %s (%dK lower / %dK upper memory)\n",
version_string, mbi.mem_lower, mbi.mem_upper);
+#else
+ grub_printf ("GNU GRUB version %s (%dK lower / %dK upper memory)\n",
+ version_string, mbi.mem_lower, mbi.mem_upper);
+#endif
}
#endif
diff -Naur grub-0.97_splash/stage2/cmdline.c grub-0.97_chinese/stage2/cmdline.c
--- grub-0.97_splash/stage2/cmdline.c 2007-04-10 09:40:45.000000000 +0800
+++ grub-0.97_chinese/stage2/cmdline.c 2007-04-11 17:36:42.000000000 +0800
@@ -51,10 +51,23 @@
void
print_cmdline_message (int forever)
{
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ printf (" £Û ÌṩÀàËÆ BASH µÄÐб༭¹¦ÄÜ¡£¶ÔÓÚµÚÒ»¸ö´Ê, TAB ¼üÁгö¿ÉÄܵÄ\n"
+ " ÍêÕûÃüÁî¡£·ñÔò¼´Áгö¿ÉÄܵÄÉ豸/Îļþ¡£%s £Ý\n",
+ (forever ? "" : " °´ `ESC` ¼´¿ÉÍ˳öµ±Ç°×´Ì¬¡£"));
+ else
printf (" [ Minimal BASH-like line editing is supported. For the first word, TAB\n"
" lists possible command completions. Anywhere else TAB lists the possible\n"
" completions of a device/filename.%s ]\n",
(forever ? "" : " ESC at any time exits."));
+
+#else
+ printf (" [ Minimal BASH-like line editing is supported. For the first word, TAB\n"
+ " lists possible command completions. Anywhere else TAB lists the possible\n"
+ " completions of a device/filename.%s ]\n",
+ (forever ? "" : " ESC at any time exits."));
+#endif
}
/* Find the builtin whose command name is COMMAND and return the
diff -Naur grub-0.97_splash/stage2/graphics.c grub-0.97_chinese/stage2/graphics.c
--- grub-0.97_splash/stage2/graphics.c 2007-04-11 18:00:21.000000000 +0800
+++ grub-0.97_chinese/stage2/graphics.c 2007-04-11 17:38:18.000000000 +0800
@@ -1,4 +1,5 @@
/* graphics.c - graphics mode support for GRUB */
+/* Chinese double-byte character support by Gandalf <f22_storm@163.com> */
/* Implemented as a terminal type by Jeremy Katz <katzj@redhat.com> based
* on a patch by Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*/
@@ -42,6 +43,7 @@
static unsigned char *VSHADOW4 = (unsigned char *)0x3B2C00; //unsigned char VSHADOW4[38400];
static unsigned char *VSHADOW8 = (unsigned char *)0x3BC200; //unsigned char VSHADOW8[38400];
+#define BASE_FONT_ADDR 0x500000; /* Raw base address for Chinese Font.*/
/* constants to define the viewable area */
const int x0 = 0;
const int x1 = 80;
@@ -52,6 +54,8 @@
* scroll and the like */
static unsigned short text[80 * 30];
+unsigned short stg2_ptborder = 0; /* Is called from stage2 drawing the menu border? */
+
/* why do these have to be kept here? */
int foreground = (63 << 16) | (63 << 8) | (63), background = 0, border = 0;
@@ -59,6 +63,9 @@
static int fontx = 0;
static int fonty = 0;
+//static char* chrMsg = "(r)Powered by Gandalf, f22_storm@163.com, 07/15/2004";
+
+unsigned short ushFontReaded = 0; /* font loaded? */
/* global state so that we don't try to recursively scroll or cursor */
static int no_scroll = 0;
@@ -113,10 +120,40 @@
saved_videomode = set_videomode(0x12);
}
+ if (! ushFontReaded)
+ {
+ ushFontReaded = 1;
+
+/* remove them all.
+ grub_open("/boot/grub/fonts") ||
+ grub_open("/boot/fonts") ||
+ grub_open("/grub/fonts") ||
+ grub_open("/fonts")
+*/
+
+ if (grub_strlen(fontfile) > 0)
+ {
+ if ( grub_open(fontfile) )
+ {
+ grub_read ((char *) RAW_ADDR (0x500000), -1);
+
+ grub_close();
+ }
+ else
+ {
+ ushFontReaded = 0;
+ grub_printf(" load fontfile failed!\n");
+ }
+ }
+ }
+
if (! read_image(splashimage)) {
- set_videomode(saved_videomode);
- grub_printf("failed to read image\n");
- return 0;
+ if(! ushFontReaded)
+ {
+ set_videomode(saved_videomode);
+ grub_printf("failed to read image\n");
+ return 0; /* graphics_init failure! */
+ }
}
font8x16 = (unsigned char*)graphics_get_font();
@@ -127,7 +164,7 @@
graphics_highlight_color = ((graphics_normal_color >> 4) |
((graphics_normal_color & 0xf) << 4));
- return 1;
+ return 1; /* graphics_init success */
}
/* Leave graphics mode */
@@ -136,6 +173,7 @@
if (graphics_inited) {
set_videomode(saved_videomode);
graphics_inited = 0;
+ ushFontReaded = 0;
}
}
@@ -479,21 +517,88 @@
static unsigned char chr[16 << 2];
static unsigned char mask[16];
+static unsigned char by[32], chsa[16], chsb[16];
+/* This function was modified by Gandalf for Chinese Support
+ *
+ * Change Log:
+ * N/A
+ * TODO:
+ * There is a empty line of the center of Chinese Character. !!!
+ */
void graphics_cursor(int set) {
unsigned char *pat, *mem, *ptr;
- int i, ch, invert, offset;
+ int i, ch, invert, offset, n, ch1, ch2;
+
+ int dotpos;
+
+ int fontloaded;
if (set && no_scroll)
return;
offset = cursorY * 80 + fontx;
+ fontloaded = 0;
+
ch = text[fonty * 80 + fontx] & 0xff;
invert = (text[fonty * 80 + fontx] & 0xff00) != 0;
+
pat = font8x16 + (ch << 4);
+
+ if (ushFontReaded && ch >= 0xa1 &&
+ (! stg2_ptborder ||
+ (ch != DISP_VERT &&
+ ch != DISP_UR &&
+ ch != DISP_LL &&
+ ch != DISP_HORIZ &&
+ ch != DISP_LR &&
+ ch != DISP_UL
+ )
+ )
+ )
+ {
+ /* here is one trick, look one line as a string with '\0' ended, so,
+ * if the last byte is the 1st byte of a Chinese Character,,, ,,, */
+ for (n = 0; n < fontx; n++)
+ {
+ ch1 = text[fonty * 80 + n] & 0xff;
+ ch2 = text[fonty * 80 + n+1] & 0xff;
+
+ if ((ch1>=0xa1 && ch1<=0xfe)&&(ch2>=0xa1 && ch2<=0xfe))
+ {
+ if (n == fontx-1)
+ {
+
+ fontloaded = 1;
+ dotpos = (ch1-0xa1)*94 + ch2 - 0xa1;
+ dotpos<<=5;
+
+ grub_memmove(by, (unsigned char *) RAW_ADDR (0x500000 + dotpos), 32);
+
+ for (i = 0; i <32; i ++)
+ {
+ if (i%2)
+ chsb[i/2] = by[i];
+ else
+ chsa[i/2] = by[i];
+ }
+ }
+ n++;
+ }
+ }
+ }
mem = (unsigned char*)VIDEOMEM + offset;
+ if (fontloaded)
+ {
+ mem--;//mem = (unsigned char*)VIDEOMEM + offset -1;
+ offset--;
+ pat = chsa;
+ }
+
+write_char:
+
if (set)
{
MapMask(15);
@@ -563,6 +668,17 @@
}
MapMask(15);
+
+ if (fontloaded)
+ {
+ fontloaded = 0;
+
+ /* reset the mem position */
+ mem++;//mem += 1;//mem = (unsigned char*)VIDEOMEM + offset;
+ offset = cursorY * 80 + fontx;
+ pat = chsb;
+ goto write_char;
+ }
}
#endif /* SUPPORT_GRAPHICS */
diff -Naur grub-0.97_splash/stage2/shared.h grub-0.97_chinese/stage2/shared.h
--- grub-0.97_splash/stage2/shared.h 2007-04-10 09:40:22.000000000 +0800
+++ grub-0.97_chinese/stage2/shared.h 2007-04-11 17:36:42.000000000 +0800
@@ -391,6 +391,12 @@
* Below this should be ONLY defines and other constructs for C code.
*/
+
+extern char fontfile[256];
+unsigned short stg2_ptborder;
+extern int graphics_inited;
+extern unsigned short ushFontReaded;
+
/* multiboot stuff */
#include "mb_header.h"
@@ -934,6 +940,10 @@
char *short_doc;
/* The long version of the documentation. */
char *long_doc;
+ /* The short-chinese version of the documentation. */
+ char *sc_short_doc;
+ /* The long version-chinese of the documentation. */
+ char *sc_long_doc;
};
/* All the builtins are registered in this. */
diff -Naur grub-0.97_splash/stage2/stage2.c grub-0.97_chinese/stage2/stage2.c
--- grub-0.97_splash/stage2/stage2.c 2007-04-10 09:23:58.000000000 +0800
+++ grub-0.97_chinese/stage2/stage2.c 2007-04-11 17:36:42.000000000 +0800
@@ -239,6 +239,8 @@
gotoxy (MENU_BOX_X - 2, y);
+ stg2_ptborder = 1; /* Chinese Season */
+
grub_putchar (DISP_UL);
for (i = 0; i < MENU_BOX_W + 1; i++)
grub_putchar (DISP_HORIZ);
@@ -264,6 +266,8 @@
grub_putchar (DISP_HORIZ);
grub_putchar (DISP_LR);
+ stg2_ptborder = 0;
+
if (current_term->setcolorstate)
current_term->setcolorstate (COLOR_STATE_STANDARD);
}
@@ -338,8 +342,14 @@
grub_timeout--;
/* Print a message. */
- grub_printf ("\rPress `ESC' to enter the menu... %d ",
- grub_timeout);
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ grub_printf ("\r °´ Esc ¼ü½øÈë²Ëµ¥¡­¡­ %d ",
+ grub_timeout);
+ else
+#endif
+ grub_printf ("\rPress ESC to enter the menu... %d ",
+ grub_timeout);
}
}
}
@@ -355,27 +365,57 @@
else
print_border (MENU_BOX_Y - 1, MENU_BOX_H);
- grub_printf ("\nUse the %c and %c keys to highlight an entry.",
- DISP_UP, DISP_DOWN);
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ grub_printf ("\n Óà %c ºÍ %c Á½¼ü½«Ò»¸ö²Ëµ¥ÏîÖÃΪ¸ßÁÁ¡£",
+ DISP_UP, DISP_DOWN);
+ else
+#endif
+ grub_printf ("\nUse the %c and %c keys to highlight an entry.",
+ DISP_UP, DISP_DOWN);
if (! auth && password)
{
- printf (" Press ENTER or \'b\' to boot.\n"
- "Press \'p\' to gain privileged control.");
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ printf ("°´»Ø³µ»ò b ¼üÆô¶¯¡£°´ p ¼üÈ¡µÃ\n"
+ " ÌØȨ¿ØÖƹ¦ÄÜ¡£");
+ else
+#endif
+ printf (" Press ENTER or \'b\' to boot.\n"
+ "Press \'p\' to gain privileged control.");
}
else
{
if (config_entries)
- printf (" Press ENTER or \'b\' to boot.\n"
- "Press \'e\' to edit the commands before booting, or \'c\' for a command-line.");
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ printf ("°´»Ø³µ»ò b ¼üÆô¶¯£»°´ e ¼ü¿ÉÔÚ\n"
+ " Æô¶¯Ç°ÖðÌõ±à¼­²Ëµ¥ÖеÄÃüÁîÐòÁУ»°´ c ¼ü½øÈëÃüÁîÐС£");
+ else
+#endif
+ printf (" Press ENTER or \'b\' to boot.\n"
+ "Press \'e\' to edit the commands before booting, or \'c\' for a command-line.");
else
- printf (" At a selected line, press \'e\' to\n"
- "edit, \'d\' to delete, or \'O\'/\'o\' to open a new line before/after. When done,\n"
- "press \'b\' to boot, \'c\' for a command-line, or ESC to go back to the main menu.");
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ printf (" °´ e ¼ü±à¼­µ±Ç°ÐУ»°´ d ¼üɾ\n"
+ " ³ýµ±Ç°ÐУ»°´ O ¼ü»ò o ¼ü·Ö±ðÔÚµ±Ç°ÐÐ֮ǰ»òÖ®ºó²åÈëÒ»¸öÐÂÐС£±à¼­½áÊøʱ£¬\n"
+ " °´ b ¼üÆô¶¯£»°´ c ¼ü½øÈëÃüÁîÐУ»°´ Esc ¼üÍ˻ص½Ö÷²Ëµ¥¡£");
+ else
+#endif
+ printf (" At a selected line, press \'e\' to\n"
+ "edit, \'d\' to delete, or \'O\'/\'o\' to open a new line before/after. When done,\n"
+ "press \'b\' to boot, \'c\' for a command-line, or ESC to go back to the main menu.");
}
if (current_term->flags & TERM_DUMB)
- grub_printf ("\n\nThe selected entry is %d ", entryno);
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ grub_printf ("\n\n µ±Ç°Ñ¡ÖÐÏîΪ£º%d ", entryno);
+ else
+#endif
+ grub_printf ("\n\nThe selected entry is %d ", entryno);
else
print_entries (/*3, MENU_BOX_H,*/ first_entry, entryno, menu_entries);
}
@@ -401,15 +441,27 @@
time2 = time1;
if (current_term->flags & TERM_DUMB)
- grub_printf ("\r Entry %d will be booted automatically in %d seconds. ",
- entryno, grub_timeout);
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ grub_printf ("\r ÌõÄ¿ %d ½«»á×Ô¶¯ÔËÐÐÓÚ %d ÃëÖ®ºó¡£ ",
+ entryno, grub_timeout);
+ else
+#endif
+ grub_printf ("\r Entry %d will be booted automatically in %d seconds. ",
+ entryno, grub_timeout);
else
{
gotoxy (MENU_BOX_X - 2, MENU_BOX_H + 7);
- grub_printf ("The highlighted entry will be booted automatically in %d seconds. ",
- grub_timeout);
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ grub_printf (" ¸ßÁÁÑ¡ÖеÄÌõÄ¿½«»á×Ô¶¯ÔËÐÐÓÚ %d ÃëÖ®ºó¡£ ",
+ grub_timeout);
+ else
+#endif
+ grub_printf ("The highlighted entry will be booted automatically in %d seconds. ",
+ grub_timeout);
gotoxy (MENU_BOX_E, MENU_BOX_Y + entryno);
- }
+ }
grub_timeout--;
}
@@ -425,7 +477,14 @@
since we're comming in here also on GRUB_TIMEOUT == -1 and
hang in GETKEY */
if (current_term->flags & TERM_DUMB)
- grub_printf ("\r Highlighted entry is %d: ", entryno);
+ {
+#ifdef SUPPORT_GRAPHICS
+ if (graphics_inited && ushFontReaded)
+ grub_printf ("\r ¸ßÁÁÑ¡ÖеÄÌõĿΪ %d: ", entryno);
+ else
+#endif
+ grub_printf ("\r Highlighted entry is %d: ", entryno);
+ }
c = /*ASCII_CHAR*/ (getkey ());