merge mainline into mips
This commit is contained in:
commit
85a2cf749f
230 changed files with 7727 additions and 3654 deletions
|
@ -1,7 +1,7 @@
|
|||
/* grub-mkimage.c - make a bootable image */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -34,6 +34,7 @@
|
|||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define _GNU_SOURCE 1
|
||||
#include <getopt.h>
|
||||
|
@ -246,9 +247,18 @@ generate_image (const char *dir, char *prefix, FILE *out, char *mods[],
|
|||
|
||||
boot_img = grub_util_read_image (boot_path);
|
||||
|
||||
*((grub_uint16_t *) (boot_img + GRUB_DISK_SECTOR_SIZE
|
||||
- GRUB_BOOT_MACHINE_LIST_SIZE + 8))
|
||||
= grub_host_to_target16 (num);
|
||||
{
|
||||
struct grub_boot_blocklist *block;
|
||||
block = (struct grub_boot_blocklist *) (boot_img
|
||||
+ GRUB_DISK_SECTOR_SIZE
|
||||
- sizeof (*block));
|
||||
block->len = grub_host_to_target16 (num);
|
||||
|
||||
/* This is filled elsewhere. Verify it just in case. */
|
||||
assert (block->segment
|
||||
== grub_host_to_target16 (GRUB_BOOT_MACHINE_KERNEL_SEG
|
||||
+ (GRUB_DISK_SECTOR_SIZE >> 4)));
|
||||
}
|
||||
|
||||
grub_util_write_image (boot_img, boot_size, out);
|
||||
free (boot_img);
|
||||
|
@ -464,10 +474,7 @@ main (int argc, char *argv[])
|
|||
grub_platform_image_format_t format = GRUB_PLATFORM_IMAGE_DEFAULT;
|
||||
#endif
|
||||
|
||||
set_program_name (argv[0]);
|
||||
setlocale (LC_ALL, "");
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
grub_util_init_nls ();
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue