From: Litao Gao Date: Wed, 13 May 2020 10:21:15 +0000 (+0000) Subject: puppet-kmod: add persistent kernel module autoload for poky X-Git-Tag: bronze-rc0~4 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=9faac587b60a75c3b36ebbd9abc3ab579264df7b;p=pti%2Frtp.git puppet-kmod: add persistent kernel module autoload for poky Issue-ID: INF-113 Signed-off-by: Litao Gao Change-Id: Ic748479a90d16b43c67249089e11a68ca15b53f4 --- diff --git a/meta-stx/recipes-support/puppet/files/puppet-kmod/persistent-module-load-poky.patch b/meta-stx/recipes-support/puppet/files/puppet-kmod/persistent-module-load-poky.patch new file mode 100644 index 0000000..8ce779c --- /dev/null +++ b/meta-stx/recipes-support/puppet/files/puppet-kmod/persistent-module-load-poky.patch @@ -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 diff --git a/meta-stx/recipes-support/puppet/puppet-kmod_git.bb b/meta-stx/recipes-support/puppet/puppet-kmod_git.bb index d14e47d..dae253e 100644 --- a/meta-stx/recipes-support/puppet/puppet-kmod_git.bb +++ b/meta-stx/recipes-support/puppet/puppet-kmod_git.bb @@ -26,6 +26,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