diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-08-06 08:58:36 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-08-06 08:58:36 +0000 |
commit | 3a138c7fc3c38433f75cf3d44a4a78d80a6da705 (patch) | |
tree | 2cd0ab881d445277630d8e74e756639d19f5649f | |
parent | 579ba619a6a0d799c5cf1632003fa79e9551aa68 (diff) | |
download | alpine_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/APKBUILD | 17 | ||||
-rw-r--r-- | main/linux-vserver/x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch | 48 |
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} | |||
5 | pkgver=2.6.32.16 | 5 | pkgver=2.6.32.16 |
6 | 6 | ||
7 | _kernver=2.6.32 | 7 | _kernver=2.6.32 |
8 | pkgrel=1 | 8 | pkgrel=2 |
9 | pkgdesc="Linux kernel with vserver" | 9 | pkgdesc="Linux kernel with vserver" |
10 | url="http://linux-vserver.org/" | 10 | url="http://linux-vserver.org/" |
11 | depends="mkinitfs linux-firmware" | 11 | depends="mkinitfs linux-firmware" |
@@ -16,6 +16,7 @@ install= | |||
16 | source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2 | 16 | source="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 | " |
21 | subpackages="$pkgname-dev" | 22 | subpackages="$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() { | |||
120 | md5sums="260551284ac224c3a43c4adac7df4879 linux-2.6.32.tar.bz2 | 126 | md5sums="260551284ac224c3a43c4adac7df4879 linux-2.6.32.tar.bz2 |
121 | 744890f9651962ceae7663d44b19df65 patch-2.6.32.16.bz2 | 127 | 744890f9651962ceae7663d44b19df65 patch-2.6.32.16.bz2 |
122 | 24354a6fd8798792b9ee21f086721cd9 patch-2.6.32.16-vs2.3.0.36.29.4.diff | 128 | 24354a6fd8798792b9ee21f086721cd9 patch-2.6.32.16-vs2.3.0.36.29.4.diff |
129 | a1bcf76870b63a4a4035a8948fb758e2 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch | ||
123 | 884ba32b4edb6c51426e826c44063e98 kernelconfig.x86" | 130 | 884ba32b4edb6c51426e826c44063e98 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 @@ | |||
1 | From f1f6baf8f1df29be38003089787e378567ce0086 Mon Sep 17 00:00:00 2001 | ||
2 | From: H. Peter Anvin <hpa@zytor.com> | ||
3 | Date: Wed, 17 Feb 2010 18:32:06 -0800 | ||
4 | Subject: [PATCH] x86, setup: When restoring the screen, update boot_params.screen_info | ||
5 | |||
6 | When we restore the screen content after a mode change, we return the | ||
7 | cursor to its former position. However, we need to also update | ||
8 | boot_params.screen_info accordingly, so that the decompression code | ||
9 | knows where on the screen the cursor is. Just in case the video BIOS | ||
10 | does something extra screwy, read the cursor position back from the | ||
11 | BIOS instead of relying on it doing the right thing. | ||
12 | |||
13 | While we're at it, make sure we cap the cursor position to the new | ||
14 | screen coordinates. | ||
15 | |||
16 | Reported-by: Wim Osterholt <wim@djo.tudelft.nl> | ||
17 | Bugzilla-Reference: http://bugzilla.kernel.org/show_bug.cgi?id=15329 | ||
18 | Signed-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 | |||
23 | diff --git a/arch/x86/boot/video.c b/arch/x86/boot/video.c | ||
24 | index 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 | -- | ||
47 | 1.7.1 | ||
48 | |||