mirror of
https://github.com/openwrt/openwrt.git
synced 2026-12-06 04:15:39 +04:00
kvm-support: add a package for KVM device handling
/dev/kvm comes out 0600 root:root, so a hypervisor runs as root. Add a kvm-support package which allocates the kvm group and puts the node into it. KVM is built into the kernel where it exists, so no module carries a dependency on the package; userspace depends on it. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
1 parent
94b949df48
commit
801c947113
2 files changed
+22
No files matched your search
@@ -110,6 +110,21 @@ define Package/dvb-support/install
|
||||
$(call InstallFragment,$(1),45-dvb.json)
|
||||
endef
|
||||
|
||||
define Package/kvm-support
|
||||
$(call Package/hardware-support/Default)
|
||||
TITLE:=KVM device support
|
||||
USERID:=:kvm=34
|
||||
endef
|
||||
|
||||
define Package/kvm-support/description
|
||||
Feature gate for hardware virtualisation. Allocates the kvm group and
|
||||
installs the hotplug rule which puts /dev/kvm into it.
|
||||
endef
|
||||
|
||||
define Package/kvm-support/install
|
||||
$(call InstallFragment,$(1),50-kvm.json)
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
endef
|
||||
|
||||
@@ -124,3 +139,4 @@ $(eval $(call BuildPackage,video-support))
|
||||
$(eval $(call BuildPackage,accel-support))
|
||||
$(eval $(call BuildPackage,input-support))
|
||||
$(eval $(call BuildPackage,dvb-support))
|
||||
$(eval $(call BuildPackage,kvm-support))
|
||||
@@ -0,0 +1,6 @@
|
||||
[
|
||||
[ "if",
|
||||
[ "eq", "DEVNAME", "kvm" ],
|
||||
[ "makedev", "/dev/%DEVNAME%", "0660", "kvm" ]
|
||||
]
|
||||
]
|
||||
Reference in new issue
Block a user