ia64/xen-unstable

changeset 1453:7031f4a4155f

bitkeeper revision 1.953 (40c8a141u6AhH-XX3mAZTtPQdUxzYg)

Fix 'make world' option
author iap10@labyrinth.cl.cam.ac.uk
date Thu Jun 10 17:58:25 2004 +0000 (2004-06-10)
parents 92b8e1efa784
children ec7778babc15
files Makefile tools/misc/xen-clone
line diff
     1.1 --- a/Makefile	Thu Jun 10 16:59:06 2004 +0000
     1.2 +++ b/Makefile	Thu Jun 10 17:58:25 2004 +0000
     1.3 @@ -14,31 +14,42 @@ dist: all
     1.4  	$(MAKE) prefix=`pwd`/../install dist=yes -C xen install
     1.5  	$(MAKE) prefix=`pwd`/../install dist=yes -C tools install
     1.6  
     1.7 -LINUX_SRC        ?= ../linux-2.4.26.tar.gz
     1.8 +LINUX_VER        ?= $(shell ( /bin/ls -ld linux-*-xen-sparse ) 2>/dev/null | sed -e 's!^.*linux-\(.\+\)-xen-sparse!\1!' )
     1.9 +LINUX_SRC        ?= ../linux-$(LINUX_VER).tar.gz
    1.10  LINUX_CONFIG_DIR ?= ../install/config
    1.11 +
    1.12 +linux: 
    1.13 +	# build whatever is in the current linux directory
    1.14 +	( cd ../linux-$(LINUX_VER)-xen ; ARCH=xen make bzImage )
    1.15 +
    1.16  world: dist
    1.17 -	$(RM) ../linux-2.4.26-xen
    1.18 +	mkdir -p ../install/config
    1.19 +	$(RM) -rf ../linux-$(LINUX_VER)-xen
    1.20 +	[ -e $(LINUX_SRC) ] || wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-$(LINUX_VER).tar.gz -O- > ../linux-$(LINUX_VER).tar.gz
    1.21  	tar -x -z -C .. -f $(LINUX_SRC)
    1.22 -	mv ../linux-2.4.26 ../linux-2.4.26-xen
    1.23 -	cd ../linux-2.4.26-xen
    1.24 -	cp $(LINUX_CONFIG_DIR)/dom0 .config
    1.25 -	ARCH=xen make oldconfig; ARCH=xen make dep; ARCH=xen make bzImage
    1.26 -	install -m0644 arch/xen/boot/bzImage \
    1.27 -		../install/boot/vmlinuz-2.4.26-xen0
    1.28 -	install -m0644 vmlinux ../install/boot/vmlinux-syms-2.4.26-xen0
    1.29 -	ARCH=xen make mrproper
    1.30 -	cp $(LINUX_CONFIG_DIR)/unprivileged .config
    1.31 -	ARCH=xen make oldconfig; ARCH=xen make dep; ARCH=xen make bzImage
    1.32 -	install -m0644 arch/xen/boot/bzImage \
    1.33 -		../install/boot/vmlinuz-2.4.26-xen
    1.34 -	install -m0644 vmlinux ../install/boot/vmlinux-syms-2.4.26-xen
    1.35 +	mv ../linux-$(LINUX_VER) ../linux-$(LINUX_VER)-xen
    1.36 +	( cd linux-$(LINUX_VER)-xen-sparse ; ./mkbuildtree ../../linux-$(LINUX_VER)-xen )
    1.37 +	cp $(LINUX_CONFIG_DIR)/dom0 ../linux-$(LINUX_VER)-xen/.config || cp linux-$(LINUX_VER)-xen-sparse/arch/xen/defconfigs/dom0 ../linux-$(LINUX_VER)-xen/.config
    1.38 +	( cd ../linux-$(LINUX_VER)-xen; ARCH=xen make oldconfig; ARCH=xen make dep; ARCH=xen make bzImage )
    1.39 +	install -m0644 ../linux-$(LINUX_VER)-xen/arch/xen/boot/bzImage \
    1.40 +		../install/boot/vmlinuz-$(LINUX_VER)-xen0
    1.41 +	install -m0644 ../linux-$(LINUX_VER)-xen/vmlinux ../install/boot/vmlinux-syms-$(LINUX_VER)-xen0
    1.42 +	install -m0644 ../linux-$(LINUX_VER)-xen/.config $(LINUX_CONFIG_DIR)/dom0
    1.43 +	( cd ../linux-$(LINUX_VER)-xen ; ARCH=xen make mrproper )
    1.44 +	cp $(LINUX_CONFIG_DIR)/unprivileged ../linux-$(LINUX_VER)-xen/.config || cp linux-$(LINUX_VER)-xen-sparse/arch/xen/defconfigs/unprivileged ../linux-$(LINUX_VER)-xen/.config 
    1.45 +	( cd ../linux-$(LINUX_VER)-xen; ARCH=xen make oldconfig; ARCH=xen make dep; ARCH=xen make bzImage )
    1.46 +	install -m0644 ../linux-$(LINUX_VER)-xen/arch/xen/boot/bzImage \
    1.47 +		../install/boot/vmlinuz-$(LINUX_VER)-xen
    1.48 +	install -m0644 ../linux-$(LINUX_VER)-xen/vmlinux ../install/boot/vmlinux-syms-$(LINUX_VER)-xen
    1.49 +	install -m0644 ../linux-$(LINUX_VER)-xen/.config $(LINUX_CONFIG_DIR)/unprivileged
    1.50  
    1.51  clean: delete-symlinks
    1.52  	$(MAKE) -C xen clean
    1.53  	$(MAKE) -C tools clean
    1.54  
    1.55  make-symlinks: delete-symlinks
    1.56 -	ln -sf linux-2.4.26-xen-sparse linux-xen-sparse
    1.57 +	ln -sf linux-$(LINUX_VER)-xen-sparse linux-xen-sparse
    1.58  
    1.59  delete-symlinks:
    1.60  	$(RM) linux-xen-sparse
    1.61 + 
    1.62 \ No newline at end of file
     2.1 --- a/tools/misc/xen-clone	Thu Jun 10 16:59:06 2004 +0000
     2.2 +++ b/tools/misc/xen-clone	Thu Jun 10 17:58:25 2004 +0000
     2.3 @@ -60,41 +60,66 @@ bk pull
     2.4  cd ${TOP}
     2.5  fi
     2.6  
     2.7 -# identify this version of linux
     2.8 -LINUX_VER=`( /bin/ls -ld ${DEST_BK_REP}/xenolinux-sparse || /bin/ls -ld ${DEST_BK_REP}/xenolinux-*-sparse ) 2>/dev/null | sed -e 's!^.*xenolinux-\(.\+\)-sparse!\1!'`
     2.9  
    2.10 -if [ -z "${LINUX_VER}" ]
    2.11 +if [ -d ${DEST_BK_REP}/linux-*-xen-sparse ]
    2.12  then
    2.13 -echo Unable to identify Linux version. Bailing.
    2.14 -exit -1
    2.15 -fi
    2.16 + # this is a new style Xen repository so building is dead easy
    2.17 +
    2.18 + LINUX_VER=`( /bin/ls -ld ${DEST_BK_REP}/*linux-*-xen-sparse ) 2>/dev/null | sed -e 's!^.*linux-\(.\+\)-xen-sparse!\1!'`
    2.19 +
    2.20 + if [ -e ${LINUX_DIR}/linux-${LINUX_VER}.tar.gz ]  
    2.21 +  LINUX_SRC=${LINUX_DIR}/linux-${LINUX_VER}.tar.gz
    2.22 + elif
    2.23 +  wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-${LINUX_VER}.tar.gz -O- > linux-${LINUX_VER}.tar.gz
    2.24 +  LINUX_SRC=''
    2.25 + fi
    2.26 +
    2.27 + cd ${DEST_BK_REP} 
    2.28 + make world
    2.29 + cd ../install/boot
    2.30 + ln -s vmlinux-${LINUX_VER}-xen0 xenolinux.gz
    2.31 +  
    2.32 +elif
    2.33 + # old style repository without 'make world'
    2.34 +
    2.35 +
    2.36 + # identify this version of linux
    2.37 + LINUX_VER=`( /bin/ls -ld ${DEST_BK_REP}/*xenolinux-sparse || /bin/ls -ld ${DEST_BK_REP}/*xenolinux-*-sparse ) 2>/dev/null | sed -e 's!^.*xenolinux-\(.\+\)-sparse!\1!'`
    2.38 +
    2.39 + if [ -z "${LINUX_VER}" ]
    2.40 + then
    2.41 + echo Unable to identify Linux version. Bailing.
    2.42 + exit -1
    2.43 + fi
    2.44  
    2.45 -# copy in the master Linux tree for this kernel
    2.46 -if [ ! -d linux-${LINUX_VER} ]
    2.47 -then
    2.48 -tar -jxf ${LINUX_DIR}/linux-${LINUX_VER}.tar.bz2 || 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
    2.49 + # copy in the master Linux tree for this kernel
    2.50 + if [ ! -d linux-${LINUX_VER} ]
    2.51 + then
    2.52 + tar -jxf ${LINUX_DIR}/linux-${LINUX_VER}.tar.bz2 || 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
    2.53 + fi
    2.54 +
    2.55 + # build and install Xen and tools
    2.56 + cd ${DEST_BK_REP}
    2.57 + make dist || make install
    2.58 +
    2.59 + # Turn linux into xenolinux then build it
    2.60 + cd xenolinux-${LINUX_VER}-sparse
    2.61 + ./mkbuildtree ../../linux-${LINUX_VER}
    2.62 + cd ../..
    2.63 + mv linux-${LINUX_VER} xenolinux-${LINUX_VER}
    2.64 + cd xenolinux-${LINUX_VER}
    2.65 +
    2.66 + # cope with the change from ARCH=xeno to ARCH=xen
    2.67 + cd arch; XEN=`/bin/ls -d xen*`; cd ..
    2.68 +
    2.69 + # built it all
    2.70 + ARCH=$XEN make oldconfig
    2.71 + ARCH=$XEN make dep
    2.72 + ARCH=$XEN make bzImage
    2.73 + ARCH=$XEN make dist || ARCH=xen make install
    2.74 + ARCH=$XEN make modules
    2.75 + ARCH=$XEN make INSTALL_MOD_PATH=${TOP}/install modules_install
    2.76 + cd ..
    2.77 +
    2.78  fi
    2.79  
    2.80 -# build and install Xen and tools
    2.81 -cd ${DEST_BK_REP}
    2.82 -make dist || make install
    2.83 -
    2.84 -# Turn linux into xenolinux then build it
    2.85 -cd xenolinux-${LINUX_VER}-sparse
    2.86 -./mkbuildtree ../../linux-${LINUX_VER}
    2.87 -cd ../..
    2.88 -mv linux-${LINUX_VER} xenolinux-${LINUX_VER}
    2.89 -cd xenolinux-${LINUX_VER}
    2.90 -
    2.91 -# cope with the change from ARCH=xeno to ARCH=xen
    2.92 -cd arch; XEN=`/bin/ls -d xen*`; cd ..
    2.93 -
    2.94 -# built it all
    2.95 -ARCH=$XEN make oldconfig
    2.96 -ARCH=$XEN make dep
    2.97 -ARCH=$XEN make bzImage
    2.98 -ARCH=$XEN make dist || ARCH=xen make install
    2.99 -ARCH=$XEN make modules
   2.100 -ARCH=$XEN make INSTALL_MOD_PATH=${TOP}/install modules_install
   2.101 -cd ..
   2.102 -