Changes between Version 23 and Version 24 of Developer/VirtualMachines/VirtualBox


Ignore:
Timestamp:
Feb 6, 2018, 2:49:47 PM (20 months ago)
Author:
Tony Richardson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Developer/VirtualMachines/VirtualBox

    v23 v24  
    99This page describes two options for booting RTEMS - over the virtual network from a TFTP server or off of a virtual hard disk.
    1010
     11A solution for debugging RTEMS remotely through VirtualBox serial port is also described.
     12
    1113= Booting RTEMS over A Virtual Network =
    1214
    1315This page describes how to setup a “one click solution” for booting RTEMS in VirtualBox; if the RTEMS application gets updated, it is just a matter of rebooting the virtual machine to boot the new updated application.
    1416
    15 A solution for debugging RTEMS remotely through VirtualBox serial port is also described. = What we will need? =
     17 == What we will need? ==
    1618
    1719 * VirtualBox
    1820 * Etherboot
    1921 * Opentftp
    20  * Socat relay= Get Virtual Box =
     22
     23== Get Virtual Box ==
    2124
    2225The first step is to get and install VirtualBox.
     
    189192Now press "Get Image" and replace the old one in the virtual machine. Next Time you boot the virtual machine the booting process will be fully automated and will be no need for interaction.
    190193
    191 == Serial Port Access ==
    192 
    193 
    194 We can use the VirtualBox serial port for remote console or for debugging purposes. If your application is compiled with the RTEMS gdbstub you can remotely debug it from the gdb on your host computer.
    195 
    196 To achieve this we will need to activate the serial port in VirtualBox.'''Go to your virtual machine settings and choose “Serial Ports”. Enable the serial port as “COM1” with the Mode “Host Pipe”. Select create Pipe and select the place where to create the pipe (eg:/tmp/vboxsp)'''
    197 
    198 Now we will need to install socat. You can obtain it from [http://www.dest-unreach.org/socat/ here] or install from your disto’s repositories:
    199 
    200 {{{
    201 yum install socat
    202 }}}
    203 
    204 Now lets use socat to create a pseudo terminal. Run the Virtual Machine and open a terminal in your host. Issue the folowing command:
    205 
    206 {{{
    207 socat -d -d /tmp/vboxsp pty
    208 }}}
    209 
    210 You should obtain a output similar to the following one:
    211 
    212 {{{
    213 [root@cdcs testbed]# socat -d -d /tmp/vboxsp pty
    214 2010/06/10 15:08:54 socat[3331] N opening connection to AF=1 "/tmp/vboxsp"
    215 2010/06/10 15:08:54 socat[3331] N successfully connected from local address AF=1 "\xB@\xAE<\xA9\xB@\xAEA\xA9\xB@\xAEA\xA9\xB@\xAE,\xBA\x06\bB\xA9\xB@\xAE"
    216 2010/06/10 15:08:54 socat[3331] N successfully connected via
    217 2010/06/10 15:08:54 socat[3331] N PTY is /dev/pts/4
    218 2010/06/10 15:08:54 socat[3331] N starting data transfer loop with FDs [3,3] and [4,4]
    219 }}}
    220 
    221 Write down the PTY that outputted by socat; in this case /dev/pts/4.
    222 
    223 Now if your application has the RTEMS gdb stub you can start i386-rtems4.10-gdb and issue the following commands to start debugging the application remotely:
    224 
    225 {{{
    226 set remotebaud 115200
    227 target remote /dev/pts/4
    228 }}}
    229 
    230 You can also use socat to channel the serial port to a network connection(
    231 for connecting with telnet or similar):
    232 
    233 {{{
    234 socat UNIX-CONNECT:/tmp/vboxsp TCP-LISTEN:7777
    235 telnet localhost 7777
    236 }}}
    237 
    238 ==  Networking Applications  ==
    239 
    240 XXX: Determine if/how to run RTEMS network applications with the VirtualBox emulator.
    241194
    242195= Booting RTEMS from a Virtual Drive =
     
    436389This allows you to either boot RTEMS applications from the virtual disk or via TFTP.
    437390
    438    
    439    
    440    
     391= Serial Port Access =
     392
     393
     394We can use the VirtualBox serial port for remote console or for debugging purposes. If your application is compiled with the RTEMS gdbstub you can remotely debug it from the gdb on your host computer.
     395
     396To achieve this we will need to activate the serial port in VirtualBox.'''Go to your virtual machine settings and choose “Serial Ports”. Enable the serial port as “COM1” with the Mode “Host Pipe”. Select create Pipe and select the place where to create the pipe (eg:/tmp/vboxsp)'''
     397
     398Now we will need to install socat. You can obtain it from [http://www.dest-unreach.org/socat/ here] or install from your disto’s repositories:
     399
     400{{{
     401yum install socat
     402}}}
     403
     404Now lets use socat to create a pseudo terminal. Run the Virtual Machine and open a terminal in your host. Issue the folowing command:
     405
     406{{{
     407socat -d -d /tmp/vboxsp pty
     408}}}
     409
     410You should obtain a output similar to the following one:
     411
     412{{{
     413[root@cdcs testbed]# socat -d -d /tmp/vboxsp pty
     4142010/06/10 15:08:54 socat[3331] N opening connection to AF=1 "/tmp/vboxsp"
     4152010/06/10 15:08:54 socat[3331] N successfully connected from local address AF=1 "\xB@\xAE<\xA9\xB@\xAEA\xA9\xB@\xAEA\xA9\xB@\xAE,\xBA\x06\bB\xA9\xB@\xAE"
     4162010/06/10 15:08:54 socat[3331] N successfully connected via
     4172010/06/10 15:08:54 socat[3331] N PTY is /dev/pts/4
     4182010/06/10 15:08:54 socat[3331] N starting data transfer loop with FDs [3,3] and [4,4]
     419}}}
     420
     421Write down the PTY that outputted by socat; in this case /dev/pts/4.
     422
     423Now if your application has the RTEMS gdb stub you can start i386-rtems4.10-gdb and issue the following commands to start debugging the application remotely:
     424
     425{{{
     426set remotebaud 115200
     427target remote /dev/pts/4
     428}}}
     429
     430You can also use socat to channel the serial port to a network connection(
     431for connecting with telnet or similar):
     432
     433{{{
     434socat UNIX-CONNECT:/tmp/vboxsp TCP-LISTEN:7777
     435telnet localhost 7777
     436}}}
     437
     438=  Networking Applications  =
     439
     440XXX: Determine if/how to run RTEMS network applications with the VirtualBox emulator.
     441   
     442