[PATCH 2/2] i386/pc386: default graphics driver changed from VGA to VESA based

Jan Dolezal dolezj21 at fel.cvut.cz
Tue May 19 14:34:58 UTC 2015


basic VGA driver can be enabled during configure phase by exporting variable
USE_VGA=1 so that it is available in configure environment
cirrus driver is enabled the same way by exporting variable
USE_CIRRUS_GD5446=1
---
 c/src/lib/libbsp/i386/pc386/Makefile.am   | 12 +++++-----
 c/src/lib/libbsp/i386/pc386/configure.ac  | 38 +++++++++++++++++++------------
 c/src/lib/libbsp/i386/pc386/preinstall.am |  2 --
 3 files changed, 29 insertions(+), 23 deletions(-)

diff --git a/c/src/lib/libbsp/i386/pc386/Makefile.am b/c/src/lib/libbsp/i386/pc386/Makefile.am
index 1da40f2..0f893c6 100644
--- a/c/src/lib/libbsp/i386/pc386/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/Makefile.am
@@ -96,17 +96,17 @@ libbsp_a_SOURCES += console/vt.c
 libbsp_a_SOURCES += console/videoAsm.S
 libbsp_a_SOURCES += console/kbd_parser.c
 libbsp_a_SOURCES += console/vgacons.c
+if USE_VGA
+libbsp_a_SOURCES += console/fb_vga.c
+endif
+if USE_CIRRUS_GD5446
+libbsp_a_SOURCES += console/fb_cirrus.c
+endif
 if USE_VBE_RM
 include_bsp_HEADERS += include/vbe3.h
 include_HEADERS += include/edid.h
 include_bsp_HEADERS += include/fb_vesa.h
 libbsp_a_SOURCES += console/fb_vesa_rm.c
-else
-if USE_CIRRUS_GD5446
-libbsp_a_SOURCES += console/fb_cirrus.c
-else
-libbsp_a_SOURCES += console/fb_vga.c
-endif
 endif
 endif
 
diff --git a/c/src/lib/libbsp/i386/pc386/configure.ac b/c/src/lib/libbsp/i386/pc386/configure.ac
index f8855ee..469d5f5 100644
--- a/c/src/lib/libbsp/i386/pc386/configure.ac
+++ b/c/src/lib/libbsp/i386/pc386/configure.ac
@@ -99,21 +99,8 @@ RTEMS_BSPOPTS_HELP([CLOCK_DRIVER_USE_8254],
  - you do not mind adding roughly 5 microseconds to each context switch.
 ])
 
-RTEMS_BSPOPTS_SET([USE_CIRRUS_GD5446],[*],[0])
-RTEMS_BSPOPTS_HELP([USE_CIRRUS_GD5446],
-[If defined, enable use of the Cirrus GD5446 controller rather than the very basic
- VGA driver for frame buffer support.
-
- NOTE: This has only been tested on Qemu.])
-AM_CONDITIONAL(USE_CIRRUS_GD5446,test "$USE_CIRRUS_GD5446" = "1")
-
-RTEMS_BSPOPTS_SET([USE_VBE_RM],[*],[0])
-RTEMS_BSPOPTS_HELP([USE_VBE_RM],
-[If defined, enables use of the Vesa Bios Extensions - real mode interface,
- which enables graphical mode and introduce it upon bootup.])
-AM_CONDITIONAL(USE_VBE_RM,test "$USE_VBE_RM" = "1")
-
-if test "${USE_VBE_RM}" = "1" ; then
+if test "${USE_CIRRUS_GD5446}" != "1" -a "${USE_VGA}" != "1"; then
+  USE_VBE_RM=1;
   if test -z "${NUM_APP_DRV_GDT_DESCRIPTORS}"; then
       NUM_APP_DRV_GDT_DESCRIPTORS=2 ;
   else
@@ -125,6 +112,27 @@ RTEMS_BSPOPTS_HELP([NUM_APP_DRV_GDT_DESCRIPTORS],
 [Defines how many descriptors in GDT may be allocated for application or
  driver usage.])
 
+RTEMS_BSPOPTS_SET([USE_CIRRUS_GD5446],[*],[0])
+RTEMS_BSPOPTS_HELP([USE_CIRRUS_GD5446],
+[If defined, enables use of the Cirrus GD5446 controller rather than the
+ controller utilizing Vesa Bios Extensions - real mode interface.
+
+ NOTE: This has only been tested on Qemu.])
+AM_CONDITIONAL(USE_CIRRUS_GD5446,test "$USE_CIRRUS_GD5446" = "1")
+
+RTEMS_BSPOPTS_SET([USE_VGA],[*],[0])
+RTEMS_BSPOPTS_HELP([USE_VGA],
+[If defined, enables use of the very basic VGA driver for framebuffer support
+ rather than the controller utilizing Vesa Bios Extensions - real mode
+ interface.])
+AM_CONDITIONAL(USE_VGA,test "$USE_VGA" = "1")
+
+RTEMS_BSPOPTS_SET([USE_VBE_RM],[*],[0])
+RTEMS_BSPOPTS_HELP([USE_VBE_RM],
+[Defined by default. Enables use of the Vesa Bios Extensions - real mode
+ interface, which enables graphical mode and introduce it upon bootup.])
+AM_CONDITIONAL(USE_VBE_RM,test "$USE_VBE_RM" = "1")
+
 if test X${CLOCK_DRIVER_USE_TSC} = X1 -a X${CLOCK_DRIVER_USE_8254} = X1 ; then
   AC_MSG_ERROR([pc386 both TSC and 8254 specified for clock driver])
 fi
diff --git a/c/src/lib/libbsp/i386/pc386/preinstall.am b/c/src/lib/libbsp/i386/pc386/preinstall.am
index 5305fbe..6d87f3a 100644
--- a/c/src/lib/libbsp/i386/pc386/preinstall.am
+++ b/c/src/lib/libbsp/i386/pc386/preinstall.am
@@ -152,8 +152,6 @@ PREINSTALL_FILES += $(PROJECT_INCLUDE)/edid.h
 $(PROJECT_INCLUDE)/bsp/fb_vesa.h: include/fb_vesa.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/fb_vesa.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/fb_vesa.h
-
-else
 endif
 endif
 $(PROJECT_INCLUDE)/i386_io.h: ../../i386/shared/comm/i386_io.h $(PROJECT_INCLUDE)/$(dirstamp)
-- 
1.9.1




More information about the devel mailing list