Author: gb
Date: Wed Feb 14 15:06:59 2007
New Revision: 120890

Added:
   packages/cooker/qemu/current/SOURCES/qemu-0.9.0-kernel-option-vga.patch
Modified:
   packages/cooker/qemu/current/SPECS/qemu.spec

Log:
- add support for vga= option with -kernel (Pascal Terjan)


Added: packages/cooker/qemu/current/SOURCES/qemu-0.9.0-kernel-option-vga.patch
==============================================================================
--- (empty file)
+++ packages/cooker/qemu/current/SOURCES/qemu-0.9.0-kernel-option-vga.patch     
Wed Feb 14 15:06:59 2007
@@ -0,0 +1,36 @@
+--- qemu-0.9.0/hw/pc.c.kernel-option-vga       2007-02-13 14:41:12.000000000 
+0100
++++ qemu-0.9.0/hw/pc.c 2007-02-14 17:01:57.000000000 +0100
+@@ -567,6 +567,7 @@ static void pc_init1(int ram_size, int v
+     if (linux_boot) {
+         uint8_t bootsect[512];
+         uint8_t old_bootsect[512];
++        char *vmode;
+ 
+         if (bs_table[0] == NULL) {
+             fprintf(stderr, "A disk image must be given for 'hda' when 
booting a Linux kernel\n");
+@@ -618,6 +619,25 @@ static void pc_init1(int ram_size, int v
+                 KERNEL_CMDLINE_ADDR - KERNEL_PARAMS_ADDR);
+         /* loader type */
+         stw_raw(phys_ram_base + KERNEL_PARAMS_ADDR + 0x210, 0x01);
++
++        /* handle vga= parameter */
++        vmode = strstr(kernel_cmdline, "vga=");
++        if (vmode) {
++            char *space;
++            unsigned int video_mode;
++            /* skip "vga=" */
++            vmode += 4;
++            if (!strncmp(vmode, "normal", 6)) {
++                video_mode = 0xffff;
++            } else if (!strncmp(vmode, "ext", 3)) {
++                video_mode = 0xfffe;
++            } else if (!strncmp(vmode, "ask", 3)) {
++                video_mode = 0xfffd;
++            } else {
++                video_mode = strtol(vmode, NULL, 0);
++            }
++            stw_raw(phys_ram_base + KERNEL_PARAMS_ADDR + 0x1fa, video_mode);
++        }
+     }
+ 
+     if (pci_enabled) {

Modified: packages/cooker/qemu/current/SPECS/qemu.spec
==============================================================================
--- packages/cooker/qemu/current/SPECS/qemu.spec        (original)
+++ packages/cooker/qemu/current/SPECS/qemu.spec        Wed Feb 14 15:06:59 2007
@@ -47,6 +47,7 @@
 Patch5:                qemu-0.8.3-enforce-16byte-boundaries.patch
 Patch6:                qemu-0.8.3-osx-intel-port.patch
 Patch10:       qemu-0.7.0-cross64-mingw32-fixes.patch
+Patch11:       qemu-0.9.0-kernel-option-vga.patch
 Patch12:       qemu-0.7.2-no-nptl.patch
 Patch13:       qemu-0.8.1-fix-errno-tls.patch
 Patch14:       qemu-0.8.3-dont-strip.patch
@@ -122,6 +123,7 @@
 %patch5 -p1 -b .enforce-16byte-boundaries
 %patch6 -p1 -b .osx-intel-port
 %patch10 -p1 -b .cross64-mingw32-fixes
+%patch11 -p1 -b .kernel-option-vga
 %patch12 -p1 -b .no-nptl
 %patch13 -p1 -b .fix-errno-tls
 %patch14 -p1 -b .dont-strip

Reply via email to