]> git.proxmox.com Git - grub2.git/log
grub2.git
19 years ago2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Sat, 13 Aug 2005 18:44:14 +0000 (18:44 +0000)]
2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>

        * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
        program with another one, because the old one didn't detect a bug
        in gcc-3.4. Always use regparm 2, because the new test is still
        not enough for gcc-4.0. Someone must investigate a simple test
        case which detects a bug in gcc-4.0.

19 years agoForgot to add this file.
okuji [Fri, 12 Aug 2005 19:53:59 +0000 (19:53 +0000)]
Forgot to add this file.

19 years ago2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Fri, 12 Aug 2005 19:53:33 +0000 (19:53 +0000)]
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.

19 years agoAdded support for VESA Bios Extension to i386 kernel.
chaac [Tue, 9 Aug 2005 14:39:50 +0000 (14:39 +0000)]
Added support for VESA Bios Extension to i386 kernel.

19 years ago2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Tue, 9 Aug 2005 03:36:50 +0000 (03:36 +0000)]
2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>

* conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
* DISTLIST: Likewise.
* kern/ieee1275/of.c: Moved to ...
* kern/ieee1275/ieee1275.c: ... here.

19 years ago2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Tue, 9 Aug 2005 03:25:40 +0000 (03:25 +0000)]
2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>

* term/ieee1275/ofconsole.c: Include <grub/mm.h>.
(grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
Pass 0 as `end' parameter to grub_strtoul().

19 years ago2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Tue, 9 Aug 2005 03:15:35 +0000 (03:15 +0000)]
2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>

* include/grub/powerpc/ieee1275/console.h: Do not include
<grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
ifdef.
(grub_console_cur_color): Remove i386-specific prototype.
(grub_console_real_putchar): Likewise.
(grub_console_checkkey): Likewise.
(grub_console_getkey): Likewise.
(grub_console_getxy): Likewise.
(grub_console_gotoxy): Likewise.
(grub_console_cls): Likewise.
(grub_console_setcursor): Likewise.
* kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
Include <grub/machine/console.h>.
* term/ieee1275/ofconsole.c: Likewise.

19 years agoThere were two Vladimir Serbinenko.
okuji [Mon, 8 Aug 2005 23:33:47 +0000 (23:33 +0000)]
There were two Vladimir Serbinenko.

19 years ago2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Mon, 8 Aug 2005 23:15:21 +0000 (23:15 +0000)]
2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>

        * Makefile.in (LIBLZO): New variable.

        * configure.ac: Check for LZO version 2.

        * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
        lzo/lzo1x.h instead of lzo1x.h.

        * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
        of -llzo.

        * util/i386/pc/grub-setup.c (main): Do not free PREFIX
        twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.

        * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
        copying the data from PARTITION to P.

19 years ago2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Sun, 7 Aug 2005 17:12:52 +0000 (17:12 +0000)]
2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>

        * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
        negative, unload the module.

        * util/i386/pc/grub-setup.c (setup): The name of the PC partition
        map is "pc_partition_map" but not "pc".
        (usage): Fix the description. The options are --boot-image and
        --core-image but not --boot-file or --core-file.
        (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
        based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
        DEFAULT_DIRECTORY.

        * util/i386/pc/grub-install.in: Do not specify --boot-file or
        --core-file. Specify INSTALL_DEVICE as an argument.

        * util/console.c: Include config.h.
        [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
        [HAVE_NCURSES_H]: Include ncurses.h.
        [HAVE_CURSES_H]: Include curses.h.
        [!A_NORMAL] (A_NORMAL): Defined as zero.
        [!A_STANDOUT] (A_STANDOUT): Likewise.

        * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
        -lncurses.
        * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.

        * configure.ac: Check for curses libraries and headers.

        * Makefile.in (LIBCURSES): New variable.

        * genmk.rb (Script::rule): Set the executable bits.

        * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
        name of the PC partition map is "pc_partition_map" but not "pc".

19 years ago2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Sun, 7 Aug 2005 14:59:56 +0000 (14:59 +0000)]
2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>

        * util/i386/pc/grub-install.in (grub_probefs): New variable.
        (modules): Likewise.
        (usage): Added descriptions for --modules and --grub-probefs.
        Handle --modules and --grub-probefs. Save the arguments in MODULES
        and GRUB_PROBEFS, respectively.
        Auto-detect a filesystem module against GRUBDIR. If the result is
        empty and modules are not specified explicitly, abort the
        installation. Add the result to MODULES.

        * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
        disk/powerpc/ieee1275/ofdisk.c,
        include/grub/powerpc/ieee1275/init.h and
        term/powerpc/ieee1275/ofconsole.c.
        Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
        term/ieee1275/ofconsole.c.

        * include/grub/powerpc/ieee1275/console.h: Resurrected.

        * COPYING: Upgraded to the latest version. Only the address of the
        FSF office has changed.

19 years ago2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Sun, 7 Aug 2005 14:14:40 +0000 (14:14 +0000)]
2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>

        * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
        kern/ieee1275.c with kern/ieee1275/of.c.

        * kern/ieee1275.c: Moved to ...
        * kern/ieee1275/of.c: ... here.

19 years ago2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Sat, 6 Aug 2005 15:50:07 +0000 (15:50 +0000)]
2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>

        * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
        readablity.

        * config.guess: Updated to the latest version from gnulib.
        * config.sub: Likewise.
        * install.sh: Likewise.
        * mkinstalldirs: Likewise.

        * include/grub/console.h: Removed. This file is arch-specific. Do
        not put this in include/grub.

        * include/grub/i386/pc/console.h: Resurrected.

        * util/console.c: Include grub/machine/console.h instead of
        grub/console.h.
        * util/grub-emu.c: Likewise.

19 years ago2005-08-04 Marco Gerards <metgerards@student.han.nl>
marco_g [Thu, 4 Aug 2005 18:10:51 +0000 (18:10 +0000)]
2005-08-04  Marco Gerards  <metgerards@student.han.nl>

* kern/term.c (grub_putcode): Use `grub_getwh' instead of
hardcoded value.

From Vincent Pelletier  <subdino2004@yahoo.fr>
* include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
Redefined to use grub_getwh.
(grub_term): New member named getwh.
(grub_getwh): New prototype.
* kern/term.c (grub_getwh): New function.
* term/i386/pc/console.c (grub_console_getwh): New function.
(grub_console_term): New member `getwh'.
* term/i386/pc/vga.c (grub_vga_getwh): New function.
(grub_vga_term): New member `getwh'.
* term/sparc64/ofconsole.c (grub_ofconsole_readkey): Use
grub_ssize_t.
(grub_ofconsole_getw): New function.
(grub_ofconsole_init): Use grub_ssize_t and unsigned char.
(grub_ofconsole_term): New field named getwh and new initial
value.

19 years ago2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Wed, 3 Aug 2005 22:53:51 +0000 (22:53 +0000)]
2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>

* include/grub/powerpc/ieee1275/ieee1275.h: Move ...
* include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
Move `abort', `grub_reboot', and `grub_halt' prototypes ...
* include/grub/powerpc/ieee1275/kernel.h: ... to here.
* commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
of <grub/machine/ieee1275.h>.
* commands/ieee1275/reboot.c: Likewise.
* boot/powerpc/ieee1275/ieee1275.c: Move ...
* kern/ieee1275.c: ... to here.  All users updated.  Change all
parameter structs to use new type `grub_ieee1275_cell_t'.
* term/powerpc/ieee1275/ofconsole.c: Move ...
* term/ieee1275/ofconsole.c: ... to here.  All users updated.
* disk/powerpc/ieee1275/ofdisk.c: Move ...
* disk/ieee1275/ofdisk.c: ... to here.  All users updated.
* boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
to return int.
* include/grub/i386/pc/console.h: Move to include/grub/console.h.
Remove unused prototypes.  All users updated.
* include/grub/powerpc/ieee1275/console.h: Removed.
* include/grub/powerpc/ieee1275/ieee1275.h: Define
`grub_ieee1275_cell_t'.
* kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
Cast comparisons with -1 to the correct type.
* loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
type to match `grub_ieee1275_entry_fn'.

19 years ago2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Mon, 1 Aug 2005 20:38:46 +0000 (20:38 +0000)]
2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>

* DISTLIST: Added util/i386/pc/grub-probefs.c.

* conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
(grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
partmap/sun.c.
(grub_probefs_SOURCES): New variable.

* util/i386/pc/grub-probefs.c: New file.

* util/i386/pc/grub-setup.c (main): Call
grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
grub_hfs_init and grub_jfs_init to initialize the system. Call
grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
grub_pc_partition_map_fini to finish the system.

19 years ago2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Sun, 31 Jul 2005 16:12:29 +0000 (16:12 +0000)]
2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>

* loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
function.
(grub_multiboot_load_elf32): Likewise.
(grub_multiboot_is_elf64): Likewise.
(grub_multiboot_load_elf64): Likewise.
(grub_multiboot_load_elf): Likewise.
(grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
an ELF32 or ELF64 file.
This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.

From Serbinenko Vladimir <serbinenko.vova@list.ru>:
* kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
NULL before calling FS->LABEL.
* fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
* commands/ls.c (grub_ls_list_files): Show labels, if possible.
(grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
before calling FS->LABEL.

19 years ago2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Tue, 26 Jul 2005 20:05:47 +0000 (20:05 +0000)]
2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>

        * util/i386/pc/grub-install.in (datadir): New variable.
        (libdir): Removed.
        (pkgdatadir): New variable.
        (pkglibdir): Removed.

19 years agoSorry. I forgot to commit ChangeLog.
okuji [Tue, 26 Jul 2005 20:02:40 +0000 (20:02 +0000)]
Sorry. I forgot to commit ChangeLog.

19 years ago2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Sun, 24 Jul 2005 18:16:26 +0000 (18:16 +0000)]
2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>

* DISTLIST: Added util/i386/pc/grub-install.in.

* util/i386/pc/grub-install.in: New file.

* conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
(grub_install_SOURCES): Likewise.

* genmk.rb: Added support for scripts.
(Script): New class.
(scripts): New variable.

* Makefile.in (install-local): Install sbin_SCRIPTS by
INSTALL_SCRIPT.
(uninstall): Remove sbin_SCRIPTS.

* util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
device, try to get a GRUB device by
grub_util_biosdisk_get_grub_dev.
Free DEST_DEV.

* util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
description for --device-map.

19 years ago2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Wed, 20 Jul 2005 20:30:46 +0000 (20:30 +0000)]
2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>

Change the semantics of variable hooks. They now return strings
instead of error values.

* util/i386/pc/grub-setup.c: Include grub/env.h.
(setup): Use grub_device_set_root instead of grub_env_set.

* kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
grub_env_get instead of grub_device_set_root and
grub_device_get_root, respectively.

* kern/main.c (grub_env_write_root): New function.
(grub_set_root_dev): Register grub_env_write_hook for "root". Use
grub_env_set instead of grub_device_set_root.

* kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
many variables.
(grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
rather than calling ENV->WRITE_HOOK afterwards.
(grub_env_get): Return the result of ENV->READ_HOOK rather than
passing a pointer of a pointer.
(grub_register_variable_hook): Change the types of "read_hook" and
"write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
respectively.
Allocate the default empty string on the heap, because this string
may be freed later.

* kern/device.c: Include grub/env.h.
(grub_device_set_root): Removed.
(grub_device_get_root): Likewise.
(grub_device_open): Use grub_env_get instead of
grub_device_get_root.

* include/grub/env.h (grub_env_read_hook_t): New type.
(grub_env_write_hook_t): Likewise.
(grub_env_var): Change the types of "read_hook" and "write_hook"
to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
(grub_register_variable_hook): Likewise.

* include/grub/device.h (grub_device_set_root): Removed.
(grub_device_set_root): Likewise.

* fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
make sure that DIRNAME terminates with '/', so that
grub_fat_find_dir will fail if PATH is not a directory.

* commands/ls.c (grub_ls_list_files): Remove the qualifier const
from DIRNAME.
Use the qualifier auto for print_files and print_files_long.
If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
as a regular file.
Put a newline only if there is no error.
(grub_cmd_ls): Remove grub_ls_print_files, because this is not
used.

19 years ago2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Tue, 19 Jul 2005 22:30:36 +0000 (22:30 +0000)]
2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>

* kern/partition.c (grub_partition_probe): Initialize PART to
NULL. Otherwise, when no partition map is registered, this returns
a garbage.

19 years ago2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Mon, 18 Jul 2005 22:21:41 +0000 (22:21 +0000)]
2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>

* partmap/apple.c (apple_partition_map_iterate): Check if POS
equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
valid.

19 years ago2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Mon, 18 Jul 2005 20:30:37 +0000 (20:30 +0000)]
2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>

* commands/ls.c (grub_ls_list_disks): Print the filesystem
information on each device, if it does not have partitions. Print
"Device" instead of "Disk", because this function is not specific
to disk devices.

* normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
static to ensure that it is put on the memory rather than a
register.

19 years ago2005-07-17 Yoshinori Okuji <okuji@enbug.org>
okuji [Sun, 17 Jul 2005 20:26:07 +0000 (20:26 +0000)]
2005-07-17  Yoshinori Okuji  <okuji@enbug.org>

* commands/cat.c (GRUB_MOD_INIT): Use better documentation.
(grub_cat_init): Likewise.
* loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
(options): Likewise.
* commands/configfile.c (GRUB_MOD_INIT): Likewise.
(grub_configfile_init): Likewise.
* font/manager.c (GRUB_MOD_INIT): Likewise.
* commands/help.c (GRUB_MOD_INIT): Likewise.
(grub_help_init): Likewise.
* normal/command.c (grub_command_init): Likewise.
* loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
* disk/loopback.c (grub_loop_init): Likewise.
(GRUB_MOD_INIT): Likewise.
* commands/ls.c (grub_ls_init): Likewise.
(GRUB_MOD_INIT): Likewise.
(options): Likewise.
* commands/boot.c (grub_boot_init): Likewise.
(GRUB_MOD_INIT): Likewise.
* loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
* commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
(GRUB_MOD_INIT): Likewise.
* commands/cmp.c (grub_cmp_init): Likewise.
(GRUB_MOD_INIT): Likewise.

* normal/arg.c: Use <> instead of "" to include header files.
(SHORT_ARG_HELP): New macro.
(SHORT_ARG_USAGE): Likewise.
(help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
of 'h' and 'u' for help and usage, respectively. Use more GNU-like
descriptions.
(find_short): Check if C is 'h' or 'u' explicitly.
(grub_arg_show_help): Use space characters instead of tabs. Treat
SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
are shown with --help and --usage only if they are not used for
the command itself.
(parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
'h' and 'u'.

* include/grub/arg.h (struct grub_arg_option): Add the qualifier
const into "longarg". Change the type of "shortarg" to int.

19 years ago2005-07-17 Yoshinori Okuji <okuji@enbug.org>
okuji [Sun, 17 Jul 2005 14:57:07 +0000 (14:57 +0000)]
2005-07-17  Yoshinori Okuji  <okuji@enbug.org>

* boot/i386/pc/boot.S (boot_drive_check): New label.

* include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
macro.

* util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
which do not pass a boot drive correctly. Copied from GRUB Legacy.

19 years ago2005-07-17 Yoshinori Okuji <okuji@enbug.org>
okuji [Sun, 17 Jul 2005 14:17:55 +0000 (14:17 +0000)]
2005-07-17  Yoshinori Okuji  <okuji@enbug.org>

* kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
When turning off Gate A20, skip the check and return immediately,
because this is not fatal usually.

19 years ago2005-07-17 Yoshinori Okuji <okuji@enbug.org>
okuji [Sat, 16 Jul 2005 22:06:33 +0000 (22:06 +0000)]
2005-07-17  Yoshinori Okuji  <okuji@enbug.org>

* conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
be 0x7C00 instead of 0x8000.

* boot/i386/pc/pxeboot.S: Rewritten.

* kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
EXT_C.
(gate_a20_check_state): Read a byte from 0x108000. Invert the
result.

19 years ago2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Sat, 16 Jul 2005 09:32:52 +0000 (09:32 +0000)]
2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>

* kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
robustness. This routine now supports a BIOS call and System
Control Port A to modify the gate A20.

* include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
Increased to 0x440.

19 years ago2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Tue, 12 Jul 2005 22:36:43 +0000 (22:36 +0000)]
2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>

* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
device path and resulting ihandle.
(grub_ofdisk_close): dprintf the ihandle being closed.
(grub_ofdisk_read): dprintf function parameters.
* kern/mm.c (grub_mm_init_region): Likewise.
* loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
(grub_linux_boot): dprintf the Linux entry point, initrd address and
size, and boot arguments.
(grub_rescue_cmd_linux): dprintf each ELF segment's address and size
before loading into memory.
(grub_rescue_cmd_initrd): dprintf the initrd's address and size
before loading into memory.

19 years ago2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Tue, 12 Jul 2005 19:33:32 +0000 (19:33 +0000)]
2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>

* kern/mm.c: Added much documentation.
(GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
8, set to 5 instead of 8.

19 years ago2005-07-10 Yoshinori Okuji <okuji@enbug.org>
okuji [Sun, 10 Jul 2005 07:57:49 +0000 (07:57 +0000)]
2005-07-10  Yoshinori Okuji  <okuji@enbug.org>

* DISTLIST: Added util/i386/pc/grub-mkimage.c.

* conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
(grub_mkdevicemap_SOURCES): New variable.

* util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
lib/device.c of GRUB Legacy.

19 years ago2005-07-10 Yoshinori Okuji <okuji@enbug.org>
okuji [Sun, 10 Jul 2005 07:02:48 +0000 (07:02 +0000)]
2005-07-10  Yoshinori Okuji  <okuji@enbug.org>

* commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
instead of PATH is NULL.

19 years ago2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
subdino [Sat, 9 Jul 2005 16:29:02 +0000 (16:29 +0000)]
2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>

* commands/cmp.c (BUFFER_SIZE): New macro.
(grub_cmd_cmp): Close the right file at the right time.  Compare
only data just read.  Don't report files of different  size as
identical.  Dynamically allocate buffers.  Move variable
declarations at the beginning of function.

19 years ago2005-07-09 Yoshinori Okuji <okuji@enbug.org>
okuji [Sat, 9 Jul 2005 09:34:39 +0000 (09:34 +0000)]
2005-07-09  Yoshinori Okuji  <okuji@enbug.org>

* aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
  reverse.

19 years ago2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
subdino [Mon, 4 Jul 2005 13:50:10 +0000 (13:50 +0000)]
2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>

        * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
        when backspace is pressed at beginning of line.

19 years ago2005-07-03 Yoshinori Okuji <okuji@enbug.org>
okuji [Sun, 3 Jul 2005 18:06:56 +0000 (18:06 +0000)]
2005-07-03  Yoshinori Okuji  <okuji@enbug.org>

* DISTLIST: Added genfslist.sh.

* normal/main.c (fs_module_list): New variable.
(autoload_fs_module): New function.
(read_fs_list): Likewise.
(grub_normal_execute): Call read_fs_list.

* kern/fs.c (grub_fs_autoload_hook): New variable.
(grub_fs_probe): Added support for auto-loading.

* include/grub/normal.h (struct grub_fs_module_list): New struct.
(grub_fs_module_list_t): New type.

* include/grub/fs.h (grub_fs_autoload_hook_t): New type.
(grub_fs_autoload_hook): New prototype.

* genfslist.sh: New file.

* genmk.rb: Added a rule to generate a filesystem list.

19 years ago2005-06-30 Marco Gerards <metgerards@student.han.nl>
marco_g [Thu, 30 Jun 2005 10:21:37 +0000 (10:21 +0000)]
2005-06-30  Marco Gerards  <metgerards@student.han.nl>

* configure.ac: Fix the test for cross-compiling.

* genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
define GRUB_UTIL anymore.

* util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
so this function works on other systems than just big endian.
(load_modules): Likewise.
(add_segments): Likewise.

19 years ago2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Thu, 23 Jun 2005 23:13:57 +0000 (23:13 +0000)]
2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>

* kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
contains `l' modifier, get a long from va_arg().

19 years ago2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Thu, 23 Jun 2005 08:12:19 +0000 (08:12 +0000)]
2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>

        * kern/mm.c (grub_free): If the next free block which is being
        merged is the first free block, set the first block to the block
        being freed.
        Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.

19 years ago2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Tue, 21 Jun 2005 03:12:15 +0000 (03:12 +0000)]
2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>

* boot/powerpc/ieee1275/cmain.c (cmain): Initialize
`grub_ieee1275_chosen'.

19 years ago2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Tue, 21 Jun 2005 02:33:52 +0000 (02:33 +0000)]
2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>

* boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
(grub_ieee1275_chosen): New variable.
(cmain): Initialize and use `grub_ieee1275_chosen' instead of
`chosen'.
* boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
* boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
Rename first argument to `phandle' for consistency.
(grub_ieee1275_get_property_length): Likewise.
(grub_ieee1275_next_property): Likewise.  Change type of first argument
to grub_ieee1275_phandle_t.
* include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
Move export next to declaration.
(grub_ieee1275_chosen): New variable.
* include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
Correct cosmetic typo.
* kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
`grub_ieee1275_chosen'.
* kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
* loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
(grub_rescue_cmd_linux): Set `initrd_addr' to 0.
* term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
`grub_ieee1275_chosen'.

19 years ago2005-05-16 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Tue, 17 May 2005 02:25:19 +0000 (02:25 +0000)]
2005-05-16  Hollis Blanchard  <hollis@penguinppc.org>

* boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
/chosen/bootargs.
* kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
/chosen/bootargs as "variable=value" pairs.

19 years ago2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
hollisb [Mon, 9 May 2005 01:47:37 +0000 (01:47 +0000)]
2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>

* include/grub/misc.h (grub_dprintf): New macro.
(grub_real_dprintf): New prototype.
(grub_strword): Likewise.
(grub_iswordseparator): Likewise.
* kern/misc.c (grub_real_dprintf): New function.
(grub_strword): Likewise.
(grub_iswordseparator): Likewise.

19 years ago2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Sun, 1 May 2005 03:45:36 +0000 (03:45 +0000)]
2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>

* boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
(roundup): Remove macro.
(grub_ieee1275_flags): Make static.
(grub_ieee1275_realmode): Remove.
(grub_ieee1275_test_flag): New function.
(grub_ieee1275_set_flag): Likewise.
(find_options): Rename to `grub_ieee1275_find_options'; update
callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
(cmain): New prototype.
(cmain): Use `grub_ieee1275_set_flag' instead of accessing
`grub_ieee1275_flags' directly.
* conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
machine/biosdisk.h.
* disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
Don't include grub/machine/init.h.
(grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
* include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
Remove prototype.
(grub_ieee1275_realmode): Likewise.
(grub_ieee1275_flag): New enum.
(grub_ieee1275_test_flag): New prototype.
(grub_ieee1275_set_flag): New prototype.
* include/grub/powerpc/ieee1275/init.h: Remove file.
* include/grub/powerpc/ieee1275/ofdisk.h: New file.
* kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
(grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
comment.
* kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
`grub_ieee1275_test_flag'.
(grub_ieee1275_encode_devname): Likewise.

19 years ago2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Fri, 22 Apr 2005 02:32:37 +0000 (02:32 +0000)]
2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>

* include/grub/powerpc/ieee1275/ieee1275.h
(grub_ieee1275_encode_devname): New prototype.
(grub_ieee1275_get_filename): Likewise.
* kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
function.
(grub_set_prefix): Likewise.
(grub_machine_init): Call grub_set_prefix.
* kern/powerpc/ieee1275/openfw.c: Fix typos.
(grub_parse_type): New enum.
(grub_ieee1275_get_devargs): New function.
(grub_ieee1275_get_devname): Likewise.
(grub_ieee1275_parse_args): Likewise.
(grub_ieee1275_get_filename): Likewise.
(grub_ieee1275_encode_devname): Likewise.

19 years ago2005-03-30 Marco Gerards <metgerards@student.han.nl>
marco_g [Wed, 30 Mar 2005 18:59:00 +0000 (18:59 +0000)]
2005-03-30  Marco Gerards  <metgerards@student.han.nl>

* kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
`grub_loader_unset'.

19 years ago2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Sat, 26 Mar 2005 17:34:50 +0000 (17:34 +0000)]
2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>

* commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
instead of grub_ieee1275_interpret.
(grub_halt_init): New function.
(grub_halt_fini): Likewise.
(GRUB_MOD_INIT): Correct message grammar.
* commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
instead of grub_ieee1275_interpret.
(grub_reboot_init): New function.
(grub_reboot_fini): Likewise.
* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
util/i386/pc/misc.c with commands/ieee1275/halt.c,
commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
function.
* include/grub/powerpc/ieee1275/console.h (grub_console_fini):
Add prototype.
* include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
prototype.
(grub_halt): Likewise.
* include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
(cmain): Remove __attribute__((unused)).
* kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
(grub_heap_len): Likewise.
(grub_machine_fini): New function.
* kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
(grub_halt): Likewise.
* term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
function.
* util/powerpc/ieee1275/misc.c: New file.

19 years ago2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Sat, 19 Mar 2005 17:49:19 +0000 (17:49 +0000)]
2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>

  * DISTLIST: New file.
  * gendistlist.sh: Likewise.

  * Makefile.in (COMMON_DISTFILES): Removed.
  (BOOT_DISTFILES): Likewise.
  (CONF_DISTFILES): Likewise.
  (DISK_DISTFILES): Likewise.
  (FS_DISTFILES): Likewise.
  (INCLUDE_DISTFILES): Likewise.
  (KERN_DISTFILES): Likewise.
  (LOADER_DISTFILES): Likewise.
  (TERM_DISTFILES): Likewise.
  (UTIL_DISTFILES): Likewise.
  (DISTFILES): Likewise.
  (uninstall): Uninstall files in $(pkgdata_DATA).
  (DISTLIST): New target.
  (distdir): Use the contents of the file DISTLIST to get a list of
  distributed files.

19 years ago2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Fri, 18 Mar 2005 18:16:26 +0000 (18:16 +0000)]
2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>

  * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
  descriptor. This is ported from GRUB Legacy.

  * gencmdlist.sh: Added an extra semicolon to make it work with
  old sed versions. Reported by Robert Bihlmeyer
  <robbe@orcus.priv.at>.

19 years ago2005-03-08 Yoshinori Okuji <okuji@enbug.org>
okuji [Tue, 8 Mar 2005 01:01:06 +0000 (01:01 +0000)]
2005-03-08  Yoshinori Okuji  <okuji@enbug.org>

  Automatic loading of commands is supported.

  * normal/main.c (read_command_list): New function.
  (grub_normal_execute): Call read_command_list.

  * normal/command.c (grub_register_command): Return zero or CMD.
  Allocate CMD->NAME from the heap.
  Initialize CMD->MODULE_NAME to zero.
  Find the same name as well. If the same command is found and it is
  a dummy command, overwrite members. If it is not a dummy command,
  return zero.
  (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
  (grub_command_find): If a dummy command is found, load a module
  and retry to find a command only once.

  * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
  make sure that each command is loaded.

  * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
  macro.
  (struct grub_command): Remove const from the member `name'.
  Add a new member `module_name'.
  (grub_register_command): Return grub_command_t.

  * commands/help.c (grub_cmd_help): Call grub_command_find to make
  sure that each command is loaded.

  * genmk.rb (PModule::rule): Specify a module name without the
  suffix ".mod" to gencmdlist.sh.

19 years ago2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Wed, 2 Mar 2005 21:52:38 +0000 (21:52 +0000)]
2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>

  * gencmdlist.sh: New file.

  * genmk.rb (PModule::rule): Generate a rule for a command list.
  Clean command.lst.
  Generate command.lst from $(COMMANDFILES).

  * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
  (DATA): Added $(pkgdata_DATA).
  (install-local): Install files in $(pkgdata_DATA).

19 years agoAdded several people.
okuji [Wed, 2 Mar 2005 21:04:59 +0000 (21:04 +0000)]
Added several people.

19 years agoForgot to add configfile.c.
okuji [Wed, 2 Mar 2005 20:13:20 +0000 (20:13 +0000)]
Forgot to add configfile.c.

19 years ago2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Wed, 2 Mar 2005 20:12:46 +0000 (20:12 +0000)]
2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>

  * term/i386/pc/vga.c (debug_command): Removed.
  (GRUB_MOD_INIT): Do not register the command "debug".

  From Hollis Blanchard:
  * commands/configfile.c: New file.
  * conf/i386-pc.rmk (grub_emu_SOURCES): Added
  commands/configfile.c.
  (pkgdata_MODULES): Added configfile.mod.
  (configfile_mod_SOURCES): New variable.
  (configfile_mod_CFLAGS): Likewise.
  * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
  commands/configfile.c.
  (pkgdata_MODULES): Added configfile.mod.
  (configfile_mod_SOURCES): New variable.
  (configfile_mod_CFLAGS): Likewise.
  * util/grub-emu.c (main): Call grub_configfile_init and
  grub_configfile_fini.
  * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
  prototype.
  [GRUB_UTIL] (grub_configfile_fini): Likewise.

19 years ago2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Sun, 27 Feb 2005 22:19:55 +0000 (22:19 +0000)]
2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>

  * normal/arg.c (grub_arg_show_help): Do not show the bug report
  address.

  * commands/help.c (grub_cmd_help): Do not print newlines after
  the last command in print_command_help.

19 years ago2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Sun, 27 Feb 2005 21:19:06 +0000 (21:19 +0000)]
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).

19 years ago2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
marco_g [Mon, 21 Feb 2005 22:00:32 +0000 (22:00 +0000)]
2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>

* conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
(grub_emu_SOURCES): Likewise.
(pkgdata_MODULES): Add `sun.mod'.
(sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
`partmap/sun.c'.
(pkgdata_MODULES): Add `sun.mod'.
(sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
* include/grub/partition.h (grub_sun_partition_map_init): New
prototype.
(grub_sun_partition_map_fini): Likewise.
* partmap/sun.c: New file.
* util/grub-emu.c (main): Initialize and de-initialize the sun
partitionmap support.

19 years ago2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Sat, 19 Feb 2005 20:56:07 +0000 (20:56 +0000)]
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.

19 years ago2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Tue, 15 Feb 2005 00:07:01 +0000 (00:07 +0000)]
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.

19 years ago2005-02-14 Guillem Jover <guillem@hadrons.org>
marco_g [Mon, 14 Feb 2005 18:41:33 +0000 (18:41 +0000)]
2005-02-14  Guillem Jover  <guillem@hadrons.org>

* include/grub/dl.h (grub_dl_check_header): New prototype.
(grub_arch_dl_check_header): Change return type to grub_err_t,
remove size parameter and export function.  Update all callers.
* kern/dl.c (grub_dl_check_header): New function.
(grub_dl_load_core): Use `grub_dl_check_header' instead of
`grub_arch_dl_check_header'.  Check ELF type.  Check if sections
are inside the core.
* kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
independent ELF header checks.
* kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
* loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
`grub_dl_check_header' instead of explicit checks.  Check for the
ELF type.
* loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
`grub_dl_check_header' instead of explicit checks.  Remove arch
specific ELF header checks.

19 years ago2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Sun, 13 Feb 2005 18:54:57 +0000 (18:54 +0000)]
2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>

* conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
* include/grub/powerpc/libgcc.h (__mulsf3): New prototype.

19 years ago2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Sun, 13 Feb 2005 01:40:28 +0000 (01:40 +0000)]
2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>

* kern/partition.c (grub_partition_probe): Clear `grub_errno' and
return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
(part_map_iterate): Clear `grub_errno' and return 0 if
`partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
* partmap/amiga.c (amiga_partition_map_iterate): Return
GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
* partmap/apple.c (apple_partition_map_iterate): Likewise.

19 years ago2005-02-01 Guillem Jover <guillem@hadrons.org>
marco_g [Tue, 1 Feb 2005 21:53:35 +0000 (21:53 +0000)]
2005-02-01  Guillem Jover  <guillem@hadrons.org>

* loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
help info.

19 years ago2005-01-31 Marco Gerards <metgerards@student.han.nl>
marco_g [Mon, 31 Jan 2005 21:44:35 +0000 (21:44 +0000)]
2005-01-31  Marco Gerards  <metgerards@student.han.nl>

* include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
Removed prototype.
(grub_rescue_cmd_linux): New prototype.
(grub_rescue_cmd_initrd): Likewise.
* powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
`bi_rec'.
(grub_linux_release_mem): Release the memory for the initrd.
(grub_load_linux): Renamed from this...
(grub_rescue_cmd_linux): ...To this.  Changed all callers.
Changed `entry' not to be static.  Loop over memory regions to
find another one when the default fails.
(grub_rescue_cmd_initrd): New function.
(grub_linux_init): Remove function.
(grub_linux_fini): Likewise.
(GRUB_MOD_INIT): Register `initrd'.
(GRUB_MOD_FINI): Unregister `initrd'.
* powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
Function removed.
(grub_linux_normal_fini): Likewise.
(GRUB_MOD_INIT): Register `initrd'.
(GRUB_MOD_FINI): Unregister `initrd'.

19 years ago2005-01-31 Marco Gerards <metgerards@student.han.nl>
marco_g [Mon, 31 Jan 2005 21:40:25 +0000 (21:40 +0000)]
2005-01-31  Marco Gerards  <metgerards@student.han.nl>

* commands/help.c: New file.
* normal/arg.c (show_help): Renamed to...
(grub_arg_show_help): ... this.
* commands/i386/pc/halt.c: New file.
* commands/i386/pc/reboot.c: Likewise.
* conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
(pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
(help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
(reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
variables.
* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
`commands/help.c'.
(pkgdata_MODULES): Add `help.mod'.
(help_mod_SOURCES, help_mod_CFLAGS): New variables.
* grub/i386/pc/init.h (grub_reboot): New prototype.
(grub_halt): Likewise.
* include/grub/normal.h (grub_arg_show_help): New prototype.
(grub_help_init): Likewise.
(grub_help_fini): Likewise.
* util/grub-emu.c (main): Initialize and deinitialize the help
command.

* normal/cmdline.c (grub_cmdline_get): Doc fix.

* normal/command.c (grub_command_init): Fixed the description of
the `set' and `unset' commands.

19 years ago2005-01-30 Marco Gerards <metgerards@student.han.nl>
marco_g [Mon, 31 Jan 2005 21:28:34 +0000 (21:28 +0000)]
2005-01-30  Marco Gerards  <metgerards@student.han.nl>

* boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
function.
* commands/ieee1275/halt.c: New file.
* commands/ieee1275/reboot.c: Likewise.
* commands/ieee1275/suspend.c (grub_cmd_suspend): Use
`__attribute__ ((unused))'.  Some GCS related fixed.
(grub_suspend_init) [GRUB_UTIL]: Function removed.
(grub_suspend_fini): Likewise.
* conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
and `halt.mod'.
(reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
(halt_mod_CFLAGS): New variables.
* include/grub/powerpc/ieee1275/ieee1275.h
(grub_ieee1275_interpret): New prototype.

19 years ago2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
okuji [Sat, 29 Jan 2005 22:01:54 +0000 (22:01 +0000)]
2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>

  * include/grub/misc.h (memmove): New prototype.
  (memcpy): Likewise.

19 years ago2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Sat, 22 Jan 2005 16:03:15 +0000 (16:03 +0000)]
2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>

* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
`devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.

19 years ago2005-01-22 Marco Gerards <metgerards@student.han.nl>
marco_g [Sat, 22 Jan 2005 15:58:18 +0000 (15:58 +0000)]
2005-01-22  Marco Gerards  <metgerards@student.han.nl>

* kern/misc.c (grub_strndup): Function rewritten.

19 years ago2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
marco_g [Sat, 22 Jan 2005 13:29:18 +0000 (13:29 +0000)]
2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>

* normal/menu.c (TERM_WIDTH): Macro redefined.
(TERM_TOP_BORDER_Y): Likewise.
(draw_border): Replaced while-loop by a for-loop.  Make the number
of lines consistent with the number of lines displayed in
print_entries.  Added a margin below the rectangle.
(print_entry): Make the entry fit in the rectangle.
(print_entries): Display the scroll arrows next to the right
border.

19 years ago2005-01-21 Marco Gerards <metgerards@student.han.nl>
marco_g [Fri, 21 Jan 2005 22:34:18 +0000 (22:34 +0000)]
2005-01-21  Marco Gerards  <metgerards@student.han.nl>

* fs/minix.c (grub_minix_find_file): Reserve more space for
`fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
`grub_strncpy' to copy `path' into it.

19 years ago2005-01-21 Marco Gerards <metgerards@student.han.nl>
marco_g [Fri, 21 Jan 2005 21:32:03 +0000 (21:32 +0000)]
2005-01-21  Marco Gerards  <metgerards@student.han.nl>

Add the loopback device, a device via which files can be accessed
as devices.

* conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
(pkgdata_MODULES): Add loopback.mod.
(loopback_mod_SOURCES): New variable.
(loopback_mod_CFLAGS): Likewise.
* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
`disk/loopback.c'.
(pkgdata_MODULES): Add loopback.mod.
(loopback_mod_SOURCES): New variable.
(loopback_mod_CFLAGS): Likewise.
* disk/loopback.c: new file.
* include/grub/normal.h (grub_loop_init): New prototype.
(grub_loop_fini): New prototype.
* util/grub-emu.c (main): Initialize and de-initialize loopback
support.
* include/grub/disk.h (grub_disk_dev_id): Add
`GRUB_DISK_DEVICE_LOOPBACK_ID'.

19 years ago2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Fri, 21 Jan 2005 02:45:03 +0000 (02:45 +0000)]
2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>

* boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
function.
* conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
(suspend_mod_SOURCES): New variable.
(suspend_mod_CFLAGS): Likewise.
* include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
New prototype.
* commands/ieee1275/suspend.c: New file.

19 years ago2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
marco_g [Thu, 20 Jan 2005 17:33:09 +0000 (17:33 +0000)]
2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>

* include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
((unused))' to `__attribute__ ((used))'.
(GRUB_MOD_FINI): Likewise.
* kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
* genmk.rb (PModule): Assign space to common symbols when linking
modules.

19 years ago2005-01-20 Marco Gerards <metgerards@student.han.nl>
marco_g [Thu, 20 Jan 2005 17:25:39 +0000 (17:25 +0000)]
2005-01-20  Marco Gerards  <metgerards@student.han.nl>

* include/grub/mm.h (grub_mm_init_region): Change the type of the
`unsigned' arguments to `grub_size_t'.
(grub_malloc): Likewise.
(grub_realloc): Likewise.
(grub_memalign): Likewise.
* kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
* kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
* util/misc.c (grub_malloc): Likewise.
(grub_realloc): Likewise.
* kern/mm.c (get_header_from_pointer): Change the casts to
`unsigned' into a cast to `grub_size_t'.

* fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
point to `currnode' when `currnode' is changed.

* util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
Schottelius <nico-linux@schottelius.org>.

19 years ago2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Sun, 9 Jan 2005 18:11:05 +0000 (18:11 +0000)]
2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>

* util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
(note_path): Remove variable.
(GRUB_IEEE1275_NOTE_NAME): New macro.
(GRUB_IEEE1275_NOTE_TYPE): Likewise.
(grub_ieee1275_note_hdr): New structure.
(grub_ieee1275_note_desc): Likewise.
(grub_ieee1275_note): Likewise.
(load_note): Remove `dir' argument.  All callers updated.  Remove
`note_img' and `path'.  Do not load a file from `note_path'.
Initialize a struct grub_ieee1275_note and write that to `out'.
Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.

19 years ago2005-01-05 Marco Gerards <metgerards@student.han.nl>
marco_g [Wed, 5 Jan 2005 13:33:16 +0000 (13:33 +0000)]
2005-01-05  Marco Gerards  <metgerards@student.han.nl>

* util/misc.c (grub_util_read_image): Revert last change.  It
called `grub_util_read_at', which seeks from the beginning of the
file.

19 years ago2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
marco_g [Tue, 4 Jan 2005 14:01:45 +0000 (14:01 +0000)]
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.

19 years ago2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Mon, 3 Jan 2005 21:48:45 +0000 (21:48 +0000)]
2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>

* boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
New function.
* include/grub/powerpc/ieee1275/ieee1275.h
(grub_ieee1275_milliseconds): New prototype.
* include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
Change to 1000.
* kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
grub_ieee1275_milliseconds.

19 years ago2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Mon, 3 Jan 2005 17:44:25 +0000 (17:44 +0000)]
2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>

* boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
variable.
(find_options): New function.
(cmain): Call find_options.
* include/grub/powerpc/ieee1275/ieee1275.h
(grub_ieee1275_realmode): New extern variable.
* kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
grub_map if grub_ieee1275_realmode is false.

19 years ago2004-12-29 Marco Gerards <metgerards@student.han.nl>
marco_g [Wed, 29 Dec 2004 22:43:48 +0000 (22:43 +0000)]
2004-12-29  Marco Gerards  <metgerards@student.han.nl>

* normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
lines are inserted and make it work like readline.  Reported by
Vincent Pelletier <subdino2004@yahoo.fr>.

19 years ago2004-12-28 Marco Gerards <metgerards@student.han.nl>
marco_g [Tue, 28 Dec 2004 22:43:37 +0000 (22:43 +0000)]
2004-12-28  Marco Gerards  <metgerards@student.han.nl>

* boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.

* conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
`kern/powerpc/cache.S'.

19 years ago2004-12-27 Marco Gerards <metgerards@student.han.nl>
marco_g [Mon, 27 Dec 2004 13:46:20 +0000 (13:46 +0000)]
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.

19 years ago2004-12-19 Marco Gerards <metgerards@student.han.nl>
marco_g [Sun, 19 Dec 2004 20:35:06 +0000 (20:35 +0000)]
2004-12-19  Marco Gerards  <metgerards@student.han.nl>

* conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
`symlist.c', add `grubof_symlist.c'.
(symlist.c): Variable removed.
(grubof_HEADERS): Variable added.
(grubof_symlist.c): New target.
(kernel_syms.lst): Use `grubof_HEADERS' instead of
`kernel_img_HEADERS'.
(grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
* kern/powerpc/dl.c: New file.
* kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
Function removed.
(grub_arch_dl_relocate_symbols): Likewise.
(grub_register_exported_symbols): Likewise.

19 years ago2004-12-13 Marco Gerards <metgerards@student.han.nl>
marco_g [Mon, 13 Dec 2004 17:26:17 +0000 (17:26 +0000)]
2004-12-13  Marco Gerards  <metgerards@student.han.nl>

* fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
(grub_ext2_dir): Likewise.  Don't return in case of an error, jump
to fail instead.  Reported by Vincent Pelletier
<subdino2004@yahoo.fr>.

* fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
it is not allocated.  Reported by Vincent Pelletier
<subdino2004@yahoo.fr>.

* normal/cmdline.c (grub_tab_complete): Add a blank line to the
output so the output looks better.

19 years ago2004-12-04 Marco Gerards <metgerards@student.han.nl>
marco_g [Sat, 4 Dec 2004 18:45:46 +0000 (18:45 +0000)]
2004-12-04  Marco Gerards  <metgerards@student.han.nl>

Modulize the partition map support and add support for the amiga
partition map.

* commands/ls.c: Include <grub/partition.h> instead of
<grub/machine/partition.h>.
* kern/disk.c: Likewise.
* kern/rescue.c: Likewise.
* loader/i386/pc/chainloader.c: Likewise.
* normal/cmdline.c: Likewise.
* kern/powerpc/ieee1275/init.c: Likewise.
(grub_machine_init): Call `grub_pc_partition_map_init',
`grub_amiga_partition_map_init' and
`grub_apple_partition_map_init'.
* conf/i386-pc.rmk (kernel_img_SOURCES): Remove
`disk/i386/pc/partition.c'.  Add `kern/partition.c'.
(kernel_img_HEADERS): Remove `machine/partition.h'.  Add
`partition.h' and `pc_partition.h'.
(grub_setup_SOURCES): Remove
`disk/i386/pc/partition.c'.  Add `kern/partition.c',
`partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
(grub_emu_SOURCES): Likewise.
(pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
(amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
(apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
`disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
`partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
(grubof_SOURCES): Likewise.
* disk/i386/pc/partition.c: File removed.
* disk/powerpc/ieee1275/partition.c: Likewise.
* include/grub/powerpc/ieee1275/partition.h: Likewise.
* include/grub/i386/pc/partition.h: Likewise.
* kern/partition.c: New file.
* partmap/amiga.c: Likewise.
* partmap/apple.c: Likewise.
* partmap/pc.c: Likewise.
* include/grub/partition.h: Likewise..
* include/grub/pc_partition.h: Likewise.
* util/grub-emu.c: Include <grub/partition.h> instead of
<grub/machine/partition.h>.
(main): Call `grub_pc_partition_map_init',
`grub_amiga_partition_map_init' and
`grub_apple_partition_map_init' and deinitialize afterwards.
* util/i386/pc/biosdisk.c: Include `#include
<grub/partition.h>' and `include <grub/pc_partition.h>' instead of
`<grub/machine/partition.h>'.
* util/i386/pc/grub-setup.c: Likewise.
* util/i386/pc/biosdisk.c: Likewise.
(grub_util_biosdisk_get_grub_dev): Only access the PC specific
partition information in case of a PC partition.
* util/i386/pc/grub-setup.c: Include `#include
<grub/partition.h>' and `include <grub/pc_partition.h>' instead of
`<grub/machine/partition.h>'.
(setup): Only access the PC specific partition information in case
of a PC partition.

19 years ago2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
marco_g [Tue, 16 Nov 2004 23:34:45 +0000 (23:34 +0000)]
2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>

* kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
(grub_longjmp): Likewise.
* include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
20.
* normal/powerpc/setjmp.S: New file.
* conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
`normal/powerpc/setjmp.S'.
(grubof_CFLAGS): Add `-DGRUBOF'.
* include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
[GRUB_UTIL && !GRUBOF].

19 years ago2004-11-16 Marco Gerards <metgerards@student.han.nl>
marco_g [Tue, 16 Nov 2004 21:59:11 +0000 (21:59 +0000)]
2004-11-16  Marco Gerards  <metgerards@student.han.nl>

* kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
property named `name'.  Correctly handle the error returned by
`grub_ieee1275_finddevice' if a device can not be opened.

19 years ago2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Wed, 3 Nov 2004 03:21:14 +0000 (03:21 +0000)]
2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>

* term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
`actual' for negativity.
* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
kern/fshelp.c.

19 years ago2004-11-01 Marco Gerards <metgerards@student.han.nl>
marco_g [Mon, 1 Nov 2004 16:19:30 +0000 (16:19 +0000)]
2004-11-01  Marco Gerards  <metgerards@student.han.nl>

* term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
(PAGE_OFFSET): New macro.
(CRTC_ADDR_PORT): Likewise.
(CRTC_DATA_PORT): Likewise.
(START_ADDR_HIGH_REGISTER): Likewise.
(START_ADDR_LOW_REGISTER): Likewise.
(GRAPHICS_ADDR_PORT): Likewise.
(GRAPHICS_DATA_PORT): Likewise.
(READ_MAP_REGISTER): Likewise.
(INPUT_STATUS1_REGISTER): Likewise.
(INPUT_STATUS1_VERTR_BIT): Likewise.
(page): New variable.
(wait_vretrace): New function.
(set_read_map): Likewise.
(set_start_address): Likewise.
(grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
the right page.
(check_vga_mem): Take the page into account.
(write_char): Likewise.
(write_cursor): Likewise.
(scroll_up): Likewise.  Copy the page to the page that is not
shown and switch between both pages.
(grub_vga_putchar): Fix off by one error.
(grub_vga_cls): Wait for the vertical retrace.  Take the page into
account.

19 years ago2004-11-01 Marco Gerards <metgerards@student.han.nl>
marco_g [Mon, 1 Nov 2004 16:14:16 +0000 (16:14 +0000)]
2004-11-01  Marco Gerards  <metgerards@student.han.nl>

Add support for iso9660 (including rockridge).

* conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
(iso9660_mod_SOURCES): New variable.
(iso9660_mod_CFLAGS): Likewise.
* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
* include/grub/fs.h (grub_iso9660_init): New prototype.
* util/grub-emu.c (main): Call `grub_iso9660_init'.
* fs/iso9660.c: New file.

* include/grub/misc.h (grub_strncat): New prototype.
* kern/misc.c (grub_strncat): New function.

* fs/hfs.c (grub_hfs_mount): Translate the error
`GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
* fs/jfs.c (grub_jfs_mount): Likewise.
* fs/ufs.c (grub_ufs_mount): Likewise.

19 years ago2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Fri, 29 Oct 2004 02:45:14 +0000 (02:45 +0000)]
2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>

* boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
which initialized BAT registers.
* boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
Move from here...
* include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
... to here.
* kern/powerpc/ieee1275/openfw.c (grub_map): New function.
(grub_mapclaim): Likewise.
* loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
hand.

19 years ago2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Wed, 20 Oct 2004 01:08:02 +0000 (01:08 +0000)]
2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>

    * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
    (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
    -ffreestanding and -msoft-float.

19 years ago2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Fri, 15 Oct 2004 20:04:28 +0000 (20:04 +0000)]
2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>

* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
set in grub_ieee1275_flags.

19 years ago2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Fri, 15 Oct 2004 02:29:11 +0000 (02:29 +0000)]
2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>

        * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
        prototype.
        * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
        grub_console_init first.
        Change the memory range used for grub_ieee1275_claim and
        grub_mm_init_region.
        Print an error message if the claim fails.
        Include <grub/misc.h>.

19 years ago2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Wed, 13 Oct 2004 23:43:44 +0000 (23:43 +0000)]
2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>

    * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
    Call grub_children_iterate for device nodes of type `scsi',
    `ide', or `ata'.
    (grub_ofdisk_open): Remove manual device alias resolution.
    Fix memory leak when device cannot be opened.
    * include/grub/powerpc/ieee1275/ieee1275.h
    (grub_children_iterate): New prototype.
    * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
    New function.
    * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
    Return -1 if args.size was -1.

19 years ago2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Tue, 12 Oct 2004 03:56:10 +0000 (03:56 +0000)]
2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>

    * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
    (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
    World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
    Open Firmware's memory for it; claim memory from _start to _end.
    * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
    (_end): New extern.
    (_start): Zero BSS from __bss_start to _end.
    * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
    New extern.
    (GRUB_IEEE1275_NO_PARTITION_0): New #define.

19 years ago2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Mon, 11 Oct 2004 14:11:33 +0000 (14:11 +0000)]
2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>

    * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim):
    Return -1 if args.base was -1.

19 years ago2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
hollisb [Sat, 9 Oct 2004 02:37:18 +0000 (02:37 +0000)]
2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>

    * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
escape sequence instead of a literal ^L. Also call
grub_ofconsole_gotoxy.