summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Blaabjerg <styx@gentoo.org>2002-08-13 20:38:43 +0000
committerJoachim Blaabjerg <styx@gentoo.org>2002-08-13 20:38:43 +0000
commita275b909b9bc799dce70dcca0986f62e5ae3f327 (patch)
treee7ad9b17c5d56873702b457c96645454bc656b79 /sys-apps/grub
parentinitial version (diff)
downloadgentoo-2-a275b909b9bc799dce70dcca0986f62e5ae3f327.tar.gz
gentoo-2-a275b909b9bc799dce70dcca0986f62e5ae3f327.tar.bz2
gentoo-2-a275b909b9bc799dce70dcca0986f62e5ae3f327.zip
Added grub-0.92-usbfix.patch to grub-0.92.ebuild
Diffstat (limited to 'sys-apps/grub')
-rw-r--r--sys-apps/grub/ChangeLog8
-rw-r--r--sys-apps/grub/files/grub-0.92/grub-0.92-usbfix.patch83
-rw-r--r--sys-apps/grub/grub-0.92.ebuild1
3 files changed, 91 insertions, 1 deletions
diff --git a/sys-apps/grub/ChangeLog b/sys-apps/grub/ChangeLog
index 2270771de203..501c5b3e5b4e 100644
--- a/sys-apps/grub/ChangeLog
+++ b/sys-apps/grub/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-apps/grub
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/grub/ChangeLog,v 1.7 2002/07/21 19:57:32 gerk Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/grub/ChangeLog,v 1.8 2002/08/13 20:38:43 styx Exp $
+
+*grub-0.92.ebuild (13 Aug 2002)
+
+ 13 Aug 2002; Joachim Blaabjerg <styx@gentoo.org> grub-0.92.ebuild :
+
+ Added grub-0.92-usbfix.patch to hopefully fix bug #6372. It still compiles!
*grub-0.90-r7.ebuild (14 July 2002)
diff --git a/sys-apps/grub/files/grub-0.92/grub-0.92-usbfix.patch b/sys-apps/grub/files/grub-0.92/grub-0.92-usbfix.patch
new file mode 100644
index 000000000000..2ec17311a52e
--- /dev/null
+++ b/sys-apps/grub/files/grub-0.92/grub-0.92-usbfix.patch
@@ -0,0 +1,83 @@
+diff -ur grub-0.92/stage2/shared.h grub/stage2/shared.h
+--- grub-0.92/stage2/shared.h 25 Mar 2002 21:43:55 -0000
++++ grub/stage2/shared.h 7 May 2002 18:34:23 -0000
+@@ -258,14 +258,18 @@
+ #define VARIABLE(x) ENTRY(x)
+
+
++/* Keyboard controller defines */
+ #define K_RDWR 0x60 /* keyboard data & cmds (read/write) */
+-#define K_STATUS 0x64 /* keyboard status */
++#define K_STATUS 0x64 /* keyboard status (read-only) */
+ #define K_CMD 0x64 /* keybd ctlr command (write-only) */
+
+ #define K_OBUF_FUL 0x01 /* output buffer full */
+ #define K_IBUF_FUL 0x02 /* input buffer full */
+
+-#define KC_CMD_WIN 0xd0 /* read output port */
++#define KC_CMD_KBDIS 0xad /* disable keyboard */
++#define KC_CMD_KBEN 0xae /* enable keyboard */
++
++#define KC_CMD_ROUT 0xd0 /* read output port */
+ #define KC_CMD_WOUT 0xd1 /* write output port */
+ #define KB_OUTPUT_MASK 0xdd /* enable output buffer full interrupt
+ enable data line
+diff -ur grub-0.92/stage2/asm.S grub/stage2/asm.S
+--- grub-0.92/stage2/asm.S 12 Nov 2001 06:57:29 -0000
++++ grub/stage2/asm.S 7 May 2002 18:34:28 -0000
+@@ -1694,10 +1694,24 @@
+ */
+
+ ENTRY(gateA20)
++ pushl %ebp
++ movl %esp, %ebp
+ pushl %eax
++ pushl %ebx
+
+ call gloop1
+
++ /* mask PS/2 interrupts */
++ movb $0x10, %al
++ outb $0xa1
++ movb $1, %al
++ outb $0x21
++ /* disable keyboard */
++ movb $KC_CMD_KBDIS, %al
++ outb $K_CMD
++ call gloop1
++
++ /* set up to write keyboard controller "output port" */
+ movb $KC_CMD_WOUT, %al
+ outb $K_CMD
+
+@@ -1707,16 +1721,29 @@
+ jnz gloopint1
+
+ movb $KB_OUTPUT_MASK, %al
+- cmpb $0, 0x8(%esp)
++ cmpb $0, 0x8(%ebp)
+ jz gdoit
+
+ orb $KB_A20_ENABLE, %al
+ gdoit:
++ /* write keyboard controller "output port" */
+ outb $K_RDWR
+
+ call gloop1
+
++ /* enable keyboard again (this also adds a bit of delay...) */
++ movb $KC_CMD_KBEN, %al
++ outb $K_CMD
++ call gloop1
++ /* unmask PS/2 interrupts */
++ movb $0, %al
++ outb $0xa1
++ movb $0, %al
++ outb $0x21
++
++ popl %ebx
+ popl %eax
++ popl %ebp
+ ret
+
+ gloop1:
diff --git a/sys-apps/grub/grub-0.92.ebuild b/sys-apps/grub/grub-0.92.ebuild
index b8501f6a4436..c4c76bec4369 100644
--- a/sys-apps/grub/grub-0.92.ebuild
+++ b/sys-apps/grub/grub-0.92.ebuild
@@ -55,6 +55,7 @@ src_unpack() {
patch -p1 < ${FILESDIR}/${P}/grub-0.92-automake16.patch || die
patch -p0 < ${FILESDIR}/${P}/grub-0.92-nodeprecatedflags.patch || die
patch -p1 < ${FILESDIR}/${P}/grub-0.91-vga16-serial.patch || die
+ patch -p1 < ${FILESDIR}/${P}/grub-0.92-usbfix.patch || die
}