Fix sparc64.
* configure.ac (GRUB_KERNEL_MACHINE_LINK_ADDR): Removed. * grub-core/Makefile.core.def (kernel): Make ldflags just use the right address. Add sparc64_ieee1275_ldflags. * grub-core/loader/sparc64/ieee1275/linux.c: Remove leftover include. * util/grub-mkimagexx.c (locate_sections): Correct grub_host_to_target32 to grub_host_to_target_addr (load_image): Likewise.
This commit is contained in:
parent
f452b04048
commit
fb53b340aa
5 changed files with 24 additions and 25 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2010-09-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Fix sparc64.
|
||||
|
||||
* configure.ac (GRUB_KERNEL_MACHINE_LINK_ADDR): Removed.
|
||||
* grub-core/Makefile.core.def (kernel): Make ldflags just use the
|
||||
right address. Add sparc64_ieee1275_ldflags.
|
||||
* grub-core/loader/sparc64/ieee1275/linux.c: Remove leftover include.
|
||||
* util/grub-mkimagexx.c (locate_sections): Correct grub_host_to_target32
|
||||
to grub_host_to_target_addr
|
||||
(load_image): Likewise.
|
||||
|
||||
2010-09-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/normal/completion.c (complete_file): Handle device
|
||||
|
|
12
configure.ac
12
configure.ac
|
@ -867,20 +867,8 @@ pkglibrootdir='$(libdir)'/`echo $PACKAGE | sed "$program_transform_name"`
|
|||
AC_SUBST(pkglibrootdir)
|
||||
|
||||
AC_SUBST([FONT_SOURCE])
|
||||
AS_IF([test x$target_cpu = xi386 -a x$platform = xpc],
|
||||
[AC_SUBST([GRUB_KERNEL_MACHINE_LINK_ADDR], 0x8200)])
|
||||
AS_IF([test x$target_cpu = xi386 -a x$platform = xcoreboot],
|
||||
[AC_SUBST([GRUB_KERNEL_MACHINE_LINK_ADDR], 0x8200)])
|
||||
AS_IF([test x$target_cpu = xi386 -a x$platform = xmultiboot],
|
||||
[AC_SUBST([GRUB_KERNEL_MACHINE_LINK_ADDR], 0x8200)])
|
||||
AS_IF([test x$target_cpu = xmips -a x$platform = xyeeloong],
|
||||
[AC_SUBST([GRUB_KERNEL_MACHINE_LINK_ADDR], 0x80200000)])
|
||||
AS_IF([test x$target_cpu = xpowerpc -a x$platform = xieee1275],
|
||||
[AC_SUBST([GRUB_KERNEL_MACHINE_LINK_ADDR], 0x200000)])
|
||||
AS_IF([test x$target_cpu = xi386 -a x$platform = xqemu],
|
||||
[AC_SUBST([GRUB_BOOT_MACHINE_LINK_ADDR], 0xffe00)])
|
||||
AS_IF([test x$target_cpu = xi386 -a x$platform = xieee1275],
|
||||
[AC_SUBST([GRUB_KERNEL_MACHINE_LINK_ADDR], 0x10000)])
|
||||
AS_IF([test x$TARGET_APPLE_CC = x1],
|
||||
[AC_SUBST([USE_APPLE_CC_FIXES], yes)])
|
||||
|
||||
|
|
|
@ -10,20 +10,20 @@ kernel = {
|
|||
x86_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment';
|
||||
|
||||
i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),$(GRUB_KERNEL_MACHINE_LINK_ADDR)';
|
||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200';
|
||||
|
||||
i386_qemu_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT),$(GRUB_KERNEL_MACHINE_LINK_ADDR)';
|
||||
i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200';
|
||||
|
||||
i386_coreboot_ldflags = '-Wl,-Ttext=$(GRUB_KERNEL_MACHINE_LINK_ADDR)';
|
||||
i386_multiboot_ldflags = '-Wl,-Ttext=$(GRUB_KERNEL_MACHINE_LINK_ADDR)';
|
||||
i386_ieee1275_ldflags = '-Wl,-Ttext=$(GRUB_KERNEL_MACHINE_LINK_ADDR)';
|
||||
mips_yeeloong_ldflags = '-Wl,-Ttext,$(GRUB_KERNEL_MACHINE_LINK_ADDR)';
|
||||
powerpc_ieee1275_ldflags = '-Wl,-Ttext,$(GRUB_KERNEL_MACHINE_LINK_ADDR)';
|
||||
i386_coreboot_ldflags = '-Wl,-Ttext=0x8200';
|
||||
i386_multiboot_ldflags = '-Wl,-Ttext=0x8200';
|
||||
i386_ieee1275_ldflags = '-Wl,-Ttext=0x10000';
|
||||
mips_yeeloong_ldflags = '-Wl,-Ttext,0x80200000';
|
||||
powerpc_ieee1275_ldflags = '-Wl,-Ttext,0x200000';
|
||||
sparc64_ieee1275_ldflags = '-Wl,-Ttext,0x4400';
|
||||
|
||||
mips_yeeloong_cppflags = '-DUSE_ASCII_FAILBACK';
|
||||
i386_qemu_cppflags = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)';
|
||||
i386_qemu_ccasflags = '-DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)';
|
||||
emu_cflags = '$(CFLAGS_GNULIB)';
|
||||
emu_cppflags = '$(CPPFLAGS_GNULIB)';
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <grub/mm.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/ieee1275/ieee1275.h>
|
||||
#include <grub/gzio.h>
|
||||
#include <grub/command.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
|
|
|
@ -555,7 +555,7 @@ SUFFIX (locate_sections) (Elf_Shdr *sections, Elf_Half section_entsize,
|
|||
i++, s = (Elf_Shdr *) ((char *) s + section_entsize))
|
||||
if (SUFFIX (is_text_section) (s, image_target))
|
||||
{
|
||||
Elf_Word align = grub_host_to_target32 (s->sh_addralign);
|
||||
Elf_Word align = grub_host_to_target_addr (s->sh_addralign);
|
||||
const char *name = strtab + grub_host_to_target32 (s->sh_name);
|
||||
if (align)
|
||||
current_address = ALIGN_UP (current_address + image_target->vaddr_offset,
|
||||
|
@ -577,7 +577,7 @@ SUFFIX (locate_sections) (Elf_Shdr *sections, Elf_Half section_entsize,
|
|||
i++, s = (Elf_Shdr *) ((char *) s + section_entsize))
|
||||
if (SUFFIX (is_data_section) (s, image_target))
|
||||
{
|
||||
Elf_Word align = grub_host_to_target32 (s->sh_addralign);
|
||||
Elf_Word align = grub_host_to_target_addr (s->sh_addralign);
|
||||
const char *name = strtab + grub_host_to_target32 (s->sh_name);
|
||||
|
||||
if (align)
|
||||
|
@ -641,7 +641,7 @@ SUFFIX (load_image) (const char *kernel_path, grub_size_t *exec_size,
|
|||
/* Relocate sections then symbols in the virtual address space. */
|
||||
s = (Elf_Shdr *) ((char *) sections
|
||||
+ grub_host_to_target16 (e->e_shstrndx) * section_entsize);
|
||||
strtab = (char *) e + grub_host_to_target32 (s->sh_offset);
|
||||
strtab = (char *) e + grub_host_to_target_addr (s->sh_offset);
|
||||
|
||||
section_addresses = SUFFIX (locate_sections) (sections, section_entsize,
|
||||
num_sections, strtab,
|
||||
|
@ -662,7 +662,7 @@ SUFFIX (load_image) (const char *kernel_path, grub_size_t *exec_size,
|
|||
i++, s = (Elf_Shdr *) ((char *) s + section_entsize))
|
||||
if (grub_target_to_host32 (s->sh_type) == SHT_NOBITS)
|
||||
{
|
||||
Elf_Word align = grub_host_to_target32 (s->sh_addralign);
|
||||
Elf_Word align = grub_host_to_target_addr (s->sh_addralign);
|
||||
const char *name = strtab + grub_host_to_target32 (s->sh_name);
|
||||
|
||||
if (align)
|
||||
|
|
Loading…
Reference in a new issue