add a mem option into Linux automatically only if the user doesn't specify it explicitly.

This commit is contained in:
okuji 2000-06-17 08:48:28 +00:00
parent 3899310dca
commit edb9c0d7b0
3 changed files with 18 additions and 8 deletions

View file

@ -1,3 +1,8 @@
2000-06-17 OKUJI Yoshinori <okuji@gnu.org>
* stage2/boot.c (load_image): Pass a mem option to Linux, only
if SRC has no substring "mem=".
2000-06-17 OKUJI Yoshinori <okuji@gnu.org>
* stage2/compile: Removed.

4
configure vendored
View file

@ -622,7 +622,7 @@ fi
ac_aux_dir=
for ac_dir in aux $srcdir/aux; do
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@ -634,7 +634,7 @@ for ac_dir in aux $srcdir/aux; do
fi
done
if test -z "$ac_aux_dir"; then
{ echo "configure: error: can not find install-sh or install.sh in aux $srcdir/aux" 1>&2; exit 1; }
{ echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub

View file

@ -271,12 +271,17 @@ load_image (char *kernel, char *arg, kernel_t suggested_type)
*((unsigned short *) CL_OFFSET) = CL_MY_LOCATION - CL_BASE_ADDR;
*((unsigned short *) CL_MAGIC_ADDR) = CL_MAGIC;
grub_memmove (dest, "mem=", 4);
dest += 4;
/* Add a mem option automatically only if the user doesn't
specify it explicitly. */
if (! grub_strstr (src, "mem="))
{
grub_memmove (dest, "mem=", 4);
dest += 4;
dest = convert_to_ascii (dest, 'u', (extended_memory + 0x400));
*(dest++) = 'K';
*(dest++) = ' ';
dest = convert_to_ascii (dest, 'u', (extended_memory + 0x400));
*(dest++) = 'K';
*(dest++) = ' ';
}
while (*src && *src != ' ')
src++;