New upstream release candidate.

This commit is contained in:
Colin Watson 2011-01-17 11:03:07 +00:00
commit 8da4b6e32c
12 changed files with 89 additions and 16 deletions

View File

@ -1,3 +1,41 @@
2011-01-16 Vladimir Serbinenko <phcoder@gmail.com>
* configure.ac: Bump version to 1.99~rc1.
2011-01-15 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkimage.c (generate_image): Check fwstart.img checksum
for safety.
2011-01-14 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/mips/yeeloong/init.c (grub_machine_init): Init boot
module.
2011-01-14 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/Makefile.core.def (fwstart): Add lost LDFLAGS.
2011-01-13 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/zfs/zfsinfo.c (grub_cmd_zfs_bootfs): Quote bootpath and
diskdevid.
2011-01-13 Vladimir Serbinenko <phcoder@gmail.com>
Fix compilation on cygwin.
* conf/Makefile.common (STRIPFLAGS_KERNEL): Add -F elf32-i386 and
-R .drectve on cygwin.
* conf/i386-pc-cygwin-img-ld.sc: Merge rdata and pdata into data.
* configure.ac: Use $(top_builddir) in TARGET_OBJ2ELF.
(COND_CYGWIN): New condition.
* grub-core/Makefile.am (%.mod): Set TARGET_OBJ2ELF.
* grub-core/genmod.sh.in: Use ${TARGET_OBJ2ELF} and
not @TARGET_OBJ2ELF@.
* util/grub-pe2elf.c (write_symbol_table): Use pe_symtab->type and not
type to determine whether aux is to be used.
2011-01-12 Vladimir Serbinenko <phcoder@gmail.com>
* util/ieee1275/ofpath.c (grub_util_devname_to_ofpath): Use the

View File

@ -67,7 +67,11 @@ CFLAGS_KERNEL = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
LDFLAGS_KERNEL = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N -static-libgcc
CPPFLAGS_KERNEL = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM)
CCASFLAGS_KERNEL = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
if COND_CYGWIN
STRIPFLAGS_KERNEL = -F elf32-i386 -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve
else
STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment
endif
CFLAGS_MODULE = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
LDFLAGS_MODULE = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N,-r,-d

View File

@ -13,15 +13,9 @@ SECTIONS
__data_start__ = . ;
*(.data)
__data_end__ = . ;
}
.rdata :
{
__rdata_start__ = . ;
*(.rdata)
__rdata_end__ = . ;
}
.pdata :
{
*(.pdata)
edata = . ;
}

View File

@ -454,7 +454,7 @@ fi
# For platforms where ELF is not the default link format.
AC_MSG_CHECKING([for command to convert module to ELF format])
case "${host_os}" in
cygwin) TARGET_OBJ2ELF='$(grub_utildir)/grub-pe2elf';
cygwin) TARGET_OBJ2ELF='$(top_builddir)/grub-pe2elf';
# FIXME: put proper test here
NEED_REGISTER_FRAME_INFO=1
;;
@ -964,6 +964,7 @@ AM_CONDITIONAL([COND_APPLE_CC], [test x$TARGET_APPLE_CC = x1])
AM_CONDITIONAL([COND_ENABLE_EFIEMU], [test x$enable_efiemu = xyes])
AM_CONDITIONAL([COND_HAVE_ASM_USCORE], [test x$HAVE_ASM_USCORE = x1])
AM_CONDITIONAL([COND_CYGWIN], [test x$host_os = xcygwin])
# Output files.
grub_CHECK_LINK_DIR

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
grub2 (1.99~rc1-1) UNRELEASED; urgency=low
* New upstream release candidate.
-- Colin Watson <cjwatson@debian.org> Mon, 17 Jan 2011 10:59:11 +0000
grub2 (1.99~20110112-1) experimental; urgency=low
* New Bazaar snapshot.

View File

@ -303,7 +303,7 @@ platform_DATA += moddep.lst
CLEANFILES += config.log syminfo.lst moddep.lst
$(MOD_FILES): %.mod : genmod.sh moddep.lst %.module$(EXEEXT)
sh $^ $@
TARGET_OBJ2ELF=@TARGET_OBJ2ELF@ sh $^ $@
platform_DATA += $(MOD_FILES)
CLEANFILES += $(MOD_FILES)

View File

@ -324,6 +324,7 @@ image = {
name = fwstart;
mips_yeeloong = boot/mips/yeeloong/fwstart.S;
objcopyflags = '-O binary';
ldflags = '-static-libgcc -lgcc -Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic';
enable = mips_yeeloong;
};

View File

@ -364,12 +364,14 @@ grub_cmd_zfs_bootfs (grub_command_t cmd __attribute__ ((unused)), int argc,
grub_free (nv);
grub_free (nvlist);
bootfs = grub_xasprintf ("zfs-bootfs=%s/%llu%s%s%s%s",
bootfs = grub_xasprintf ("zfs-bootfs=%s/%llu%s%s%s%s%s%s",
poolname, (unsigned long long) mdnobj,
bootpath ? ",bootpath=" : "",
bootpath ? ",bootpath=\"" : "",
bootpath ? : "",
devid ? ",diskdevid=" : "",
devid ? : "");
bootpath ? "\"" : "",
devid ? ",diskdevid=\"" : "",
devid ? : "",
devid ? "\"" : "");
if (!bootfs)
return grub_errno;
if (argc >= 2)

View File

@ -52,8 +52,8 @@ fi
rm -f $t1 $t2
if test x@TARGET_APPLE_CC@ != x1; then
if ! test -z "@TARGET_OBJ2ELF@"; then
./@TARGET_OBJ2ELF@ $tmpfile || exit 1
if ! test -z "${TARGET_OBJ2ELF}"; then
./${TARGET_OBJ2ELF} $tmpfile || exit 1
fi
if test x@platform@ != xemu; then
@STRIP@ --strip-unneeded \

View File

@ -41,6 +41,7 @@ extern void grub_at_keyboard_init (void);
extern void grub_serial_init (void);
extern void grub_terminfo_init (void);
extern void grub_keylayouts_init (void);
extern void grub_boot_init (void);
/* FIXME: use interrupt to count high. */
grub_uint64_t
@ -210,6 +211,8 @@ grub_machine_init (void)
grub_terminfo_init ();
grub_serial_init ();
grub_boot_init ();
}
void

View File

@ -29,6 +29,7 @@
#include <grub/util/resolve.h>
#include <grub/misc.h>
#include <grub/offsets.h>
#include <grub/crypto.h>
#include <time.h>
#include <stdio.h>
@ -1167,11 +1168,34 @@ generate_image (const char *dir, char *prefix, FILE *out, char *mods[],
size_t rom_size;
char *boot_path, *boot_img;
size_t boot_size;
grub_uint8_t context[GRUB_MD_SHA512->contextsize];
/* fwstart.img is the only part which can't be testes by using *-elf
target. Check it against the checksum. This checksum is obtained with
sha512sum utility after compiling on Gnewsense.
*/
const grub_uint8_t fwstart_good_hash[] =
{ 0x75, 0xbf, 0xa3, 0x0e, 0x7c, 0xd1, 0x03, 0x82,
0xe1, 0x34, 0x55, 0xd7, 0x09, 0x1e, 0x6c, 0xcc,
0xef, 0x08, 0x61, 0xc1, 0x3c, 0xd8, 0xc7, 0x9f,
0xe8, 0x2d, 0x3d, 0xb2, 0xda, 0x41, 0xd3, 0x83,
0xd7, 0xb8, 0xe3, 0xd7, 0x13, 0xec, 0x9b, 0xf6,
0xf6, 0xae, 0x6b, 0x32, 0x29, 0xc1, 0x69, 0x82,
0xfa, 0x65, 0x2d, 0x97, 0x3e, 0x83, 0x6e, 0x6c,
0xce, 0x34, 0x10, 0x59, 0x74, 0x0e, 0x96, 0x26 };
boot_path = grub_util_get_path (dir, "fwstart.img");
boot_size = grub_util_get_image_size (boot_path);
boot_img = grub_util_read_image (boot_path);
grub_memset (context, 0, sizeof (context));
GRUB_MD_SHA512->init (context);
GRUB_MD_SHA512->write (context, boot_img, boot_size);
GRUB_MD_SHA512->final (context);
if (grub_memcmp (GRUB_MD_SHA512->read (context), fwstart_good_hash,
GRUB_MD_SHA512->mdlen) != 0)
grub_util_warn ("fwstart.img doesn't match the known good version. "
"Proceed at your own risk");
rom_size = ALIGN_UP (core_size + boot_size, 512 * 1024);
rom_img = xmalloc (rom_size);

View File

@ -337,7 +337,7 @@ write_symbol_table (FILE* fp, char *image,
else
bind = STB_LOCAL;
if ((type != STT_FUNC) && (pe_symtab->num_aux))
if ((pe_symtab->type != GRUB_PE32_DT_FUNCTION) && (pe_symtab->num_aux))
{
if (! pe_symtab->value)
type = STT_SECTION;