Microwindows development under QEMU pc386

Pavel Pisa ppisa4lists at pikron.com
Wed Jun 20 17:31:06 UTC 2012


Hello Alex, Joel and all others,

there are some (mostly) good news how to move on track
with Nano-X/Microwindows development.
Alexandru-Sever Horin and I have independently tested
actual Microwindows (MWin) sources and have more issues there.

The main obstacle on pc386 platform is, that planar framebuffer
access is considered ancient history and only marginally
supported by actual GIT MWin sources. It worth to be checked
if it can be updated but for MWin and RTEMS development
the support for true-color display (usually TFT) on embedded
targets is most important.

But ability to test all code in emulator is important as well
and QEMU pc386 is the standard testbed for RTEMS development
in many cases and worth some effort.

QEMU offers not only dumb VGA emulation but even Cirrus GD5446
PCI display adapter emulation. It is used in most of the QEMU
setups. It can be used in planar mode with up to 4 MB framebuffer
with 8, 16, 24 and 32 bit depth truecolor pixel formats.

And followup patches provide required support on side
of git://git.rtems.org/rtems-testing.git and RTEMS core
pc386 console side. The Cirrus GD5446 driver (fb_cirrus.c)
provides alternative framebuffer driver which can be used together
with QEMU pc386 emulation. Code is based on original fb_vga.c
sources, knowledge GD5446 from datasheet and defines from Xorg,
FreeBSD has been used. The mode setup function has been partially
copied from equivalent Linux driver.

I have been able to compile and run some MWin demos with this
setup. There are some issues still (mouse cursor background
is clobbered). Butactual state should be enough to provide
base for Alex GSoC development.

Some remarks for testing

Used QEMU parameters

  path_to/pc386 -i -v -D src/bin/mtest

Line used to build MWin for pc386 RTEMS target

  ( cd src && make -f Makefile.rtems RTEMS_MAKEFILE_PATH=/opt/rtems4.11/i386-rtems4.11/pc686/ CONFIG=`pwd`/Configs/config.rtem
s "$@" )

There are some more issues with MWin. One is that more semaphores are required
to open mouse. Other is that MWin provided RTEMS application wrapper
requires tuning for actual RTEMS GIT sources. The diff containing unsorted
changes used in my tests is attached to this email.

Best wishes

                Pavel Pisa
    e-mail:     pisa at cmp.felk.cvut.cz
    www:        http://cmp.felk.cvut.cz/~pisa
    university: http://dce.fel.cvut.cz/
    company:    http://www.pikron.com/


diff --git a/src/Configs/config.rtems b/src/Configs/config.rtems
index b3a0cff..bd3b953 100644
--- a/src/Configs/config.rtems
+++ b/src/Configs/config.rtems
@@ -223,7 +223,7 @@ endif
 # .pcf.gz files, but it will add libz to the size of the server
 ####################################################################
 HAVE_PCF_SUPPORT         = Y
-HAVE_PCFGZ_SUPPORT       = Y
+HAVE_PCFGZ_SUPPORT       = N
 PCF_FONT_DIR             = "fonts/pcf"
 
 # Chinese Han Zi Ku loadable font support
@@ -415,6 +415,6 @@ HERCDRIVER               = N
 DBGDRIVER                = N
 
 # Mouse support
-SERMOUSE                 = Y
+SERMOUSE                 = N
 
 endif
diff --git a/src/demos/mwdvetest/Makefile b/src/demos/mwdvetest/Makefile
index a04612d..0c6aba6 100644
--- a/src/demos/mwdvetest/Makefile
+++ b/src/demos/mwdvetest/Makefile
@@ -56,7 +56,7 @@ include $(MW_DIR_SRC)/Makefile.rules
 
 ######################## Tools targets section ###############################
 
-$(MW_DIR_BIN)/mwdvetest: $(OBJS) $(MWINLIBS) $(CONFIG)
+$(MW_DIR_BIN)/mwdvetest: $(OBJS) $(CONFIG)
 	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(CCMWINLIBS)
 
 $(MW_DIR_BIN)/mwdvetest.res:
diff --git a/src/demos/mwin/Makefile b/src/demos/mwin/Makefile
index 369e7d3..52bb383 100644
--- a/src/demos/mwin/Makefile
+++ b/src/demos/mwin/Makefile
@@ -87,11 +87,11 @@ MWIN_DEMOS_WITH_NONSTANDARD_LINK := \
 MWIN_DEMOS_WITH_STANDARD_LINK := \
 	$(filter-out $(MWIN_DEMOS_WITH_NONSTANDARD_LINK),$(DEMOS))
 
-$(MWIN_DEMOS_WITH_STANDARD_LINK): $(MW_DIR_BIN)/%: $(MW_DIR_OBJ)/demos/mwin/%.o $(MWINLIBS) $(CONFIG)
+$(MWIN_DEMOS_WITH_STANDARD_LINK): $(MW_DIR_BIN)/%: $(MW_DIR_OBJ)/demos/mwin/%.o $(CONFIG)
 	@echo "Linking $(patsubst $(MW_DIR_BIN)/%,%,$@) ..."
 	$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(CCMWINLIBS)
 
-$(MW_DIR_BIN)/mine: $(MW_DIR_OBJ)/demos/mwin/mine.o $(MINEIMAGES) $(MWINLIBS) $(CONFIG)
+$(MW_DIR_BIN)/mine: $(MW_DIR_OBJ)/demos/mwin/mine.o $(MINEIMAGES) $(CONFIG)
 	@echo "Linking $(patsubst $(MW_DIR_BIN)/%,%,$@) ..."
 	$(CC) $(CFLAGS) $(LDFLAGS) $< $(MINEIMAGES) -o $@ $(CCMWINLIBS)
 
diff --git a/src/drivers/Objects.rules b/src/drivers/Objects.rules
index 4aa21dd..297826c 100644
--- a/src/drivers/Objects.rules
+++ b/src/drivers/Objects.rules
@@ -53,7 +53,7 @@ ifeq ($(ARCH), ECOS)
 MW_CORE_OBJS += $(MW_DIR_OBJ)/drivers/scr_ecos.o
 else
 ifeq ($(ARCH), RTEMS)
-MW_CORE_OBJS += $(MW_DIR_OBJ)/drivers/scr_rtems.o $(MW_DIR_OBJ)/drivers/romfont.o
+MW_CORE_OBJS += $(MW_DIR_OBJ)/drivers/scr_rtems.o $(MW_DIR_OBJ)/drivers/deprecated/romfont.o
 else
 MW_CORE_OBJS += $(MW_DIR_OBJ)/drivers/scr_fb.o
 endif
diff --git a/src/rtems/net_cfg.h b/src/rtems/net_cfg.h
index 1eca3e4..cd88ef4 100644
--- a/src/rtems/net_cfg.h
+++ b/src/rtems/net_cfg.h
@@ -22,6 +22,7 @@
 #include <bsp.h>
 #include <rtems/rtems_bsdnet.h>
 
+#if 0
 
 /*
  * Loopback interface
@@ -70,3 +71,5 @@ struct rtems_bsdnet_config rtems_bsdnet_config = {
 };
 
 #endif
+
+#endif
diff --git a/src/rtems/rtems_init.c b/src/rtems/rtems_init.c
index baf27ad..f41a301 100644
--- a/src/rtems/rtems_init.c
+++ b/src/rtems/rtems_init.c
@@ -38,6 +38,7 @@
 /* TBD: Find better way than this to deal with BSPs which do not have
  *      these driver entries.  This is a hacky cover up.
  */
+#if 0
 #ifndef PAUX_DRIVER_TABLE_ENTRY
   #define PAUX_DRIVER_TABLE_ENTRY NULL_DRIVER_TABLE_ENTRY
 #endif
@@ -47,6 +48,7 @@
 #ifndef SERIAL_MOUSE_DRIVER_TABLE_ENTRY
   #define SERIAL_MOUSE_DRIVER_TABLE_ENTRY NULL_DRIVER_TABLE_ENTRY
 #endif
+#endif
 
 /* TBD: For now assume there is a network configuration.  The default is
  *      loopback.  RTEMS has to have networking enabled but we don't have
@@ -147,7 +149,8 @@ void *POSIX_Init( void *argument )
  *  too high.
  */
 #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES              20
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES               32
+#define CONFIGURE_MAXIMUM_POSIX_MUTEXES               40
+#define CONFIGURE_MAXIMUM_SEMAPHORES                  40
 #define CONFIGURE_MAXIMUM_POSIX_THREADS               10
 #define CONFIGURE_MAXIMUM_TASKS                       10
 #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS      20
@@ -183,8 +186,9 @@ void *POSIX_Init( void *argument )
 #endif
 
 #define CONFIGURE_APPLICATION_EXTRA_DRIVERS \
-          TTY2_DRIVER_TABLE_ENTRY, \
           MOUSE_DRIVER
 
+//          TTY2_DRIVER_TABLE_ENTRY, \
+
 #define  CONFIGURE_INIT
 #include <rtems/confdefs.h>



More information about the devel mailing list