Merge branch 'mainline' into snow64

This commit is contained in:
phcoder 2009-09-04 15:18:38 +02:00
commit 30c270dbf8
15 changed files with 125 additions and 14 deletions

View file

@ -1,3 +1,53 @@
2009-09-04 Vladimir Serbinenko <phcoder@gmail.com>
* loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
unnecessary calls to grub_error.
2009-09-04 Colin Watson <cjwatson@ubuntu.com>
* NEWS: Mention `keystatus' and Unicode fonts.
2009-09-04 Robert Millan <rmh.grub@aybabtu.com>
* configure.ac: Bump version to 1.97~beta2.
* docs/version.texi: Likewise.
2009-09-03 Colin Watson <cjwatson@ubuntu.com>
* configure.ac: By default, GCC 4.4 generates .eh_frame sections
containing unwind information in some cases where it previously did
not. Use -fno-dwarf2-cfi-asm if available to restore the old
behaviour. See http://patchwork.kernel.org/patch/8555/ for related
discussion.
2009-09-02 Yves BLUSSEAU <blusseau@zetam.org>
Embedding loadenv module into grub-emu
* conf/i386-pc.rmk (grub_emu_SOURCES): add lib/envblk.c and
commands/loadenv.c
* conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise
* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise
* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise
* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise
* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise
* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise
2009-09-03 Magnus Granberg <zorry@ume.nu>
* aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
include -fPIE in the default specs.
* configure.ac: Check if pie_possible is yes and add -fno-PIE
to TARGET_CFLAGS.
2009-09-03 Felix Zielcke <fzielcke@z-51.de>
* INSTALL: Note that GNU Bison 2.3 or later is required.
2009-09-03 Colin Watson <cjwatson@ubuntu.com>
* kern/i386/pc/startup.S: Fix typo.
2009-09-02 Vladimir Serbinenko <phcoder@gmail.com>
* efiemu/loadcore.c (SUFFIX (grub_efiemu_loadcore_load)): Fix style

View file

@ -13,7 +13,7 @@ configuring the GRUB.
* GCC 2.95 or later
* GNU Make
* GNU Bison
* GNU Bison 2.3 or later
* GNU binutils 2.9.1.0.23 or later
* Other standard GNU/Unix tools
* Ruby 1.6 or later

4
NEWS
View file

@ -1,5 +1,9 @@
New in 1.97 - :
* Add `keystatus' command.
* Unicode fonts are now used by default.
* Add `hdparm' command.
* Add support for getting the current date and time from CMOS as variables.

28
aclocal.m4 vendored
View file

@ -413,3 +413,31 @@ else
[fi
rm -rf testdir]
])
dnl Check if the C compiler supports `-fPIE'.
AC_DEFUN(grub_CHECK_PIE,[
[# Position independent executable.
pie_possible=yes]
AC_MSG_CHECKING([whether `$CC' has `-fPIE' as default])
# Is this a reliable test case?
AC_LANG_CONFTEST([[
#ifdef __PIE__
int main() {
return 0;
}
#else
#error NO __PIE__ DEFINED
#endif
]])
[# `$CC -c -o ...' might not be portable. But, oh, well... Is calling
# `ac_compile' like this correct, after all?
if eval "$ac_compile -S -o conftest.s" 2> /dev/null; then]
AC_MSG_RESULT([yes])
[# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
rm -f conftest.s
else
pie_possible=no]
AC_MSG_RESULT([no])
[fi]
])

View file

@ -112,6 +112,7 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
commands/gptsync.c commands/probe.c commands/xnu_uuid.c \
commands/password.c commands/keystatus.c \
lib/hexdump.c commands/i386/cpuid.c \
lib/envblk.c commands/loadenv.c \
disk/host.c disk/loopback.c \
\
fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \

View file

@ -40,6 +40,7 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
commands/halt.c commands/reboot.c commands/keystatus.c \
commands/i386/cpuid.c \
commands/password.c \
lib/envblk.c commands/loadenv.c \
disk/loopback.c \
\
fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \

View file

@ -64,6 +64,7 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
commands/handler.c commands/ls.c commands/test.c \
commands/search.c commands/blocklist.c commands/hexdump.c \
lib/hexdump.c commands/halt.c commands/reboot.c \
lib/envblk.c commands/loadenv.c \
commands/gptsync.c commands/probe.c commands/xnu_uuid.c \
commands/i386/cpuid.c \
commands/password.c commands/keystatus.c \

View file

@ -122,6 +122,7 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
commands/handler.c commands/ls.c commands/test.c \
commands/search.c commands/blocklist.c commands/hexdump.c \
lib/hexdump.c commands/i386/pc/halt.c commands/reboot.c \
lib/envblk.c commands/loadenv.c \
commands/gptsync.c commands/probe.c commands/xnu_uuid.c \
commands/i386/cpuid.c \
commands/password.c commands/keystatus.c \

View file

@ -45,6 +45,7 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
commands/search.c commands/handler.c commands/test.c \
commands/ls.c commands/blocklist.c commands/hexdump.c \
lib/hexdump.c commands/halt.c commands/reboot.c \
lib/envblk.c commands/loadenv.c \
commands/gptsync.c commands/probe.c commands/xnu_uuid.c \
commands/password.c commands/keystatus.c \
disk/loopback.c \

View file

@ -103,6 +103,7 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
commands/search.c commands/handler.c commands/test.c \
commands/ls.c commands/blocklist.c commands/hexdump.c \
lib/hexdump.c commands/halt.c commands/reboot.c \
lib/envblk.c commands/loadenv.c \
commands/gptsync.c commands/probe.c commands/xnu_uuid.c \
commands/password.c commands/keystatus.c \
disk/loopback.c \

View file

@ -38,6 +38,7 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
commands/halt.c commands/reboot.c \
commands/i386/cpuid.c \
commands/password.c commands/keystatus.c \
lib/envblk.c commands/loadenv.c \
disk/loopback.c \
\
fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \

View file

@ -31,7 +31,7 @@ dnl (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for the target
dnl type.
AC_INIT([GRUB],[1.97~beta1],[bug-grub@gnu.org])
AC_INIT([GRUB],[1.97~beta2],[bug-grub@gnu.org])
AC_PREREQ(2.59)
AC_CONFIG_SRCDIR([include/grub/dl.h])
AC_CONFIG_HEADER([config.h])
@ -246,6 +246,23 @@ if test "x$TARGET_CFLAGS" = x; then
TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1"
fi
fi
# By default, GCC 4.4 generates .eh_frame sections containing unwind
# information in some cases where it previously did not. GRUB doesn't need
# these and they just use up vital space. Restore the old compiler
# behaviour.
AC_CACHE_CHECK([whether -fno-dwarf2-cfi-asm works], [grub_cv_cc_fno_dwarf2_cfi_asm], [
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fno-dwarf2-cfi-asm"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_cc_fno_dwarf2_cfi_asm=yes],
[grub_cv_cc_fno_dwarf2_cfi_asm=no])
CFLAGS="$SAVE_CFLAGS"
])
if test "x$grub_cv_cc_fno_dwarf2_cfi_asm" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
fi
fi
grub_apple_target_cc
@ -346,6 +363,14 @@ fi
# Need __enable_execute_stack() for nested function trampolines?
grub_CHECK_ENABLE_EXECUTE_STACK
# Position independent executable.
grub_CHECK_PIE
[# Need that, because some distributions ship compilers that include
# `-fPIE' in the default specs.
if [ x"$pie_possible" = xyes ]; then
TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE"
fi]
# Smashing stack protector.
grub_CHECK_STACK_PROTECTOR
# Need that, because some distributions ship compilers that include

View file

@ -1,4 +1,4 @@
@set UPDATED 7 Ago 2009
@set UPDATED-MONTH Ago 2009
@set EDITION 1.97~beta1
@set VERSION 1.97~beta1
@set EDITION 1.97~beta2
@set VERSION 1.97~beta2

View file

@ -37,7 +37,7 @@
* Note: GRUB is compiled with the options -mrtd and -mregparm=3.
* So the first three arguments are passed in %eax, %edx, and %ecx,
* respectively, and if a function has a fixed number of arguments
* and the number if greater than three, the function must return
* and the number is greater than three, the function must return
* with "ret $N" where N is ((the number of arguments) - 3) * 4.
*/

View file

@ -247,7 +247,7 @@ grub_cpu_xnu_fill_devicetree (void)
curval->datasize = (SYSTEM_TABLE_SIZEOF (firmware_revision));
curval->data = grub_malloc (curval->datasize);
if (! curval->data)
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't create device tree");
return grub_errno;
grub_memcpy (curval->data, (SYSTEM_TABLE_VAR(firmware_revision)),
curval->datasize);
@ -268,7 +268,7 @@ grub_cpu_xnu_fill_devicetree (void)
curval->datasize = sizeof ("EFI32");
curval->data = grub_malloc (curval->datasize);
if (! curval->data)
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't create device tree");
return grub_errno;
if (SIZEOF_OF_UINTN == 4)
grub_memcpy (curval->data, "EFI32", curval->datasize);
else
@ -287,7 +287,7 @@ grub_cpu_xnu_fill_devicetree (void)
curval->datasize = sizeof (grub_uint64_t);
curval->data = grub_malloc (curval->datasize);
if (!curval->data)
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't create device tree");
return grub_errno;
/* First see if user supplies the value. */
char *fsbvar = grub_env_get ("fsb");
@ -373,8 +373,7 @@ grub_cpu_xnu_fill_devicetree (void)
curval->datasize = SIZEOF_OF_UINTN;
curval->data = grub_malloc (curval->datasize);
if (! curval->data)
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
"couldn't create device tree");
return grub_errno;
if (SIZEOF_OF_UINTN == 4)
*((grub_uint32_t *)curval->data) = PTR_TO_UINT32 (ptr);
else
@ -392,8 +391,7 @@ grub_cpu_xnu_fill_devicetree (void)
curval->datasize = grub_strlen (table_aliases[j].name) + 1;
curval->data = grub_malloc (curval->datasize);
if (!curval->data)
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
"couldn't create device tree");
return grub_errno;
grub_memcpy (curval->data, table_aliases[j].name, curval->datasize);
}
}
@ -409,8 +407,7 @@ grub_cpu_xnu_fill_devicetree (void)
curval->datasize = SIZEOF_OF_UINTN;
curval->data = grub_malloc (curval->datasize);
if (! curval->data)
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
"couldn't create device tree");
return grub_errno;
if (SIZEOF_OF_UINTN == 4)
*((grub_uint32_t *) curval->data)
= PTR_TO_UINT32 (SYSTEM_TABLE_PTR (runtime_services));