PATCH: build-initrd.sh add MODULEDIRECTORY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

a cleaner approach this time (I hope...)

-- 
left blank, right bald
--- build-initrd.sh.orig	2007-01-31 20:04:15.000000000 +0100
+++ build-initrd.sh	2007-05-11 15:53:27.000000000 +0200
@@ -125,6 +125,15 @@
 # 1 = use loop module, 0 = loop driver linked to kernel
 USEMODULE=1
 
+# Directory to look for modules under /boot/modules-`uname -r`/
+# Only used if USEMODULE=1 or extra modules are loaded.
+# Normally this is empty, but if you want to use the same kernel version on
+# different CPU architectures in combination with a single boot medium, you
+# can use this to make sure that the correct modules are loaded for each
+# CPU architecture. MODULEDIRECTORY must end with a /
+# Example: MODULEDIRECTORY="`hostname`/"
+MODULEDIRECTORY=""
+
 # 1 = stop after creating and copying initrd, 0 = also copy tools/libs
 INITRDONLY=0
 
@@ -456,7 +465,7 @@
     buf[0] = 0;
     strCat(buf, "/lib/insmod /lib/modules-");
     strCat(buf, &un.release[0]);
-    strCat(buf, "/loop");
+    strCat(buf, "/${MODULEDIRECTORY}loop");
     strCat(buf, modext);
     strCat(buf, " ${LOOPMODPARAMS}");
     if(exeWait(buf)) goto fail5;
@@ -466,7 +475,7 @@
     buf[0] = 0;
     strCat(buf, "/lib/insmod /lib/modules-");
     strCat(buf, &un.release[0]);
-    strCat(buf, "/${EXTRAMODULENAME1}");
+    strCat(buf, "/${MODULEDIRECTORY}${EXTRAMODULENAME1}");
     strCat(buf, modext);
     strCat(buf, " ${EXTRAMODULEPARAMS1}");
     if(exeWait(buf)) goto fail5;
@@ -475,7 +484,7 @@
     buf[0] = 0;
     strCat(buf, "/lib/insmod /lib/modules-");
     strCat(buf, &un.release[0]);
-    strCat(buf, "/${EXTRAMODULENAME2}");
+    strCat(buf, "/${MODULEDIRECTORY}${EXTRAMODULENAME2}");
     strCat(buf, modext);
     strCat(buf, " ${EXTRAMODULEPARAMS2}");
     if(exeWait(buf)) goto fail5;
@@ -484,7 +493,7 @@
     buf[0] = 0;
     strCat(buf, "/lib/insmod /lib/modules-");
     strCat(buf, &un.release[0]);
-    strCat(buf, "/${EXTRAMODULENAME3}");
+    strCat(buf, "/${MODULEDIRECTORY}${EXTRAMODULENAME3}");
     strCat(buf, modext);
     strCat(buf, " ${EXTRAMODULEPARAMS3}");
     if(exeWait(buf)) goto fail5;
@@ -493,7 +502,7 @@
     buf[0] = 0;
     strCat(buf, "/lib/insmod /lib/modules-");
     strCat(buf, &un.release[0]);
-    strCat(buf, "/${EXTRAMODULENAME4}");
+    strCat(buf, "/${MODULEDIRECTORY}${EXTRAMODULENAME4}");
     strCat(buf, modext);
     strCat(buf, " ${EXTRAMODULEPARAMS4}");
     if(exeWait(buf)) goto fail5;
@@ -502,7 +511,7 @@
     buf[0] = 0;
     strCat(buf, "/lib/insmod /lib/modules-");
     strCat(buf, &un.release[0]);
-    strCat(buf, "/${EXTRAMODULENAME5}");
+    strCat(buf, "/${MODULEDIRECTORY}${EXTRAMODULENAME5}");
     strCat(buf, modext);
     strCat(buf, " ${EXTRAMODULEPARAMS5}");
     if(exeWait(buf)) goto fail5;

Attachment: pgpVHUhqhru00.pgp
Description: PGP signature


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux