From: Maciek Nowacki <maciek@Voyager.powersurfr.com>
To: Tom Diehl <tdiehl@pil.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: How to compile on one machine and install on another?
Date: Wed, 20 Jun 2001 14:11:20 -0600 [thread overview]
Message-ID: <20010620141119.A5660@wintermute.starfire> (raw)
In-Reply-To: <Pine.LNX.4.33.0106191646330.17727-100000@localhost.localdomain>
In-Reply-To: <Pine.LNX.4.33.0106191646330.17727-100000@localhost.localdomain>
On Tue, Jun 19, 2001 at 04:55:10PM -0400, Tom Diehl wrote:
> On Tue, 19 Jun 2001, Alan Cox wrote:
>
> > Other than making sure you configure it for the box it will eventually run
> > on - nope you have it all sorted. If you use modules you'll want to install
> > the modules on the target machine too
>
> What is the best way to install the modules? Is there a directory _all_ of
> the modules exist in b4 you do "make modules_install". I usually end up
> setting EXTRAVERSION to something unique and doing a make modules_install.
> That way it does not hose up the modules for the build machine.
> Is there a better way?
Change MODLIB in $(TOPDIR)/Makefile (e.g. /usr/src/linux/Makefile). I do this
to compile the kernel and modules without root priviledges at all. make
modules_install will fail at the end when trying to run 'depmod', but that's
okay - you can do that yourself:
(TOPDIR=${HOME}/linux, MODLIB=${HOME}/kernel/<revision>/modules)
cd $TOPDIR
make config dep clean bzImage modules && cp arch/i386/boot/bzImage System.map \
${MODLIB}/../ && make modules_install || echo modules_install failed as expected
cd ${MODLIB}/../
mkdir -p lib/modules
ln -s ${PWD}/modules lib/modules/`uname -r`
depmod -F System.map -C /dev/null -b $PWD -r -a
Note that Joe Average user can do all of this, root need not be involved at
all.
Then fix up the resulting modules.dep with sed, I don't remember what depmod
gives you exactly so I can't type out the exact command.. then clean up:
rm lib/modules/`uname -r` ; rmdir lib/modules lib
Now you have a nice kernel package ready to go in $HOME/kernel. Don't forget
to copy $MODLIB into the right spot (rename the directory to the kernel's
revision) and chown -R root or modutils will pout, unless you are making a
romfs or such where the only user is root :-) nfs will work just fine without
security qualms since the kernel installation is non-root owned. (for
large-scale deployment, you probably can't beat having machines booting from
a server and fetching new romfs images each boot.)
btw, the abuse of depmod in this way isn't very nice, but afaics there is no
other way. I would personally like depmod to dump dependency information for
any valid module tree, expanding the definition of valid to include trees not
prefixed by /lib/modules/`uname -r`, but oh well, it gets by in the end as so
many other things do ;-)
Maciek
next prev parent reply other threads:[~2001-06-20 20:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-19 20:32 How to compile on one machine and install on another? McHarry, John
2001-06-19 20:35 ` Alan Cox
2001-06-19 20:55 ` Tom Diehl
2001-06-19 21:04 ` Steven Walter
2001-06-19 21:11 ` Raphael Manfredi
2001-06-19 21:50 ` John R Lenton
2001-06-23 4:53 ` Anuradha Ratnaweera
2001-06-20 20:11 ` Maciek Nowacki [this message]
2001-06-21 3:10 ` Keith Owens
2001-06-19 21:32 ` Gabriel Rocha
2001-06-19 21:45 ` Eli Carter
2001-06-19 21:53 ` Gabriel Rocha
2001-06-19 22:42 ` Mike Castle
2001-06-20 0:24 ` Kelledin Tane
2001-06-20 0:42 ` Gabriel Rocha
2001-06-20 7:58 ` Helge Hafting
2001-06-21 2:42 ` Keith Owens
-- strict thread matches above, loose matches on Subject: below --
2001-06-19 21:04 McHarry, John
[not found] <fa.o4pbsqv.26md2n@ifi.uio.no>
[not found] ` <fa.go24tnv.1v60h9a@ifi.uio.no>
2001-06-20 2:23 ` John Weber
2001-06-20 2:50 ` Mike Castle
2001-06-20 2:58 ` Keith Owens
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=20010620141119.A5660@wintermute.starfire \
--to=maciek@voyager.powersurfr.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tdiehl@pil.net \
/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.