Skip to contentSkip to conversation

rename "grubof" to "grub"

PATCH In review Hollis Blanchard 4 participants 7 messages Apr 21, 2006 – May 2, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rename "grubof" to "grub"

This patch renames "grubof", the executable name for PPC and Sparc, to "grub". I'm still not sure what the naming convention should be for the executable output by grub-mkimage; I'm thinking maybe "grub.ppc". It isn't an image ("grub.img"); it's still an ELF file...

I haven't tested the Sparc build, but the PPC rename was trivial so I expect Sparc will "just work" too.

-Hollis

2006-04-20 Hollis Blanchard <[email protected]>

* conf/powerpc-ieee1275.rmk: Replace grubof' with grub'.
* conf/sparc64-ieee1275.rmk: Likewise.
* util/powerpc/ieee1275/grub-mkimage.c: Likewise.

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

powerpc-ieee1275.rmk +11 -11
diff -u -p -r1.53 powerpc-ieee1275.rmk
@@ -7,23 +7,23 @@ COMMON_LDFLAGS += -nostdlib
 
 # Images.
 
-MOSTLYCLEANFILES += grubof_symlist.c kernel_syms.lst
+MOSTLYCLEANFILES += grub_symlist.c kernel_syms.lst
 DEFSYMFILES += kernel_syms.lst
 
-grubof_HEADERS = arg.h boot.h device.h disk.h dl.h elf.h env.h err.h \
+grub_HEADERS = arg.h boot.h device.h disk.h dl.h elf.h env.h err.h \
 	file.h fs.h kernel.h misc.h mm.h net.h parser.h rescue.h symbol.h \
 	term.h types.h powerpc/libgcc.h loader.h \
 	partition.h pc_partition.h ieee1275/ieee1275.h machine/time.h \
 	machine/kernel.h
 
-grubof_symlist.c: $(addprefix include/grub/,$(grubof_HEADERS)) gensymlist.sh
+grub_symlist.c: $(addprefix include/grub/,$(grub_HEADERS)) gensymlist.sh
 	sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@
 
-kernel_syms.lst: $(addprefix include/grub/,$(grubof_HEADERS)) genkernsyms.sh
+kernel_syms.lst: $(addprefix include/grub/,$(grub_HEADERS)) genkernsyms.sh
 	sh $(srcdir)/genkernsyms.sh $(filter %h,$^) > $@
 
 # Programs
-pkgdata_PROGRAMS = grubof
+pkgdata_PROGRAMS = grub
 
 # Utilities.
 bin_UTILITIES = grub-emu
@@ -59,18 +59,18 @@ grub_emu_SOURCES = commands/boot.c comma
 
 grub_emu_LDFLAGS = $(LIBCURSES)
 
-grubof_SOURCES = kern/powerpc/ieee1275/crt0.S kern/powerpc/ieee1275/cmain.c \
+grub_SOURCES = kern/powerpc/ieee1275/crt0.S kern/powerpc/ieee1275/cmain.c \
 	kern/ieee1275/ieee1275.c kern/main.c kern/device.c 		\
 	kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c 		\
 	kern/misc.c kern/mm.c kern/loader.c kern/rescue.c kern/term.c 	\
 	kern/powerpc/ieee1275/init.c term/ieee1275/ofconsole.c 		\
 	kern/powerpc/ieee1275/openfw.c disk/ieee1275/ofdisk.c 		\
 	kern/parser.c kern/partition.c kern/env.c kern/powerpc/dl.c 	\
-	grubof_symlist.c kern/powerpc/cache.S
-grubof_HEADERS = grub/powerpc/ieee1275/ieee1275.h
-grubof_CFLAGS = $(COMMON_CFLAGS)
-grubof_ASFLAGS = $(COMMON_ASFLAGS)
-grubof_LDFLAGS = $(COMMON_LDFLAGS) -static-libgcc -lgcc \
+	grub_symlist.c kern/powerpc/cache.S
+grub_HEADERS = grub/powerpc/ieee1275/ieee1275.h
+grub_CFLAGS = $(COMMON_CFLAGS)
+grub_ASFLAGS = $(COMMON_ASFLAGS)
+grub_LDFLAGS = $(COMMON_LDFLAGS) -static-libgcc -lgcc \
 	-Wl,-N,-S,-Ttext,0x200000,-Bstatic
 
 # For genmoddep.

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

sparc64-ieee1275.rmk +11 -11
diff -u -p -r1.9 sparc64-ieee1275.rmk
@@ -7,27 +7,27 @@ COMMON_LDFLAGS = -melf64_sparc -nostdlib
 
 # Images.
 
-MOSTLYCLEANFILES += grubof_symlist.c kernel_syms.lst
+MOSTLYCLEANFILES += grub_symlist.c kernel_syms.lst
 DEFSYMFILES += kernel_syms.lst
 
-grubof_HEADERS = arg.h boot.h device.h disk.h dl.h elf.h env.h err.h \
+grub_HEADERS = arg.h boot.h device.h disk.h dl.h elf.h env.h err.h \
 	file.h fs.h kernel.h misc.h mm.h net.h parser.h rescue.h symbol.h \
 	term.h types.h sparc64/libgcc.h loader.h \
 	partition.h pc_partition.h ieee1275/ieee1275.h machine/time.h \
 	machine/kernel.h
 
-grubof_symlist.c: $(addprefix include/grub/,$(grubof_HEADERS)) gensymlist.sh
+grub_symlist.c: $(addprefix include/grub/,$(grub_HEADERS)) gensymlist.sh
 	sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@
 
 # For the parser.
 grub_script.tab.c grub_script.tab.h: normal/parser.y
 	$(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/normal/parser.y
 
-kernel_syms.lst: $(addprefix include/grub/,$(grubof_HEADERS)) genkernsyms.sh
+kernel_syms.lst: $(addprefix include/grub/,$(grub_HEADERS)) genkernsyms.sh
 	sh $(srcdir)/genkernsyms.sh $(filter %h,$^) > $@
 
 # Programs
-pkgdata_PROGRAMS = grubof
+pkgdata_PROGRAMS = grub
 
 # Utilities.
 #bin_UTILITIES = grub-emu grub-mkimage
@@ -63,17 +63,17 @@ grub_mkimage_SOURCES = util/sparc64/ieee
 
 grub_emu_LDFLAGS = $(LIBCURSES)
 
-grubof_SOURCES = kern/sparc64/ieee1275/init.c kern/ieee1275/ieee1275.c \
+grub_SOURCES = kern/sparc64/ieee1275/init.c kern/ieee1275/ieee1275.c \
 	kern/main.c kern/device.c kern/disk.c kern/dl.c kern/file.c \
 	kern/fs.c kern/err.c kern/misc.c kern/mm.c kern/loader.c \
 	kern/rescue.c kern/term.c term/ieee1275/ofconsole.c \
 	kern/sparc64/ieee1275/openfw.c disk/ieee1275/ofdisk.c \
-	kern/partition.c kern/env.c kern/sparc64/dl.c grubof_symlist.c \
+	kern/partition.c kern/env.c kern/sparc64/dl.c grub_symlist.c \
 	kern/sparc64/cache.S kern/parser.c
-grubof_HEADERS = grub/sparc64/ieee1275/ieee1275.h
-grubof_CFLAGS = $(COMMON_CFLAGS)
-grubof_ASFLAGS = $(COMMON_ASFLAGS)
-grubof_LDFLAGS = -mno-app-regs -nostdlib -Wl,-N,-Ttext,0x200000,-Bstatic,-melf64_sparc
+grub_HEADERS = grub/sparc64/ieee1275/ieee1275.h
+grub_CFLAGS = $(COMMON_CFLAGS)
+grub_ASFLAGS = $(COMMON_ASFLAGS)
+grub_LDFLAGS = -mno-app-regs -nostdlib -Wl,-N,-Ttext,0x200000,-Bstatic,-melf64_sparc
 
 # For genmoddep.
 genmoddep_SOURCES = util/genmoddep.c

Index: util/powerpc/ieee1275/grub-mkimage.c
===================================================================
RCS file: /sources/grub/grub2/util/powerpc/ieee1275/grub-mkimage.c,v retrieving revision 1.4

powerpc/ieee1275/grub-mkimage.c +1 -1
diff -u -p -r1.4 grub-mkimage.c
@@ -168,7 +168,7 @@ add_segments (char *dir, FILE *out, int 
   int i;
 
   /* Read ELF header.  */
-  kernel_path = grub_util_get_path (dir, "grubof");
+  kernel_path = grub_util_get_path (dir, "grub");
   in = fopen (kernel_path, "rb");
   if (! in)
     grub_util_error ("cannot open %s", kernel_path);
#1 lore raw
Quoted 4 lines · Hollis Blanchard

This patch renames "grubof", the executable name for PPC and Sparc, to "grub". I'm still not sure what the naming convention should be for the executable output by grub-mkimage; I'm thinking maybe "grub.ppc". It isn't an image ("grub.img"); it's still an ELF file...

Personally I would prefer something like `_grub' so people see there is something special about it and just don't use it like that. After that the output file can just be called grub if people want that.

--
Marco

#2 lore raw
Quoted 10 lines · Marco Gerards
Quoted 4 lines · Hollis Blanchard

This patch renames "grubof", the executable name for PPC and Sparc, to "grub". I'm still not sure what the naming convention should be for the executable output by grub-mkimage; I'm thinking maybe "grub.ppc". It isn't an image ("grub.img"); it's still an ELF file...

Personally I would prefer something like `_grub' so people see there is something special about it and just don't use it like that. After that the output file can just be called grub if people want that.

What about "grubkernel" and "grub"? Or "grub.raw" and "grub"? I'd like to try to stay within 8.3 naming for all files, since people will be deploying the end result on FAT filesystems.

I was just bit by this issue myself, when I tried to run "grubof" without any modules. :) Unfortunately, because the module memory wasn't even mapped, when I tried to check the magic number I just ended up crashing my crappy Open Firmware. :( Need to come up with a better solution for that...

-Hollis

#3 lore raw
Quoted 3 lines · Hollis Blanchard

What about "grubkernel" and "grub"? Or "grub.raw" and "grub"? I'd like to try to stay within 8.3 naming for all files, since people will be deploying the end result on FAT filesystems.

How about "vmgrub" for the grub kernel :)

Signature · 4 lines
Roger Leigh
                Printing on GNU/Linux?  http://gutenprint.sourceforge.net/
                Debian GNU/Linux        http://www.debian.org/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
#4 lore raw
Quoted 5 lines · Roger Leigh
Quoted 3 lines

What about "grubkernel" and "grub"? Or "grub.raw" and "grub"? I'd like to try to stay within 8.3 naming for all files, since people will be deploying the end result on FAT filesystems.

How about "vmgrub" for the grub kernel :)

... and put "paging" on the feature request list ;-)

Stefan

Signature · 3 lines
coresystems GmbH · Brahmsstr. 16 · D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 · Fax: +49 761 7664613
Email: [email protected]  · http://www.coresystems.de/
#5 lore raw
Quoted 8 lines · Stefan Reinauer
Quoted 5 lines · Roger Leigh
Quoted 3 lines

What about "grubkernel" and "grub"? Or "grub.raw" and "grub"? I'd like to try to stay within 8.3 naming for all files, since people will be deploying the end result on FAT filesystems.

How about "vmgrub" for the grub kernel :)

... and put "paging" on the feature request list ;-)

It certainly has a lower priority than multitasking to me. ;-)

--
Marco

#6 lore raw
In reply to Hollis Blanchard
Quoted 9 lines · Hollis Blanchard
Quoted 7 lines · Marco Gerards
Quoted 4 lines · Hollis Blanchard

This patch renames "grubof", the executable name for PPC and Sparc, to "grub". I'm still not sure what the naming convention should be for the executable output by grub-mkimage; I'm thinking maybe "grub.ppc". It isn't an image ("grub.img"); it's still an ELF file...

Quoted 7 lines
Quoted 3 lines

Personally I would prefer something like `_grub' so people see there is something special about it and just don't use it like that. After that the output file can just be called grub if people want that.

What about "grubkernel" and "grub"? Or "grub.raw" and "grub"? I'd like to try to stay within 8.3 naming for all files, since people will be deploying the end result on FAT filesystems.

_grub works on fat. We use an underscore for the rescue mode chainloader on the PC as well. Personally I prefer something like this or another obscure name that scares people. :-)

--
Marco