Commit Graph
46 Commits
Author SHA1 Message Date
proski 065f6e0a20 * stage2/boot.c: Imply --no-mem-option for Linux kernels with
protocol version 2.03 and above (Linux 2.4.18 and newer).
2004-03-29 14:54:30 +00:00
okuji 2269fa15f8 2004-01-11 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/terminfo.c (ti_set_term): Use a pointer to struct
	terminfo instead to avoid GCC's bug, which inserts a reference
	to memcpy implicitly.
	(ti_get_term): Likewise.
	All callers are fixed.

	* stage2/terminfo.h (ti_set_term): Updated.
	(ti_get_term): Likewise.

	* stage2/shared.h (struct linux_kernel_header): New member,
	initrd_max_address. Defined in the boot protocol 2.03 or higher.

	* stage2/boot.c (load_initrd): If the boot protocol is greater
	than or equal to 2.03, use the field ``initrd_max_address''
	instead of LINUX_INITRD_MAX_ADDRESS.
2004-01-11 09:38:04 +00:00
okuji 0151ef5e78 2003-03-19 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/boot.c (load_image): Check if DATA_LEN plus SECTOR_SIZE
	is less than or equal to MULTIBOOT_SEARCH, instead of if
	DATA_LEN is less than or equal to MULTIBOOT_SEARCH.
	Reported by Neelkanth Natu <neelnatu@yahoo.com>.
2003-03-18 21:07:35 +00:00
okuji 3201624b93 2002-12-01 Yoshinori K. Okuji <okuji@enbug.org>
From Alexander Langer <alex@big.endian.de>:
	* stage2/freebsd.h (RB_GDB): New macro.
	(RB_MUTE): Likewise.
	(RB_MULTIPLE): Likewise.

	* stage2/boot.c (bsd_boot): Set the bits of RB_MULTIPLE, RB_GDB
	and RB_MUTE when "-D", "-g" and "-m" are specified,
	respectively.
2002-11-30 17:33:06 +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 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 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 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 30ec0405c4 2002-03-26 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/boot.c (linux_mem_size): New variable.
	(load_image): Check a mem= option and set LINUX_MEM_SIZE to the
	specified memory size, if any. Otherwise, to zero. When an
	overflow is detected, use LINUX_INITRD_MAX_ADDRESS instead.
	(load_initrd): If LINUX_MEM_SIZE is non-zero, use it instead of
	the actual memory size.
	* stage2/char_io.c (safe_parse_maxint): Use ERR_NUMBER_OVERFLOW
	instead of ERR_NUMBER_PARSING, when an overflow occurs.
	* stage2/common.c [!STAGE1_5] (err_list): Added
	ERR_NUMBER_OVERFLOW.
	* stage2/shared.h (ERR_NUMBER_OVERFLOW): New constant.
2002-03-25 21:43:55 +00:00
okuji 3a150c2b37 Reorganize the file `AUTHOR', according to the current status of copyright
assignments received by the FSF.

Jason Thomas was added.
Erich Stefan Boleyn was moved into those who assigned their copyrights.
Gordon Matzigkeit was moved into the others, because he still wasn't listed
in fencepost.gnu.org:/gd/gnuorg/copyright.list.

The remaining problem is that we haven't had copyright assignments of
VaX#8, Heiko Schroeder and Gordon Matzigkeit. As for the first two, Erich
is now trying to contact them by proxy. So I'm just waiting.

As for Gordon.... oh, what are you doing, Gordon?! Hurry up, please!
2001-11-12 06:57:29 +00:00
okuji f2ca2f3ea2 Don't decompress an initrd automatically. 2001-07-05 10:52:59 +00:00
okuji b7e8ad7e6d ELF symbol loading support is added. 2001-07-03 13:52:28 +00:00
okuji 123b813394 Always jump to the physical entry address of a Multiboot OS image, even
when the physical one differs from the virtual one.
2001-06-19 11:31:15 +00:00
gord 9e3e10d2c1 Don't cast entry_addr to an int. 2001-03-28 17:22:34 +00:00
okuji c610524eb0 avoid Linux 2.2.x memory range check bug. 2001-03-16 09:10:44 +00:00
okuji 092f32f05b fix a bug in the Linux cmdline handling code. 2000-10-16 04:27:56 +00:00
okuji 009bf82dbc Change "shit" to "mess".
NOTE: Even the word "mess" is not still enough to represent how wrong and
bad the Linux video support is, but I don't want to hear complaints from
Linux fanatics any more.
2000-10-10 17:48:57 +00:00
okuji 0bcf40674e append a mem= option instead of prepending it. 2000-09-11 20:55:02 +00:00
okuji 529a2dc5e0 fix some bugs in the linux boot code. 2000-07-25 12:08:14 +00:00
okuji c786d8603e comply with the linux/i386 boot protocol version 2.02. 2000-07-23 21:21:37 +00:00
okuji e01f0b9514 fix a big linux problem. 2000-07-14 07:48:13 +00:00
okuji f0ae3c922f add a new option --no-mem-option into the command kernel. 2000-06-23 08:53:27 +00:00
okuji edb9c0d7b0 add a mem option into Linux automatically only if the user doesn't specify it explicitly. 2000-06-17 08:48:28 +00:00
okuji 3899310dca leave the vga option for Linux, remove unnecessary compile scripts and add a really necessary compile script into the top dir. 2000-06-17 03:44:43 +00:00
okuji 5aef9e78a5 perhaps fix the bug that Linux cannot get a correct memory size. 2000-05-04 22:15:20 +00:00
okuji 4d452e493f fix a bogus bug in kernel_func, load initrd below 1GB, append mem= option only if >64MB, add some CDROM detection code, don't use the last page for initrd to avoid a Linux's bug. 2000-04-05 02:29:50 +00:00
okuji ba86939fcb add NetBSD ELF support using a dirty solution. 2000-04-03 12:22:20 +00:00
okuji 161b9f4dde new function grub_seek, fix a bug in the doc. 1999-12-30 06:32:02 +00:00
okuji c95941d65d fix several bugs. 1999-11-11 20:43:20 +00:00
okuji 1f6d422a9a clear the bss at the startup and fix some netboot bugs. 1999-10-22 17:32:23 +00:00
okuji fa2dd120e4 fix some minor problems in load_initrd. 1999-10-17 03:30:33 +00:00
okuji 41df320a22 fix the NetBSD and OpenBSD boot bug. 1999-10-12 08:42:11 +00:00
okuji c16ba0eb9d fix a bug in freebsd boot, reformat TODO. 1999-10-05 16:58:36 +00:00
okuji dfe653fc49 improve the command-line interface. 1999-09-17 03:21:31 +00:00
okuji 5ef3bd9c37 fix the interpretation of the boot drive in the multiboot. 1999-09-13 03:43:20 +00:00
okuji 6608e1b9e2 The internal of the command handling is heavily modified, and a new command help is added. 1999-09-05 05:54:33 +00:00
okuji e079197cd6 fix the elf loading. 1999-09-04 01:09:14 +00:00
okuji 69be37a233 fix a bug in fat. fix bsd boot in the grub shell. 1999-08-31 03:17:30 +00:00
okuji 83b3d5eee0 add hide and unhide commands. add additional minix fs support. some code cleanups. 1999-08-29 16:23:12 +00:00
okuji 0623b3f394 add missing RAW_ADDRs 1999-08-04 19:38:05 +00:00
okuji 50fa325cd0 fix a stupid bug 1999-08-03 15:45:15 +00:00
okuji 70ba31d512 freebsd-elf support 1999-08-03 02:22:50 +00:00
okuji 95dfefd185 fix a bug in stage1_lba, and move all the constants in stage1 to stage1.h 1999-07-13 15:46:28 +00:00
okuji cb7e6d5e4e Bug fixes in the geometry detection. Linux video mode selection support. New Stage 1 stage1_lba is added. Stage 1.5 becomes much smaller. 1999-07-12 00:47:11 +00:00
okuji 9350d46a2a build process is cleaned up 1999-06-24 00:03:29 +00:00