grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] i386-qemu port


From: Pavel Roskin
Subject: Re: [PATCH] i386-qemu port
Date: Sun, 21 Jun 2009 21:50:25 -0400

On Sun, 2009-06-21 at 22:22 +0200, Robert Millan wrote:
> New patch, after a bunch of misc cleanup, turning hardcoded numbers into
> macros, improving comments, etc.

kernel_img_FORMAT is defined but never used.

GRUB_MEMORY_MACHINE_LINK_ADDR doesn't need to be conditional, it's the
same for coreboot and qemu.

Renaming kernel.elf to kernel.img could be done separately.  Since it's
a trivial patch, it can be committed without review provided that is
compiles.

Please don't add trailing whitespace.

When compiling for coreboot, a warning appears:

/home/proski/src/grub2.git/kern/i386/coreboot/init.c: In function
'grub_arch_modules_addr':
/home/proski/src/grub2.git/kern/i386/coreboot/init.c:159: warning:
return makes integer from pointer without a cast

Compilation for qemu fails when compiling in a separate directory:

/home/proski/src/grub2.git/boot/i386/qemu/boot.S:60:32: error:
kern/i386/realmode.S: No such file or directory

The fix is to use relative path to include realmode.S:

#include "../../../kern/i386/realmode.S"

Here's my fix for compile warnings and errors.  Please incorporate.

diff --git a/boot/i386/qemu/boot.S b/boot/i386/qemu/boot.S
index 81cdc24..177453b 100644
--- a/boot/i386/qemu/boot.S
+++ b/boot/i386/qemu/boot.S
@@ -57,7 +57,7 @@ VARIABLE(grub_core_entry_addr)
        movl    grub_core_entry_addr, %edx
        jmp     *%edx
 
-#include "kern/i386/realmode.S"
+#include "../../../kern/i386/realmode.S"
 
 real_to_prot:
        .code16
diff --git a/kern/i386/coreboot/init.c b/kern/i386/coreboot/init.c
index 89e1e58..8a27c2b 100644
--- a/kern/i386/coreboot/init.c
+++ b/kern/i386/coreboot/init.c
@@ -156,5 +156,5 @@ grub_addr_t
 grub_arch_modules_addr (void)
 {
 //  return ALIGN_UP((grub_addr_t) _end, GRUB_MOD_ALIGN);
-  return _end;
+  return (grub_addr_t) _end;
 }

-- 
Regards,
Pavel Roskin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]