The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)
SDK on VirtualBox/Design
 (Initial draft)  | 
			 (path details)  | 
			||
| Line 19: | Line 19: | ||
* Other source directory trees  | * Other source directory trees  | ||
| − | There are 3 shared folders.  | + | === current ===  | 
| + | |||
| + | There are 3 shared folders at the moment.  | ||
mersdk:/etc/mersdk is mapped to the SailfishOS application areas mersdk folder and contains: configuration, targets and the ssh keys    | mersdk:/etc/mersdk is mapped to the SailfishOS application areas mersdk folder and contains: configuration, targets and the ssh keys    | ||
| Line 26: | Line 28: | ||
srcN:/home/srcN are each mapped to source directory areas on the host  | srcN:/home/srcN are each mapped to source directory areas on the host  | ||
| + | |||
| + | === planned ===  | ||
| + | |||
| + | The upcoming SDK will have 4 shared folders on the Engine and 2 on the Emulator:  | ||
| + | |||
| + | * ./vmshare is shared as 'config' to MerSDK and emulators mounted under /etc/mersdk/share  | ||
| + | |||
| + |  ./vmshare/ssh/private_keys/*/	private keys to ssh to emulator and SDK  | ||
| + |  ./vmshare/devices.xml		device description/config  | ||
| + | |||
| + | * ./mersdk/targets is shared as 'targets' to MerSDK mounted under /host_targets/  | ||
| + | |||
| + |  ./mersdk/targets/*/		Targets  | ||
| + |  ./mersdk/targets/targets.xml	Target description  | ||
| + | |||
| + | * ./mersdk/ssh is shared as 'ssh' to MerSDK mounted under /etc/sshd/authorized_keys  | ||
| + | |||
| + |  ./mersdk/ssh/*/ 		authorized_keys for sshd  | ||
| + | |||
| + | * ./emulator/1/ssh is shared as 'ssh' to MerSDK mounted under /etc/sshd/authorized_keys  | ||
| + | |||
| + |  ./emulator/1/ssh/*/ 		authorized_keys for sshd  | ||
| + | |||
| + | |||
| + | Additional src dir mappings will look like this:  | ||
| + | |||
| + | * QtCreator asks for a shared src path  | ||
| + | |||
| + | * Runs:  | ||
| + |  VBoxManage sharedfolder add MerSDK src<N> --hostpath <path>  | ||
| + | |||
| + | * Also adds the path to:  | ||
| + |  ./share/qtcreator/MerProject/QtCreator.ini at MerSDK/SharedSrc<N>  | ||
| + | |||
| + | * Then run sdk-manage --srcdir --add 1  | ||
| + | * This adds and mounts a mountpoint (systemd) change --add to --remove to remove  | ||
| + | |||
| + | * The current version of scripts in sdk-utils/sdk-vm assumes these paths  | ||
== Networking ==  | == Networking ==  | ||
| Line 52: | Line 92: | ||
   <device name="Nemo N9" type="real">  |    <device name="Nemo N9" type="real">  | ||
    <ip>192.168.0.12</ip>  |     <ip>192.168.0.12</ip>  | ||
| − |     <sshkeypath></sshkeypath>  | + |     <sshkeypath></sshkeypath> <!-- relative to this XML file? -->  | 
   </device>  |    </device>  | ||
   <device name="SailfishOS Emulator" type="vbox">  |    <device name="SailfishOS Emulator" type="vbox">  | ||
Revision as of 13:47, 3 June 2013
Contents | 
Overview
The virtualised SDK architecture supports multiple devices and emulators with a single Build Engine.
The main components are:
- Build Engine
 - Qt Creator
 - Virtualbox Emulator(s)
 - Physical device(s)
 
Shared folders are used for sharing:
- Configuration
 - SSH keys
 - Home directory
 - Targets
 - Other source directory trees
 
current
There are 3 shared folders at the moment.
mersdk:/etc/mersdk is mapped to the SailfishOS application areas mersdk folder and contains: configuration, targets and the ssh keys
home:/home/mersdk is mapped to the users 'home' directory
srcN:/home/srcN are each mapped to source directory areas on the host
planned
The upcoming SDK will have 4 shared folders on the Engine and 2 on the Emulator:
- ./vmshare is shared as 'config' to MerSDK and emulators mounted under /etc/mersdk/share
 
./vmshare/ssh/private_keys/*/ private keys to ssh to emulator and SDK ./vmshare/devices.xml device description/config
- ./mersdk/targets is shared as 'targets' to MerSDK mounted under /host_targets/
 
./mersdk/targets/*/ Targets ./mersdk/targets/targets.xml Target description
- ./mersdk/ssh is shared as 'ssh' to MerSDK mounted under /etc/sshd/authorized_keys
 
./mersdk/ssh/*/ authorized_keys for sshd
- ./emulator/1/ssh is shared as 'ssh' to MerSDK mounted under /etc/sshd/authorized_keys
 
./emulator/1/ssh/*/ authorized_keys for sshd
Additional src dir mappings will look like this:
- QtCreator asks for a shared src path
 
- Runs:
 
VBoxManage sharedfolder add MerSDK src<N> --hostpath <path>
- Also adds the path to:
 
./share/qtcreator/MerProject/QtCreator.ini at MerSDK/SharedSrc<N>
- Then run sdk-manage --srcdir --add 1
 - This adds and mounts a mountpoint (systemd) change --add to --remove to remove
 
- The current version of scripts in sdk-utils/sdk-vm assumes these paths
 
Networking
Overview
The SDK network serves the following purposes:
- Host -> Build Engine for ssh/web
 - Host -> Emulator for ssh/debugging
 - Host -> Device for ssh/debugging
 - Build Engine -> internet for updates and information
 - Build Engine -> Device with ssh to support deployment
 - Emulator -> internet for updates and information
 - Build Engine -> Emulator with ssh to support deployment
 
To do this the Emulator and Build Engine will have 2 network adaptors. An adaptor running in NAT mode allows open outbound access and permits some incoming connections (ssh, www and gdb). This also handles Engine > Device connectivity. Another adaptor is a VirtualBox internal adaptor and supports open Build Engine <> Emulator(s) connectivity.
QtCreator and the Build Engine need to collaborate to setup the Emulator internal networking.
<devices> <engine name="Mer SDK" type="vbox"> <subnet>10.220.220</subnet </engine> <device name="Nemo N9" type="real"> <ip>192.168.0.12</ip> <sshkeypath></sshkeypath> </device> <device name="SailfishOS Emulator" type="vbox"> <index>2</index> <subnet>10.220.220</subnet> <sshkeypath></sshkeypath> <mac>08:00:27:7C:A1:AF</mac> </device> </devices>