Skip to contentSkip to conversation

Grub2 running address on PowerPC64

PATCH In review Manoel 2 participants 2 messages Nov 18, 2008 – Nov 22, 2008

lore
Share & tools
lore

Manoel

author
#0 lore raw

PATCH 1/1 Grub2 running address on PowerPC64

OF uses the address 0x4000 as base-load (as stated in NOTE section added by grub-mkelfimage) and grub uses 0x10000 as running address, thus causing segment overlapping which leads to grub2 unable to load its modules.

This patch moves the running address to 0x200000 to prevent overlapping, its the same address used by Yaboot and is know to work well.

the makefile must be regenerated using the command:

 $ ruby genmk.rb < conf/powerpc-ieee1275.rmk> conf/powerpc-ieee1275.mk 
Signature · 4 lines
Best Regards,

Manoel Abranches <[email protected]>
IBM Linux Technology Center Brazil
powerpc-ieee1275.rmk +1 -1
Index: conf/powerpc-ieee1275.rmk
===================================================================
@@ -85,7 +85,7 @@
 kernel_elf_CFLAGS = $(COMMON_CFLAGS)
 kernel_elf_ASFLAGS = $(COMMON_ASFLAGS)
 kernel_elf_LDFLAGS = $(COMMON_LDFLAGS) -static-libgcc -lgcc \
-	-Wl,-N,-S,-Ttext,0x10000,-Bstatic
+	-Wl,-N,-S,-Ttext,0x200000,-Bstatic
 
 # Scripts.
 sbin_SCRIPTS = grub-install
#1 lore raw

Committed, thanks!

Quoted 36 lines · Manoel

OF uses the address 0x4000 as base-load (as stated in NOTE section added by grub-mkelfimage) and grub uses 0x10000 as running address, thus causing segment overlapping which leads to grub2 unable to load its modules.

This patch moves the running address to 0x200000 to prevent overlapping, its the same address used by Yaboot and is know to work well.

the makefile must be regenerated using the command:

 $ ruby genmk.rb < conf/powerpc-ieee1275.rmk> conf/powerpc-ieee1275.mk 
Signature · 7 lines
Best Regards,

Manoel Abranches <[email protected]>
IBM Linux Technology Center Brazil

Index: conf/powerpc-ieee1275.rmk
===================================================================
powerpc-ieee1275.rmk +1 -1
@@ -85,7 +85,7 @@
 kernel_elf_CFLAGS = $(COMMON_CFLAGS)
 kernel_elf_ASFLAGS = $(COMMON_ASFLAGS)
 kernel_elf_LDFLAGS = $(COMMON_LDFLAGS) -static-libgcc -lgcc \
-	-Wl,-N,-S,-Ttext,0x10000,-Bstatic
+	-Wl,-N,-S,-Ttext,0x200000,-Bstatic
 
 # Scripts.
 sbin_SCRIPTS = grub-install

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 5 lines
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."