Index: stage2/stage2.c
===================================================================
--- stage2/stage2.c	(revision 340)
+++ stage2/stage2.c	(working copy)
@@ -1427,10 +1427,21 @@
 		//printf ("  Booting \'%s\'\n\n", (((*p) & 0xF0) ? p : ++p));
 		if (! ((*p) & 0xF0))
 			p++;
+		#if 0
+		//commented by chenall 2013-04-19 the old code does not translate variables.
 		grub_putstr ("  Booting ");
 		while ((*p) && (ch = *p++) && ch != '\n') grub_putchar (ch, 255);
 		grub_putchar ('\n', 255);
 		grub_putchar ('\n', 255);
+		#else
+		//added by chenall 2013-04-19 also translate variables for boot message.
+		char *p_t = (char *)SCRATCHADDR;
+		while(*p && *p != '\n')
+			*p_t++ = *p++;
+		*p_t++ = 0;
+		expand_var ((char *)SCRATCHADDR, p_t, 0x400);
+		printf ("  Booting \'%s\'\n\n",p_t);
+		#endif
 	}
 	else
 		printf ("  Booting command-list\n\n");
Index: stage2/shared.h
===================================================================
--- stage2/shared.h	(revision 340)
+++ stage2/shared.h	(working copy)
@@ -879,6 +879,7 @@
 #define WENV_RANDOM (*(unsigned long *)(ENVI[_WENV_]+0x20))
 #define QUOTE_CHAR (*(ENVI[_WENV_]+0x30))
 #define WENV_TMP (ENVI[_WENV_]+0x40)
+#define VAR_EX_TMP ((char *)(BASE_ADDR+MAX_VARS * (MAX_VAR_LEN + MAX_ENV_LEN)))
 #define set_envi(var, val)			envi_cmd(var, val, 0)
 //#define get_env(var, val)			envi_cmd(var, val, 1)
 #define get_env_all()				envi_cmd(NULL, NULL, 2)
