diff --git a/ChangeLog b/ChangeLog index ada73e07c..091037201 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-04-30 Jeroen Dekkers + + * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c, + commands/ls.c, commands/terminal.c, commands/boot.c, + commands/cmp.c and commands/cat.c. + (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc. + + * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of + "env.h" + 2004-04-04 Yoshinori K. Okuji All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_ diff --git a/conf/powerpc-ieee1275.mk b/conf/powerpc-ieee1275.mk index d73e97546..fd655f492 100644 --- a/conf/powerpc-ieee1275.mk +++ b/conf/powerpc-ieee1275.mk @@ -27,12 +27,14 @@ grub_emu_SOURCES = kern/main.c kern/device.c \ disk/powerpc/ieee1275/partition.c \ util/i386/pc/biosdisk.c fs/fat.c fs/ext2.c \ normal/cmdline.c normal/command.c normal/main.c normal/menu.c \ + normal/arg.c \ util/console.c util/grub-emu.c util/misc.c util/i386/pc/getroot.c \ - kern/env.c -CLEANFILES += grub-emu grub_emu-kern_main.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-kern_err.o grub_emu-kern_misc.o grub_emu-kern_loader.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-disk_powerpc_ieee1275_partition.o grub_emu-util_i386_pc_biosdisk.o grub_emu-fs_fat.o grub_emu-fs_ext2.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-util_console.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_i386_pc_getroot.o grub_emu-kern_env.o -MOSTLYCLEANFILES += grub_emu-kern_main.d grub_emu-kern_device.d grub_emu-kern_disk.d grub_emu-kern_dl.d grub_emu-kern_file.d grub_emu-kern_fs.d grub_emu-kern_err.d grub_emu-kern_misc.d grub_emu-kern_loader.d grub_emu-kern_rescue.d grub_emu-kern_term.d grub_emu-disk_powerpc_ieee1275_partition.d grub_emu-util_i386_pc_biosdisk.d grub_emu-fs_fat.d grub_emu-fs_ext2.d grub_emu-normal_cmdline.d grub_emu-normal_command.d grub_emu-normal_main.d grub_emu-normal_menu.d grub_emu-util_console.d grub_emu-util_grub_emu.d grub_emu-util_misc.d grub_emu-util_i386_pc_getroot.d grub_emu-kern_env.d + kern/env.c commands/ls.c \ + commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c +CLEANFILES += grub-emu grub_emu-kern_main.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-kern_err.o grub_emu-kern_misc.o grub_emu-kern_loader.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-disk_powerpc_ieee1275_partition.o grub_emu-util_i386_pc_biosdisk.o grub_emu-fs_fat.o grub_emu-fs_ext2.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-normal_arg.o grub_emu-util_console.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_i386_pc_getroot.o grub_emu-kern_env.o grub_emu-commands_ls.o grub_emu-commands_terminal.o grub_emu-commands_boot.o grub_emu-commands_cmp.o grub_emu-commands_cat.o +MOSTLYCLEANFILES += grub_emu-kern_main.d grub_emu-kern_device.d grub_emu-kern_disk.d grub_emu-kern_dl.d grub_emu-kern_file.d grub_emu-kern_fs.d grub_emu-kern_err.d grub_emu-kern_misc.d grub_emu-kern_loader.d grub_emu-kern_rescue.d grub_emu-kern_term.d grub_emu-disk_powerpc_ieee1275_partition.d grub_emu-util_i386_pc_biosdisk.d grub_emu-fs_fat.d grub_emu-fs_ext2.d grub_emu-normal_cmdline.d grub_emu-normal_command.d grub_emu-normal_main.d grub_emu-normal_menu.d grub_emu-normal_arg.d grub_emu-util_console.d grub_emu-util_grub_emu.d grub_emu-util_misc.d grub_emu-util_i386_pc_getroot.d grub_emu-kern_env.d grub_emu-commands_ls.d grub_emu-commands_terminal.d grub_emu-commands_boot.d grub_emu-commands_cmp.d grub_emu-commands_cat.d -grub-emu: grub_emu-kern_main.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-kern_err.o grub_emu-kern_misc.o grub_emu-kern_loader.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-disk_powerpc_ieee1275_partition.o grub_emu-util_i386_pc_biosdisk.o grub_emu-fs_fat.o grub_emu-fs_ext2.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-util_console.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_i386_pc_getroot.o grub_emu-kern_env.o +grub-emu: grub_emu-kern_main.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-kern_err.o grub_emu-kern_misc.o grub_emu-kern_loader.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-disk_powerpc_ieee1275_partition.o grub_emu-util_i386_pc_biosdisk.o grub_emu-fs_fat.o grub_emu-fs_ext2.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-normal_arg.o grub_emu-util_console.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_i386_pc_getroot.o grub_emu-kern_env.o grub_emu-commands_ls.o grub_emu-commands_terminal.o grub_emu-commands_boot.o grub_emu-commands_cmp.o grub_emu-commands_cat.o $(BUILD_CC) -o $@ $^ $(BUILD_LDFLAGS) $(grub_emu_LDFLAGS) grub_emu-kern_main.o: kern/main.c @@ -187,6 +189,14 @@ grub_emu-normal_menu.d: normal/menu.c -include grub_emu-normal_menu.d +grub_emu-normal_arg.o: normal/arg.c + $(BUILD_CC) -Inormal -I$(srcdir)/normal $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -c -o $@ $< + +grub_emu-normal_arg.d: normal/arg.c + set -e; $(BUILD_CC) -Inormal -I$(srcdir)/normal $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -M $< | sed 's,arg\.o[ :]*,grub_emu-normal_arg.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@ + +-include grub_emu-normal_arg.d + grub_emu-util_console.o: util/console.c $(BUILD_CC) -Iutil -I$(srcdir)/util $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -c -o $@ $< @@ -227,6 +237,46 @@ grub_emu-kern_env.d: kern/env.c -include grub_emu-kern_env.d +grub_emu-commands_ls.o: commands/ls.c + $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -c -o $@ $< + +grub_emu-commands_ls.d: commands/ls.c + set -e; $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -M $< | sed 's,ls\.o[ :]*,grub_emu-commands_ls.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@ + +-include grub_emu-commands_ls.d + +grub_emu-commands_terminal.o: commands/terminal.c + $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -c -o $@ $< + +grub_emu-commands_terminal.d: commands/terminal.c + set -e; $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -M $< | sed 's,terminal\.o[ :]*,grub_emu-commands_terminal.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@ + +-include grub_emu-commands_terminal.d + +grub_emu-commands_boot.o: commands/boot.c + $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -c -o $@ $< + +grub_emu-commands_boot.d: commands/boot.c + set -e; $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -M $< | sed 's,boot\.o[ :]*,grub_emu-commands_boot.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@ + +-include grub_emu-commands_boot.d + +grub_emu-commands_cmp.o: commands/cmp.c + $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -c -o $@ $< + +grub_emu-commands_cmp.d: commands/cmp.c + set -e; $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -M $< | sed 's,cmp\.o[ :]*,grub_emu-commands_cmp.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@ + +-include grub_emu-commands_cmp.d + +grub_emu-commands_cat.o: commands/cat.c + $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -c -o $@ $< + +grub_emu-commands_cat.d: commands/cat.c + set -e; $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -M $< | sed 's,cat\.o[ :]*,grub_emu-commands_cat.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@ + +-include grub_emu-commands_cat.d + grub_emu_LDFLAGS = -lncurses grubof_SOURCES = boot/powerpc/ieee1275/cmain.c boot/powerpc/ieee1275/ieee1275.c \ @@ -463,7 +513,7 @@ grubof-normal_arg.d: normal/arg.c grubof_HEADERS = grub/powerpc/ieee1275/ieee1275.h grubof_CFLAGS = $(COMMON_CFLAGS) grubof_ASFLAGS = $(COMMON_ASFLAGS) -grubof_LDFLAGS = -Wl,-Ttext,0x200000,-Bstatic +grubof_LDFLAGS = -nostdlib -static-libgcc -lgcc -Wl,-Ttext,0x200000,-Bstatic # For genmoddep. genmoddep_SOURCES = util/genmoddep.c diff --git a/conf/powerpc-ieee1275.rmk b/conf/powerpc-ieee1275.rmk index e22d07284..a0712616f 100644 --- a/conf/powerpc-ieee1275.rmk +++ b/conf/powerpc-ieee1275.rmk @@ -27,8 +27,10 @@ grub_emu_SOURCES = kern/main.c kern/device.c \ disk/powerpc/ieee1275/partition.c \ util/i386/pc/biosdisk.c fs/fat.c fs/ext2.c \ normal/cmdline.c normal/command.c normal/main.c normal/menu.c \ + normal/arg.c \ util/console.c util/grub-emu.c util/misc.c util/i386/pc/getroot.c \ - kern/env.c + kern/env.c commands/ls.c \ + commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c grub_emu_LDFLAGS = -lncurses grubof_SOURCES = boot/powerpc/ieee1275/cmain.c boot/powerpc/ieee1275/ieee1275.c \ @@ -43,7 +45,7 @@ grubof_SOURCES = boot/powerpc/ieee1275/cmain.c boot/powerpc/ieee1275/ieee1275.c grubof_HEADERS = grub/powerpc/ieee1275/ieee1275.h grubof_CFLAGS = $(COMMON_CFLAGS) grubof_ASFLAGS = $(COMMON_ASFLAGS) -grubof_LDFLAGS = -Wl,-Ttext,0x200000,-Bstatic +grubof_LDFLAGS = -nostdlib -static-libgcc -lgcc -Wl,-Ttext,0x200000,-Bstatic # For genmoddep. genmoddep_SOURCES = util/genmoddep.c diff --git a/kern/powerpc/ieee1275/init.c b/kern/powerpc/ieee1275/init.c index fcf94e74d..693cdf75c 100644 --- a/kern/powerpc/ieee1275/init.c +++ b/kern/powerpc/ieee1275/init.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include void grub_ofdisk_init (void); void grub_console_init (void);