PPC multiboot
I did some hacking on a multiboot loader for PPC last night. I wasn't trying to properly update the multiboot spec for non-x86 architectures, but rather just use the existing structures and code.
I've also attached a "hello world" PPC multiboot client. I noticed the top-level "hello" directory is a simple GRUB module, but I'm not sure how useful that is. It might be more useful to create hello/powerpc/ieee1275 and hello/i386/pc directories including the simplest possible multiboot clients. (Right now my hello application is mysteriously failing on my G3, apparently on the first stack reference, which may be the result of a firmware "quirk".)
This patch is not meant to be applied, but I'm putting it out here for the curious.
-Hollis
Index: conf/powerpc-ieee1275.rmk
===================================================================
RCS file: /cvsroot/grub/grub2/conf/powerpc-ieee1275.rmk,v retrieving revision 1.30
powerpc-ieee1275.rmk +9 -1
@@ -72,7 +72,7 @@ pkgdata_MODULES = _linux.mod linux.mod f hfs.mod jfs.mod normal.mod hello.mod font.mod ls.mod \ boot.mod cmp.mod cat.mod terminal.mod fshelp.mod amiga.mod apple.mod \ pc.mod suspend.mod loopback.mod help.mod reboot.mod halt.mod sun.mod \ - default.mod timeout.mod configfile.mod + default.mod timeout.mod configfile.mod _multiboot.mod multiboot.mod # For fshelp.mod. fshelp_mod_SOURCES = fs/fshelp.c
@@ -114,6 +114,14 @@ _linux_mod_CFLAGS = $(COMMON_CFLAGS) linux_mod_SOURCES = loader/powerpc/ieee1275/linux_normal.c linux_mod_CFLAGS = $(COMMON_CFLAGS) +# For _multiboot.mod. +_multiboot_mod_SOURCES = loader/powerpc/ieee1275/multiboot.c +_multiboot_mod_CFLAGS = $(COMMON_CFLAGS) + +# For multiboot.mod. +multiboot_mod_SOURCES = loader/powerpc/ieee1275/multiboot_normal.c +multiboot_mod_CFLAGS = $(COMMON_CFLAGS) + # For normal.mod. normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ normal/context.c normal/main.c normal/menu.c \
Index: include/grub/powerpc/ieee1275/loader.h
===================================================================
RCS file: /cvsroot/grub/grub2/include/grub/powerpc/ieee1275/loader.h,v retrieving revision 1.4
grub/powerpc/ieee1275/loader.h +3 -0
@@ -25,6 +25,9 @@void grub_rescue_cmd_linux (int argc,char *argv[]);void grub_rescue_cmd_initrd (int argc,char *argv[]); +void grub_rescue_cmd_multiboot (int argc,char *argv[]); +void grub_rescue_cmd_module (int argc,char *argv[]); +void grub_linux_init (void );void grub_linux_fini (void );void grub_linux_normal_init (void );
powerpc/ieee1275/multiboot.c new file +400 -0
400 lines not on this page · raw message
powerpc/ieee1275/multiboot_normal.c new file +61 -0
61 lines not on this page · raw message