WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] handy script

Other might find the following little script useful, which I'll
add to tools/misc

Run at the root of a xenolinux build tree, it 'renames' the xen
architecture directories to be 'i386', so that you can get a xen
build of the tree just by typing 'make'. 

The main reason for wanting to do this is if you've got some
other package that wants to patch the kernel and has some complex
build system that you can't be bothered to figure out and make
work with ARCH=xen (e.g. OpenAFS or Freeswan/IPSEC). This script
will make the tree look just like an i386 tree, so unless the
patch conflicts with arch Xen (which is pretty unlikely) the
package's normal make procedure should just work.

Ian

-------------------------------

#!/bin/bash

cln () {
while [ $# -gt 0 ]; do
  (
    test -f "$1" || { echo "$1: No such file or directory" 1>&2; exit 1; }
    { cp $1 cln$$ && rm $1 && mv cln$$ $1; } || { rm -f cln$$; exit 1; }
  )
  shift
done
}


for i in `find include/asm-xen arch/xen -type l | xargs ls -l | egrep 
'../(asm-)?i386/' | awk '{print $9}'`
do
  #echo $i
  cln $i
done

mv include/asm-i386 include/asm-Xi386
mv include/asm-xen include/asm-i386
ln -s asm-i386 include/asm-xen
rm include/asm
ln -s asm-i386 include/asm
mv arch/i386 arch/Xi386
mv arch/xen arch/i386
ln -s i386 arch/xen

mv Makefile XMakefile
#sed -e 's/^EXTRAVERSION =.*/EXTRAVERSION = -xen/' <XMakefile >Makefile
echo ARCH=i386 >Makefile ; cat XMakefile >>Makefile





-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] handy script, Ian Pratt <=