On Tue, Nov 11, 2008 at 10:04:57PM +0100, Uwe Hermann wrote:
> > - echo "$DEFAULT_CC $_CFLAGS $_LDFLAGS $CMDLINE $_LIBDIR/i386/head.o
> > $_LIBDIR/libpayload.a $_LIBGCC"
> > + echo "$DEFAULT_CC $_CFLAGS $_LDFLAGS $_LIBDIR/i386/head.o $CMDLINE
> > $_LIBDIR/libpayload.a $_LIBGCC"
>
> Please also add a comment here, this is highly non-obvious from just
> looking at the file's contents otherwise.
Done.
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."
Signed-off-by: Robert Millan <[EMAIL PROTECTED]>
Index: libpayload/bin/lpgcc
===================================================================
--- libpayload/bin/lpgcc (revision 3744)
+++ libpayload/bin/lpgcc (working copy)
@@ -101,8 +101,13 @@
else
_LIBGCC=`$DEFAULT_CC -m32 -print-libgcc-file-name`
if [ $DEBUGME -eq 1 ]; then
- echo "$DEFAULT_CC $_CFLAGS $_LDFLAGS $CMDLINE $_LIBDIR/i386/head.o $_LIBDIR/libpayload.a $_LIBGCC"
+ echo "$DEFAULT_CC $_CFLAGS $_LDFLAGS $_LIBDIR/i386/head.o $CMDLINE $_LIBDIR/libpayload.a $_LIBGCC"
fi
- $DEFAULT_CC $_CFLAGS $_LDFLAGS $CMDLINE $_LIBDIR/i386/head.o $_LIBDIR/libpayload.a $_LIBGCC
+ # Note: i386/head.o must be the first object being linked, because it
+ # contains a Multiboot header. The Multiboot standard requires this
+ # header to be placed below 0x2000 in the resulting image. See:
+ # http://www.gnu.org/software/grub/manual/multiboot/html_node/OS-image-format.html
+
+ $DEFAULT_CC $_CFLAGS $_LDFLAGS $_LIBDIR/i386/head.o $CMDLINE $_LIBDIR/libpayload.a $_LIBGCC
fi
--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot