Commit graph

647 commits

Author SHA1 Message Date
okuji
cba84c4d9c Fold too long lines. 2002-09-13 11:49:56 +00:00
okuji
36ae96d649 2002-09-13 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/serial.c (fill_input_buf): Take a new argument NOWAIT.
	If NOWAIT is true, don't loop.
	All callers are changed.
2002-09-13 11:27:41 +00:00
okuji
c97b7d2098 2002-09-08 Yoshinori K. Okuji <okuji@enbug.org>
* configure.in (--disable-serial): Fix a typo in the
	description.
2002-09-08 02:01:14 +00:00
okuji
7c16231fec Update what Jason Thomas did. 2002-09-03 19:05:48 +00:00
jthomas
e184c99216 - I just realised I had commited with the wrong date in the changelog 2002-08-25 22:44:48 +00:00
jthomas
d932c071e9 Changed highlight state code for hercules, console and serial.
The state was 0 - normal or 1 - highlight.
        The state is now defined using an enum called color_state.

        * stage2/term.h (color_state): New enum.
        (COLOR_STATE_STANDARD): Standard color to use when not using user defined.
        (COLOR_STATE_NORMAL): User defined normal color.
        (COLOR_STATE_HIGHLIGHT): User defined highlight color.
        (console_highlight): Renamed to console_setcolorstate.
        (serial_highlight): Renamed to serial_setcolorstate.
        (hercules_highlight): Renamed to hercules_setcolorstate.
        * stage2/hercules.c (herc_highlight_state): Removed.
        (herc_standard_color): New variable.
        (herc_color_state): Likewise.
        (herc_highlight): Renamed to herc_setcolorstate.
        (herc_setcolorstate): Added switch to handle new states.
        * stage2/console.c (console_highlight_state): Removed.
        (console_standard_color): New variable.
        (console_color_state): Likewise.
        (console_highlight): Renamed to console_setcolorstate.
        (console_setcolorstate): Added switch to handle new states.
        * stage2/serial.c (serial_highlight): Renamed to serial_setcolorstate.
        (serial_setcolorstate): Adjusted 'if' to suit new states.
        * grub/asmstub.c (console_highlight): Renamed to console_setcolorstate.
        (console_setcolorstate): Adjusted 'if' to suit new states.
        * stage2/stage2.c (print_entry): Set color states using new states.
        (print_border): Likewise.
        * stage2/stage2.c (run_menu): Reverse if (!) to if () for uniformitty.
2002-08-22 05:59:55 +00:00
okuji
51955d52d8 2002-07-12 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/boot.c (load_image): Rewrite the Linux booting support
	radically. Now it should work even on a machine having, say,
	only 128KB, theoretically. Of course, GRUB itself doesn't work
	on such a system, though.
	(load_initrd): Initialize LH based on CUR_ADDR, because the
	location becomes dynamic.
	* stage2/shared.h (LINUX_MAX_SETUP_SECTS): Set to 64.
	(LINUX_HEAP_END_OFFSET): Set to (0x9000 - 0x200).
	(LINUX_STAGING_AREA): Removed.
	(LINUX_SETUP): Likewise.
	(LINUX_KERNEL): Likewise.
	(LINUX_KERNEL_MAXLEN): Likewise.
	(LINUX_SETUP_SEG): Likewise.
	(LINUX_INIT_SEG): Likewise.
	(LINUX_SETUP_STACK): Set to 0x9000.
	(LINUX_BZIMAGE_ADDR): New macro.
	(LINUX_ZIMAGE_ADDR): Likewise.
	(LINUX_OLD_REAL_MODE_ADDR): Likewise.
	(CL_MY_LOCATION): Removed.
	(CL_MY_END_ADDR): Likewise.
	(CL_BASE_ADDR): Likewise.
	(CL_MAGIC): Renamed to ...
	(LINUX_CL_MAGIC): ... this.
	(LINUX_CL_OFFSET): New macro.
	(LINUX_CL_END_OFFSET): Likewise.
	(LINUX_SETUP_MOVE_SIZE): Likewise.
	(struct linux_kernel_header): Change the type of the member
	"cmd_line_ptr" to char *.
	(linux_data_tmp_addr): Declared.
	(linux_data_real_addr): Likewise.
	* stage2/asm.S [!STAGE1_5] (linux_data_tmp_addr): New variable.
	[!STAGE1_5] (linux_data_real_addr): Likewise.
	[!STAGE1_5] (big_linux_boot): Copy the real mode part from
	LINUX_DATA_TMP_ADDR to LINUX_DATA_REAL_ADDR.
	* grub/asmstub.c (linux_data_tmp_addr): New variable.
	(linux_data_real_addr): Likewise.
2002-07-12 09:55:55 +00:00
okuji
f8b4503f1b 2002-07-09 Yoshinori K. Okuji <okuji@enbug.org>
From Mark Kettenis <kettenis@chello.nl>:
	* stage2/boot.c (load_image): Recognize newer FreeBSD kernels.
	* stage2/i386-elf.h (EI_OSABI): New macro.
	(EI_ABIVERSION): Likewise.
	(ELFOSABI_FREEBSD): Likewise.
	(EI_PAD): Set to 9.
2002-07-09 13:24:21 +00:00
okuji
80d0f93b30 2002-07-06 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/shared.h (boot_part_offset): Removed.

	* stage2/disk_io.c (set_bootdev): Copy the partition information
	here. Now this function can call rawread, so it can fail.
	(boot_part_offset): Removed.

	* stage2/builtins.c (boot_func): Don't copy the partition
	information here.
	(real_root_func): Check ERRNUM after calling set_bootdev.
2002-07-05 22:15:57 +00:00
okuji
1548282786 2002-07-04 Yoshinori K. Okuji <okuji@enbug.org>
* docs/grub.texi (Reporting bugs): Use the group name (i.e.
	grub) instead of the group id (i.e. 68) for the URL of the BTS.
2002-07-03 20:27:47 +00:00
okuji
4fcd549f56 2002-07-03 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/serial.c [!GRUB_UTIL] (inb): Added a delay into this
	function itself.
	[!GRUB_UTIL] (outb): Likewise.
	[!GRUB_UTIL] (serial_hw_put): Increase the timeout value, and
	don't call serial_hw_delay explicitly any longer.
	(fill_input_buf): Increase the maximum number of retries, reset
	the counter to zero after getting a valid character, and don't
	call serial_hw_delay explicitly any longer.
2002-07-02 23:39:14 +00:00
okuji
321b3d6a1d 2002-07-03 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/serial.c [!GRUB_UTIL] (serial_hw_fetch): Fixed a typo.
	Reported by Ilguiz Latypov.
2002-07-02 21:23:28 +00:00
okuji
1e42fdd201 2002-07-01 Yoshinori K. Okuji <okuji@enbug.org>
* Makefile.am (AUTOMAKE_OPTIONS): New variable. Specify the
	required Automake version explicitly.
2002-07-01 14:28:53 +00:00
okuji
05202f5eb0 2002-06-30 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/builtins.c [SUPPORT_SERIAL || SUPPORT_HERCULES]
	(terminal_func): Set CURRENT_TERM to each of selected terminals
	before calling grub_printf, and restore CURRENT_TERM after it.
	Reported by Ilguiz Latypov.
	Prepend a carriage return to the prompting message, because it
	is ugly that the same messages fulfill the whole screen.
2002-06-29 20:48:42 +00:00
okuji
d53e46f0a9 2002-06-30 Yoshinori K. Okuji <okuji@alien>
* stage2/serial.c [!GRUB_UTIL] (serial_hw_fetch): Fixed the
	conditional statement. Reported by Ilguiz Latypov.
2002-06-29 20:35:27 +00:00
okuji
f711a2453a Write several notes for maintainers. 2002-06-24 12:17:41 +00:00
okuji
fada891e5c Rewrite the sections "Header graphics fields" and "Machine state". 2002-06-16 03:12:58 +00:00
okuji
52c5e2e399 2002-06-15 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/disk_io.c [SUPPORT_NETBOOT] (GRUB): Defined.
	[SUPPORT_NETBOOT]: Include etherboot.h.
	[!STAGE1_5] (print_completions) [SUPPORT_NETBOOT]: When
	completing a disk name, if NETWORK_READY is true, add "nd" as a
	completion.
2002-06-15 01:04:59 +00:00
okuji
e2a3acbed0 2002-06-15 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/fsys_xfs.c (le32): Don't use bswap, but use xchgb and
	roll, because 386 doesn't have bswap. Reported by Frode Vatvedt
	Fjeld <frodef@acm.org>.
2002-06-15 00:47:08 +00:00
okuji
c628bca2ae Fix some typos in the Multiboot Specification. 2002-06-14 23:53:54 +00:00
okuji
86dbc3fcbc 2002-06-12 Yoshinori K. Okuji <okuji@enbug.org>
* netboot/main.c (ifconfig): If GW is specified, clear out the
	ARP entry for the gateway. If SVR is specified, clear out the
	ARP entry for the server. Reported by Uwe Dannowski
	<ud3@ira.uka.de>.
2002-06-12 08:58:21 +00:00
okuji
24bd9d82c1 2002-06-12 Yoshinori K. Okuji <okuji@enbug.org>
* util/grub-md5-crypt.in: Prompt to retype a password, and check
	if the passwords matches. Suggested by Matt Perry
	<matt@primefactor.com>.
	Also, don't use Perl any longer, because *BSD's sh and GNU
	support ``read -r'', and GRUB doesn't support any other
	operating system anyway.
2002-06-12 08:39:50 +00:00
okuji
eaf934e523 I forgot to add console.c and term.h. 2002-06-11 20:08:17 +00:00
okuji
2369202e83 2002-06-12 Yoshinori K. Okuji <okuji@enbug.org>
The terminal handling code is rewritten radically.

	* stage2/console.c: New file.
	* stage2/term.h: Likewise.

	* stage2/Makefile.am (noinst_HEADERS): Added term.h.
	(libgrub_a_SOURCES): Added serial.c.
	(pre_stage2_exec_SOURCES): Added console.c.

	* stage2/asm.S (console_putchar): Rewritten from scratch.
	[!STAGE1_5] (translation_table): New variable.
	[!STAGE1_5] (translate_keycode): New function.
	[!STAGE1_5] (console_getkey): Call translate_keycode.
	[!STAGE1_5] (console_checkkey): Likewise.
	[!STAGE1_5] (nocursor): Renamed to ...
	[!STAGE1_5] (console_nocursor): ... this.
	[!STAGE1_5] (console_set_attrib): Removed.

	* stage2/builtins.c: Include term.h.
	(terminal): Removed.
	(normal_color): Likewise.
	(highlight_color): Likewise.
	(cat_func): Display a question mark when a non-printable
	character was read.
	(terminal_func): Rewritten almost from scratch.

	* stage2/char_io.c: Include term.h.
	[!STAGE1_5] (auto_fill): Removed.
	[!STAGE1_5] (term_table): New variable.
	[!STAGE1_5] (current_term): Likewise.
	[!STAGE1_5] (real_get_cmdline): New function. The code was
	stolen from the previous version of get_cmdline.
	[!STAGE1_5] (get_cmdline): Rewritten from scratch.
	[!STAGE1_5] (translate_keycode): Removed.
	[!STAGE1_5] (getkey): Rewritten from scratch.
	[!STAGE1_5] (checkkey): Likewise.
	(grub_putchar): Likewise.
	[!STAGE1_5] (gotoxy): Likewise.
	[!STAGE1_5] (getxy): Likewise.
	[!STAGE1_5] (cls): Likewise.
	[!STAGE1_5] (nocursor): New function.
	[SUPPORT_SERIAL] (serial_getxy): Removed.
	[SUPPORT_SERIAL] (serial_gotoxy): Likewise.
	[SUPPORT_SERIAL] (serial_cls): Likewise.
	[SUPPORT_SERIAL] (serial_getxy): Likewise.
	[!STAGE1_5] (set_attrib): Likewise.

	* stage2/cmdline.c (init_cmdline): Set COUNT_LINES to -1.

	* stage2/common.c [!STAGE1_5] (err_list): Removed
	ERR_NEED_SERIAL and added ERR_DEV_NEED_INIT.

	* stage2/hercules.c: Rewritten almost from scratch.
	* stage2/hercules.h (herc_putchar): Removed.
	(herc_cls): Likewise.
	(herc_getxy): Likewise.
	(herc_gotoxy): Likewise.
	(herc_set_attrib): Likewise.

	* stage2/serial.c: Rewritten almost from scratch.
	* stage2/serial.h: Likewise.

	* stage2/shared.h [GRUB_UTIL] (DISP_UL): Set to the same value
	as VGA's.
	[GRUB_UTIL] (DISP_UR): Likewise.
	[GRUB_UTIL] (DISP_LL): Likewise.
	[GRUB_UTIL] (DISP_LR): Likewise.
	[GRUB_UTIL] (DISP_HORIZ): Likewise.
	[GRUB_UTIL] (DISP_VERT): Likewise.
	[GRUB_UTIL] (DISP_LEFT): Likewise.
	[GRUB_UTIL] (DISP_RIGHT): Likewise.
	[GRUB_UTIL] (DISP_UP): Likewise.
	[GRUB_UTIL] (DISP_DOWN): Likewise.
	(grub_error_t): Removed ERR_NEED_SERIAL.
	Added ERR_DEV_NEED_INIT.
	(normal_color): Removed.
	(highlight_color): Likewise.
	(console_cls): Removed, because this is declared in term.h.
	(console_getxy): Likewise.
	(console_gotoxy): Likewise.
	(console_putchar): Likewise.
	(console_getkey): Likewise.
	(console_checkkey): Likewise.
	(console_set_attrib): Removed.
	(set_attrib): Likewise.
	[GRUB_UTIL] (nocursor): Declared.
	(auto_fill): Removed.
	(terminal): Likewise.
	(TERMINAL_CONSOLE): Likewise.
	(TERMINAL_SERIAL): Likewise.
	(TERMINAL_HERCULES): Likewise.
	(TERMINAL_DUMB): Likewise.
	(translate_keycode): Likewise.

	* stage2/stage2.c: Include term.h.
	(print_entry): Rewritten from scratch.
	(print_entries): Likewise.
	(print_border): Likewise.
	(set_line): Removed.
	(set_line_normal): Likewise.
	(set_line_highlight): Likewise.

	* grub/Makefile.am (AM_CFLAGS): Added -DSUPPORT_HERCULES=1.

	* grub/asmstub.c: Don't include hercules.h. Include term.h.
	(console_current_color): New variable.
	(console_translate_key): New function.
	(console_checkkey): Rewritten from scratch.
	(console_getkey): Likewise.
	(console_putchar): Likewise.
	(console_set_attrib): Removed.
	(console_highlight): New function.
	(console_setcolor): Likewise.
	(console_nocursor): Likewise.
	(serial_getkey): Removed.
	(serial_checkkey): Likewise.
	(serial_putchar): Likewise.
	(serial_exists): Likewise.
	(serial_get_port): Likewise.
	(serial_init): Likewise.
	(serial_hw_fetch): New function.
	(serial_hw_put): Likewise.
	(serial_hw_delay): Likewise.
	(serial_hw_get_port): Likewise.
	(serial_hw_init): Likewise.
	(set_serial_device): Renamed to ...
	(serial_set_device): ... this.
	(herc_putchar): Renamed to ...
	(hercules_putchar): ... this.
	(herc_cls): Renamed to ...
	(hercules_cls): ... this.
	(herc_getxy): Renamed to ...
	(hercules_getxy): ... this.
	(herc_gotoxy): Renamed to ...
	(hercules_gotoxy): ... this.
	(hercules_highlight): New function.
	(hercules_setcolor): Likewise.
	(hercules_nocursor): Likewise.
	(herc_set_attrib): Removed.

	* grub/main.c: Include term.h.
	(main): If USE_CURSES is false, set CURRENT_TERM->FLAGS to
	TERM_NO_EDIT | TERM_DUMB. TERMINAL is not used any longer.
2002-06-11 16:36:54 +00:00
okuji
9ab2360b15 2002-06-01 Yoshinori K. Okuji <okuji@enbug.org>
* docs/grub.texi (FAQ): Removed. See the GNU GRUB FAQ on the web
	instead.
2002-06-01 00:00:27 +00:00
okuji
afbae72a33 2002-05-31 Yoshinori K. Okuji <okuji@enbug.org>
* docs/grub.texi (Reporting bugs): Recommend using the BTS on
	Savannah rather than the list bug-grub.
2002-05-30 22:56:49 +00:00
okuji
970554010c Simplify the file README, and update NEWS. 2002-05-30 20:21:30 +00:00
okuji
db6d85e1ff BUGS doesn't have information any longer, because we use the BTS on
Savannah instead.
2002-05-28 22:23:03 +00:00
okuji
c65ae440c8 2002-05-25 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/builtins.c (boot_func): Load the boot partition
	information, only if the address of the boot partition entry is
	set appropriately.
	(real_root_func): If ATTEMPT_MOUNT is false, call open_partition
	and if successful, call set_bootdev, to set the offset of the
	boot partition and the address of the boot paetition entry.
	IF ATTEMPT_MOUNT is false, don't set BOOTDEV. The BSD evil hack
	is useless with the command "rootnoverify" anyway.
	* stage2/disk_io.c (boot_part_addr): Initialized with zero
	explicitly, to emphasize that it is invalid.
2002-05-25 11:33:47 +00:00
okuji
4339b22d7a 2002-05-24 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/builtins.c (real_root_func): New function.
	(root_func): Just call real_root_func.
	(rootnoverify_func): Likewise.
2002-05-24 13:53:57 +00:00
okuji
58a5878421 2002-05-23 Yoshinori K. Okuji <okuji@enbug.org>
* configure.in (AM_INIT_AUTOMAKE): Changed the version number to
	0.93.
2002-05-22 17:12:45 +00:00
okuji
fe3f7e4580 Oops! I forgot to add Yuri into THANKS. 2002-05-22 17:09:30 +00:00
okuji
b225b42f05 2002-05-23 Yoshinori K. Okuji <okuji@enbug.org>
Define the behavior of the boot loader when the load end address
	and the bss end address are zero in the Multiboot Specification,
	and add the support into GRUB. I've modified a patch from Yuri
	Zaporogets <yuriz@ukr.net>.

	* stage2/boot.c (load_image): In the case of Multiboot a.out
	kludge, set the load end address to the load address plus the
	size of the OS image file, if it is zero. Similarly, set the bss
	end address to the load end address, if it is zero.

	* util/mbchk.c (check_multiboot): Don't check if the load
	address is greater than or equal to the load end address, if the
	load end address is zero. Don't check if the load end address is
	greater than the bss end address, if the bss end address is
	zero. And, don't check if the load end address is less than or
	equal to the entry address, if the load end address is zero.

	* docs/multiboot.texi (The address fields of Multiboot header):
	Added descriptions about the behavior of the boot loader when
	LOAD_END_ADDR is zero and BSS_END_ADDR is zero.
2002-05-22 17:08:37 +00:00
okuji
f90c3eaf90 2002-05-22 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/builtins.c (boot_func): If DEBUG is true, print
	BOOT_DRIVE and BOOT_PART_OFFSET.
	Don't set ERRNUM after rawread failed, because rawread should
	set ERRNUM itself.
2002-05-22 06:58:23 +00:00
okuji
58703b663c 2002-05-20 Yoshinori K. Okuji <okuji@enbug.org>
* lib/device.c (read_device_map): Show an error message and exit
	abnormally, if MAP[DRIVE] has already been filled.
	* util/grub-install.in: If there is any dulicated entry, print
	an error message and exit abnormally.
2002-05-20 11:48:03 +00:00
okuji
2364cf3673 2002-05-20 Yoshinori K. Okuji <okuji@enbug.org>
* lib/device.c: Don't include linux/hdreg.h, linux/major.h,
	or linux/kdev_t.h.
	[__linux__] (HDIO_GETGEO): Defined.
	[__linux__] (hd_geometry): Likewise.
	[__linux__] (FLOPPY_MAJOR): Likewise.
	[__linux__] (MINORBITS): Likewise.
	[__linux__] (MAJOR): Likewise.
2002-05-20 09:45:33 +00:00
okuji
1ed089ed1a 2002-05-08 Yoshinori K. Okuji <okuji@enbug.org>
* netboot/fsys_tftp.c (tftp_read): Don't call buf_fill unless
	SIZE is positive.
2002-05-08 07:12:29 +00:00
okuji
522de743e8 2002-05-08 Yoshinori K. Okuji <okuji@enbug.org>
* netboot/etherboot.h (ETH_MAX_MTU): Because some DHCP/BOOTP
	servers don't treat the maximum length the same as Etherboot,
	subtract the size of an IP header and that of an UDP header.
2002-05-08 05:49:33 +00:00
okuji
20ac296c28 2002-04-30 Yoshinori K. Okuji <okuji@enbug.org>
From Jean-Jacques Michel <jjmichel@linbox.com>:
	* stage2/boot.c (load_image): For Linux, check if DATA_LEN is
	greater than MULTIBOOT_SEARCH. If that's true, read the rest
	after copying data already read in BUFFER.
2002-04-30 14:10:03 +00:00
okuji
73d5c0f09c Added a released date into NEWS. 2002-04-29 22:49:40 +00:00
okuji
6d4bf545d3 2002-04-30 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/boot.c (load_image): For Linux, don't check if the
	length of protected mode code is greater than or equal to the
	expected length minus 16. Instead, just check if no error
	occurred. That was problematic, because memdisk has no protected
	mode code. Also, I don't see what the magic number 16 was for.
2002-04-29 18:52:16 +00:00
okuji
bd9abb21c5 2002-04-29 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/builtins.c [SUPPORT_SERIAL] (terminal_func): Added a
	new option ``--silent''. This suppresses messages, if specified.
2002-04-29 00:35:30 +00:00
okuji
cc7647f7d5 2002-04-29 Yoshinori K. Okuji <okuji@enbug.org>
* config.guess: New upstream version.
	* config.sub: Likewise.
2002-04-29 00:19:34 +00:00
okuji
b687a97ef2 2002-04-20 Yoshinori K. Okuji <okuji@enbug.org>
* netboot/config.c (PCI_NIC) [INCLUDE_DAVICOM]: Fix typos.
	Reported by Julien Perrot <julien.perrot@iie.cnam.fr>.
2002-04-20 00:43:10 +00:00
okuji
e6e09deced 2002-04-17 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/builtins.c [SUPPORT_SERIAL] (terminal_func): Set
	COUNT_LINES to -1, to disable the pager.
2002-04-17 09:41:54 +00:00
okuji
204a870ff7 Update the link to binutils. 2002-04-15 22:09:16 +00:00
proski
d6f4c1c620 * util/grub-install.in: Fix hardcoded /dev/hda1. 2002-04-06 22:30:18 +00:00
okuji
86d5582ec2 2002-04-06 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/builtins.c [GRUB_UTIL] (dump_func): New function.
	[GRUB_UTIL] (builtin_dump): New variable.
	(builtin_table) [GRUB_UTIL]: Added a pointer to BUILTIN_DUMP.
	* util/grub-install.in: Make sure that GRUB reads the same
	images as the host operating system by comparing the result of
	running the command "dump" with the contents of the OS file.
2002-04-06 12:15:13 +00:00
okuji
cfce0b1fae 2002-04-04 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/builtins.c (setup_func): Don't embed a drive number, if
	unnecessary.
2002-04-04 14:52:21 +00:00
okuji
4c73310092 Miscellaneous doc updates. 2002-04-04 14:22:35 +00:00