lkml.org 
[lkml]   [1999]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: How to force "make modules_install" to install elsewhere
Date
From
> How do I tell "make modules_install" to install the modules to an
> alternate arbitrary directory of my choosing. One such as:

Set INSTALL_MOD_PATH on the make command line.

The following script, called either from the linux source dir or with
the linux source dir as $1, creates two tarballs, one with kernel and
modules as well as System.map and config file, the other one with
include files, both to be installed in the root:


---C-U-T->->----------------------------------------------------------
#!/bin/sh
set -e

[ "$1" -a -d "$1" ] && cd "$1"
[ -f System.map -a -d include/linux ] || { echo "usage: $0 srcdir"; exit 1; }

mkdir tmp 2>/dev/null || true
rm -rf tmp/boot tmp/lib tmp/usr

va=`fgrep UTS_RELEASE include/linux/version.h | cut -f3 -d' ' |\
tr -cd "[0-9.-]"`
vb=`cat .version`
vc="$va.$vb"

mkdir tmp/boot
cp arch/i386/boot/bzImage tmp/boot/vmlinuz-$va
cp System.map tmp/boot/System.map-$va
cp .config tmp/boot/config-$va
make modules_install INSTALL_MOD_PATH=`pwd`/tmp

echo "Creating boot-$vc.tar.gz"
( cd tmp; tar chzf ../boot-$vc.tar.gz boot lib )

mkdir -p tmp/usr/src/linux-$va/include
cp -a include/linux include/asm-i386 include/asm tmp/usr/src/linux-$va/include
echo "Creating inc-$vc.tar.gz"
( cd tmp; tar chzf ../inc-$vc.tar.gz usr )

rm -rf tmp/boot tmp/lib tmp/usr
----------------------------------------------------------<-<-T-U-C---

This is for i386, don't know how bzImage is handles on other archs.

Olaf


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.189 / U:1.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site