From: iap10@labyrinth.cl.cam.ac.uk Date: Thu, 10 Jun 2004 17:58:25 +0000 (+0000) Subject: bitkeeper revision 1.953 (40c8a141u6AhH-XX3mAZTtPQdUxzYg) X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~18168 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f328d1d1e5d1564f382cc7e6c5754acf43755358;p=xen.git bitkeeper revision 1.953 (40c8a141u6AhH-XX3mAZTtPQdUxzYg) Fix 'make world' option --- diff --git a/Makefile b/Makefile index 7f51503a39..acbfb2a23f 100644 --- a/Makefile +++ b/Makefile @@ -14,31 +14,42 @@ dist: all $(MAKE) prefix=`pwd`/../install dist=yes -C xen install $(MAKE) prefix=`pwd`/../install dist=yes -C tools install -LINUX_SRC ?= ../linux-2.4.26.tar.gz +LINUX_VER ?= $(shell ( /bin/ls -ld linux-*-xen-sparse ) 2>/dev/null | sed -e 's!^.*linux-\(.\+\)-xen-sparse!\1!' ) +LINUX_SRC ?= ../linux-$(LINUX_VER).tar.gz LINUX_CONFIG_DIR ?= ../install/config + +linux: + # build whatever is in the current linux directory + ( cd ../linux-$(LINUX_VER)-xen ; ARCH=xen make bzImage ) + world: dist - $(RM) ../linux-2.4.26-xen + mkdir -p ../install/config + $(RM) -rf ../linux-$(LINUX_VER)-xen + [ -e $(LINUX_SRC) ] || wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-$(LINUX_VER).tar.gz -O- > ../linux-$(LINUX_VER).tar.gz tar -x -z -C .. -f $(LINUX_SRC) - mv ../linux-2.4.26 ../linux-2.4.26-xen - cd ../linux-2.4.26-xen - cp $(LINUX_CONFIG_DIR)/dom0 .config - ARCH=xen make oldconfig; ARCH=xen make dep; ARCH=xen make bzImage - install -m0644 arch/xen/boot/bzImage \ - ../install/boot/vmlinuz-2.4.26-xen0 - install -m0644 vmlinux ../install/boot/vmlinux-syms-2.4.26-xen0 - ARCH=xen make mrproper - cp $(LINUX_CONFIG_DIR)/unprivileged .config - ARCH=xen make oldconfig; ARCH=xen make dep; ARCH=xen make bzImage - install -m0644 arch/xen/boot/bzImage \ - ../install/boot/vmlinuz-2.4.26-xen - install -m0644 vmlinux ../install/boot/vmlinux-syms-2.4.26-xen + mv ../linux-$(LINUX_VER) ../linux-$(LINUX_VER)-xen + ( cd linux-$(LINUX_VER)-xen-sparse ; ./mkbuildtree ../../linux-$(LINUX_VER)-xen ) + 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 + ( cd ../linux-$(LINUX_VER)-xen; ARCH=xen make oldconfig; ARCH=xen make dep; ARCH=xen make bzImage ) + install -m0644 ../linux-$(LINUX_VER)-xen/arch/xen/boot/bzImage \ + ../install/boot/vmlinuz-$(LINUX_VER)-xen0 + install -m0644 ../linux-$(LINUX_VER)-xen/vmlinux ../install/boot/vmlinux-syms-$(LINUX_VER)-xen0 + install -m0644 ../linux-$(LINUX_VER)-xen/.config $(LINUX_CONFIG_DIR)/dom0 + ( cd ../linux-$(LINUX_VER)-xen ; ARCH=xen make mrproper ) + 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 + ( cd ../linux-$(LINUX_VER)-xen; ARCH=xen make oldconfig; ARCH=xen make dep; ARCH=xen make bzImage ) + install -m0644 ../linux-$(LINUX_VER)-xen/arch/xen/boot/bzImage \ + ../install/boot/vmlinuz-$(LINUX_VER)-xen + install -m0644 ../linux-$(LINUX_VER)-xen/vmlinux ../install/boot/vmlinux-syms-$(LINUX_VER)-xen + install -m0644 ../linux-$(LINUX_VER)-xen/.config $(LINUX_CONFIG_DIR)/unprivileged clean: delete-symlinks $(MAKE) -C xen clean $(MAKE) -C tools clean make-symlinks: delete-symlinks - ln -sf linux-2.4.26-xen-sparse linux-xen-sparse + ln -sf linux-$(LINUX_VER)-xen-sparse linux-xen-sparse delete-symlinks: $(RM) linux-xen-sparse + \ No newline at end of file diff --git a/tools/misc/xen-clone b/tools/misc/xen-clone index 0815bf167d..ea3b483316 100755 --- a/tools/misc/xen-clone +++ b/tools/misc/xen-clone @@ -60,41 +60,66 @@ bk pull cd ${TOP} fi -# identify this version of linux -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!'` -if [ -z "${LINUX_VER}" ] +if [ -d ${DEST_BK_REP}/linux-*-xen-sparse ] then -echo Unable to identify Linux version. Bailing. -exit -1 -fi + # this is a new style Xen repository so building is dead easy + + LINUX_VER=`( /bin/ls -ld ${DEST_BK_REP}/*linux-*-xen-sparse ) 2>/dev/null | sed -e 's!^.*linux-\(.\+\)-xen-sparse!\1!'` + + if [ -e ${LINUX_DIR}/linux-${LINUX_VER}.tar.gz ] + LINUX_SRC=${LINUX_DIR}/linux-${LINUX_VER}.tar.gz + elif + wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-${LINUX_VER}.tar.gz -O- > linux-${LINUX_VER}.tar.gz + LINUX_SRC='' + fi + + cd ${DEST_BK_REP} + make world + cd ../install/boot + ln -s vmlinux-${LINUX_VER}-xen0 xenolinux.gz + +elif + # old style repository without 'make world' + + + # identify this version of linux + 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!'` + + if [ -z "${LINUX_VER}" ] + then + echo Unable to identify Linux version. Bailing. + exit -1 + fi + + # copy in the master Linux tree for this kernel + if [ ! -d linux-${LINUX_VER} ] + then + 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 + fi + + # build and install Xen and tools + cd ${DEST_BK_REP} + make dist || make install + + # Turn linux into xenolinux then build it + cd xenolinux-${LINUX_VER}-sparse + ./mkbuildtree ../../linux-${LINUX_VER} + cd ../.. + mv linux-${LINUX_VER} xenolinux-${LINUX_VER} + cd xenolinux-${LINUX_VER} + + # cope with the change from ARCH=xeno to ARCH=xen + cd arch; XEN=`/bin/ls -d xen*`; cd .. + + # built it all + ARCH=$XEN make oldconfig + ARCH=$XEN make dep + ARCH=$XEN make bzImage + ARCH=$XEN make dist || ARCH=xen make install + ARCH=$XEN make modules + ARCH=$XEN make INSTALL_MOD_PATH=${TOP}/install modules_install + cd .. -# copy in the master Linux tree for this kernel -if [ ! -d linux-${LINUX_VER} ] -then -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 fi -# build and install Xen and tools -cd ${DEST_BK_REP} -make dist || make install - -# Turn linux into xenolinux then build it -cd xenolinux-${LINUX_VER}-sparse -./mkbuildtree ../../linux-${LINUX_VER} -cd ../.. -mv linux-${LINUX_VER} xenolinux-${LINUX_VER} -cd xenolinux-${LINUX_VER} - -# cope with the change from ARCH=xeno to ARCH=xen -cd arch; XEN=`/bin/ls -d xen*`; cd .. - -# built it all -ARCH=$XEN make oldconfig -ARCH=$XEN make dep -ARCH=$XEN make bzImage -ARCH=$XEN make dist || ARCH=xen make install -ARCH=$XEN make modules -ARCH=$XEN make INSTALL_MOD_PATH=${TOP}/install modules_install -cd .. -