ia64/xen-unstable

view tools/misc/xen-clone @ 720:017595b44310

bitkeeper revision 1.426 (3f67735ai0MOd0z8ockI7RQVT4dA_Q)

fix broken checksum calculation code for UDP console.
author iap10@labyrinth.cl.cam.ac.uk
date Tue Sep 16 20:32:26 2003 +0000 (2003-09-16)
parents 0b04d8a47390
children f6f2a326ccaa
line source
1 #!/bin/sh -x
3 # usage: xen-clone bk_repository dest_dir orig_linux_dir
4 #
5 # this script contains some CL site specific details, but can easily be adapted
6 #
8 # test which site we're on
9 [ -d /usr/groups/xeno/ -a -d /usr/groups/srgboot ] && SITE=UCCL
11 case "$SITE" in
12 UCCL)
13 BK_REP=${1:-/usr/groups/xeno/BK/xeno.bk}
14 # BK_REP=${1:-xeno-master/xeno.bk}
15 LINUX_DIR=${3:-/usr/groups/xeno/archive/}
16 ;;
17 *)
18 BK_REP=${1:-bk://xen.bkbits.net/xeno.bk}
19 # BK_REP=${1:-ssh://xen@xen.bkbits.net/xeno.bk}
20 LINUX_DIR=${3:-..}
21 ;;
22 esac
24 DEST_DIR=${2:-xeno-clone}
25 DEST_BK_REP=`basename ${BK_REP}`
27 echo usage: xen-clone bk_repository dest_dir orig_linux_dir
28 echo Source BK Repository : ${BK_REP}
29 echo Destination Dir/Repository : ${DEST_DIR}/${DEST_BK_REP}
30 echo Pristine Linux Source directory : ${LINUX_DIR}
32 mkdir -p ${DEST_DIR}
33 cd ${DEST_DIR}
34 TOP=`/bin/pwd`
36 # site-specific set up of installation directories
37 case "$SITE" in
38 UCCL)
39 PATH=$PATH:/usr/groups/xeno/build_tools/bin
40 mkdir -p install/boot
41 cd install/boot
42 ln -sf ../../../xeno-roots/roots .
43 ln -sf ../../../xeno-roots/usr .
44 ln -sf ../lib .
45 ln -sf ../bin .
46 ln -sf /usr/groups/srgboot/${USER}/xenoboot.sh .
47 ln -sf `pwd` /usr/groups/srgboot/${USER}/${DEST_DIR}
48 cd ../..
49 ;;
50 esac
52 # clone the master repository (now checked-out by default)
53 bk clone ${BK_REP} ${DEST_BK_REP}
55 # identify this version of linux
56 LINUX_VER=`/bin/ls -ld ${DEST_BK_REP}/xenolinux-sparse | sed -e 's!^.*xenolinux-\([0-9.]\+\)-sparse!\1!'`
58 # copy in the master Linux tree for this kernel
59 tar -zxf ${LINUX_DIR}/linux-${LINUX_VER}.tar.gz || tar -zxf ${LINUX_DIR}/linux-${LINUX_VER}.tgz || cp -a ${LINUX_DIR}/linux-${LINUX_VER} . || wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-${LINUX_VER}.tar.gz -O- | tar -zxf - || exit -1
61 # build and install Xen and tools
62 cd ${DEST_BK_REP}
63 make install
65 # Turn linux into xenolinux then build it
66 cd xenolinux-${LINUX_VER}-sparse
67 ./mkbuildtree ../../linux-${LINUX_VER}
68 cd ../..
69 mv linux-${LINUX_VER} xenolinux-${LINUX_VER}
70 cd xenolinux-${LINUX_VER}
71 export ARCH=xeno
72 export INSTALL_MOD_PATH=${TOP}/install
73 make oldconfig
74 make dep
75 make bzImage
76 make install
77 make modules
78 make modules_install
79 cd ..