From: Nicholas Miell <nmiell@attbi.com>
To: Boszormenyi Zoltan <zboszor@freemail.hu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] module-init-tools vs. mkinitrd
Date: 11 Feb 2003 13:19:43 -0800 [thread overview]
Message-ID: <1044998376.1195.10.camel@entropy> (raw)
In-Reply-To: <3E48AAD1.6060200@freemail.hu>
[-- Attachment #1: Type: text/plain, Size: 34 bytes --]
This patch is a bit more useful.
[-- Attachment #2: Type: text/plain, Size: 2040 bytes --]
--- mkinitrd 2002-09-04 22:07:04.000000000 -0700
+++ /sbin/mkinitrd 2003-02-11 12:57:58.000000000 -0800
@@ -128,7 +128,7 @@
modName="sbp2"
fi
- fmPath=`(cd /lib/modules/$kernel; echo find . -name $modName.o | /sbin/nash --quiet)`
+ fmPath=`(cd /lib/modules/$kernel; echo find . -name $modName$o | /sbin/nash --quiet)`
if [ ! -f /lib/modules/$kernel/$fmPath ]; then
if [ -n "$skiperrors" ]; then
@@ -276,6 +276,9 @@
exit 1
fi
+# 2.5.48 changed the module extension from o to ko
+o=`echo $kernel | awk 'BEGIN { FS="."}; { if ( $2 >= 5 && $3 >= 48 ) print ".ko"; else print ".o"; }'`
+
# find a temporary directory which doesn't use tmpfs
TMPDIR=""
for t in /tmp /var/tmp /root ${PWD}; do
@@ -461,7 +464,7 @@
dd if=/dev/zero of=$IMAGE bs=1k count=$IMAGESIZE 2> /dev/null || exit 1
-LODEV=$(echo findlodev $modName.o | /sbin/nash --quiet)
+LODEV=$(echo findlodev $modName$o | /sbin/nash --quiet)
if [ -z "$LODEV" ]; then
rm -rf $MNTPOINT $IMAGE
@@ -500,7 +503,14 @@
rm -rf $MNTPOINT/lost+found
inst /sbin/nash "$MNTIMAGE/bin/nash"
-inst /sbin/insmod.static "$MNTIMAGE/bin/insmod"
+
+# use the old insmod (when necessary)
+old=""
+if [ $o = ".o" -a -x /sbin/insmod.static.old ]; then
+ old=".old";
+fi
+inst /sbin/insmod.static$old "$MNTIMAGE/bin/insmod"
+
ln -s /sbin/nash $MNTIMAGE/sbin/modprobe
for MODULE in $MODULES; do
@@ -536,7 +546,7 @@
for MODULE in $MODULES; do
text=""
- module=`echo $MODULE | sed "s|.*/||" | sed "s/.o$//"`
+ module=`echo $MODULE | sed "s|.*/||" | sed "s/$o$//"`
options=`sed -n -e "s/^options[ ][ ]*$module[ ][ ]*//p" $modulefile 2>/dev/null`
@@ -547,7 +557,7 @@
echo "Loading module $module$text"
fi
echo "echo \"Loading $module module\"" >> $RCFILE
- echo "insmod /lib/$module.o $options" >> $RCFILE
+ echo "insmod /lib/$module$o $options" >> $RCFILE
# Hack - we need a delay after loading usb-storage to give things
# time to settle down before we start looking a block devices
prev parent reply other threads:[~2003-02-11 21:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-11 7:48 [PATCH] module-init-tools vs. mkinitrd Boszormenyi Zoltan
2003-02-11 21:19 ` Nicholas Miell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1044998376.1195.10.camel@entropy \
--to=nmiell@attbi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zboszor@freemail.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.