grub/conf/powerpc-ieee1275.rmk

225 lines
6.3 KiB
Text
Raw Normal View History

2004-03-29 Marco Gerards <metgerards@student.han.nl> Add support for the newworld apple macintosh (PPC). This has been tested on the powerbook 2000 only. It only adds support for generic ieee1275 functions, console and disk support. This should be easy to port to other architectures with support for Open Firmware. * configure.ac: Accept the powerpc as host_cpu. In the case of the powerpc cpu set the host_vendor to ieee1275. Make sure the i386 specific tests are only executed while building for the i386. Inverse test for crosscompile. * genmk.rb (Utility): Allow assembler files. * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno. * conf/powerpc-ieee1275.rmk: New file. * disk/powerpc/ieee1275/ofdisk.c: Likewise. * disk/powerpc/ieee1275/partition.c: Likewise. * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/console.h: Likewise. * include/pupa/powerpc/ieee1275/partition.h: Likewise. * include/pupa/powerpc/ieee1275/time.h: Likewise. * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/multiboot.h: Likewise. * include/pupa/powerpc/ieee1275/loader.h * include/pupa/powerpc/setjmp.h: Likewise. * include/pupa/powerpc/types.h: Likewise. * kern/powerpc/ieee1275/init.c: Likewise. * kern/powerpc/ieee1275/openfw.c: Likewise. * term/powerpc/ieee1275/ofconsole.c: Likewise. These files were written by Johan Rydberg (jrydberg@night.trouble.net) and I only modified them slightly. * boot/powerpc/ieee1275/cmain.c: New file. * boot/powerpc/ieee1275/crt0.S: Likewise. * boot/powerpc/ieee1275/ieee1275.c: Likewise. * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
2004-03-28 21:52:02 +00:00
# -*- makefile -*-
COMMON_ASFLAGS = -nostdinc -D__ASSEMBLY__
COMMON_CFLAGS = -ffreestanding -msoft-float
2004-03-29 Marco Gerards <metgerards@student.han.nl> Add support for the newworld apple macintosh (PPC). This has been tested on the powerbook 2000 only. It only adds support for generic ieee1275 functions, console and disk support. This should be easy to port to other architectures with support for Open Firmware. * configure.ac: Accept the powerpc as host_cpu. In the case of the powerpc cpu set the host_vendor to ieee1275. Make sure the i386 specific tests are only executed while building for the i386. Inverse test for crosscompile. * genmk.rb (Utility): Allow assembler files. * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno. * conf/powerpc-ieee1275.rmk: New file. * disk/powerpc/ieee1275/ofdisk.c: Likewise. * disk/powerpc/ieee1275/partition.c: Likewise. * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/console.h: Likewise. * include/pupa/powerpc/ieee1275/partition.h: Likewise. * include/pupa/powerpc/ieee1275/time.h: Likewise. * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/multiboot.h: Likewise. * include/pupa/powerpc/ieee1275/loader.h * include/pupa/powerpc/setjmp.h: Likewise. * include/pupa/powerpc/types.h: Likewise. * kern/powerpc/ieee1275/init.c: Likewise. * kern/powerpc/ieee1275/openfw.c: Likewise. * term/powerpc/ieee1275/ofconsole.c: Likewise. These files were written by Johan Rydberg (jrydberg@night.trouble.net) and I only modified them slightly. * boot/powerpc/ieee1275/cmain.c: New file. * boot/powerpc/ieee1275/crt0.S: Likewise. * boot/powerpc/ieee1275/ieee1275.c: Likewise. * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
2004-03-28 21:52:02 +00:00
# Images.
MOSTLYCLEANFILES += grubof_symlist.c kernel_syms.lst
2004-03-29 Marco Gerards <metgerards@student.han.nl> Add support for the newworld apple macintosh (PPC). This has been tested on the powerbook 2000 only. It only adds support for generic ieee1275 functions, console and disk support. This should be easy to port to other architectures with support for Open Firmware. * configure.ac: Accept the powerpc as host_cpu. In the case of the powerpc cpu set the host_vendor to ieee1275. Make sure the i386 specific tests are only executed while building for the i386. Inverse test for crosscompile. * genmk.rb (Utility): Allow assembler files. * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno. * conf/powerpc-ieee1275.rmk: New file. * disk/powerpc/ieee1275/ofdisk.c: Likewise. * disk/powerpc/ieee1275/partition.c: Likewise. * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/console.h: Likewise. * include/pupa/powerpc/ieee1275/partition.h: Likewise. * include/pupa/powerpc/ieee1275/time.h: Likewise. * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/multiboot.h: Likewise. * include/pupa/powerpc/ieee1275/loader.h * include/pupa/powerpc/setjmp.h: Likewise. * include/pupa/powerpc/types.h: Likewise. * kern/powerpc/ieee1275/init.c: Likewise. * kern/powerpc/ieee1275/openfw.c: Likewise. * term/powerpc/ieee1275/ofconsole.c: Likewise. These files were written by Johan Rydberg (jrydberg@night.trouble.net) and I only modified them slightly. * boot/powerpc/ieee1275/cmain.c: New file. * boot/powerpc/ieee1275/crt0.S: Likewise. * boot/powerpc/ieee1275/ieee1275.c: Likewise. * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
2004-03-28 21:52:02 +00:00
DEFSYMFILES += kernel_syms.lst
grubof_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
2004-03-29 Marco Gerards <metgerards@student.han.nl> Add support for the newworld apple macintosh (PPC). This has been tested on the powerbook 2000 only. It only adds support for generic ieee1275 functions, console and disk support. This should be easy to port to other architectures with support for Open Firmware. * configure.ac: Accept the powerpc as host_cpu. In the case of the powerpc cpu set the host_vendor to ieee1275. Make sure the i386 specific tests are only executed while building for the i386. Inverse test for crosscompile. * genmk.rb (Utility): Allow assembler files. * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno. * conf/powerpc-ieee1275.rmk: New file. * disk/powerpc/ieee1275/ofdisk.c: Likewise. * disk/powerpc/ieee1275/partition.c: Likewise. * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/console.h: Likewise. * include/pupa/powerpc/ieee1275/partition.h: Likewise. * include/pupa/powerpc/ieee1275/time.h: Likewise. * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/multiboot.h: Likewise. * include/pupa/powerpc/ieee1275/loader.h * include/pupa/powerpc/setjmp.h: Likewise. * include/pupa/powerpc/types.h: Likewise. * kern/powerpc/ieee1275/init.c: Likewise. * kern/powerpc/ieee1275/openfw.c: Likewise. * term/powerpc/ieee1275/ofconsole.c: Likewise. These files were written by Johan Rydberg (jrydberg@night.trouble.net) and I only modified them slightly. * boot/powerpc/ieee1275/cmain.c: New file. * boot/powerpc/ieee1275/crt0.S: Likewise. * boot/powerpc/ieee1275/ieee1275.c: Likewise. * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
2004-03-28 21:52:02 +00:00
sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@
kernel_syms.lst: $(addprefix include/grub/,$(grubof_HEADERS)) genkernsyms.sh
2004-03-29 Marco Gerards <metgerards@student.han.nl> Add support for the newworld apple macintosh (PPC). This has been tested on the powerbook 2000 only. It only adds support for generic ieee1275 functions, console and disk support. This should be easy to port to other architectures with support for Open Firmware. * configure.ac: Accept the powerpc as host_cpu. In the case of the powerpc cpu set the host_vendor to ieee1275. Make sure the i386 specific tests are only executed while building for the i386. Inverse test for crosscompile. * genmk.rb (Utility): Allow assembler files. * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno. * conf/powerpc-ieee1275.rmk: New file. * disk/powerpc/ieee1275/ofdisk.c: Likewise. * disk/powerpc/ieee1275/partition.c: Likewise. * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/console.h: Likewise. * include/pupa/powerpc/ieee1275/partition.h: Likewise. * include/pupa/powerpc/ieee1275/time.h: Likewise. * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/multiboot.h: Likewise. * include/pupa/powerpc/ieee1275/loader.h * include/pupa/powerpc/setjmp.h: Likewise. * include/pupa/powerpc/types.h: Likewise. * kern/powerpc/ieee1275/init.c: Likewise. * kern/powerpc/ieee1275/openfw.c: Likewise. * term/powerpc/ieee1275/ofconsole.c: Likewise. These files were written by Johan Rydberg (jrydberg@night.trouble.net) and I only modified them slightly. * boot/powerpc/ieee1275/cmain.c: New file. * boot/powerpc/ieee1275/crt0.S: Likewise. * boot/powerpc/ieee1275/ieee1275.c: Likewise. * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
2004-03-28 21:52:02 +00:00
sh $(srcdir)/genkernsyms.sh $(filter %h,$^) > $@
2004-12-27 Marco Gerards <metgerards@student.han.nl> * genmk.rb: Handle the `Program' class in the main loop. Written by Johan Rydberg <jrydberg@gnu.org>. (Program): New class. (programs): New variable. * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h> instead of "grub/machine/ieee1275.h". Include <grub/kernel.h> instead of "grub/kernel.h". Include <grub/machine/init.h>. (help_arch): Function removed. * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `powerpc/libgcc.h' and `loader.h'. (pkgdata_PROGRAMS): New variable. (sbin_UTILITIES): Variable removed. (grub_emu_SOURCES): Added kern/powerpc/cache.S. (grubof_SOURCES): Variable re-defined so it only includes the core functionality. (grubof_CFLAGS): Remove `-DGRUBOF'. (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS, (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES) (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS) (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES) (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS) (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES) (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS) (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS) (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES) (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS) (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS) (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES) (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS) (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES) (pc_mod_CFLAGS): New variables. * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>. (grub_ofdisk_iterate): Add a prototype for `dev_iterate'. * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype. * include/grub/loader.h (grub_os_area_addr, grub_os_area_size): Moved from here... * include/grub/i386/pc/init.h (grub_os_area_addr) (rub_os_area_size): ... to here. * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn): Export symbol. * include/grub/powerpc/ieee1275/init.h: New file. * include/grub/powerpc/libgcc.h: Likewise. * include/grub/cache.h: Likewise. * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard <hollis@penguinppc.org>. * kern/dl.c: Include <grub/cache.h>. (grub_dl_flush_cache): New function. (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache for this module. * kern/powerpc/ieee1275/init.c (grub_ofdisk_init) (grub_console_init): Removed prototypes. (grub_machine_init): Don't initialize the modules anymore. * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function static. * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN): Macro undef removed. (GRUB_HOST_WORDS_BIGENDIAN): New macro. * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add relocation `R_PPC_REL32'. Return an error when the relocation is unknown. * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'. * kern/i386/pc/init.c (grub_arch_sync_caches): New function. * util/misc.c (grub_arch_sync_caches): Likewise.
2004-12-27 13:46:20 +00:00
# Programs
pkgdata_PROGRAMS = grubof
2004-03-29 Marco Gerards <metgerards@student.han.nl> Add support for the newworld apple macintosh (PPC). This has been tested on the powerbook 2000 only. It only adds support for generic ieee1275 functions, console and disk support. This should be easy to port to other architectures with support for Open Firmware. * configure.ac: Accept the powerpc as host_cpu. In the case of the powerpc cpu set the host_vendor to ieee1275. Make sure the i386 specific tests are only executed while building for the i386. Inverse test for crosscompile. * genmk.rb (Utility): Allow assembler files. * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno. * conf/powerpc-ieee1275.rmk: New file. * disk/powerpc/ieee1275/ofdisk.c: Likewise. * disk/powerpc/ieee1275/partition.c: Likewise. * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/console.h: Likewise. * include/pupa/powerpc/ieee1275/partition.h: Likewise. * include/pupa/powerpc/ieee1275/time.h: Likewise. * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/multiboot.h: Likewise. * include/pupa/powerpc/ieee1275/loader.h * include/pupa/powerpc/setjmp.h: Likewise. * include/pupa/powerpc/types.h: Likewise. * kern/powerpc/ieee1275/init.c: Likewise. * kern/powerpc/ieee1275/openfw.c: Likewise. * term/powerpc/ieee1275/ofconsole.c: Likewise. These files were written by Johan Rydberg (jrydberg@night.trouble.net) and I only modified them slightly. * boot/powerpc/ieee1275/cmain.c: New file. * boot/powerpc/ieee1275/crt0.S: Likewise. * boot/powerpc/ieee1275/ieee1275.c: Likewise. * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
2004-03-28 21:52:02 +00:00
# Utilities.
2005-01-04 Hollis Blanchard <hollis@penguinppc.org> * TODO: Add note about endianness in grub-mkimage. * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note section. * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage. (grub_mkimage_SOURCES): New target. * include/grub/kernel.h (grub_start_addr): Remove variable. (grub_end_addr): Likewise. (grub_total_module_size): Likewise. (grub_kernel_image_size): Likewise. (GRUB_MODULE_MAGIC): New constant. (grub_module_info): New structure. (grub_arch_modules_addr): New prototype. (grub_get_end_addr): Remove prototype. * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype. * include/grub/powerpc/ieee1275/kernel.h: New file. * include/grub/util/misc.h (grub_util_get_fp_size): New prototype. (grub_util_read_at): Likewise. (grub_util_write_image_at): Likewise. * kern/main.c (grub_get_end_addr): Remove function. (grub_load_modules): Call grub_arch_modules_addr instead of using grub_end_addr. Look for a grub_module_info struct in memory. Use the grub_module_info fields instead of calling grub_get_end_addr as loop conditions. Move grub_add_unused_region code here. (grub_add_unused_region): Remove function. * kern/i386/pc/init.c: Include grub/cache.h. (grub_machine_init): Remove call to grub_get_end_addr. Remove one call to add_mem_region. (grub_arch_modules_addr): New function. * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable. (grub_total_module_size): Likewise. Include grub/machine/kernel.h. (grub_arch_modules_addr): New function. * util/grub-emu.c (grub_end_addr): Remove variable. (grub_total_module_size): Likewise. (grub_arch_modules_addr): New function. * util/misc.c: Include unistd.h. (grub_util_get_fp_size): New function. (grub_util_read_at): Likewise. (grub_util_write_image_at): Likewise. (grub_util_read_image): Call grub_util_read_at. (grub_util_write_image): Call grub_util_write_image_at. * util/i386/pc/grub-mkimage.c (generate_image): Allocate additional memory in kernel_img for a struct grub_module_info. Fill in that grub_module_info. * util/powerpc/ieee1275/grub-mkimage.c: New file.
2005-01-04 14:01:45 +00:00
bin_UTILITIES = grub-emu grub-mkimage
2004-03-29 Marco Gerards <metgerards@student.han.nl> Add support for the newworld apple macintosh (PPC). This has been tested on the powerbook 2000 only. It only adds support for generic ieee1275 functions, console and disk support. This should be easy to port to other architectures with support for Open Firmware. * configure.ac: Accept the powerpc as host_cpu. In the case of the powerpc cpu set the host_vendor to ieee1275. Make sure the i386 specific tests are only executed while building for the i386. Inverse test for crosscompile. * genmk.rb (Utility): Allow assembler files. * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno. * conf/powerpc-ieee1275.rmk: New file. * disk/powerpc/ieee1275/ofdisk.c: Likewise. * disk/powerpc/ieee1275/partition.c: Likewise. * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/console.h: Likewise. * include/pupa/powerpc/ieee1275/partition.h: Likewise. * include/pupa/powerpc/ieee1275/time.h: Likewise. * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/multiboot.h: Likewise. * include/pupa/powerpc/ieee1275/loader.h * include/pupa/powerpc/setjmp.h: Likewise. * include/pupa/powerpc/types.h: Likewise. * kern/powerpc/ieee1275/init.c: Likewise. * kern/powerpc/ieee1275/openfw.c: Likewise. * term/powerpc/ieee1275/ofconsole.c: Likewise. These files were written by Johan Rydberg (jrydberg@night.trouble.net) and I only modified them slightly. * boot/powerpc/ieee1275/cmain.c: New file. * boot/powerpc/ieee1275/crt0.S: Likewise. * boot/powerpc/ieee1275/ieee1275.c: Likewise. * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
2004-03-28 21:52:02 +00:00
noinst_UTILITIES = genmoddep
2005-01-04 Hollis Blanchard <hollis@penguinppc.org> * TODO: Add note about endianness in grub-mkimage. * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note section. * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage. (grub_mkimage_SOURCES): New target. * include/grub/kernel.h (grub_start_addr): Remove variable. (grub_end_addr): Likewise. (grub_total_module_size): Likewise. (grub_kernel_image_size): Likewise. (GRUB_MODULE_MAGIC): New constant. (grub_module_info): New structure. (grub_arch_modules_addr): New prototype. (grub_get_end_addr): Remove prototype. * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype. * include/grub/powerpc/ieee1275/kernel.h: New file. * include/grub/util/misc.h (grub_util_get_fp_size): New prototype. (grub_util_read_at): Likewise. (grub_util_write_image_at): Likewise. * kern/main.c (grub_get_end_addr): Remove function. (grub_load_modules): Call grub_arch_modules_addr instead of using grub_end_addr. Look for a grub_module_info struct in memory. Use the grub_module_info fields instead of calling grub_get_end_addr as loop conditions. Move grub_add_unused_region code here. (grub_add_unused_region): Remove function. * kern/i386/pc/init.c: Include grub/cache.h. (grub_machine_init): Remove call to grub_get_end_addr. Remove one call to add_mem_region. (grub_arch_modules_addr): New function. * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable. (grub_total_module_size): Likewise. Include grub/machine/kernel.h. (grub_arch_modules_addr): New function. * util/grub-emu.c (grub_end_addr): Remove variable. (grub_total_module_size): Likewise. (grub_arch_modules_addr): New function. * util/misc.c: Include unistd.h. (grub_util_get_fp_size): New function. (grub_util_read_at): Likewise. (grub_util_write_image_at): Likewise. (grub_util_read_image): Call grub_util_read_at. (grub_util_write_image): Call grub_util_write_image_at. * util/i386/pc/grub-mkimage.c (generate_image): Allocate additional memory in kernel_img for a struct grub_module_info. Fill in that grub_module_info. * util/powerpc/ieee1275/grub-mkimage.c: New file.
2005-01-04 14:01:45 +00:00
# For grub-mkimage.
grub_mkimage_SOURCES = util/powerpc/ieee1275/grub-mkimage.c util/misc.c \
util/resolve.c
# For grub-emu
2005-02-27 Yoshinori K. Okuji <okuji@enbug.org> * commands/default.h: New file. * commands/timeout.h: Likewise. * normal/context.c: Likewise. * util/misc.c: Do not include sys/times.h. Include sys/time.h and grub/machine/time.h. (grub_get_rtc): Rewritten with gettimeofday. * util/grub-emu.c (main): Call grub_default_init and grub_timeout_init before grub_normal_init, and call grub_timeout_fini and grub_default_fini after grub_main. * util/console.c (grub_ncurses_checkkey): Return the read character or -1. * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it timeouts. * normal/main.c (read_config_file): Push MENU. If this fails, print an error and wait for a user input. Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE. If a menu is empty or an error occurs, pop MENU. (grub_normal_execute): Pop and free MENU after grub_menu_run returns. * kern/loader.c (grub_loader_boot): Call grub_machine_fini. * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not include time.h. [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as without GRUB_UTIL. * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include time.h. [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as without GRUB_UTIL. * include/grub/normal.h (struct grub_menu_list): New struct. (grub_menu_list_t): New type. (struct grub_context): New struct. (grub_context_t): New type. (grub_register_command): Got rid of EXPORT_FUNC. (grub_unregister_command): Likewise. (grub_context_get): New prototype. (grub_context_get_current_menu): Likewise. (grub_context_push_menu): Likewise. (grub_context_pop_menu): Likewise. [GRUB_UTIL] (grub_default_init): Likewise. [GRUB_UTIL] (grub_default_fini): Likewise. [GRUB_UTIL] (grub_timeout_init): Likewise. [GRUB_UTIL] (grub_timeout_fini): Likewise. * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c, commands/timeout.c and normal/context.c. (pkgdata_MODULES): Added default.mod and timeout.mod. (normal_mod_SOURCES): Added normal/context.c. (default_mod_SOURCES): New variable. (default_mod_CFLAGS): Likewise. (timeout_mod_SOURCES): Likewise. (timeout_mod_CFLAGS): Likewise. * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from conf/i386-pc.rmk. (pkgdata_MODULES): Added default.mod and timeout.mod. (normal_mod_SOURCES): Added normal/context.c. (default_mod_SOURCES): New variable. (default_mod_CFLAGS): Likewise. (timeout_mod_SOURCES): Likewise. (timeout_mod_CFLAGS): Likewise. * Makefile.in (all-local): Added $(MKFILES).
2005-02-27 21:19:06 +00:00
grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \
commands/configfile.c commands/default.c commands/help.c \
commands/search.c commands/terminal.c commands/ls.c \
commands/timeout.c \
commands/ieee1275/halt.c commands/ieee1275/reboot.c \
2005-02-27 Yoshinori K. Okuji <okuji@enbug.org> * commands/default.h: New file. * commands/timeout.h: Likewise. * normal/context.c: Likewise. * util/misc.c: Do not include sys/times.h. Include sys/time.h and grub/machine/time.h. (grub_get_rtc): Rewritten with gettimeofday. * util/grub-emu.c (main): Call grub_default_init and grub_timeout_init before grub_normal_init, and call grub_timeout_fini and grub_default_fini after grub_main. * util/console.c (grub_ncurses_checkkey): Return the read character or -1. * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it timeouts. * normal/main.c (read_config_file): Push MENU. If this fails, print an error and wait for a user input. Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE. If a menu is empty or an error occurs, pop MENU. (grub_normal_execute): Pop and free MENU after grub_menu_run returns. * kern/loader.c (grub_loader_boot): Call grub_machine_fini. * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not include time.h. [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as without GRUB_UTIL. * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include time.h. [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as without GRUB_UTIL. * include/grub/normal.h (struct grub_menu_list): New struct. (grub_menu_list_t): New type. (struct grub_context): New struct. (grub_context_t): New type. (grub_register_command): Got rid of EXPORT_FUNC. (grub_unregister_command): Likewise. (grub_context_get): New prototype. (grub_context_get_current_menu): Likewise. (grub_context_push_menu): Likewise. (grub_context_pop_menu): Likewise. [GRUB_UTIL] (grub_default_init): Likewise. [GRUB_UTIL] (grub_default_fini): Likewise. [GRUB_UTIL] (grub_timeout_init): Likewise. [GRUB_UTIL] (grub_timeout_fini): Likewise. * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c, commands/timeout.c and normal/context.c. (pkgdata_MODULES): Added default.mod and timeout.mod. (normal_mod_SOURCES): Added normal/context.c. (default_mod_SOURCES): New variable. (default_mod_CFLAGS): Likewise. (timeout_mod_SOURCES): Likewise. (timeout_mod_CFLAGS): Likewise. * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from conf/i386-pc.rmk. (pkgdata_MODULES): Added default.mod and timeout.mod. (normal_mod_SOURCES): Added normal/context.c. (default_mod_SOURCES): New variable. (default_mod_CFLAGS): Likewise. (timeout_mod_SOURCES): Likewise. (timeout_mod_CFLAGS): Likewise. * Makefile.in (all-local): Added $(MKFILES).
2005-02-27 21:19:06 +00:00
disk/loopback.c \
fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c \
fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c \
io/gzio.c \
2005-02-27 Yoshinori K. Okuji <okuji@enbug.org> * commands/default.h: New file. * commands/timeout.h: Likewise. * normal/context.c: Likewise. * util/misc.c: Do not include sys/times.h. Include sys/time.h and grub/machine/time.h. (grub_get_rtc): Rewritten with gettimeofday. * util/grub-emu.c (main): Call grub_default_init and grub_timeout_init before grub_normal_init, and call grub_timeout_fini and grub_default_fini after grub_main. * util/console.c (grub_ncurses_checkkey): Return the read character or -1. * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it timeouts. * normal/main.c (read_config_file): Push MENU. If this fails, print an error and wait for a user input. Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE. If a menu is empty or an error occurs, pop MENU. (grub_normal_execute): Pop and free MENU after grub_menu_run returns. * kern/loader.c (grub_loader_boot): Call grub_machine_fini. * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not include time.h. [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as without GRUB_UTIL. * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include time.h. [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as without GRUB_UTIL. * include/grub/normal.h (struct grub_menu_list): New struct. (grub_menu_list_t): New type. (struct grub_context): New struct. (grub_context_t): New type. (grub_register_command): Got rid of EXPORT_FUNC. (grub_unregister_command): Likewise. (grub_context_get): New prototype. (grub_context_get_current_menu): Likewise. (grub_context_push_menu): Likewise. (grub_context_pop_menu): Likewise. [GRUB_UTIL] (grub_default_init): Likewise. [GRUB_UTIL] (grub_default_fini): Likewise. [GRUB_UTIL] (grub_timeout_init): Likewise. [GRUB_UTIL] (grub_timeout_fini): Likewise. * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c, commands/timeout.c and normal/context.c. (pkgdata_MODULES): Added default.mod and timeout.mod. (normal_mod_SOURCES): Added normal/context.c. (default_mod_SOURCES): New variable. (default_mod_CFLAGS): Likewise. (timeout_mod_SOURCES): Likewise. (timeout_mod_CFLAGS): Likewise. * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from conf/i386-pc.rmk. (pkgdata_MODULES): Added default.mod and timeout.mod. (normal_mod_SOURCES): Added normal/context.c. (default_mod_SOURCES): New variable. (default_mod_CFLAGS): Likewise. (timeout_mod_SOURCES): Likewise. (timeout_mod_CFLAGS): Likewise. * Makefile.in (all-local): Added $(MKFILES).
2005-02-27 21:19:06 +00:00
kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c \
kern/file.c kern/fs.c kern/loader.c kern/main.c kern/misc.c \
kern/parser.c kern/partition.c kern/rescue.c kern/term.c \
2005-08-12 Yoshinori K. Okuji <okuji@enbug.org> * DISTLIST: Added normal/completion.c. * normal/completion.c: New file. * term/i386/pc/console.c (grub_console_getwh): New function. (grub_console_term): Assign grub_console_getwh to getwh. * normal/cmdline.c (grub_tab_complete): Removed. Now the same function is defined in normal/completion.c as grub_normal_do_completion. (grub_cmdline_get): Use grub_normal_do_completion instead of grub_tab_complete. * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK returns non-zero, otherwise return 0. (grub_partition_iterate): First, probe the partition map. Then, call ITERATE only for this partition map. * kern/misc.c (grub_strncmp): Rewritten. * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE returns non-zero. Otherwise return 0. * include/grub/partition.h (grub_partition_map_iterate): Return int instead of void. * include/grub/normal.h (grub_normal_do_completion): New prototype. * include/grub/misc.h (grub_strncmp): Change the type of N to grub_size_t. * include/grub/disk.h (grub_disk_dev_iterate): Return int instead of void. * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to unsigned explictly before comparing it with I. * kern/main.c (grub_env_write_root): Add the attribute unused into VAR. * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added normal/completion.c. (normal_mod_SOURCES): Likewise. * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise. (normal_mod_SOURCES): Likewise. * normal/command.c (grub_iterate_commands): If ITERATE returns non-zero, return one immediately.
2005-08-12 19:53:33 +00:00
normal/arg.c normal/cmdline.c normal/command.c \
normal/completion.c normal/context.c \
2005-08-18 Yoshinori K. Okuji <okuji@enbug.org> * normal/misc.c: New file. * DISTLIST: Added normal/misc.c. * partmap/amiga.c (amiga_partition_map_iterate): Add an argument DISK to HOOK. Call HOOK with DISK. * partmap/apple.c (apple_partition_map_iterate): Likewise. * partmap/pc.c (pc_partition_map_iterate): Likewise. * partmap/sun.c (sun_partition_map_iterate): Likewise. * normal/menu_entry.c (struct screen): Added a new member "completion_shown". (completion_buffer): New global variable. (make_screen): Set SCREEN->COMPLETION_SHOWN to zero. (store_completion): New function. (complete): Likewise. (clear_completions): Likewise. (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero, call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is a tab, call complete. * normal/completion.c (disk_dev): Removed. (print_simple_completion): Likewise. (print_partition_completion): Likewise. (print_func): New global variable. (add_completion): Do not take the arguments WHAT or PRINT any longer. Added a new argument TYPE. Instead of printing directly, call PRINT_FUNC if not NULL. All callers changed. (complete_device): Use a local variable DEV instead of DISK_DEV. Do not move CURRENT_WORD to the end of a device name. (grub_normal_do_completion): Take a new argument HOOK. Do not initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an empty string, return NULL instead. All callers changed. * normal/cmdline.c (print_completion): New function. * kern/partition.c (grub_partition_iterate): Add an argument DISK to HOOK. All callers changed. * kern/disk.c (grub_print_partinfo): Removed. * include/grub/partition.h (struct grub_partition_map): Add a new argument DISK into HOOK of ITERATE. (grub_partition_iterate): Add a new argument DISK to HOOK. * include/grub/normal.h (enum grub_completion_type): New enum. (grub_completion_type_t): New type. (GRUB_COMPLETION_TYPE_COMMAND): New constant. (GRUB_COMPLETION_TYPE_DEVICE): Likewise. (GRUB_COMPLETION_TYPE_PARTITION): Likewise. (GRUB_COMPLETION_TYPE_FILE): Likewise. (grub_normal_do_completion): Added a new argument HOOK. (grub_normal_print_device_info): New prototype. * include/grub/disk.h (grub_print_partinfo): Removed. * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c. (normal_mod_SOURCES): Likewise. * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise. (normal_mod_SOURCES): Likewise. * commands/ls.c (grub_ls_list_disks): Use grub_normal_print_device_info instead of grub_print_partinfo. Free PNAME. (grub_ls_list_files): Use grub_normal_print_device_info instead of duplicating the code.
2005-08-18 03:14:39 +00:00
normal/main.c normal/menu.c normal/menu_entry.c normal/misc.c \
2005-02-27 Yoshinori K. Okuji <okuji@enbug.org> * commands/default.h: New file. * commands/timeout.h: Likewise. * normal/context.c: Likewise. * util/misc.c: Do not include sys/times.h. Include sys/time.h and grub/machine/time.h. (grub_get_rtc): Rewritten with gettimeofday. * util/grub-emu.c (main): Call grub_default_init and grub_timeout_init before grub_normal_init, and call grub_timeout_fini and grub_default_fini after grub_main. * util/console.c (grub_ncurses_checkkey): Return the read character or -1. * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it timeouts. * normal/main.c (read_config_file): Push MENU. If this fails, print an error and wait for a user input. Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE. If a menu is empty or an error occurs, pop MENU. (grub_normal_execute): Pop and free MENU after grub_menu_run returns. * kern/loader.c (grub_loader_boot): Call grub_machine_fini. * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not include time.h. [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as without GRUB_UTIL. * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include time.h. [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as without GRUB_UTIL. * include/grub/normal.h (struct grub_menu_list): New struct. (grub_menu_list_t): New type. (struct grub_context): New struct. (grub_context_t): New type. (grub_register_command): Got rid of EXPORT_FUNC. (grub_unregister_command): Likewise. (grub_context_get): New prototype. (grub_context_get_current_menu): Likewise. (grub_context_push_menu): Likewise. (grub_context_pop_menu): Likewise. [GRUB_UTIL] (grub_default_init): Likewise. [GRUB_UTIL] (grub_default_fini): Likewise. [GRUB_UTIL] (grub_timeout_init): Likewise. [GRUB_UTIL] (grub_timeout_fini): Likewise. * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c, commands/timeout.c and normal/context.c. (pkgdata_MODULES): Added default.mod and timeout.mod. (normal_mod_SOURCES): Added normal/context.c. (default_mod_SOURCES): New variable. (default_mod_CFLAGS): Likewise. (timeout_mod_SOURCES): Likewise. (timeout_mod_CFLAGS): Likewise. * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from conf/i386-pc.rmk. (pkgdata_MODULES): Added default.mod and timeout.mod. (normal_mod_SOURCES): Added normal/context.c. (default_mod_SOURCES): New variable. (default_mod_CFLAGS): Likewise. (timeout_mod_SOURCES): Likewise. (timeout_mod_CFLAGS): Likewise. * Makefile.in (all-local): Added $(MKFILES).
2005-02-27 21:19:06 +00:00
partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \
util/console.c util/grub-emu.c util/misc.c \
util/i386/pc/biosdisk.c util/i386/pc/getroot.c \
util/powerpc/ieee1275/misc.c
2005-02-27 Yoshinori K. Okuji <okuji@enbug.org> * commands/default.h: New file. * commands/timeout.h: Likewise. * normal/context.c: Likewise. * util/misc.c: Do not include sys/times.h. Include sys/time.h and grub/machine/time.h. (grub_get_rtc): Rewritten with gettimeofday. * util/grub-emu.c (main): Call grub_default_init and grub_timeout_init before grub_normal_init, and call grub_timeout_fini and grub_default_fini after grub_main. * util/console.c (grub_ncurses_checkkey): Return the read character or -1. * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it timeouts. * normal/main.c (read_config_file): Push MENU. If this fails, print an error and wait for a user input. Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE. If a menu is empty or an error occurs, pop MENU. (grub_normal_execute): Pop and free MENU after grub_menu_run returns. * kern/loader.c (grub_loader_boot): Call grub_machine_fini. * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not include time.h. [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as without GRUB_UTIL. * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include time.h. [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as without GRUB_UTIL. * include/grub/normal.h (struct grub_menu_list): New struct. (grub_menu_list_t): New type. (struct grub_context): New struct. (grub_context_t): New type. (grub_register_command): Got rid of EXPORT_FUNC. (grub_unregister_command): Likewise. (grub_context_get): New prototype. (grub_context_get_current_menu): Likewise. (grub_context_push_menu): Likewise. (grub_context_pop_menu): Likewise. [GRUB_UTIL] (grub_default_init): Likewise. [GRUB_UTIL] (grub_default_fini): Likewise. [GRUB_UTIL] (grub_timeout_init): Likewise. [GRUB_UTIL] (grub_timeout_fini): Likewise. * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c, commands/timeout.c and normal/context.c. (pkgdata_MODULES): Added default.mod and timeout.mod. (normal_mod_SOURCES): Added normal/context.c. (default_mod_SOURCES): New variable. (default_mod_CFLAGS): Likewise. (timeout_mod_SOURCES): Likewise. (timeout_mod_CFLAGS): Likewise. * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from conf/i386-pc.rmk. (pkgdata_MODULES): Added default.mod and timeout.mod. (normal_mod_SOURCES): Added normal/context.c. (default_mod_SOURCES): New variable. (default_mod_CFLAGS): Likewise. (timeout_mod_SOURCES): Likewise. (timeout_mod_CFLAGS): Likewise. * Makefile.in (all-local): Added $(MKFILES).
2005-02-27 21:19:06 +00:00
grub_emu_LDFLAGS = $(LIBCURSES)
2004-03-29 Marco Gerards <metgerards@student.han.nl> Add support for the newworld apple macintosh (PPC). This has been tested on the powerbook 2000 only. It only adds support for generic ieee1275 functions, console and disk support. This should be easy to port to other architectures with support for Open Firmware. * configure.ac: Accept the powerpc as host_cpu. In the case of the powerpc cpu set the host_vendor to ieee1275. Make sure the i386 specific tests are only executed while building for the i386. Inverse test for crosscompile. * genmk.rb (Utility): Allow assembler files. * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno. * conf/powerpc-ieee1275.rmk: New file. * disk/powerpc/ieee1275/ofdisk.c: Likewise. * disk/powerpc/ieee1275/partition.c: Likewise. * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/console.h: Likewise. * include/pupa/powerpc/ieee1275/partition.h: Likewise. * include/pupa/powerpc/ieee1275/time.h: Likewise. * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/multiboot.h: Likewise. * include/pupa/powerpc/ieee1275/loader.h * include/pupa/powerpc/setjmp.h: Likewise. * include/pupa/powerpc/types.h: Likewise. * kern/powerpc/ieee1275/init.c: Likewise. * kern/powerpc/ieee1275/openfw.c: Likewise. * term/powerpc/ieee1275/ofconsole.c: Likewise. These files were written by Johan Rydberg (jrydberg@night.trouble.net) and I only modified them slightly. * boot/powerpc/ieee1275/cmain.c: New file. * boot/powerpc/ieee1275/crt0.S: Likewise. * boot/powerpc/ieee1275/ieee1275.c: Likewise. * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
2004-03-28 21:52:02 +00:00
grubof_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
2004-12-27 Marco Gerards <metgerards@student.han.nl> * genmk.rb: Handle the `Program' class in the main loop. Written by Johan Rydberg <jrydberg@gnu.org>. (Program): New class. (programs): New variable. * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h> instead of "grub/machine/ieee1275.h". Include <grub/kernel.h> instead of "grub/kernel.h". Include <grub/machine/init.h>. (help_arch): Function removed. * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `powerpc/libgcc.h' and `loader.h'. (pkgdata_PROGRAMS): New variable. (sbin_UTILITIES): Variable removed. (grub_emu_SOURCES): Added kern/powerpc/cache.S. (grubof_SOURCES): Variable re-defined so it only includes the core functionality. (grubof_CFLAGS): Remove `-DGRUBOF'. (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS, (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES) (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS) (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES) (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS) (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES) (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS) (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS) (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES) (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS) (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS) (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES) (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS) (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES) (pc_mod_CFLAGS): New variables. * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>. (grub_ofdisk_iterate): Add a prototype for `dev_iterate'. * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype. * include/grub/loader.h (grub_os_area_addr, grub_os_area_size): Moved from here... * include/grub/i386/pc/init.h (grub_os_area_addr) (rub_os_area_size): ... to here. * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn): Export symbol. * include/grub/powerpc/ieee1275/init.h: New file. * include/grub/powerpc/libgcc.h: Likewise. * include/grub/cache.h: Likewise. * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard <hollis@penguinppc.org>. * kern/dl.c: Include <grub/cache.h>. (grub_dl_flush_cache): New function. (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache for this module. * kern/powerpc/ieee1275/init.c (grub_ofdisk_init) (grub_console_init): Removed prototypes. (grub_machine_init): Don't initialize the modules anymore. * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function static. * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN): Macro undef removed. (GRUB_HOST_WORDS_BIGENDIAN): New macro. * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add relocation `R_PPC_REL32'. Return an error when the relocation is unknown. * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'. * kern/i386/pc/init.c (grub_arch_sync_caches): New function. * util/misc.c (grub_arch_sync_caches): Likewise.
2004-12-27 13:46:20 +00:00
grubof_CFLAGS = $(COMMON_CFLAGS)
grubof_ASFLAGS = $(COMMON_ASFLAGS)
grubof_LDFLAGS = -nostdlib -static-libgcc -lgcc -Wl,-N,-S,-Ttext,0x200000,-Bstatic
2004-03-29 Marco Gerards <metgerards@student.han.nl> Add support for the newworld apple macintosh (PPC). This has been tested on the powerbook 2000 only. It only adds support for generic ieee1275 functions, console and disk support. This should be easy to port to other architectures with support for Open Firmware. * configure.ac: Accept the powerpc as host_cpu. In the case of the powerpc cpu set the host_vendor to ieee1275. Make sure the i386 specific tests are only executed while building for the i386. Inverse test for crosscompile. * genmk.rb (Utility): Allow assembler files. * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno. * conf/powerpc-ieee1275.rmk: New file. * disk/powerpc/ieee1275/ofdisk.c: Likewise. * disk/powerpc/ieee1275/partition.c: Likewise. * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/console.h: Likewise. * include/pupa/powerpc/ieee1275/partition.h: Likewise. * include/pupa/powerpc/ieee1275/time.h: Likewise. * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/multiboot.h: Likewise. * include/pupa/powerpc/ieee1275/loader.h * include/pupa/powerpc/setjmp.h: Likewise. * include/pupa/powerpc/types.h: Likewise. * kern/powerpc/ieee1275/init.c: Likewise. * kern/powerpc/ieee1275/openfw.c: Likewise. * term/powerpc/ieee1275/ofconsole.c: Likewise. These files were written by Johan Rydberg (jrydberg@night.trouble.net) and I only modified them slightly. * boot/powerpc/ieee1275/cmain.c: New file. * boot/powerpc/ieee1275/crt0.S: Likewise. * boot/powerpc/ieee1275/ieee1275.c: Likewise. * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
2004-03-28 21:52:02 +00:00
# For genmoddep.
genmoddep_SOURCES = util/genmoddep.c
# Modules.
2004-12-27 Marco Gerards <metgerards@student.han.nl> * genmk.rb: Handle the `Program' class in the main loop. Written by Johan Rydberg <jrydberg@gnu.org>. (Program): New class. (programs): New variable. * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h> instead of "grub/machine/ieee1275.h". Include <grub/kernel.h> instead of "grub/kernel.h". Include <grub/machine/init.h>. (help_arch): Function removed. * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `powerpc/libgcc.h' and `loader.h'. (pkgdata_PROGRAMS): New variable. (sbin_UTILITIES): Variable removed. (grub_emu_SOURCES): Added kern/powerpc/cache.S. (grubof_SOURCES): Variable re-defined so it only includes the core functionality. (grubof_CFLAGS): Remove `-DGRUBOF'. (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS, (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES) (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS) (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES) (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS) (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES) (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS) (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS) (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES) (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS) (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS) (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES) (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS) (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES) (pc_mod_CFLAGS): New variables. * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>. (grub_ofdisk_iterate): Add a prototype for `dev_iterate'. * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype. * include/grub/loader.h (grub_os_area_addr, grub_os_area_size): Moved from here... * include/grub/i386/pc/init.h (grub_os_area_addr) (rub_os_area_size): ... to here. * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn): Export symbol. * include/grub/powerpc/ieee1275/init.h: New file. * include/grub/powerpc/libgcc.h: Likewise. * include/grub/cache.h: Likewise. * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard <hollis@penguinppc.org>. * kern/dl.c: Include <grub/cache.h>. (grub_dl_flush_cache): New function. (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache for this module. * kern/powerpc/ieee1275/init.c (grub_ofdisk_init) (grub_console_init): Removed prototypes. (grub_machine_init): Don't initialize the modules anymore. * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function static. * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN): Macro undef removed. (GRUB_HOST_WORDS_BIGENDIAN): New macro. * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add relocation `R_PPC_REL32'. Return an error when the relocation is unknown. * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'. * kern/i386/pc/init.c (grub_arch_sync_caches): New function. * util/misc.c (grub_arch_sync_caches): Likewise.
2004-12-27 13:46:20 +00:00
pkgdata_MODULES = _linux.mod linux.mod fat.mod ufs.mod ext2.mod minix.mod \
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 \
2005-02-27 Yoshinori K. Okuji <okuji@enbug.org> * commands/default.h: New file. * commands/timeout.h: Likewise. * normal/context.c: Likewise. * util/misc.c: Do not include sys/times.h. Include sys/time.h and grub/machine/time.h. (grub_get_rtc): Rewritten with gettimeofday. * util/grub-emu.c (main): Call grub_default_init and grub_timeout_init before grub_normal_init, and call grub_timeout_fini and grub_default_fini after grub_main. * util/console.c (grub_ncurses_checkkey): Return the read character or -1. * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it timeouts. * normal/main.c (read_config_file): Push MENU. If this fails, print an error and wait for a user input. Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE. If a menu is empty or an error occurs, pop MENU. (grub_normal_execute): Pop and free MENU after grub_menu_run returns. * kern/loader.c (grub_loader_boot): Call grub_machine_fini. * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not include time.h. [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as without GRUB_UTIL. * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include time.h. [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as without GRUB_UTIL. * include/grub/normal.h (struct grub_menu_list): New struct. (grub_menu_list_t): New type. (struct grub_context): New struct. (grub_context_t): New type. (grub_register_command): Got rid of EXPORT_FUNC. (grub_unregister_command): Likewise. (grub_context_get): New prototype. (grub_context_get_current_menu): Likewise. (grub_context_push_menu): Likewise. (grub_context_pop_menu): Likewise. [GRUB_UTIL] (grub_default_init): Likewise. [GRUB_UTIL] (grub_default_fini): Likewise. [GRUB_UTIL] (grub_timeout_init): Likewise. [GRUB_UTIL] (grub_timeout_fini): Likewise. * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c, commands/timeout.c and normal/context.c. (pkgdata_MODULES): Added default.mod and timeout.mod. (normal_mod_SOURCES): Added normal/context.c. (default_mod_SOURCES): New variable. (default_mod_CFLAGS): Likewise. (timeout_mod_SOURCES): Likewise. (timeout_mod_CFLAGS): Likewise. * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from conf/i386-pc.rmk. (pkgdata_MODULES): Added default.mod and timeout.mod. (normal_mod_SOURCES): Added normal/context.c. (default_mod_SOURCES): New variable. (default_mod_CFLAGS): Likewise. (timeout_mod_SOURCES): Likewise. (timeout_mod_CFLAGS): Likewise. * Makefile.in (all-local): Added $(MKFILES).
2005-02-27 21:19:06 +00:00
pc.mod suspend.mod loopback.mod help.mod reboot.mod halt.mod sun.mod \
default.mod timeout.mod configfile.mod search.mod gzio.mod xfs.mod \
affs.mod sfs.mod
2004-12-27 Marco Gerards <metgerards@student.han.nl> * genmk.rb: Handle the `Program' class in the main loop. Written by Johan Rydberg <jrydberg@gnu.org>. (Program): New class. (programs): New variable. * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h> instead of "grub/machine/ieee1275.h". Include <grub/kernel.h> instead of "grub/kernel.h". Include <grub/machine/init.h>. (help_arch): Function removed. * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `powerpc/libgcc.h' and `loader.h'. (pkgdata_PROGRAMS): New variable. (sbin_UTILITIES): Variable removed. (grub_emu_SOURCES): Added kern/powerpc/cache.S. (grubof_SOURCES): Variable re-defined so it only includes the core functionality. (grubof_CFLAGS): Remove `-DGRUBOF'. (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS, (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES) (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS) (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES) (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS) (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES) (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS) (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS) (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES) (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS) (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS) (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES) (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS) (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES) (pc_mod_CFLAGS): New variables. * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>. (grub_ofdisk_iterate): Add a prototype for `dev_iterate'. * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype. * include/grub/loader.h (grub_os_area_addr, grub_os_area_size): Moved from here... * include/grub/i386/pc/init.h (grub_os_area_addr) (rub_os_area_size): ... to here. * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn): Export symbol. * include/grub/powerpc/ieee1275/init.h: New file. * include/grub/powerpc/libgcc.h: Likewise. * include/grub/cache.h: Likewise. * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard <hollis@penguinppc.org>. * kern/dl.c: Include <grub/cache.h>. (grub_dl_flush_cache): New function. (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache for this module. * kern/powerpc/ieee1275/init.c (grub_ofdisk_init) (grub_console_init): Removed prototypes. (grub_machine_init): Don't initialize the modules anymore. * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function static. * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN): Macro undef removed. (GRUB_HOST_WORDS_BIGENDIAN): New macro. * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add relocation `R_PPC_REL32'. Return an error when the relocation is unknown. * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'. * kern/i386/pc/init.c (grub_arch_sync_caches): New function. * util/misc.c (grub_arch_sync_caches): Likewise.
2004-12-27 13:46:20 +00:00
# For fshelp.mod.
fshelp_mod_SOURCES = fs/fshelp.c
fshelp_mod_CFLAGS = $(COMMON_CFLAGS)
# For fat.mod.
fat_mod_SOURCES = fs/fat.c
fat_mod_CFLAGS = $(COMMON_CFLAGS)
# For ext2.mod.
ext2_mod_SOURCES = fs/ext2.c
ext2_mod_CFLAGS = $(COMMON_CFLAGS)
# For ufs.mod.
ufs_mod_SOURCES = fs/ufs.c
ufs_mod_CFLAGS = $(COMMON_CFLAGS)
# For minix.mod.
minix_mod_SOURCES = fs/minix.c
minix_mod_CFLAGS = $(COMMON_CFLAGS)
# For hfs.mod.
hfs_mod_SOURCES = fs/hfs.c
hfs_mod_CFLAGS = $(COMMON_CFLAGS)
# For jfs.mod.
jfs_mod_SOURCES = fs/jfs.c
jfs_mod_CFLAGS = $(COMMON_CFLAGS)
# For iso9660.mod.
iso9660_mod_SOURCES = fs/iso9660.c
iso9660_mod_CFLAGS = $(COMMON_CFLAGS)
# For xfs.mod.
xfs_mod_SOURCES = fs/xfs.c
xfs_mod_CFLAGS = $(COMMON_CFLAGS)
# For affs.mod.
2005-10-08 11:24:48 +00:00
affs_mod_SOURCES = fs/affs.c
affs_mod_CFLAGS = $(COMMON_CFLAGS)
# For sfs.mod.
sfs_mod_SOURCES = fs/sfs.c
sfs_mod_CFLAGS = $(COMMON_CFLAGS)
2004-12-27 Marco Gerards <metgerards@student.han.nl> * genmk.rb: Handle the `Program' class in the main loop. Written by Johan Rydberg <jrydberg@gnu.org>. (Program): New class. (programs): New variable. * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h> instead of "grub/machine/ieee1275.h". Include <grub/kernel.h> instead of "grub/kernel.h". Include <grub/machine/init.h>. (help_arch): Function removed. * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `powerpc/libgcc.h' and `loader.h'. (pkgdata_PROGRAMS): New variable. (sbin_UTILITIES): Variable removed. (grub_emu_SOURCES): Added kern/powerpc/cache.S. (grubof_SOURCES): Variable re-defined so it only includes the core functionality. (grubof_CFLAGS): Remove `-DGRUBOF'. (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS, (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES) (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS) (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES) (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS) (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES) (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS) (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS) (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES) (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS) (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS) (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES) (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS) (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES) (pc_mod_CFLAGS): New variables. * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>. (grub_ofdisk_iterate): Add a prototype for `dev_iterate'. * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype. * include/grub/loader.h (grub_os_area_addr, grub_os_area_size): Moved from here... * include/grub/i386/pc/init.h (grub_os_area_addr) (rub_os_area_size): ... to here. * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn): Export symbol. * include/grub/powerpc/ieee1275/init.h: New file. * include/grub/powerpc/libgcc.h: Likewise. * include/grub/cache.h: Likewise. * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard <hollis@penguinppc.org>. * kern/dl.c: Include <grub/cache.h>. (grub_dl_flush_cache): New function. (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache for this module. * kern/powerpc/ieee1275/init.c (grub_ofdisk_init) (grub_console_init): Removed prototypes. (grub_machine_init): Don't initialize the modules anymore. * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function static. * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN): Macro undef removed. (GRUB_HOST_WORDS_BIGENDIAN): New macro. * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add relocation `R_PPC_REL32'. Return an error when the relocation is unknown. * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'. * kern/i386/pc/init.c (grub_arch_sync_caches): New function. * util/misc.c (grub_arch_sync_caches): Likewise.
2004-12-27 13:46:20 +00:00
# For _linux.mod.
_linux_mod_SOURCES = loader/powerpc/ieee1275/linux.c
_linux_mod_CFLAGS = $(COMMON_CFLAGS)
2004-12-27 Marco Gerards <metgerards@student.han.nl> * genmk.rb: Handle the `Program' class in the main loop. Written by Johan Rydberg <jrydberg@gnu.org>. (Program): New class. (programs): New variable. * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h> instead of "grub/machine/ieee1275.h". Include <grub/kernel.h> instead of "grub/kernel.h". Include <grub/machine/init.h>. (help_arch): Function removed. * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `powerpc/libgcc.h' and `loader.h'. (pkgdata_PROGRAMS): New variable. (sbin_UTILITIES): Variable removed. (grub_emu_SOURCES): Added kern/powerpc/cache.S. (grubof_SOURCES): Variable re-defined so it only includes the core functionality. (grubof_CFLAGS): Remove `-DGRUBOF'. (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS, (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES) (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS) (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES) (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS) (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES) (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS) (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS) (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES) (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS) (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS) (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES) (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS) (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES) (pc_mod_CFLAGS): New variables. * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>. (grub_ofdisk_iterate): Add a prototype for `dev_iterate'. * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype. * include/grub/loader.h (grub_os_area_addr, grub_os_area_size): Moved from here... * include/grub/i386/pc/init.h (grub_os_area_addr) (rub_os_area_size): ... to here. * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn): Export symbol. * include/grub/powerpc/ieee1275/init.h: New file. * include/grub/powerpc/libgcc.h: Likewise. * include/grub/cache.h: Likewise. * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard <hollis@penguinppc.org>. * kern/dl.c: Include <grub/cache.h>. (grub_dl_flush_cache): New function. (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache for this module. * kern/powerpc/ieee1275/init.c (grub_ofdisk_init) (grub_console_init): Removed prototypes. (grub_machine_init): Don't initialize the modules anymore. * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function static. * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN): Macro undef removed. (GRUB_HOST_WORDS_BIGENDIAN): New macro. * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add relocation `R_PPC_REL32'. Return an error when the relocation is unknown. * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'. * kern/i386/pc/init.c (grub_arch_sync_caches): New function. * util/misc.c (grub_arch_sync_caches): Likewise.
2004-12-27 13:46:20 +00:00
# For linux.mod.
linux_mod_SOURCES = loader/powerpc/ieee1275/linux_normal.c
linux_mod_CFLAGS = $(COMMON_CFLAGS)
# For normal.mod.
2005-02-19 Yoshinori K. Okuji <okuji@enbug.org> This implements an Emacs-like menu entry editor. * normal/menu_entry.c: New file. * util/console.c (grub_ncurses_putchar): Translate some Unicode characters to ASCII. (saved_char): New variable. (grub_ncurses_checkkey): Rewritten completely. (grub_ncurses_getkey): Likewise. (grub_ncurses_init): Call raw instead of cbreak. * normal/menu.c (print_entry): Do not put a space. (init_page): Renamed to ... (grub_menu_init_page): ... this. All callers changed. (edit_menu_entry): Removed. (run_menu): Call grub_menu_entry_run instead of edit_menu_entry. * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor. * kern/misc.c (grub_vprintf): Call grub_refresh. * normal/menu.c (DISP_LEFT): Renamed to ... * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this. * normal/menu.c (DISP_UP): Renamed to ... * include/grub/term.h (GRUB_TERM_DISP_UP): ... this. * normal/menu.c (DISP_RIGHT): Renamed to ... * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this. * normal/menu.c (DISP_DOWN): Renamed to ... * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this. * normal/menu.c (DISP_HLINE): Renamed to ... * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this. * normal/menu.c (DISP_VLINE): Renamed to ... * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this. * normal/menu.c (DISP_UL): Renamed to ... * include/grub/term.h (GRUB_TERM_DISP_UL): ... this. * normal/menu.c (DISP_UR): Renamed to ... * include/grub/term.h (GRUB_TERM_DISP_UR): ... this. * normal/menu.c (DISP_LL): Renamed to ... * include/grub/term.h (GRUB_TERM_DISP_LL): ... this. * normal/menu.c (DISP_LR): Renamed to ... * include/grub/term.h (GRUB_TERM_DISP_LR): ... this. * normal/menu.c (TERM_WIDTH): Renamed to ... * include/grub/term.h (GRUB_TERM_WIDTH): ... this. * normal/menu.c (TERM_HEIGHT): Renamed to ... * include/grub/term.h (GRUB_TERM_HEIGHT): ... this. * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ... * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this. * normal/menu.c (TERM_MARGIN): Renamed to ... * include/grub/term.h (GRUB_TERM_MARGIN): ... this. * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ... * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this. * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ... * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this. * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ... * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this. * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ... * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this. * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ... * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this. * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ... * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this. * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ... * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this. * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ... * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this. * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ... * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this. * normal/menu.c (TERM_CURSOR_X): Renamed to ... * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this. All callers changed. * include/grub/normal.h: New prototype. * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/menu_entry.c. (normal_mod_SOURCES): Likewise. * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise. (normal_mod_SOURCES): Likewise. 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org> * include/grub/normal.h (grub_halt_init): New prototype. (grub_halt_fini): Likewise. (grub_reboot_init): Likewise. (grub_reboot_fini): Likewise. * util/grub-emu.c: Include signal.h. (main_env): New global variable. (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot catch C-c. (grub_machine_fini): New function. (main): Call grub_halt_init and grub_reboot_init before grub_main, and grub_reboot_fini and grub_halt_fini after it. Call setjmp with MAIN_ENV to go back afterwards. Call grub_machine_fini right before return. * include/grub/util/misc.h: Include setjmp.h. (main_env): New prototype. * include/grub/kernel.h (grub_machine_fini): New prototype. * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise. * include/grub/i386/pc/console.h (grub_console_fini): Likewise. * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function. * kern/i386/pc/init.c (grub_machine_fini): Likewise. * term/i386/pc/console.c (grub_console_fini): Likewise. * util/i386/pc/misc.c: New file. * conf/i386-pc.rmk (grub_emu_SOURCES): Added util/i386/pc/misc.c, commands/i386/pc/halt.c and commands/i386/pc/reboot.c.
2005-02-19 20:56:07 +00:00
normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
2005-08-12 Yoshinori K. Okuji <okuji@enbug.org> * DISTLIST: Added normal/completion.c. * normal/completion.c: New file. * term/i386/pc/console.c (grub_console_getwh): New function. (grub_console_term): Assign grub_console_getwh to getwh. * normal/cmdline.c (grub_tab_complete): Removed. Now the same function is defined in normal/completion.c as grub_normal_do_completion. (grub_cmdline_get): Use grub_normal_do_completion instead of grub_tab_complete. * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK returns non-zero, otherwise return 0. (grub_partition_iterate): First, probe the partition map. Then, call ITERATE only for this partition map. * kern/misc.c (grub_strncmp): Rewritten. * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE returns non-zero. Otherwise return 0. * include/grub/partition.h (grub_partition_map_iterate): Return int instead of void. * include/grub/normal.h (grub_normal_do_completion): New prototype. * include/grub/misc.h (grub_strncmp): Change the type of N to grub_size_t. * include/grub/disk.h (grub_disk_dev_iterate): Return int instead of void. * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to unsigned explictly before comparing it with I. * kern/main.c (grub_env_write_root): Add the attribute unused into VAR. * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added normal/completion.c. (normal_mod_SOURCES): Likewise. * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise. (normal_mod_SOURCES): Likewise. * normal/command.c (grub_iterate_commands): If ITERATE returns non-zero, return one immediately.
2005-08-12 19:53:33 +00:00
normal/completion.c normal/context.c normal/main.c \
2005-08-18 Yoshinori K. Okuji <okuji@enbug.org> * normal/misc.c: New file. * DISTLIST: Added normal/misc.c. * partmap/amiga.c (amiga_partition_map_iterate): Add an argument DISK to HOOK. Call HOOK with DISK. * partmap/apple.c (apple_partition_map_iterate): Likewise. * partmap/pc.c (pc_partition_map_iterate): Likewise. * partmap/sun.c (sun_partition_map_iterate): Likewise. * normal/menu_entry.c (struct screen): Added a new member "completion_shown". (completion_buffer): New global variable. (make_screen): Set SCREEN->COMPLETION_SHOWN to zero. (store_completion): New function. (complete): Likewise. (clear_completions): Likewise. (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero, call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is a tab, call complete. * normal/completion.c (disk_dev): Removed. (print_simple_completion): Likewise. (print_partition_completion): Likewise. (print_func): New global variable. (add_completion): Do not take the arguments WHAT or PRINT any longer. Added a new argument TYPE. Instead of printing directly, call PRINT_FUNC if not NULL. All callers changed. (complete_device): Use a local variable DEV instead of DISK_DEV. Do not move CURRENT_WORD to the end of a device name. (grub_normal_do_completion): Take a new argument HOOK. Do not initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an empty string, return NULL instead. All callers changed. * normal/cmdline.c (print_completion): New function. * kern/partition.c (grub_partition_iterate): Add an argument DISK to HOOK. All callers changed. * kern/disk.c (grub_print_partinfo): Removed. * include/grub/partition.h (struct grub_partition_map): Add a new argument DISK into HOOK of ITERATE. (grub_partition_iterate): Add a new argument DISK to HOOK. * include/grub/normal.h (enum grub_completion_type): New enum. (grub_completion_type_t): New type. (GRUB_COMPLETION_TYPE_COMMAND): New constant. (GRUB_COMPLETION_TYPE_DEVICE): Likewise. (GRUB_COMPLETION_TYPE_PARTITION): Likewise. (GRUB_COMPLETION_TYPE_FILE): Likewise. (grub_normal_do_completion): Added a new argument HOOK. (grub_normal_print_device_info): New prototype. * include/grub/disk.h (grub_print_partinfo): Removed. * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c. (normal_mod_SOURCES): Likewise. * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise. (normal_mod_SOURCES): Likewise. * commands/ls.c (grub_ls_list_disks): Use grub_normal_print_device_info instead of grub_print_partinfo. Free PNAME. (grub_ls_list_files): Use grub_normal_print_device_info instead of duplicating the code.
2005-08-18 03:14:39 +00:00
normal/menu.c normal/menu_entry.c normal/misc.c \
normal/powerpc/setjmp.S
2004-12-27 Marco Gerards <metgerards@student.han.nl> * genmk.rb: Handle the `Program' class in the main loop. Written by Johan Rydberg <jrydberg@gnu.org>. (Program): New class. (programs): New variable. * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h> instead of "grub/machine/ieee1275.h". Include <grub/kernel.h> instead of "grub/kernel.h". Include <grub/machine/init.h>. (help_arch): Function removed. * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `powerpc/libgcc.h' and `loader.h'. (pkgdata_PROGRAMS): New variable. (sbin_UTILITIES): Variable removed. (grub_emu_SOURCES): Added kern/powerpc/cache.S. (grubof_SOURCES): Variable re-defined so it only includes the core functionality. (grubof_CFLAGS): Remove `-DGRUBOF'. (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS, (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES) (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS) (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES) (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS) (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES) (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS) (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS) (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES) (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS) (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS) (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES) (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS) (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES) (pc_mod_CFLAGS): New variables. * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>. (grub_ofdisk_iterate): Add a prototype for `dev_iterate'. * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype. * include/grub/loader.h (grub_os_area_addr, grub_os_area_size): Moved from here... * include/grub/i386/pc/init.h (grub_os_area_addr) (rub_os_area_size): ... to here. * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn): Export symbol. * include/grub/powerpc/ieee1275/init.h: New file. * include/grub/powerpc/libgcc.h: Likewise. * include/grub/cache.h: Likewise. * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard <hollis@penguinppc.org>. * kern/dl.c: Include <grub/cache.h>. (grub_dl_flush_cache): New function. (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache for this module. * kern/powerpc/ieee1275/init.c (grub_ofdisk_init) (grub_console_init): Removed prototypes. (grub_machine_init): Don't initialize the modules anymore. * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function static. * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN): Macro undef removed. (GRUB_HOST_WORDS_BIGENDIAN): New macro. * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add relocation `R_PPC_REL32'. Return an error when the relocation is unknown. * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'. * kern/i386/pc/init.c (grub_arch_sync_caches): New function. * util/misc.c (grub_arch_sync_caches): Likewise.
2004-12-27 13:46:20 +00:00
normal_mod_CFLAGS = $(COMMON_CFLAGS)
normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
# For hello.mod.
hello_mod_SOURCES = hello/hello.c
hello_mod_CFLAGS = $(COMMON_CFLAGS)
# For boot.mod.
boot_mod_SOURCES = commands/boot.c
boot_mod_CFLAGS = $(COMMON_CFLAGS)
# For terminal.mod.
terminal_mod_SOURCES = commands/terminal.c
terminal_mod_CFLAGS = $(COMMON_CFLAGS)
# For ls.mod.
ls_mod_SOURCES = commands/ls.c
ls_mod_CFLAGS = $(COMMON_CFLAGS)
# For cmp.mod.
cmp_mod_SOURCES = commands/cmp.c
cmp_mod_CFLAGS = $(COMMON_CFLAGS)
# For cat.mod.
cat_mod_SOURCES = commands/cat.c
cat_mod_CFLAGS = $(COMMON_CFLAGS)
# For font.mod.
font_mod_SOURCES = font/manager.c
font_mod_CFLAGS = $(COMMON_CFLAGS)
# For amiga.mod
amiga_mod_SOURCES = partmap/amiga.c
amiga_mod_CFLAGS = $(COMMON_CFLAGS)
# For apple.mod
apple_mod_SOURCES = partmap/apple.c
apple_mod_CFLAGS = $(COMMON_CFLAGS)
# For pc.mod
pc_mod_SOURCES = partmap/pc.c
pc_mod_CFLAGS = $(COMMON_CFLAGS)
# For sun.mod
sun_mod_SOURCES = partmap/sun.c
sun_mod_CFLAGS = $(COMMON_CFLAGS)
# For loopback.mod
loopback_mod_SOURCES = disk/loopback.c
loopback_mod_CFLAGS = $(COMMON_CFLAGS)
# For suspend.mod
suspend_mod_SOURCES = commands/ieee1275/suspend.c
suspend_mod_CFLAGS = $(COMMON_CFLAGS)
# For reboot.mod
reboot_mod_SOURCES = commands/ieee1275/reboot.c
reboot_mod_CFLAGS = $(COMMON_CFLAGS)
# For halt.mod
halt_mod_SOURCES = commands/ieee1275/halt.c
halt_mod_CFLAGS = $(COMMON_CFLAGS)
# For help.mod.
help_mod_SOURCES = commands/help.c
help_mod_CFLAGS = $(COMMON_CFLAGS)
2005-02-27 Yoshinori K. Okuji <okuji@enbug.org> * commands/default.h: New file. * commands/timeout.h: Likewise. * normal/context.c: Likewise. * util/misc.c: Do not include sys/times.h. Include sys/time.h and grub/machine/time.h. (grub_get_rtc): Rewritten with gettimeofday. * util/grub-emu.c (main): Call grub_default_init and grub_timeout_init before grub_normal_init, and call grub_timeout_fini and grub_default_fini after grub_main. * util/console.c (grub_ncurses_checkkey): Return the read character or -1. * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it timeouts. * normal/main.c (read_config_file): Push MENU. If this fails, print an error and wait for a user input. Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE. If a menu is empty or an error occurs, pop MENU. (grub_normal_execute): Pop and free MENU after grub_menu_run returns. * kern/loader.c (grub_loader_boot): Call grub_machine_fini. * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not include time.h. [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as without GRUB_UTIL. * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include time.h. [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as without GRUB_UTIL. * include/grub/normal.h (struct grub_menu_list): New struct. (grub_menu_list_t): New type. (struct grub_context): New struct. (grub_context_t): New type. (grub_register_command): Got rid of EXPORT_FUNC. (grub_unregister_command): Likewise. (grub_context_get): New prototype. (grub_context_get_current_menu): Likewise. (grub_context_push_menu): Likewise. (grub_context_pop_menu): Likewise. [GRUB_UTIL] (grub_default_init): Likewise. [GRUB_UTIL] (grub_default_fini): Likewise. [GRUB_UTIL] (grub_timeout_init): Likewise. [GRUB_UTIL] (grub_timeout_fini): Likewise. * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c, commands/timeout.c and normal/context.c. (pkgdata_MODULES): Added default.mod and timeout.mod. (normal_mod_SOURCES): Added normal/context.c. (default_mod_SOURCES): New variable. (default_mod_CFLAGS): Likewise. (timeout_mod_SOURCES): Likewise. (timeout_mod_CFLAGS): Likewise. * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from conf/i386-pc.rmk. (pkgdata_MODULES): Added default.mod and timeout.mod. (normal_mod_SOURCES): Added normal/context.c. (default_mod_SOURCES): New variable. (default_mod_CFLAGS): Likewise. (timeout_mod_SOURCES): Likewise. (timeout_mod_CFLAGS): Likewise. * Makefile.in (all-local): Added $(MKFILES).
2005-02-27 21:19:06 +00:00
# For default.mod
default_mod_SOURCES = commands/default.c
default_mod_CFLAGS = $(COMMON_CFLAGS)
# For timeout.mod
timeout_mod_SOURCES = commands/timeout.c
timeout_mod_CFLAGS = $(COMMON_CFLAGS)
# For configfile.mod
configfile_mod_SOURCES = commands/configfile.c
configfile_mod_CFLAGS = $(COMMON_CFLAGS)
# For search.mod.
search_mod_SOURCES = commands/search.c
search_mod_CFLAGS = $(COMMON_CFLAGS)
# For gzio.mod.
gzio_mod_SOURCES = io/gzio.c
gzio_mod_CFLAGS = $(COMMON_CFLAGS)