Add monochrome text support (mda_text, aka `hercules' in grub-legacy).

* grub-core/Makefile.core.def (mda_text): New module.
	* grub-core/lib/legacy_parse.c (grub_legacy_parse): Support `hercules'.
	* grub-core/term/i386/vga_common.c (grub_console_cur_color): Moved to ..
	* grub-core/term/i386/pc/vga_text.c (cur_color): ... here
	* grub-core/term/i386/pc/console.c (grub_console_cur_color): ... and
	here.
	* grub-core/term/i386/vga_common.c (grub_console_getwh): Moved to ..
	* grub-core/term/i386/pc/vga_text.c (grub_console_getwh): ... here
	* grub-core/term/i386/pc/console.c (grub_console_getwh): ... and
	here.
	* grub-core/term/i386/vga_common.c (grub_console_setcolorstate): Moved
	to ..
	* grub-core/term/i386/pc/vga_text.c (grub_console_setcolorstate):
	... here
	* grub-core/term/i386/pc/console.c (grub_console_setcolorstate): ... and
	here.
	* grub-core/term/i386/vga_common.c: Removed.
	* include/grub/i386/vga_common.h: Likewise.
	* include/grub/vga.h (grub_vga_cr_bw_write): New function.
	(grub_vga_cr_bw_read): Likewise.
	* include/grub/vgaregs.h (GRUB_VGA_IO_CR_BW_INDEX): New enum value.
	(GRUB_VGA_IO_CR_BW_DATA): Likewise.
	* grub-core/term/i386/pc/vga_text.c [MODE_MDA]: Call
	grub_vga_cr_bw_read/grub_vga_cr_bw_write instead of
	grub_vga_cr_read/grub_vga_cr_write.
	(grub_vga_text_setcolorstate) [MODE_MDA]: Ignore color.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-06-28 15:27:54 +02:00
parent 5f91f70146
commit c35fc5bd15
10 changed files with 213 additions and 110 deletions

View file

@ -123,9 +123,6 @@ kernel = {
i386_coreboot_multiboot_qemu = kern/i386/coreboot/init.c;
i386_coreboot_multiboot_qemu = term/i386/pc/vga_text.c;
i386_coreboot_multiboot_qemu = term/i386/vga_common.c;
i386_pc = term/i386/vga_common.c;
x86 = kern/i386/pit.c;
efi = disk/efi/efidisk.c;
@ -175,7 +172,6 @@ kernel = {
mips_qemu_mips = term/at_keyboard.c;
mips_qemu_mips = commands/keylayouts.c;
mips_qemu_mips = term/i386/pc/vga_text.c;
mips_qemu_mips = term/i386/vga_common.c;
mips_qemu_mips = kern/vga_init.c;
mips_arc = kern/mips/arc/init.c;
@ -1591,10 +1587,16 @@ module = {
module = {
name = vga_text;
common = term/i386/pc/vga_text.c;
common = term/i386/vga_common.c;
enable = i386_pc;
};
module = {
name = mda_text;
common = term/i386/pc/mda_text.c;
enable = i386_pc;
enable = i386_coreboot_multiboot_qemu;
};
module = {
name = video_cirrus;
x86 = video/cirrus.c;