]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Sync with trunk
authorRobert Millan <rmh@aybabtu.com>
Mon, 18 Jan 2010 20:51:35 +0000 (20:51 +0000)
committerRobert Millan <rmh@aybabtu.com>
Mon, 18 Jan 2010 20:51:35 +0000 (20:51 +0000)
1  2 
conf/i386-coreboot.rmk
conf/i386-pc.rmk
conf/i386.rmk
genmk.rb
term/gfxterm.c
util/elf/grub-mkimage.c
util/grub-install.in
util/grub-mkrawimage.c

Simple merge
Simple merge
diff --cc conf/i386.rmk
Simple merge
diff --cc genmk.rb
Simple merge
diff --cc term/gfxterm.c
index bf3321236e2b9d6b31b9ba46c9843e5fbd96d480,f493f882c2dfa30130215ab9cf55b619267cf788..94aacee885846ab6aed4a1e1a2355cd60715add2
@@@ -27,7 -27,7 +27,7 @@@
  #include <grub/bitmap.h>
  #include <grub/command.h>
  
- #define DEFAULT_VIDEO_MODE    "1024x768,800x600,640x480,0x0"
 -#define DEFAULT_VIDEO_MODE "auto"
++#define DEFAULT_VIDEO_MODE    "auto"
  #define DEFAULT_BORDER_WIDTH  10
  
  #define DEFAULT_STANDARD_COLOR  0x07
Simple merge
Simple merge
index 5dba325c36136fffbc86f3c1b92087e674e850a5,16b2c6619fe5d6aa845bafaa61a3298ab3306d47..2316479e9e42f1b5463deb47e486161be5ae9301
@@@ -325,71 -289,8 +325,71 @@@ generate_image (const char *dir, char *
  
  #ifdef GRUB_MACHINE_PCBIOS
    if (GRUB_KERNEL_MACHINE_LINK_ADDR + core_size > GRUB_MEMORY_MACHINE_UPPER)
-     grub_util_error (_("Core image is too big (%p > %p)\n"),
+     grub_util_error (_("core image is too big (%p > %p)"),
 -                   GRUB_KERNEL_MACHINE_LINK_ADDR + core_size, GRUB_MEMORY_MACHINE_UPPER);
 +                   GRUB_KERNEL_MACHINE_LINK_ADDR + core_size,
 +                   GRUB_MEMORY_MACHINE_UPPER);
 +#endif
 +
 +#if defined(GRUB_MACHINE_MIPS)
 +  if (format == GRUB_PLATFORM_IMAGE_ELF)
 +    {
 +      char *elf_img;
 +      size_t program_size;
 +      Elf32_Ehdr *ehdr;
 +      Elf32_Phdr *phdr;
 +      grub_uint32_t target_addr;
 +
 +      program_size = ALIGN_UP (core_size, 4);
 +
 +      elf_img = xmalloc (program_size + sizeof (*ehdr) + sizeof (*phdr));
 +      memset (elf_img, 0, program_size + sizeof (*ehdr) + sizeof (*phdr));
 +      memcpy (elf_img  + sizeof (*ehdr) + sizeof (*phdr), core_img, core_size);
 +      ehdr = (void *) elf_img;
 +      phdr = (void *) (elf_img + sizeof (*ehdr));
 +      memcpy (ehdr->e_ident, ELFMAG, SELFMAG);
 +      ehdr->e_ident[EI_CLASS] = ELFCLASS32;
 +#ifdef GRUB_CPU_MIPSEL
 +      ehdr->e_ident[EI_DATA] = ELFDATA2LSB;
 +#else
 +      ehdr->e_ident[EI_DATA] = ELFDATA2MSB;
 +#endif
 +      ehdr->e_ident[EI_VERSION] = EV_CURRENT;
 +      ehdr->e_ident[EI_OSABI] = ELFOSABI_NONE;
 +      ehdr->e_type = grub_host_to_target16 (ET_EXEC);
 +      ehdr->e_machine = grub_host_to_target16 (EM_MIPS);
 +      ehdr->e_version = grub_host_to_target32 (EV_CURRENT);
 +
 +      ehdr->e_phoff = grub_host_to_target32 ((char *) phdr - (char *) ehdr);
 +      ehdr->e_phentsize = grub_host_to_target16 (sizeof (*phdr));
 +      ehdr->e_phnum = grub_host_to_target16 (1);
 +
 +      /* No section headers.  */
 +      ehdr->e_shoff = grub_host_to_target32 (0);
 +      ehdr->e_shentsize = grub_host_to_target16 (0);
 +      ehdr->e_shnum = grub_host_to_target16 (0);
 +      ehdr->e_shstrndx = grub_host_to_target16 (0);
 +
 +      ehdr->e_ehsize = grub_host_to_target16 (sizeof (*ehdr));
 +
 +      phdr->p_type = grub_host_to_target32 (PT_LOAD);
 +      phdr->p_offset = grub_host_to_target32 (sizeof (*ehdr) + sizeof (*phdr));
 +      phdr->p_flags = grub_host_to_target32 (PF_R | PF_W | PF_X);
 +
 +      target_addr = ALIGN_UP (GRUB_KERNEL_MACHINE_LINK_ADDR 
 +                            + kernel_size + total_module_size, 32);
 +      ehdr->e_entry = grub_host_to_target32 (target_addr);
 +      phdr->p_vaddr = grub_host_to_target32 (target_addr);
 +      phdr->p_paddr = grub_host_to_target32 (target_addr);
 +      phdr->p_align = grub_host_to_target32 (GRUB_KERNEL_MACHINE_LINK_ALIGN);
 +      ehdr->e_flags = grub_host_to_target32 (0x1000 | EF_MIPS_NOREORDER 
 +                                           | EF_MIPS_PIC | EF_MIPS_CPIC);
 +      phdr->p_filesz = grub_host_to_target32 (core_size);
 +      phdr->p_memsz = grub_host_to_target32 (core_size);
 +
 +      free (core_img);
 +      core_img = elf_img;
 +      core_size = program_size  + sizeof (*ehdr) + sizeof (*phdr);
 +  }
  #endif
  
    grub_util_write_image (core_img, core_size, out);