* grub-core/loader/i386/linux.c (grub_cmd_linux): Avoid accessing
kh.loadflags on pre-2.00 kernels.
This commit is contained in:
parent
3c491b479c
commit
9bab65c49d
2 changed files with 12 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2012-04-11 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/loader/i386/linux.c (grub_cmd_linux): Avoid accessing
|
||||||
|
kh.loadflags on pre-2.00 kernels.
|
||||||
|
|
||||||
2012-04-11 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-04-11 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Terminate UNDI and PXE before launching the payload to avoid problems
|
Terminate UNDI and PXE before launching the payload to avoid problems
|
||||||
|
|
|
@ -700,9 +700,12 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! (lh.loadflags & GRUB_LINUX_FLAG_BIG_KERNEL))
|
/* FIXME: 2.03 is not always good enough (Linux 2.4 can be 2.03 and
|
||||||
|
still not support 32-bit boot. */
|
||||||
|
if (lh.header != grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE)
|
||||||
|
|| grub_le_to_cpu16 (lh.version) < 0x0203)
|
||||||
{
|
{
|
||||||
grub_error (GRUB_ERR_BAD_OS, "zImage doesn't support 32-bit boot"
|
grub_error (GRUB_ERR_BAD_OS, "version too old for 32-bit boot"
|
||||||
#ifdef GRUB_MACHINE_PCBIOS
|
#ifdef GRUB_MACHINE_PCBIOS
|
||||||
" (try with `linux16')"
|
" (try with `linux16')"
|
||||||
#endif
|
#endif
|
||||||
|
@ -710,12 +713,9 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: 2.03 is not always good enough (Linux 2.4 can be 2.03 and
|
if (! (lh.loadflags & GRUB_LINUX_FLAG_BIG_KERNEL))
|
||||||
still not support 32-bit boot. */
|
|
||||||
if (lh.header != grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE)
|
|
||||||
|| grub_le_to_cpu16 (lh.version) < 0x0203)
|
|
||||||
{
|
{
|
||||||
grub_error (GRUB_ERR_BAD_OS, "version too old for 32-bit boot"
|
grub_error (GRUB_ERR_BAD_OS, "zImage doesn't support 32-bit boot"
|
||||||
#ifdef GRUB_MACHINE_PCBIOS
|
#ifdef GRUB_MACHINE_PCBIOS
|
||||||
" (try with `linux16')"
|
" (try with `linux16')"
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue