From: Rob Landley <rob@landley.net>
To: Mikael Pettersson <mikpe@csd.uu.se>
Cc: azarah@gentoo.org, linux-kernel@vger.kernel.org,
rddunlap@osdl.org, rusty@rustcorp.com.au
Subject: Re: Make modules_install doesn't create /lib/modules/$version
Date: Mon, 22 Sep 2003 06:55:43 -0400 [thread overview]
Message-ID: <200309220655.43275.rob@landley.net> (raw)
In-Reply-To: <200309192139.h8JLdaXf012418@harpo.it.uu.se>
On Friday 19 September 2003 17:39, Mikael Pettersson wrote:
> On Fri, 19 Sep 2003 15:16:23 -0400, Rob Landley <rob@landley.net> wrote:
> >> > So how come it's never been a problem on my RH boxes?
> >> > (Currently RH9 + module-init-tools but none of Arjan's .rpms)
> >> >
> >> > I basically do
> >> > make bzImage modules |& tee /tmp/log
> >> > grep Warning /tmp/log
> >> > su
> >> > make modules_install
> >> > make install
> >> >
> >> > Creating the /lib/modules/<version> directory is the kernel's
> >> > job, not installkernel (it's never done that before).
> >>
> >> Yes, OK, so I have not checked =) I just reacted on if
> >> installkernel form non RH misbehave or not.
> >
> >The kernel isn't doing it. A script called from installkernel (in Red Hat
> > 9) calls depmod, which has to be Rusty's new depmod or it doesn't create
> > the directory. This means depmod is running against the OLD modules.
>
> You're confusing make install with make modules_install. (And
> your initial report which spoke of modules_install was obviously
> a make install since it ran arch/i386/boot/install.sh)
No, I'm not. make install calls installkernel. (If installkernel isn't
there, it runs lilo, which lobotomizes my laptop's grub boot sector.)
> make modules_install _does_ create and populate the modules directory.
> In the top-level Makefile we find:
>
> ...
> MODLIB := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
> ...
> modules_install: _modinst_ _modinst_post
>
> .PHONY: _modinst_
> _modinst_:
> @if [ -z "`$(DEPMOD) -V | grep module-init-tools`" ]; then \
> echo "Warning: you may need to install module-init-tools"; \
> echo "See http://www.codemonkey.org.uk/post-halloween-2.5.txt";\
> sleep 1; \
> fi
> @rm -rf $(MODLIB)/kernel
> @rm -f $(MODLIB)/build
> @mkdir -p $(MODLIB)/kernel
> @ln -s $(TOPDIR) $(MODLIB)/build
> $(Q)$(MAKE) -rR -f scripts/Makefile.modinst
>
> In particular note the mkdir.
I noted the mkdir. I put an echo in front of the mkdir, which didn't get
called before it died unless I made the directory myself. This is what
happens with -test5-mm4:
[root@dhcppc4 linux-2.6.0-test5]# make install modules_install
CHK include/linux/version.h
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
CHK include/linux/compile.h
SKIPPED include/linux/compile.h
Kernel: arch/i386/boot/bzImage is ready
sh /home/landley/linux/linux-2.6.0-test5/arch/i386/boot/install.sh
2.6.0-test5-mm4 arch/i386/boot/bzImage System.map ""
/lib/modules/2.6.0-test5-mm4 is not a directory.
mkinitrd failed
make[1]: *** [install] Error 1
make: *** [install] Error 2
[root@dhcppc4 linux-2.6.0-test5]#
> make install does invoke /sbin/installkernel if your
> system has one, and that script may expect the /lib/modules/
> directory to exist, but that's not a kernel bug.
I'm using Red Hat 9, which worked fine installing 2.4 series kernels.
> In any event, make modules_install before make install works
> and has always worked for me on RH systems.
You're right:
make modules_install install works.
make install modules_install does not.
Good to know.
> >I've been bitten by this before, by the way. I switched from an
> > accidental SMP kernel to a UP kernel on my laptop, and the install
> > complained about
>
> rm -f /lib/modules/$KERNELVERSION; make modules_install
That's what I did after I was bitten, yes.
> >unresolved SMP symbols in the modules. (This is how I got in the habit of
> >doing make modules_install before make install, which I thought might also
> > be responsible for the directory creation problem, but wasn't. Neither
> > creates the directory: depmod does).
>
> depmod does not create any directories, 'make modules_install' does.
Although make install dies on a red hat 9 system trying to look at the modules
directory if modules_install isn't done first. Maybe it's an RH 9 bug. I
was actually kind of surprised that we almost do "./configure;make;make
install" now, yet make install doesn't install modules. Is there a reason
make install does NOT install modules for a modular kernel?
Rob
next prev parent reply other threads:[~2003-09-22 10:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-19 21:39 Make modules_install doesn't create /lib/modules/$version Mikael Pettersson
2003-09-22 10:55 ` Rob Landley [this message]
2003-09-22 12:05 ` Mikael Pettersson
2003-09-22 13:02 ` Martin Schlemmer
-- strict thread matches above, loose matches on Subject: below --
2003-09-18 7:21 Rob Landley
2003-09-18 16:15 ` Randy.Dunlap
2003-09-19 2:25 ` Rusty Russell
2003-09-19 5:41 ` Martin Schlemmer
2003-09-19 9:10 ` Mikael Pettersson
2003-09-19 16:01 ` Martin Schlemmer
2003-09-19 19:16 ` Rob Landley
2003-09-19 19:04 ` Rob Landley
2003-09-18 17:54 ` Sam Ravnborg
2003-09-19 8:41 ` Bas Mevissen
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=200309220655.43275.rob@landley.net \
--to=rob@landley.net \
--cc=azarah@gentoo.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@csd.uu.se \
--cc=rddunlap@osdl.org \
--cc=rusty@rustcorp.com.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox