aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-08-06 08:58:36 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-08-06 08:58:36 +0000
commit3a138c7fc3c38433f75cf3d44a4a78d80a6da705 (patch)
tree2cd0ab881d445277630d8e74e756639d19f5649f
parent579ba619a6a0d799c5cf1632003fa79e9551aa68 (diff)
downloadalpine_aports-3a138c7fc3c38433f75cf3d44a4a78d80a6da705.tar.bz2
alpine_aports-3a138c7fc3c38433f75cf3d44a4a78d80a6da705.tar.xz
alpine_aports-3a138c7fc3c38433f75cf3d44a4a78d80a6da705.zip
main/linux-vserver: add fix for screen output on boot
was never applied to linux-vserver kernel. ref #339
-rw-r--r--main/linux-vserver/APKBUILD17
-rw-r--r--main/linux-vserver/x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch48
2 files changed, 60 insertions, 5 deletions
diff --git a/main/linux-vserver/APKBUILD b/main/linux-vserver/APKBUILD
index 912954526a..ff2597f754 100644
--- a/main/linux-vserver/APKBUILD
+++ b/main/linux-vserver/APKBUILD
@@ -5,7 +5,7 @@ pkgname=linux-${_flavor}
5pkgver=2.6.32.16 5pkgver=2.6.32.16
6 6
7_kernver=2.6.32 7_kernver=2.6.32
8pkgrel=1 8pkgrel=2
9pkgdesc="Linux kernel with vserver" 9pkgdesc="Linux kernel with vserver"
10url="http://linux-vserver.org/" 10url="http://linux-vserver.org/"
11depends="mkinitfs linux-firmware" 11depends="mkinitfs linux-firmware"
@@ -16,6 +16,7 @@ install=
16source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2 16source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2
17 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-$pkgver.bz2 17 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-$pkgver.bz2
18 http://vserver.13thfloor.at/Experimental/patch-2.6.32.16-vs2.3.0.36.29.4.diff 18 http://vserver.13thfloor.at/Experimental/patch-2.6.32.16-vs2.3.0.36.29.4.diff
19 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch
19 kernelconfig.x86 20 kernelconfig.x86
20 " 21 "
21subpackages="$pkgname-dev" 22subpackages="$pkgname-dev"
@@ -29,10 +30,15 @@ prepare() {
29 bunzip2 -c < ../patch-$pkgver.bz2 | patch -p1 -N || return 1 30 bunzip2 -c < ../patch-$pkgver.bz2 | patch -p1 -N || return 1
30 fi 31 fi
31 32
32 for i in ../*.diff ../*.patch; do 33 # first apply patches in specified order
33 [ -f $i ] || continue 34 for i in $source; do
34 msg "Applying $i..." 35 i=${i##*/}
35 patch -p1 -N < $i || return 1 36 case $i in
37 *.patch|*.diff)
38 msg "Applying $i..."
39 patch -s -p1 -N < "$srcdir"/$i || return 1
40 ;;
41 esac
36 done 42 done
37 43
38 mkdir -p "$srcdir"/build 44 mkdir -p "$srcdir"/build
@@ -120,4 +126,5 @@ dev() {
120md5sums="260551284ac224c3a43c4adac7df4879 linux-2.6.32.tar.bz2 126md5sums="260551284ac224c3a43c4adac7df4879 linux-2.6.32.tar.bz2
121744890f9651962ceae7663d44b19df65 patch-2.6.32.16.bz2 127744890f9651962ceae7663d44b19df65 patch-2.6.32.16.bz2
12224354a6fd8798792b9ee21f086721cd9 patch-2.6.32.16-vs2.3.0.36.29.4.diff 12824354a6fd8798792b9ee21f086721cd9 patch-2.6.32.16-vs2.3.0.36.29.4.diff
129a1bcf76870b63a4a4035a8948fb758e2 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch
123884ba32b4edb6c51426e826c44063e98 kernelconfig.x86" 130884ba32b4edb6c51426e826c44063e98 kernelconfig.x86"
diff --git a/main/linux-vserver/x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch b/main/linux-vserver/x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch
new file mode 100644
index 0000000000..a4f94d7fa4
--- /dev/null
+++ b/main/linux-vserver/x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch
@@ -0,0 +1,48 @@
1From f1f6baf8f1df29be38003089787e378567ce0086 Mon Sep 17 00:00:00 2001
2From: H. Peter Anvin <hpa@zytor.com>
3Date: Wed, 17 Feb 2010 18:32:06 -0800
4Subject: [PATCH] x86, setup: When restoring the screen, update boot_params.screen_info
5
6When we restore the screen content after a mode change, we return the
7cursor to its former position. However, we need to also update
8boot_params.screen_info accordingly, so that the decompression code
9knows where on the screen the cursor is. Just in case the video BIOS
10does something extra screwy, read the cursor position back from the
11BIOS instead of relying on it doing the right thing.
12
13While we're at it, make sure we cap the cursor position to the new
14screen coordinates.
15
16Reported-by: Wim Osterholt <wim@djo.tudelft.nl>
17Bugzilla-Reference: http://bugzilla.kernel.org/show_bug.cgi?id=15329
18Signed-off-by: H. Peter Anvin <hpa@zytor.com>
19---
20 arch/x86/boot/video.c | 7 +++++++
21 1 files changed, 7 insertions(+), 0 deletions(-)
22
23diff --git a/arch/x86/boot/video.c b/arch/x86/boot/video.c
24index f767164..43eda28 100644
25--- a/arch/x86/boot/video.c
26+++ b/arch/x86/boot/video.c
27@@ -298,11 +298,18 @@ static void restore_screen(void)
28 }
29
30 /* Restore cursor position */
31+ if (saved.curx >= xs)
32+ saved.curx = xs-1;
33+ if (saved.cury >= ys)
34+ saved.cury = ys-1;
35+
36 initregs(&ireg);
37 ireg.ah = 0x02; /* Set cursor position */
38 ireg.dh = saved.cury;
39 ireg.dl = saved.curx;
40 intcall(0x10, &ireg, NULL);
41+
42+ store_cursor_position();
43 }
44
45 void set_video(void)
46--
471.7.1
48