Blame 0049-plymouth-add-xz-support-for-kernel-modules.patch

Harald Hoyer 83ebbb
From e38fcc86086d62dfdcd776728b77d7d7acb20b80 Mon Sep 17 00:00:00 2001
Harald Hoyer 83ebbb
From: James Buren <ryuo@frugalware.org>
Harald Hoyer 83ebbb
Date: Sun, 22 Jan 2012 12:56:24 -0600
Harald Hoyer 83ebbb
Subject: [PATCH] plymouth: add xz support for kernel modules
Harald Hoyer 83ebbb
Harald Hoyer 83ebbb
This rewrites a portion of the module to support xz, as well as allow
Harald Hoyer 83ebbb
an easier expansion should future compression methods for kernel
Harald Hoyer 83ebbb
modules ever materialize.
Harald Hoyer 83ebbb
---
Harald Hoyer 83ebbb
 modules.d/50plymouth/module-setup.sh |    9 +++++++--
Harald Hoyer 83ebbb
 1 files changed, 7 insertions(+), 2 deletions(-)
Harald Hoyer 83ebbb
Harald Hoyer 83ebbb
diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh
Harald Hoyer 83ebbb
index eedc842..b78c718 100755
Harald Hoyer 83ebbb
--- a/modules.d/50plymouth/module-setup.sh
Harald Hoyer 83ebbb
+++ b/modules.d/50plymouth/module-setup.sh
Harald Hoyer 83ebbb
@@ -14,8 +14,13 @@ depends() {
Harald Hoyer 83ebbb
 installkernel() {
Harald Hoyer 83ebbb
     local _modname
Harald Hoyer 83ebbb
     # Include KMS capable drm drivers
Harald Hoyer 83ebbb
-    for _modname in $(find "$srcmods/kernel/drivers/gpu/drm" "$srcmods/extra" \( -name '*.ko' -o -name '*.ko.gz' \) 2>/dev/null); do
Harald Hoyer 83ebbb
-        if zgrep -q drm_crtc_init  $_modname; then
Harald Hoyer 83ebbb
+    for _modname in $(find "$srcmods/kernel/drivers/gpu/drm" "$srcmods/extra" \( -name '*.ko' -o -name '*.ko.gz' -o -name '*.ko.xz' \) 2>/dev/null); do
Harald Hoyer 83ebbb
+        case $_modname in
Harald Hoyer 83ebbb
+            *.ko)      grep -q drm_crtc_init $_modname ;;
Harald Hoyer 83ebbb
+            *.ko.gz)  zgrep -q drm_crtc_init $_modname ;;
Harald Hoyer 83ebbb
+            *.ko.xz) xzgrep -q drm_crtc_init $_modname ;;
Harald Hoyer 83ebbb
+        esac
Harald Hoyer 83ebbb
+        if test $? -eq 0; then
Harald Hoyer 83ebbb
             # if the hardware is present, include module even if it is not currently loaded,
Harald Hoyer 83ebbb
             # as we could e.g. be in the installer; nokmsboot boot parameter will disable
Harald Hoyer 83ebbb
             # loading of the driver if needed