diff options
author | Agata Olender <agata.olender@intel.com> | 2020-01-13 17:57:37 +0300 |
---|---|---|
committer | Olender, Agata <agata.olender@intel.com> | 2020-02-06 12:07:57 +0300 |
commit | bb43fd537ccb83e3188717ea77a58e3929a5445c (patch) | |
tree | 498fa5f08089f9adcbb1e89bf2ef4db4e355b6e2 /CMakeLists.txt | |
parent | b9a4ef7fd96aeda3e311993810c68bbb6553f3c2 (diff) | |
download | virtual-media-bb43fd537ccb83e3188717ea77a58e3929a5445c.tar.xz |
Integration with NBDKit for Legacy mode
This change introduces integration of virtual-media application with
NBDKit. NBDKit is used here to connect to externally provided image on web
and expose NBD device internally in BMC for NBD subsystem (already
implemented in Proxy mode) to use.
'Mount' D-Bus call accepts 's imgUrl' and 'b rw'. Based on 's imgUrl'
prefix (https:// or smb://) proper mount type is attempted. 'b rw'
determines Read-Only mode for both USB Gadget and NBD stack.
When 'Mount' is called, virtual-media parses arguments, determines mounting
options and attempts to mount external share.
For SMB protocol native CIFS Linux module is used:
1) mount(8) call is used to mound provided CIFS share
2) NBDKit loads file on mounted filesystem and exposes NBD Server on
internal unix socket
3) Pre-existing code takes care of mouting gadget automatically
(connecting socket to /dev/nbdX and then /dev/nbdX to USB Gadget)
For HTTPS protocol provisioning is performed by NBDKit:
1) NBDKit connects to provided resource and exposes NBD Server on internal
unix socket
2) Pre-existing code takes care of mouting gadget automatically
(connecting socket to /dev/nbdX and then /dev/nbdX to USB Gadget)
Tested:
Manual and automated tests on WilsonCity platform:
- mounting and unmounting images over CIFS and HTTPS (single, multiple
at the same time etc)
- positive and negative tests for D-Bus calls
- ensuring proper information is exposed on D-Bus
Change-Id: Ia2b6e8c13603521063f5c94cdfdb06f2e872e9e7
Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>
Signed-off-by: Agata Olender <agata.olender@intel.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 60af112..c9fd7bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,8 @@ option(YOCTO_DEPENDENCIES "Use YOCTO dependencies system" OFF) option(VM_USE_VALGRIND "Build VirtualMedia to work with valgrind" OFF) +option(VM_VERBOSE_NBDKIT_LOGS "Include detailed logs from nbdkit" OFF) + if(NOT ${YOCTO_DEPENDENCIES}) include(ExternalProject) @@ -133,6 +135,8 @@ target_compile_definitions(virtual-media PRIVATE $<$<BOOL:${VM_USE_VALGRIND}>: -DBOOST_USE_VALGRIND> + $<$<BOOL:${VM_VERBOSE_NBDKIT_LOGS}>: + -DVM_VERBOSE_NBDKIT_LOGS> $<$<BOOL:${CUSTOM_DBUS_PATH}>: -DCUSTOM_DBUS_PATH="${CUSTOM_DBUS_PATH}">) |