Skip to contentSkip to conversation

grub-probe on powerpc

PATCH Robert Millan 2 participants 2 messages May 5, 2007 – May 7, 2007

lore
Share & tools
lore
#0 lore raw

update-grub needs grub-probe to run, which is only available in i386.

In principle, this file should be portable. I made this patch (currently applied in debian) to enable it on powerpc as well. However, it seems to have runtime errors (detects size of hd0 as 0 bytes) that I can't debug (because I lack the hardware).

Maybe someone can give it a try?

Signature · 4 lines
Robert Millan

My spam trap is [email protected].  Note: this address is only intended
for spam harvesters.  Writing to it will get you added to my black list.

Index: conf/powerpc-ieee1275.rmk
===================================================================
RCS file: /sources/grub/grub2/conf/powerpc-ieee1275.rmk,v retrieving revision 1.63

powerpc-ieee1275.rmk +10 -1
diff -u -r1.63 powerpc-ieee1275.rmk
@@ -26,14 +26,23 @@
 
 # Utilities.
 bin_UTILITIES = grub-mkimage
+sbin_UTILITIES = grub-probe
 ifeq ($(enable_grub_emu), yes)
-sbin_UTILITIES = grub-emu
+sbin_UTILITIES += grub-emu
 endif
  
 # For grub-mkimage.
 grub_mkimage_SOURCES = util/powerpc/ieee1275/grub-mkimage.c util/misc.c \
         util/resolve.c 
 
+# For grub-probe.
+grub_probe_SOURCES = util/i386/pc/grub-probe.c	\
+	util/i386/pc/biosdisk.c	util/misc.c util/i386/pc/getroot.c	\
+	kern/device.c kern/disk.c kern/err.c kern/misc.c fs/fat.c	\
+	fs/ext2.c kern/parser.c kern/partition.c partmap/pc.c partmap/gpt.c fs/ufs.c 	\
+	fs/minix.c fs/hfs.c fs/jfs.c kern/fs.c kern/env.c fs/fshelp.c 	\
+	fs/xfs.c fs/affs.c fs/sfs.c fs/hfsplus.c disk/lvm.c disk/raid.c
+
 # For grub-emu
 grub_emu_DEPENDENCIES = grub_script.tab.c grub_script.tab.h		\
 	grub_modules_init.h

Index: util/update-grub.in

#1 lore raw
Quoted 8 lines · Robert Millan

update-grub needs grub-probe to run, which is only available in i386.

In principle, this file should be portable. I made this patch (currently applied in debian) to enable it on powerpc as well. However, it seems to have runtime errors (detects size of hd0 as 0 bytes) that I can't debug (because I lack the hardware).

Maybe someone can give it a try?

It should be portable, except for the list of init/fini function calls. This list can be different among architectures, so I have put this file to i386/pc.

Okuji