merge with mainline

This commit is contained in:
BVK Chaitanya 2010-11-25 19:54:50 +05:30
commit 2c7859b36f
12 changed files with 132 additions and 22 deletions

View file

@ -30,7 +30,7 @@ CCASFLAGS_LIBRARY += $(CCASFLAGS_PLATFORM)
# gentrigtables
gentrigtables: gentrigtables.c
$(BUILD_CC) -o $@ -I$(top_srcdir)/include $(CPPFLAGS) -lm $<
$(BUILD_CC) -o $@ -I$(top_srcdir)/include $(CPPFLAGS) $< -lm
CLEANFILES += gentrigtables
# trigtables.c
@ -237,9 +237,9 @@ command.lst: $(MARKER_FILES)
(for pp in $^; do \
b=`basename $$pp .marker`; \
sed -n \
-e "/COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}" \
-e "/EXTCOMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
-e "/P1COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" $$pp; \
-e "/P1COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
-e "/COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}" $$pp; \
done) | sort -u > $@
platform_DATA += command.lst
CLEANFILES += command.lst

View file

@ -162,6 +162,7 @@ kernel = {
emu = disk/host.c;
emu = gnulib/progname.c;
emu = gnulib/error.c;
emu = kern/emu/cache.S;
emu = kern/emu/console.c;
emu = kern/emu/getroot.c;
emu = kern/emu/hostdisk.c;
@ -208,7 +209,6 @@ program = {
name = grub-emu-lite;
emu = kern/emu/lite.c;
emu = kern/emu/cache.S;
emu_nodist = symlist.c;
ldadd = 'kernel.img$(EXEEXT)';
@ -300,7 +300,8 @@ image = {
mips_cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000';
objcopyflags = '-O binary';
ldflags = '-lgcc -static-libgcc -Wl,-Ttext,0x80100000';
ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
ldadd = '-lgcc';
cflags = '-static-libgcc';
enable = mips;
};
@ -313,7 +314,8 @@ image = {
mips_cppflags = '-DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000';
objcopyflags = '-O binary';
ldflags = '-lgcc -static-libgcc -Wl,-Ttext,0x80100000';
ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
ldadd = '-lgcc';
cflags = '-static-libgcc';
enable = mips;
};

View file

@ -105,7 +105,7 @@ static grub_err_t
grub_mdraid_detect (grub_disk_t disk, struct grub_raid_array *array,
grub_disk_addr_t *start_sector)
{
grub_disk_addr_t sector;
grub_disk_addr_t sector = 0;
grub_uint64_t size;
struct grub_raid_super_1x sb;
grub_uint8_t minor_version;
@ -123,6 +123,9 @@ grub_mdraid_detect (grub_disk_t disk, struct grub_raid_array *array,
for (minor_version = 0; minor_version < 3; ++minor_version)
{
if (size == GRUB_DISK_SIZE_UNKNOWN && minor_version == 0)
continue;
switch (minor_version)
{
case 0:

View file

@ -170,6 +170,8 @@ grub_mdraid_detect (grub_disk_t disk, struct grub_raid_array *array,
/* The sector where the mdraid 0.90 superblock is stored, if available. */
size = grub_disk_get_size (disk);
if (size == GRUB_DISK_SIZE_UNKNOWN)
return grub_error (GRUB_ERR_OUT_OF_RANGE, "not 0.9x raid");
sector = NEW_SIZE_SECTORS (size);
if (grub_disk_read (disk, sector, 0, SB_BYTES, &sb))

View file

@ -51,7 +51,7 @@ grub_btrfs_mount (grub_disk_t disk)
&data->sblock) != GRUB_ERR_NONE)
goto fail;
if (grub_strncmp ((char *) data->sblock.signature, BTRFS_SIGNATURE, sizeof (BTRFS_SIGNATURE) - 1))
if (grub_memcmp ((char *) data->sblock.signature, BTRFS_SIGNATURE, sizeof (BTRFS_SIGNATURE) - 1))
{
grub_error (GRUB_ERR_BAD_FS, "not a Btrfs filesystem");
goto fail;

View file

@ -655,7 +655,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
goto fail;
}
params->type_of_loader = (LINUX_LOADER_ID_GRUB << 4);
params->type_of_loader = GRUB_LINUX_BOOT_LOADER_TYPE;
/* These two are used (instead of cmd_line_ptr) by older versions of Linux,
and otherwise ignored. */

View file

@ -33,7 +33,7 @@ static grub_uint8_t grub_gpt_magic[8] =
static const grub_gpt_part_type_t grub_gpt_partition_type_empty = GRUB_GPT_PARTITION_TYPE_EMPTY;
#ifdef GRUB_UTIL
static const grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT;
static grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT;
#endif
/* 512 << 7 = 65536 byte sectors. */
@ -198,6 +198,14 @@ static struct grub_partition_map grub_gpt_partition_map =
GRUB_MOD_INIT(part_gpt)
{
grub_partition_map_register (&grub_gpt_partition_map);
#ifdef GRUB_UTIL
grub_gpt_partition_type_bios_boot.data1 =
grub_cpu_to_le32 (grub_gpt_partition_type_bios_boot.data1);
grub_gpt_partition_type_bios_boot.data2 =
grub_cpu_to_le16 (grub_gpt_partition_type_bios_boot.data2);
grub_gpt_partition_type_bios_boot.data3 =
grub_cpu_to_le16 (grub_gpt_partition_type_bios_boot.data3);
#endif
}
GRUB_MOD_FINI(part_gpt)