Changeset 607c854 in rtems


Ignore:
Timestamp:
Dec 11, 2014, 8:49:49 PM (5 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
93546b8
Parents:
86364e8
git-author:
Joel Sherrill <joel.sherrill@…> (12/11/14 20:49:49)
git-committer:
Joel Sherrill <joel.sherrill@…> (01/04/15 19:44:56)
Message:

pc386: Add BSP_ENABLE_VGA BSP option

This allows the VGA and keyboard console to be completely disabled.
It is useful on PCs without displays and prevents a very slow boot
time on the Intel Edison.

Location:
c/src/lib/libbsp/i386/pc386
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/Makefile.am

    r86364e8 r607c854  
    7575
    7676include_rtemsdir = $(includedir)/rtems
    77 include_rtems_HEADERS = console/keyboard.h
     77include_rtems_HEADERS  =
     78
     79if RTEMS_VGA
     80include_rtems_HEADERS += console/keyboard.h
    7881include_rtems_HEADERS += console/kd.h
    7982include_rtems_HEADERS += console/ps2_drv.h
    8083include_rtems_HEADERS += ../../shared/console_private.h
    8184include_rtems_HEADERS += console/vgacons.h
    82 
    83 include_HEADERS += ../../i386/shared/comm/i386_io.h
    84 # console
    8585libbsp_a_SOURCES += console/inch.c
    8686libbsp_a_SOURCES += console/outch.c
     
    9393libbsp_a_SOURCES += console/videoAsm.S
    9494libbsp_a_SOURCES += console/kbd_parser.c
     95libbsp_a_SOURCES += console/vgacons.c
     96if USE_VBE_RM
     97include_bsp_HEADERS += include/vbe3.h
     98include_HEADERS += include/edid.h
     99include_bsp_HEADERS += include/fb_vesa.h
     100libbsp_a_SOURCES += console/fb_vesa_rm.c
     101else
     102if USE_CIRRUS_GD5446
     103libbsp_a_SOURCES += console/fb_cirrus.c
     104else
     105libbsp_a_SOURCES += console/fb_vga.c
     106endif
     107endif
     108endif
     109
     110# console (non-graphics support)
     111include_HEADERS += ../../i386/shared/comm/i386_io.h
    95112libbsp_a_SOURCES += console/serial_mouse_config.c
    96113libbsp_a_SOURCES += ../../i386/shared/comm/uart.c
     
    104121libbsp_a_SOURCES += console/conscfg.c
    105122libbsp_a_SOURCES += console/printk_support.c
    106 libbsp_a_SOURCES += console/vgacons.c
    107123libbsp_a_SOURCES += console/exar17d15x.c
    108124libbsp_a_SOURCES += console/rtd316.c
    109 if USE_VBE_RM
    110 include_bsp_HEADERS += include/vbe3.h
    111 include_HEADERS += include/edid.h
    112 include_bsp_HEADERS += include/fb_vesa.h
    113 libbsp_a_SOURCES += console/fb_vesa_rm.c
    114 else
    115 if USE_CIRRUS_GD5446
    116 libbsp_a_SOURCES += console/fb_cirrus.c
    117 else
    118 libbsp_a_SOURCES += console/fb_vga.c
    119 endif
    120 endif
    121125
    122126# gdb
  • c/src/lib/libbsp/i386/pc386/configure.ac

    r86364e8 r607c854  
    1717RTEMS_CHECK_NETWORKING
    1818RTEMS_CHECK_SMP
     19
     20RTEMS_BSPOPTS_SET([BSP_ENABLE_VGA],[*],[1])
     21RTEMS_BSPOPTS_HELP([BSP_ENABLE_VGA],
     22[Set if the VGA and keyboard console support is enabled.])
     23AM_CONDITIONAL(RTEMS_VGA,[test "$BSP_ENABLE_VGA" = "1"])
    1924
    2025RTEMS_BSPOPTS_SET([USE_COM1_AS_CONSOLE],[*],[0])
  • c/src/lib/libbsp/i386/pc386/console/conscfg.c

    r86364e8 r607c854  
    1919#include <libchip/serial.h>
    2020#include <libchip/ns16550.h>
     21#if BSP_ENABLE_VGA
    2122#include "vgacons.h"
     23#endif
    2224#include <bsp/irq.h>
    2325#include <rtems/pci.h>
    2426#include <bsp/rtd316.h>
    2527
     28#if BSP_ENABLE_VGA
    2629#define VGA_CONSOLE_FUNCTIONS  &vgacons_fns
     30#endif
     31
    2732#if 0
    2833#define COM_CONSOLE_FUNCTIONS  &ns16550_fns_polled
     
    5560
    5661console_tbl     Console_Configuration_Ports[] = {
     62#if BSP_ENABLE_VGA
    5763  {
    5864    "/dev/vgacons",                        /* sDeviceName */
     
    7480    0x0                                     /* ulIntVector -- base for port */
    7581  },
     82#endif
    7683  {
    7784    "/dev/com1",                           /* sDeviceName */
  • c/src/lib/libbsp/i386/pc386/console/console_control.c

    r86364e8 r607c854  
    2727#include <libchip/serial.h>
    2828#include <rtems/mouse_parser.h>
     29#if BSP_ENABLE_VGA
    2930#include "keyboard.h"
     31#endif
    3032#include "../../../shared/console_private.h"
    3133
     
    4143)
    4244{
     45#if BSP_ENABLE_VGA
    4346  rtems_libio_ioctl_args_t *args = arg;
    4447
     
    6164  args->ioctl_return = 0;
    6265  return RTEMS_SUCCESSFUL;
     66#else
     67  return rtems_termios_ioctl (arg);
     68#endif
    6369}
  • c/src/lib/libbsp/i386/pc386/console/printk_support.c

    r86364e8 r607c854  
    2020#include <rtems.h>
    2121#include <rtems/bspIo.h>
    22 #include <rtems/keyboard.h>
     22#if BSP_ENABLE_VGA
     23  #include <rtems/keyboard.h>
     24#endif
    2325#include <bsp.h>
    2426#include <libchip/serial.h>
     
    3739void BSP_outch(char ch)
    3840{
    39   if ( BSPPrintkPort == BSP_CONSOLE_VGA ) {
    40     _IBMPC_outch( ch );
    41   } else {
    42     console_tbl *cptr;
     41  #if BSP_ENABLE_VGA
     42    if ( BSPPrintkPort == BSP_CONSOLE_VGA ) {
     43      _IBMPC_outch( ch );
     44      return;
     45    }
     46  #endif
     47  console_tbl *cptr;
    4348
    44     cptr = &Console_Configuration_Ports[BSPPrintkPort];
    45     cptr->pDeviceFns->deviceWritePolled( BSPPrintkPort, ch );
    46   }
     49  cptr = &Console_Configuration_Ports[BSPPrintkPort];
     50  cptr->pDeviceFns->deviceWritePolled( BSPPrintkPort, ch );
    4751}
    4852
     
    5155  int           result;
    5256
    53   if ( BSPPrintkPort == BSP_CONSOLE_VGA ) {
    54     result = BSP_wait_polled_input();
    55   } else {
    56     do {
    57       result = ns16550_inbyte_nonblocking_polled( BSPPrintkPort );
    58     } while (result == -1);
    59   }
     57  #if BSP_ENABLE_VGA
     58    if ( BSPPrintkPort == BSP_CONSOLE_VGA ) {
     59      result = BSP_wait_polled_input();
     60    } else
     61  #endif
     62    {
     63      do {
     64        result = ns16550_inbyte_nonblocking_polled( BSPPrintkPort );
     65      } while (result == -1);
     66    }
    6067  return result;
    6168}
  • c/src/lib/libbsp/i386/pc386/preinstall.am

    r86364e8 r607c854  
    124124PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/$(dirstamp)
    125125
     126if RTEMS_VGA
    126127$(PROJECT_INCLUDE)/rtems/keyboard.h: console/keyboard.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
    127128        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/keyboard.h
     
    144145PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/vgacons.h
    145146
    146 $(PROJECT_INCLUDE)/i386_io.h: ../../i386/shared/comm/i386_io.h $(PROJECT_INCLUDE)/$(dirstamp)
    147         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/i386_io.h
    148 PREINSTALL_FILES += $(PROJECT_INCLUDE)/i386_io.h
    149 
    150147if USE_VBE_RM
    151148$(PROJECT_INCLUDE)/bsp/vbe3.h: include/vbe3.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     
    163160else
    164161endif
     162endif
     163$(PROJECT_INCLUDE)/i386_io.h: ../../i386/shared/comm/i386_io.h $(PROJECT_INCLUDE)/$(dirstamp)
     164        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/i386_io.h
     165PREINSTALL_FILES += $(PROJECT_INCLUDE)/i386_io.h
     166
    165167$(PROJECT_INCLUDE)/pcibios.h: ../../i386/shared/pci/pcibios.h $(PROJECT_INCLUDE)/$(dirstamp)
    166168        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/pcibios.h
  • c/src/lib/libbsp/i386/pc386/start/start.S

    r86364e8 r607c854  
    199199        stosl                           #   clear a long in the bss
    200200
     201#if BSP_ENABLE_VGA
    201202/*-------------------------------------------------------------------+
    202203| Initialize the video because zero_bss has cleared initVideo parameters
     
    208209#if USE_VBE_RM
    209210        call    vesa_realmode_bootup_init
     211#endif
    210212#endif
    211213
Note: See TracChangeset for help on using the changeset viewer.