On Tue, 2002-12-31 at 11:44, Jason Thomas wrote:
actually the copyright thing is so it can be included upstream. I'd
prefer if it was not a debian thing.
okuji do you think its possible to include the splashimage stuff if the
author supports it?
For more information on the current status of the splashimage stuff as
far as I'm concerned --
I've updated it a bit for 0.93 so that instead of adding the concept of
a display, it's instead just another terminal type (the terminal
framework made this the obvious thing to do). I also dropped out some
of the functionality which touched lots of code but which we don't use
at Red Hat just to ease the maintenance for me.
As far as support is concerned, at this point, I'm pretty much tied to
supporting it whether it goes in mainline or not, so if Okuji is willing
to include it, I can probably be easily convinced to support it.
Attached is the current diff (well, this doesn't have the help and there
might have been one other support patch that was related to the graphics
stuff, but I'm about to head out the door so can't check right now) to
show the state of things. A few things to keep in mind: 1) I know all
of the indentation doesn't match the rest of GRUB, easy to fix if it's
to be included, I was just kind of going on autopilot :) 2) there are
definitely some enhancements that could be made to this if someone were
sufficiently enterprising
Jeremy
--- grub-0.93/stage2/Makefile.am.graphics 2002-12-28 23:37:03.0 -0500
+++ grub-0.93/stage2/Makefile.am2002-12-28 23:37:03.0 -0500
@@ -7,7 +7,7 @@
fat.h filesys.h freebsd.h fs.h hercules.h i386-elf.h \
imgact_aout.h jfs.h mb_header.h mb_info.h md5.h nbi.h \
pc_slice.h serial.h shared.h smp-imps.h term.h terminfo.h \
- tparm.h nbi.h vstafs.h xfs.h
+ tparm.h nbi.h vstafs.h xfs.h graphics.h
EXTRA_DIST = setjmp.S apm.S $(noinst_SCRIPTS)
# For stage1.h.
@@ -18,7 +18,7 @@
libgrub_a_SOURCES = boot.c builtins.c char_io.c cmdline.c common.c \
disk_io.c fsys_ext2fs.c fsys_fat.c fsys_ffs.c fsys_jfs.c \
fsys_minix.c fsys_reiserfs.c fsys_vstafs.c fsys_xfs.c gunzip.c \
- md5.c serial.c stage2.c terminfo.c tparm.c
+ md5.c serial.c stage2.c terminfo.c tparm.c graphics.c
libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \
-DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \
-DFSYS_JFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1 \
@@ -75,8 +75,14 @@
HERCULES_FLAGS =
endif
+if GRAPHICS_SUPPORT
+GRAPHICS_FLAGS = -DSUPPORT_GRAPHICS=1
+else
+GRAPHICS_FLAGS =
+endif
+
STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
- $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS)
+ $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS) $(GRAPHICS_FLAGS)
STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000
STAGE1_5_COMPILE = $(STAGE2_COMPILE) -DNO_DECOMPRESSION=1 -DSTAGE1_5=1
@@ -86,7 +92,7 @@
cmdline.c common.c console.c disk_io.c fsys_ext2fs.c \
fsys_fat.c fsys_ffs.c fsys_jfs.c fsys_minix.c fsys_reiserfs.c \
fsys_vstafs.c fsys_xfs.c gunzip.c hercules.c md5.c serial.c \
- smp-imps.c stage2.c terminfo.c tparm.c
+ smp-imps.c stage2.c terminfo.c tparm.c graphics.c
pre_stage2_exec_CFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS)
pre_stage2_exec_CCASFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS)
pre_stage2_exec_LDFLAGS = $(PRE_STAGE2_LINK)
--- grub-0.93/stage2/asm.S.graphics 2002-12-28 23:37:03.0 -0500
+++ grub-0.93/stage2/asm.S 2002-12-28 23:37:03.0 -0500
@@ -2224,6 +2224,156 @@
pop %ebx
pop %ebp
ret
+
+/* graphics mode functions */
+#ifdef SUPPORT_GRAPHICS
+VARIABLE(cursorX)
+.word 0
+VARIABLE(cursorY)
+.word 0
+VARIABLE(cursorCount)
+.word 0
+VARIABLE(cursorBuf)
+.byte 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+
+
+/*
+ * int set_videomode(mode)
+ * BIOS call INT 10H Function 0h to set video mode
+ * Call with %ah = 0x0
+ * %al = video mode
+ * Returns old videomode.
+ */
+ENTRY(set_videomode)
+ push%ebp
+ push%ebx
+ push%ecx
+
+ movb0x10(%esp), %cl
+
+ callEXT_C(prot_to_real)
+ .code16
+
+ xorw%bx, %bx
+ movb$0xf, %ah
+ int $0x10 /* Get Current Video mode */
+ movb%al, %ch
+ xorb%ah, %ah
+ movb%cl, %al
+int$0x10 /* Set Video mode */
+
+ DATA32 callEXT_C(real_to_prot)
+ .code32
+
+ xorb%ah, %ah
+ movb%ch, %al
+
+ pop %ecx
+ pop %ebx
+ pop %ebp
+ ret
+
+
+/*
+ * unsigned char * graphics_get_font()
+ * BIOS call INT 10H Function 11h to set font
+ * Call with %ah = 0x11
+ */
+ENTRY(graphics_get_font)
+ push%ebp
+ push%ebx
+ push%ecx
+ push%edx
+
+ call