Re: [SeaBIOS] ImageMagick-based SeaBIOS logo generation script

2012-02-08 Thread Gleb Natapov
On Wed, Feb 08, 2012 at 11:54:09AM +0100, Fred . wrote:
> Kevin wanted the logo to be generated using scripted free and libre tools.
> ImageMagick is scripted and free.
> What else can I use?
> 
ImageMagick is fine, but font file is Ubuntu specific (and may event
contain different font in different versions of Ubuntu). If everyone
agrees that this should be the SeaBIOS logo then find appropriately
licensed fount file and include it in SeaBIOS repository along with the
script.

> On Wed, Feb 8, 2012 at 11:51 AM, Fred .  wrote:
> > Well, then just execute the file and have it generate the jpg, and
> > then put the jpg file in the source tree.
> > ImageMagick is shipped by default on Ubuntu.
> >
> > On Wed, Feb 8, 2012 at 8:19 AM, Gleb Natapov  wrote:
> >> On Tue, Feb 07, 2012 at 07:59:04PM +0100, Fred . wrote:
> >>> Please put this file in the repository. I don't know, but somewhere.
> >>> So it outputs a bootsplash.jpg file to wherever SeaBIOS is looking for
> >>> that file.
> >>>
> >>> #!/bin/sh
> >>> convert -background black \
> >>>         -font /usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf \
> >> This file is hardly available on all machines where this script might
> >> run.
> >>
> >>>         -pointsize 96 -size 320x480 \
> >>>         -gravity East -fill '#2078cb' label:'Sea' \
> >>>         -gravity West -fill white     label:'BIOS' \
> >>>         +append bootsplash.jpg
> >>
> >>
> >>> ___
> >>> SeaBIOS mailing list
> >>> SeaBIOS@seabios.org
> >>> http://www.seabios.org/mailman/listinfo/seabios
> >>
> >>
> >> --
> >>                        Gleb.

--
Gleb.

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] seabios build failure in xen tree

2012-02-08 Thread Kevin O'Connor
On Wed, Feb 08, 2012 at 11:32:10AM +0100, Christoph Egger wrote:
> On 02/08/12 02:18, Kevin O'Connor wrote:
> >We can change the seabios makefile to call these scripts with an
> >explicit $(PYTHON).
> 
> Awesome!

See the attached patch.

> >That's quite odd.  This looks data related instead of python related.
> >Try running a "make clean" and then "make" in just the seabios
> >directory.  If you still see an issue, tar up the seabios "out/"
> >directory and mail it to me.
> 
> It failed the same way.
> I sent you the tarball offlist due its size.

Looks like your version of gcc is defining sections with
.rodata.__PRETTY_FUNCTION__ - which is odd as that macro isn't used in
the code.  Does the second attached patch fix it for you?

-Kevin
>From 97f1ffcfac4ca382b5008a7aabfc2c300131f978 Mon Sep 17 00:00:00 2001
From: Kevin O'Connor 
Date: Wed, 8 Feb 2012 20:21:29 -0500
Subject: [PATCH 1/2] Add PYTHON definition to Makefile.

Add PYTHON definition to Makefile so users can override it.  This
allows users to specify an exact python executable name to use during
the build.

Signed-off-by: Kevin O'Connor 
---
 Makefile |   11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 0343ce5..513e8f1 100644
--- a/Makefile
+++ b/Makefile
@@ -63,6 +63,7 @@ export KCONFIG_CONFIG := $(CURDIR)/.config
 OBJCOPY=objcopy
 OBJDUMP=objdump
 STRIP=strip
+PYTHON=python
 
 # Default targets
 -include $(KCONFIG_CONFIG)
@@ -152,7 +153,7 @@ $(OUT)romlayout16.lds: $(OUT)ccode32flat.o 
$(OUT)code32seg.o $(OUT)code16.o tool
$(Q)$(OBJDUMP) -thr $(OUT)code32flat.o > $(OUT)code32flat.o.objdump
$(Q)$(OBJDUMP) -thr $(OUT)code32seg.o > $(OUT)code32seg.o.objdump
$(Q)$(OBJDUMP) -thr $(OUT)code16.o > $(OUT)code16.o.objdump
-   $(Q)./tools/layoutrom.py $(OUT)code16.o.objdump 
$(OUT)code32seg.o.objdump $(OUT)code32flat.o.objdump $(OUT)romlayout16.lds 
$(OUT)romlayout32seg.lds $(OUT)romlayout32flat.lds
+   $(Q)$(PYTHON) ./tools/layoutrom.py $(OUT)code16.o.objdump 
$(OUT)code32seg.o.objdump $(OUT)code32flat.o.objdump $(OUT)romlayout16.lds 
$(OUT)romlayout32seg.lds $(OUT)romlayout32flat.lds
 
 # These are actually built by tools/layoutrom.py above, but by pulling them
 # into an extra rule we prevent make -j from spawning layoutrom.py 4 times.
@@ -174,7 +175,7 @@ $(OUT)bios.bin.elf $(OUT)bios.bin: $(OUT)rom.o 
tools/checkrom.py
@echo "  Prepping $@"
$(Q)$(OBJDUMP) -thr $< > $<.objdump
$(Q)$(OBJCOPY) -O binary $< $(OUT)bios.bin.raw
-   $(Q)./tools/checkrom.py $<.objdump $(OUT)bios.bin.raw $(OUT)bios.bin
+   $(Q)$(PYTHON) ./tools/checkrom.py $<.objdump $(OUT)bios.bin.raw 
$(OUT)bios.bin
$(Q)$(STRIP) -R .comment $< -o $(OUT)bios.bin.elf
 
 
@@ -204,15 +205,15 @@ $(OUT)vgabios.bin.raw: $(OUT)vgarom.o
 
 $(OUT)vgabios.bin: $(OUT)vgabios.bin.raw tools/buildrom.py
@echo "  Finalizing rom $@"
-   $(Q)./tools/buildrom.py $< $@
+   $(Q)$(PYTHON) ./tools/buildrom.py $< $@
 
 ### dsdt build rules
 src/%.hex: src/%.dsl ./tools/acpi_extract_preprocess.py ./tools/acpi_extract.py
@echo "Compiling DSDT"
$(Q)cpp -P $< > $(OUT)$*.dsl.i.orig
-   $(Q)./tools/acpi_extract_preprocess.py $(OUT)$*.dsl.i.orig > 
$(OUT)$*.dsl.i
+   $(Q)$(PYTHON) ./tools/acpi_extract_preprocess.py $(OUT)$*.dsl.i.orig > 
$(OUT)$*.dsl.i
$(Q)iasl -l -tc -p $(OUT)$* $(OUT)$*.dsl.i
-   $(Q)./tools/acpi_extract.py $(OUT)$*.lst > $(OUT)$*.off
+   $(Q)$(PYTHON) ./tools/acpi_extract.py $(OUT)$*.lst > $(OUT)$*.off
$(Q)cat $(OUT)$*.off > $@
 
 $(OUT)ccode32flat.o: src/acpi-dsdt.hex src/ssdt-proc.hex src/ssdt-pcihp.hex
-- 
1.7.6.5

>From 805ede2bd35243a4298bc64bd81be6db7cf57f58 Mon Sep 17 00:00:00 2001
From: Kevin O'Connor 
Date: Wed, 8 Feb 2012 20:23:36 -0500
Subject: [PATCH 2/2] Permit .rodata.__PRETTY_FUNCTION__. sections in roms.

Some versions of gcc appear to define these sections even though they
aren't used in the code.

Signed-off-by: Kevin O'Connor 
---
 tools/layoutrom.py |   12 
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/tools/layoutrom.py b/tools/layoutrom.py
index 45738a3..86e1f33 100755
--- a/tools/layoutrom.py
+++ b/tools/layoutrom.py
@@ -147,8 +147,10 @@ def getSectionsPrefix(sections, category, prefix):
 def doLayout(sections):
 # Determine 16bit positions
 textsections = getSectionsPrefix(sections, '16', '.text.')
-rodatasections = (getSectionsPrefix(sections, '16', '.rodata.str1.1')
-  + getSectionsPrefix(sections, '16', '.rodata.__func__.'))
+rodatasections = (
+getSectionsPrefix(sections, '16', '.rodata.str1.1')
++ getSectionsPrefix(sections, '16', '.rodata.__func__.')
++ getSectionsPrefix(sections, '16', '.rodata.__PRETTY_FUNCTION__.'))
 datasections = getSectionsPrefix(sections, '16', '.data16.')
 fixedsections = getSectionsPrefix(sections, '16', '.fixedaddr.')
 
@@ -159,8 +161,10 @@ def doLayou

Re: [SeaBIOS] [PATCH 0/3] runtime hardware detection series.

2012-02-08 Thread Kevin O'Connor
On Wed, Feb 08, 2012 at 05:38:56PM +0100, Gerd Hoffmann wrote:
>   Hi,
> 
> Next round, this time introducing a CONFIG_VGA_QEMU and doing the
> hardware detection for qemu-emulated hardware only.  Also clarifies
> Kconfig (cirrus is for emulated hardware only) as side effect.

What's the advantage of modifying the code versus just having a simple
build script?

-Kevin


#!/bin/sh
# Script to build the vgaroms that qemu uses

mkdir -p out/

CFG=$PWD/out/config-cirrus
cat > $CFG < $CFG 

[SeaBIOS] [PATCH 1/3] vga: move code to vgahw.c

2012-02-08 Thread Gerd Hoffmann
Create vgahw.c, move code from vgahw.h there, soon we will add more bits
there which will make inlining less useful.

Signed-off-by: Gerd Hoffmann 
---
 Makefile   |2 +-
 vgasrc/vgahw.c |  136 
 vgasrc/vgahw.h |  134 ++-
 3 files changed, 152 insertions(+), 120 deletions(-)
 create mode 100644 vgasrc/vgahw.c

diff --git a/Makefile b/Makefile
index 0343ce5..1dcfaeb 100644
--- a/Makefile
+++ b/Makefile
@@ -184,7 +184,7 @@ $(OUT)bios.bin.elf $(OUT)bios.bin: $(OUT)rom.o 
tools/checkrom.py
 SRCVGA=src/output.c src/util.c src/pci.c \
 vgasrc/vgabios.c vgasrc/vgafb.c vgasrc/vgafonts.c vgasrc/vbe.c \
 vgasrc/stdvga.c vgasrc/stdvgamodes.c vgasrc/stdvgaio.c \
-vgasrc/clext.c vgasrc/bochsvga.c vgasrc/geodevga.c
+vgasrc/vgahw.c vgasrc/clext.c vgasrc/bochsvga.c vgasrc/geodevga.c
 
 CFLAGS16VGA = $(CFLAGS16INC) -g -Isrc
 
diff --git a/vgasrc/vgahw.c b/vgasrc/vgahw.c
new file mode 100644
index 000..65afeb1
--- /dev/null
+++ b/vgasrc/vgahw.c
@@ -0,0 +1,136 @@
+#include "vgahw.h"
+
+struct vgamode_s *vgahw_find_mode(int mode)
+{
+if (CONFIG_VGA_CIRRUS)
+return clext_find_mode(mode);
+if (CONFIG_VGA_BOCHS)
+return bochsvga_find_mode(mode);
+return stdvga_find_mode(mode);
+}
+
+int vgahw_set_mode(struct vgamode_s *vmode_g, int flags)
+{
+if (CONFIG_VGA_CIRRUS)
+return clext_set_mode(vmode_g, flags);
+if (CONFIG_VGA_BOCHS)
+return bochsvga_set_mode(vmode_g, flags);
+return stdvga_set_mode(vmode_g, flags);
+}
+
+void vgahw_list_modes(u16 seg, u16 *dest, u16 *last)
+{
+if (CONFIG_VGA_CIRRUS)
+clext_list_modes(seg, dest, last);
+else if (CONFIG_VGA_BOCHS)
+bochsvga_list_modes(seg, dest, last);
+else
+stdvga_list_modes(seg, dest, last);
+}
+
+int vgahw_init(void)
+{
+if (CONFIG_VGA_CIRRUS)
+return clext_init();
+if (CONFIG_VGA_BOCHS)
+return bochsvga_init();
+if (CONFIG_VGA_GEODEGX2 || CONFIG_VGA_GEODELX)
+return geodevga_init();
+return stdvga_init();
+}
+
+int vgahw_get_window(struct vgamode_s *vmode_g, int window)
+{
+if (CONFIG_VGA_CIRRUS)
+return clext_get_window(vmode_g, window);
+if (CONFIG_VGA_BOCHS)
+return bochsvga_get_window(vmode_g, window);
+return stdvga_get_window(vmode_g, window);
+}
+
+int vgahw_set_window(struct vgamode_s *vmode_g, int window, int val)
+{
+if (CONFIG_VGA_CIRRUS)
+return clext_set_window(vmode_g, window, val);
+if (CONFIG_VGA_BOCHS)
+return bochsvga_set_window(vmode_g, window, val);
+return stdvga_set_window(vmode_g, window, val);
+}
+
+int vgahw_get_linelength(struct vgamode_s *vmode_g)
+{
+if (CONFIG_VGA_CIRRUS)
+return clext_get_linelength(vmode_g);
+if (CONFIG_VGA_BOCHS)
+return bochsvga_get_linelength(vmode_g);
+return stdvga_get_linelength(vmode_g);
+}
+
+int vgahw_set_linelength(struct vgamode_s *vmode_g, int val)
+{
+if (CONFIG_VGA_CIRRUS)
+return clext_set_linelength(vmode_g, val);
+if (CONFIG_VGA_BOCHS)
+return bochsvga_set_linelength(vmode_g, val);
+return stdvga_set_linelength(vmode_g, val);
+}
+
+int vgahw_get_displaystart(struct vgamode_s *vmode_g)
+{
+if (CONFIG_VGA_CIRRUS)
+return clext_get_displaystart(vmode_g);
+if (CONFIG_VGA_BOCHS)
+return bochsvga_get_displaystart(vmode_g);
+return stdvga_get_displaystart(vmode_g);
+}
+
+int vgahw_set_displaystart(struct vgamode_s *vmode_g, int val)
+{
+if (CONFIG_VGA_CIRRUS)
+return clext_set_displaystart(vmode_g, val);
+if (CONFIG_VGA_BOCHS)
+return bochsvga_set_displaystart(vmode_g, val);
+return stdvga_set_displaystart(vmode_g, val);
+}
+
+int vgahw_get_dacformat(struct vgamode_s *vmode_g)
+{
+if (CONFIG_VGA_BOCHS)
+return bochsvga_get_dacformat(vmode_g);
+return stdvga_get_dacformat(vmode_g);
+}
+
+int vgahw_set_dacformat(struct vgamode_s *vmode_g, int val)
+{
+if (CONFIG_VGA_BOCHS)
+return bochsvga_set_dacformat(vmode_g, val);
+return stdvga_set_dacformat(vmode_g, val);
+}
+
+int vgahw_size_state(int states)
+{
+if (CONFIG_VGA_CIRRUS)
+return clext_size_state(states);
+if (CONFIG_VGA_BOCHS)
+return bochsvga_size_state(states);
+return stdvga_size_state(states);
+}
+
+int vgahw_save_state(u16 seg, void *data, int states)
+{
+if (CONFIG_VGA_CIRRUS)
+return clext_save_state(seg, data, states);
+if (CONFIG_VGA_BOCHS)
+return bochsvga_save_state(seg, data, states);
+return stdvga_save_state(seg, data, states);
+}
+
+int vgahw_restore_state(u16 seg, void *data, int states)
+{
+if (CONFIG_VGA_CIRRUS)
+return clext_restore_state(seg, data, states);
+if (CONFIG_VGA_BOCHS)
+return bochsvga_restore_state(seg, data, states);
+return stdvga_restore_state(seg, data, states);
+}
+
diff --git a/vgasrc/vgahw.h b

[SeaBIOS] [PATCH 0/3] runtime hardware detection series.

2012-02-08 Thread Gerd Hoffmann
  Hi,

Next round, this time introducing a CONFIG_VGA_QEMU and doing the
hardware detection for qemu-emulated hardware only.  Also clarifies
Kconfig (cirrus is for emulated hardware only) as side effect.

cheers,
  Gerd

Gerd Hoffmann (3):
  vga: move code to vgahw.c
  vga: add pci hardware detection
  vga: add isa hardware detection

 Makefile  |2 +-
 vgasrc/Kconfig|   12 +--
 vgasrc/bochsvga.c |8 ++
 vgasrc/bochsvga.h |1 +
 vgasrc/clext.c|6 ++
 vgasrc/clext.h|1 +
 vgasrc/vgabios.c  |2 +-
 vgasrc/vgahw.c|  199 +
 vgasrc/vgahw.h|  151 +---
 9 files changed, 253 insertions(+), 129 deletions(-)
 create mode 100644 vgasrc/vgahw.c


___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


[SeaBIOS] [PATCH 2/3] vga: add pci hardware detection

2012-02-08 Thread Gerd Hoffmann
Add support for pci hardware detection (using pci id lookup), so we can
create a unified rom with support for different pieces of hardware.

Signed-off-by: Gerd Hoffmann 
---
 vgasrc/Kconfig   |   12 ++
 vgasrc/vgabios.c |2 +-
 vgasrc/vgahw.c   |  114 +++---
 vgasrc/vgahw.h   |   17 
 4 files changed, 105 insertions(+), 40 deletions(-)

diff --git a/vgasrc/Kconfig b/vgasrc/Kconfig
index 881e9ec..e011238 100644
--- a/vgasrc/Kconfig
+++ b/vgasrc/Kconfig
@@ -15,15 +15,11 @@ menu "VGA ROM"
 help
 Build basic VGA BIOS support.
 
-config VGA_CIRRUS
-bool "QEMU Cirrus CLGD 54xx VGA BIOS"
+config VGA_QEMU
+bool "QEMU VGA BIOS"
 help
-Build support for Cirrus VGA emulation.
-
-config VGA_BOCHS
-bool "Bochs DISPI interface VGA BIOS"
-help
-Build support for Bochs DISPI interface.
+Build VGA BIOS for QEMU.  This builds a unified BIOS,
+supporting both bochs vga interface and cirrus vga emulation.
 
 config VGA_GEODEGX2
 bool "GeodeGX2 interface VGA BIOS"
diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c
index 7b6c50a..a1cf11a 100644
--- a/vgasrc/vgabios.c
+++ b/vgasrc/vgabios.c
@@ -1001,7 +1001,7 @@ handle_1012XX(struct bregs *regs)
 static void
 handle_1012(struct bregs *regs)
 {
-if (CONFIG_VGA_CIRRUS && regs->bl >= 0x80) {
+if (HAVE_VGA_CIRRUS && regs->bl >= 0x80) {
 clext_1012(regs);
 return;
 }
diff --git a/vgasrc/vgahw.c b/vgasrc/vgahw.c
index 65afeb1..03d8757 100644
--- a/vgasrc/vgahw.c
+++ b/vgasrc/vgahw.c
@@ -1,28 +1,57 @@
 #include "vgahw.h"
+#include "config.h" // CONFIG_*
+#include "util.h" // dprintf
+#include "biosvar.h" // GET_GLOBAL
+#include "pci.h" // pci_config_readw
+#include "pci_regs.h" // PCI_VENDOR_ID
+#include "vgabios.h" // VgaBDF
+
+enum qemu_vga_type qemu_vga_type VAR16;
+
+struct qemu_pci_table {
+u16 vid;
+u16 did;
+char *name;
+enum qemu_vga_type type;
+};
+
+static struct qemu_pci_table hwtab[] VAR16 = {
+{
+.vid  = 0x1013,
+.did  = 0x00b8,
+.name = "cirrus",
+.type = VGA_TYPE_CIRRUS,
+},{
+.vid  = 0x1234,
+.did  = 0x,
+.name = "std",
+.type = VGA_TYPE_BOCHS,
+}
+};
 
 struct vgamode_s *vgahw_find_mode(int mode)
 {
-if (CONFIG_VGA_CIRRUS)
+if (HAVE_VGA_CIRRUS)
 return clext_find_mode(mode);
-if (CONFIG_VGA_BOCHS)
+if (HAVE_VGA_BOCHS)
 return bochsvga_find_mode(mode);
 return stdvga_find_mode(mode);
 }
 
 int vgahw_set_mode(struct vgamode_s *vmode_g, int flags)
 {
-if (CONFIG_VGA_CIRRUS)
+if (HAVE_VGA_CIRRUS)
 return clext_set_mode(vmode_g, flags);
-if (CONFIG_VGA_BOCHS)
+if (HAVE_VGA_BOCHS)
 return bochsvga_set_mode(vmode_g, flags);
 return stdvga_set_mode(vmode_g, flags);
 }
 
 void vgahw_list_modes(u16 seg, u16 *dest, u16 *last)
 {
-if (CONFIG_VGA_CIRRUS)
+if (HAVE_VGA_CIRRUS)
 clext_list_modes(seg, dest, last);
-else if (CONFIG_VGA_BOCHS)
+else if (HAVE_VGA_BOCHS)
 bochsvga_list_modes(seg, dest, last);
 else
 stdvga_list_modes(seg, dest, last);
@@ -30,10 +59,34 @@ void vgahw_list_modes(u16 seg, u16 *dest, u16 *last)
 
 int vgahw_init(void)
 {
-if (CONFIG_VGA_CIRRUS)
-return clext_init();
-if (CONFIG_VGA_BOCHS)
-return bochsvga_init();
+if (CONFIG_VGA_QEMU) {
+if (CONFIG_VGA_PCI) {
+u16 bdf = GET_GLOBAL(VgaBDF);
+u16 vid = pci_config_readw(bdf, PCI_VENDOR_ID);
+u16 did = pci_config_readw(bdf, PCI_DEVICE_ID);
+int i;
+
+for (i = 0; i < ARRAY_SIZE(hwtab); i++) {
+if (GET_GLOBAL(hwtab[i].vid) == vid &&
+GET_GLOBAL(hwtab[i].did) == did) {
+dprintf(1, "vgahw: detected qemu %s vga [pci %04x:%04x]\n",
+GET_GLOBAL(hwtab[i].name), vid, did);
+SET_VGA(qemu_vga_type, GET_GLOBAL(hwtab[i].type));
+break;
+}
+}
+}
+
+if (GET_GLOBAL(qemu_vga_type) == VGA_TYPE_UNDEFINED) {
+SET_VGA(qemu_vga_type, VGA_TYPE_STDVGA);
+dprintf(1, "vgahw: no known hardware found, using stdvga\n");
+}
+if (HAVE_VGA_CIRRUS)
+return clext_init();
+if (HAVE_VGA_BOCHS)
+return bochsvga_init();
+}
+
 if (CONFIG_VGA_GEODEGX2 || CONFIG_VGA_GEODELX)
 return geodevga_init();
 return stdvga_init();
@@ -41,96 +94,95 @@ int vgahw_init(void)
 
 int vgahw_get_window(struct vgamode_s *vmode_g, int window)
 {
-if (CONFIG_VGA_CIRRUS)
+if (HAVE_VGA_CIRRUS)
 return clext_get_window(vmode_g, window);
-if (CONFIG_VGA_BOCHS)
+if (HAVE_VGA_BOCHS)
 return bochsvga_get_window(

[SeaBIOS] [PATCH 3/3] vga: add isa hardware detection

2012-02-08 Thread Gerd Hoffmann
Try to find isa vga cards in case pci probe found nothing.

Signed-off-by: Gerd Hoffmann 
---
 vgasrc/bochsvga.c |8 
 vgasrc/bochsvga.h |1 +
 vgasrc/clext.c|6 ++
 vgasrc/clext.h|1 +
 vgasrc/vgahw.c|   11 +++
 5 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/vgasrc/bochsvga.c b/vgasrc/bochsvga.c
index 2a8aeb1..f44588f 100644
--- a/vgasrc/bochsvga.c
+++ b/vgasrc/bochsvga.c
@@ -391,3 +391,11 @@ bochsvga_init(void)
 
 return 0;
 }
+
+int
+bochsvga_isa_probe(void)
+{
+dispi_write(VBE_DISPI_INDEX_ID, VBE_DISPI_ID0);
+return dispi_read(VBE_DISPI_INDEX_ID) == VBE_DISPI_ID0;
+}
+
diff --git a/vgasrc/bochsvga.h b/vgasrc/bochsvga.h
index 1c98203..f946e9f 100644
--- a/vgasrc/bochsvga.h
+++ b/vgasrc/bochsvga.h
@@ -67,5 +67,6 @@ int bochsvga_save_state(u16 seg, void *data, int states);
 int bochsvga_restore_state(u16 seg, void *data, int states);
 int bochsvga_set_mode(struct vgamode_s *vmode_g, int flags);
 int bochsvga_init(void);
+int bochsvga_isa_probe(void);
 
 #endif // bochsvga.h
diff --git a/vgasrc/clext.c b/vgasrc/clext.c
index 7d1a604..ad6f471 100644
--- a/vgasrc/clext.c
+++ b/vgasrc/clext.c
@@ -637,3 +637,9 @@ clext_init(void)
 
 return 0;
 }
+
+int
+clext_isa_probe(void)
+{
+return cirrus_check();
+}
diff --git a/vgasrc/clext.h b/vgasrc/clext.h
index 78dba01..185e1d5 100644
--- a/vgasrc/clext.h
+++ b/vgasrc/clext.h
@@ -18,5 +18,6 @@ int clext_set_mode(struct vgamode_s *vmode_g, int flags);
 struct bregs;
 void clext_1012(struct bregs *regs);
 int clext_init(void);
+int clext_isa_probe(void);
 
 #endif // clext.h
diff --git a/vgasrc/vgahw.c b/vgasrc/vgahw.c
index 03d8757..a91a47c 100644
--- a/vgasrc/vgahw.c
+++ b/vgasrc/vgahw.c
@@ -78,9 +78,20 @@ int vgahw_init(void)
 }
 
 if (GET_GLOBAL(qemu_vga_type) == VGA_TYPE_UNDEFINED) {
+if (clext_isa_probe()) {
+SET_VGA(qemu_vga_type, VGA_TYPE_CIRRUS);
+dprintf(1, "vgahw: detected qemu cirrus vga [isa]\n");
+} else if (bochsvga_isa_probe()) {
+SET_VGA(qemu_vga_type, VGA_TYPE_BOCHS);
+dprintf(1, "vgahw: detected qemu bochs vga [isa]\n");
+}
+}
+
+if (GET_GLOBAL(qemu_vga_type) == VGA_TYPE_UNDEFINED) {
 SET_VGA(qemu_vga_type, VGA_TYPE_STDVGA);
 dprintf(1, "vgahw: no known hardware found, using stdvga\n");
 }
+
 if (HAVE_VGA_CIRRUS)
 return clext_init();
 if (HAVE_VGA_BOCHS)
-- 
1.7.1


___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] seabios build failure in xen tree

2012-02-08 Thread Christoph Egger

On 02/08/12 02:18, Kevin O'Connor wrote:

On Tue, Feb 07, 2012 at 02:35:11PM +0100, Christoph Egger wrote:


Adding seabios ML.

On 01/26/12 16:06, Ian Campbell wrote:

On Thu, 2012-01-26 at 15:01 +, Christoph Egger wrote:

On 01/26/12 15:51, Ian Campbell wrote:

On Thu, 2012-01-26 at 14:35 +, Christoph Egger wrote:

gmake[6]: Entering directory tools/firmware/seabios-dir-remote
  Building ld scripts (version "1.6.3.1-20120126_152501")
env: python: No such file or directory
gmake[6]: *** [out/romlayout16.lds] Error 127


The python scripts must be invoked with $(PYTHON) as done
throughout the build system.


We can change the seabios makefile to call these scripts with an
explicit $(PYTHON).


Awesome!


However, it's odd that there isn't a default python on your system.

[...]

What python version does SeaBIOS require?
I have python 2.5 installed.


It should work with python 2.5 - there's nothing really special going
on in the script.


I manually created a python symlink to that version and then I get
this failure:

gmake[6]: Entering directory 'tools/firmware/seabios-dir-remote'
   Building ld scripts (version "1.6.3.1-20120127_151243")
Fixed space: 0xe05b-0x1  total: 8101  slack: 5 Percent slack: 0.1%
16bit size:   46336
32bit segmented size: 2005
32bit flat size:  14699
32bit flat init size: 53888
Traceback (most recent call last):
   File "./tools/layoutrom.py", line 579, in
 main()
   File "./tools/layoutrom.py", line 576, in main
 writeLinkerScripts(sections, entrysym, genreloc, out16,
out32seg, out32flag)
   File "./tools/layoutrom.py", line 257, in writeLinkerScripts
 + COMMONTRAILER
TypeError: int argument required


That's quite odd.  This looks data related instead of python related.
Try running a "make clean" and then "make" in just the seabios
directory.  If you still see an issue, tar up the seabios "out/"
directory and mail it to me.


It failed the same way.
I sent you the tarball offlist due its size.

Christoph


--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632


___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] ImageMagick-based SeaBIOS logo generation script

2012-02-08 Thread Fred .
Kevin wanted the logo to be generated using scripted free and libre tools.
ImageMagick is scripted and free.
What else can I use?

On Wed, Feb 8, 2012 at 11:51 AM, Fred .  wrote:
> Well, then just execute the file and have it generate the jpg, and
> then put the jpg file in the source tree.
> ImageMagick is shipped by default on Ubuntu.
>
> On Wed, Feb 8, 2012 at 8:19 AM, Gleb Natapov  wrote:
>> On Tue, Feb 07, 2012 at 07:59:04PM +0100, Fred . wrote:
>>> Please put this file in the repository. I don't know, but somewhere.
>>> So it outputs a bootsplash.jpg file to wherever SeaBIOS is looking for
>>> that file.
>>>
>>> #!/bin/sh
>>> convert -background black \
>>>         -font /usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf \
>> This file is hardly available on all machines where this script might
>> run.
>>
>>>         -pointsize 96 -size 320x480 \
>>>         -gravity East -fill '#2078cb' label:'Sea' \
>>>         -gravity West -fill white     label:'BIOS' \
>>>         +append bootsplash.jpg
>>
>>
>>> ___
>>> SeaBIOS mailing list
>>> SeaBIOS@seabios.org
>>> http://www.seabios.org/mailman/listinfo/seabios
>>
>>
>> --
>>                        Gleb.

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] ImageMagick-based SeaBIOS logo generation script

2012-02-08 Thread Fred .
Well, then just execute the file and have it generate the jpg, and
then put the jpg file in the source tree.
ImageMagick is shipped by default on Ubuntu.

On Wed, Feb 8, 2012 at 8:19 AM, Gleb Natapov  wrote:
> On Tue, Feb 07, 2012 at 07:59:04PM +0100, Fred . wrote:
>> Please put this file in the repository. I don't know, but somewhere.
>> So it outputs a bootsplash.jpg file to wherever SeaBIOS is looking for
>> that file.
>>
>> #!/bin/sh
>> convert -background black \
>>         -font /usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf \
> This file is hardly available on all machines where this script might
> run.
>
>>         -pointsize 96 -size 320x480 \
>>         -gravity East -fill '#2078cb' label:'Sea' \
>>         -gravity West -fill white     label:'BIOS' \
>>         +append bootsplash.jpg
>
>
>> ___
>> SeaBIOS mailing list
>> SeaBIOS@seabios.org
>> http://www.seabios.org/mailman/listinfo/seabios
>
>
> --
>                        Gleb.

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios