[TRE-2697] Add module dependency rebuild 29/259229/1
authorMateusz Majewski <m.majewski2@samsung.com>
Wed, 2 Jun 2021 13:49:01 +0000 (15:49 +0200)
committerMateusz Majewski <m.majewski2@samsung.com>
Wed, 2 Jun 2021 13:49:44 +0000 (15:49 +0200)
Change-Id: Ibd85d9ac92471e5499239268da00a8cb23dc8e04

patterns/generic-depmod.yaml [new file with mode: 0644]
scripts/generic-depmod.post [new file with mode: 0644]

diff --git a/patterns/generic-depmod.yaml b/patterns/generic-depmod.yaml
new file mode 100644 (file)
index 0000000..843aa1d
--- /dev/null
@@ -0,0 +1,5 @@
+Summary: Generic Depmod
+Description: Generic Depmod
+Name: generic-depmod
+Packages:
+- kmod-compat
diff --git a/scripts/generic-depmod.post b/scripts/generic-depmod.post
new file mode 100644 (file)
index 0000000..b61ac6e
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+echo "#################### generic-depmod.post ####################"
+
+for D in /lib/modules/*; do
+    [ -d "$D" ] || continue
+    [ "$(find "$D" -name '*.ko' -print | head -c1 | wc -c)" -ne 0 ] || continue
+    depmod "$(basename $D)"
+done