puppet-kmod: add persistent kernel module autoload for poky

Signed-off-by: Litao Gao <litao.gao@windriver.com>
Signed-off-by: Babak Sarashki <Babak.SarAshki@windriver.com>
This commit is contained in:
Litao Gao 2020-05-13 10:21:15 +00:00 committed by Babak Sarashki
parent 15115c5a20
commit 46f675f836
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,31 @@
diff -ruN a/manifests/load.pp b/manifests/load.pp
--- a/manifests/load.pp 2020-05-13 10:13:02.620078850 +0000
+++ b/manifests/load.pp 2020-05-13 10:16:12.488077982 +0000
@@ -56,10 +56,18 @@
case $::osfamily {
'Debian': {
- augeas {"Manage ${name} in ${file}":
- incl => $file,
- lens => 'Modules.lns',
- changes => $changes,
+ if $::operatingsystem == 'poky-stx' {
+ file { "/etc/modules-load.d/${name}.conf":
+ ensure => $ensure,
+ mode => '0644',
+ content => template('kmod/poky.modprobe.erb'),
+ }
+ } else {
+ augeas {"Manage ${name} in ${file}":
+ incl => $file,
+ lens => 'Modules.lns',
+ changes => $changes,
+ }
}
}
'RedHat': {
diff -ruN a/templates/poky.modprobe.erb b/templates/poky.modprobe.erb
--- a/templates/poky.modprobe.erb 1970-01-01 00:00:00.000000000 +0000
+++ b/templates/poky.modprobe.erb 2020-05-13 10:14:46.612078375 +0000
@@ -0,0 +1 @@
+vfio_pci

View File

@ -12,6 +12,7 @@ S = "${WORKDIR}/git"
SRC_URI = "git://github.com/camptocamp/puppet-kmod;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH} \
file://${PN}/Add-gemspec.patch \
file://${PN}/persistent-module-load-poky.patch \
"
inherit ruby