Add support to map devicetree into add-on (#519)

* Add support to map devicetree into add-on

* Update const.py

* Update validate.py

* Update addon.py

* Update addons.py

* Update API.md
This commit is contained in:
Pascal Vizeli
2018-06-21 12:19:14 +02:00
committed by GitHub
parent cb520bff23
commit 054e357483
6 changed files with 23 additions and 3 deletions

View File

@@ -201,6 +201,8 @@ class DockerAddon(DockerInterface):
}})
# Init other hardware mappings
# GPIO support
if self.addon.with_gpio:
volumes.update({
"/sys/class/gpio": {
@@ -211,6 +213,14 @@ class DockerAddon(DockerInterface):
},
})
# DeviceTree support
if self.addon.with_devicetree:
volumes.update({
"/sys/firmware/devicetree": {
'bind': "/sys/firmware/devicetree", 'mode': 'r'
},
})
# Host dbus system
if self.addon.host_dbus:
volumes.update({