The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)
SDK on VirtualBox/Design
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
Notice that there may be multiple emulators so each one has an 'internal persistent DeviceID' (ie not something changeable and user visible like a name) A simple index will be enough - we can use the same index for the internal LAN (see below)
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.
Note the emulator 'index' is just a low value integer to support multiple emulator configurations.
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:5A:11:00:02</mac> </device> </devices>