> > The default script that uses them
> (tools/examples/xmexample.vmx) will
> > not look under lib64. Can you come up with a clean way to determine
> > the correct path from within that Python script, and resubmit?
>
> It would appear to be even safer (and simpler) to simply
> generate the right xmexample.vmx at compile time, expanding
> the $(LIBDIR) variable in just one place.
That's a bit grotty as I regularly use the same /etc/xen files under
both 32 and 64 bit. Having the path in the example file isn't nice
anyhow.
I think I'd prefer that we have a search path for such helper files. At
the very least the parameter shuld have a sensible default such that it
appears commetned out in the example.
Ian
> Signed-off-by: Rik van Riel <riel@xxxxxxxxxx>
>
> examples/Makefile | 8 ++-
> examples/xmexample.vmx | 96
> --------------------------------------
> examples/xmexample.vmx.in | 96
> ++++++++++++++++++++++++++++++++++++++
> ioemu/target-i386-dm/Makefile | 2
> 4 files changed, 103 insertions(+), 99 deletions(-)
>
> diff -Nurp xen-unstable.orig/tools/examples/Makefile
> xen-unstable/tools/examples/Makefile
> --- xen-unstable.orig/tools/examples/Makefile 2005-09-07
> 07:19:46.000000000 -0400
> +++ xen-unstable/tools/examples/Makefile 2005-09-12
> 14:35:28.000000000 -0400
> @@ -24,7 +24,7 @@ XEN_SCRIPTS += network-route vif-route
> XEN_SCRIPTS += block-file XEN_SCRIPTS += block-enbd
>
> -XEN_BOOT_DIR = /usr/lib/xen/boot
> +XEN_BOOT_DIR = /usr/$(LIBDIR)/xen/boot
> XEN_BOOT = mem-map.sxp
>
> XEN_HOTPLUG_DIR = /etc/hotplug
> @@ -36,12 +36,15 @@ build:
> install: all install-initd install-configs install-scripts
> install-boot \
> install-hotplug
>
> +xmexample.vmx: xmexample.vmx.in
> + sed -e 's/@@LIBDIR@@/$(LIBDIR)/' < $< > $@
> +
> install-initd:
> [ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR)
> $(DESTDIR)/etc/init.d
> $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
> $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
>
> -install-configs:
> +install-configs: $(XEN_CONFIGS)
> [ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
> $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
> [ -d $(DESTDIR)$(XEN_CONFIG_DIR)/auto ] || \ @@ -76,3
> +79,4 @@ install-hotplug:
> done
>
> clean:
> + $(RM) xmexample.vmx
> diff -Nurp xen-unstable.orig/tools/examples/xmexample.vmx
> xen-unstable/tools/examples/xmexample.vmx
> --- xen-unstable.orig/tools/examples/xmexample.vmx
> 2005-09-07 07:19:46.000000000 -0400
> +++ xen-unstable/tools/examples/xmexample.vmx 1969-12-31
> 19:00:00.000000000 -0500
> @@ -1,96 +0,0 @@
> -# -*- mode: python; -*-
> -#============================================================
> ================
> -# Python configuration setup for 'xm create'.
> -# This script sets the parameters used when a domain is
> created using 'xm create'.
> -# You use a separate script for each domain you want to
> create, or -# you can set the parameters for the domain on
> the xm command line.
> -#============================================================
> ================
> -
> -#------------------------------------------------------------
> ----------------
> -# Kernel image file.
> -kernel = "/usr/lib/xen/boot/vmxloader"
> -
> -# The domain build function. VMX domain uses 'vmx'.
> -builder='vmx'
> -
> -# Initial memory allocation (in megabytes) for the new domain.
> -memory = 128
> -
> -# A name for your domain. All domains must have different names.
> -name = "ExampleVMXDomain"
> -
> -# Which CPU to start domain on?
> -#cpu = -1 # leave to Xen to pick
> -
> -# Optionally define mac and/or bridge for the network interfaces.
> -# Random MACs are assigned if not given.
> -#vif = [ 'mac=aa:00:00:00:00:11, bridge=xen-br0' ]
> -
> -#------------------------------------------------------------
> ----------------
> -# Define the disk devices you want the domain to have access
> to, and -# what you want them accessible as.
> -# Each disk entry is of the form phy:UNAME,DEV,MODE -# where
> UNAME is the device, DEV is the device name the domain will
> see, -# and MODE is r for read-only, w for read-write.
> -
> -#disk = [ 'phy:hda1,hda1,r' ]
> -disk = [ 'file:/var/images/min-el3-i386.img,ioemu:hda,w' ]
> -
> -#------------------------------------------------------------
> ----------------
> -# Set according to whether you want the domain restarted
> when it exits.
> -# The default is 'onreboot', which restarts the domain when
> it shuts down -# with exit code reboot.
> -# Other values are 'always', and 'never'.
> -
> -#restart = 'onreboot'
> -
> -#============================================================
> ================
> -
> -
> -# New stuff
> -device_model = '/usr/lib/xen/bin/qemu-dm'
> -
> -# Advanced users only. Don't touch if you don't know what
> you're doing -memmap = '/usr/lib/xen/boot/mem-map.sxp'
> -
> -#------------------------------------------------------------
> -----------------
> -# Disk image for
> -#cdrom=
> -
> -#------------------------------------------------------------
> -----------------
> -# boot on floppy (a), hard disk (c) or CD-ROM (d) -#boot=[a|c|d]
> -#------------------------------------------------------------
> -----------------
> -# write to temporary files instead of disk image files
> -#snapshot=1
> -
> -#------------------------------------------------------------
> ----------------
> -# enable SDL library for graphics, default = 0 -sdl=0
> -
> -#------------------------------------------------------------
> ----------------
> -# enable VNC library for graphics, default = 1
> -vnc=1
> -
> -#------------------------------------------------------------
> ----------------
> -# enable spawning vncviewer(only valid when vnc=1), default = 1
> -vncviewer=1
> -
> -#------------------------------------------------------------
> ----------------
> -# no graphics, use serial port
> -#nographic=0
> -
> -
> -#------------------------------------------------------------
> -----------------
> -# enable audio support
> -#enable-audio=1
> -
> -
> -#------------------------------------------------------------
> -----------------
> -# set the real time clock to local time [default=0 i.e.
> set to utc]
> -#localtime=1
> -
> -
> -#------------------------------------------------------------
> -----------------
> -# start in full screen
> -#full-screen=1
> diff -Nurp xen-unstable.orig/tools/examples/xmexample.vmx.in
> xen-unstable/tools/examples/xmexample.vmx.in
> --- xen-unstable.orig/tools/examples/xmexample.vmx.in
> 1969-12-31 19:00:00.000000000 -0500
> +++ xen-unstable/tools/examples/xmexample.vmx.in
> 2005-09-12 14:22:26.000000000 -0400
> @@ -0,0 +1,96 @@
> +# -*- mode: python; -*-
> +#============================================================
> ==========
> +====== # Python configuration setup for 'xm create'.
> +# This script sets the parameters used when a domain is
> created using 'xm create'.
> +# You use a separate script for each domain you want to create, or #
> +you can set the parameters for the domain on the xm command line.
> +#============================================================
> ==========
> +======
> +
> +#------------------------------------------------------------
> ----------
> +------
> +# Kernel image file.
> +kernel = "/usr/@@LIBDIR@@/xen/boot/vmxloader"
> +
> +# The domain build function. VMX domain uses 'vmx'.
> +builder='vmx'
> +
> +# Initial memory allocation (in megabytes) for the new domain.
> +memory = 128
> +
> +# A name for your domain. All domains must have different names.
> +name = "ExampleVMXDomain"
> +
> +# Which CPU to start domain on?
> +#cpu = -1 # leave to Xen to pick
> +
> +# Optionally define mac and/or bridge for the network interfaces.
> +# Random MACs are assigned if not given.
> +#vif = [ 'mac=aa:00:00:00:00:11, bridge=xen-br0' ]
> +
> +#------------------------------------------------------------
> ----------
> +------ # Define the disk devices you want the domain to have
> access to,
> +and # what you want them accessible as.
> +# Each disk entry is of the form phy:UNAME,DEV,MODE # where UNAME is
> +the device, DEV is the device name the domain will see, #
> and MODE is r
> +for read-only, w for read-write.
> +
> +#disk = [ 'phy:hda1,hda1,r' ]
> +disk = [ 'file:/var/images/min-el3-i386.img,ioemu:hda,w' ]
> +
> +#------------------------------------------------------------
> ----------
> +------ # Set according to whether you want the domain
> restarted when it
> +exits.
> +# The default is 'onreboot', which restarts the domain when it shuts
> +down # with exit code reboot.
> +# Other values are 'always', and 'never'.
> +
> +#restart = 'onreboot'
> +
> +#============================================================
> ==========
> +======
> +
> +
> +# New stuff
> +device_model = '/usr/@@LIBDIR@@/xen/bin/qemu-dm'
> +
> +# Advanced users only. Don't touch if you don't know what
> you're doing
> +memmap = '/usr/@@LIBDIR@@/xen/boot/mem-map.sxp'
> +
> +#------------------------------------------------------------
> ----------
> +-------
> +# Disk image for
> +#cdrom=
> +
> +#------------------------------------------------------------
> ----------
> +------- # boot on floppy (a), hard disk (c) or CD-ROM (d)
> #boot=[a|c|d]
> +#------------------------------------------------------------
> ----------
> +------- # write to temporary files instead of disk image files
> +#snapshot=1
> +
> +#------------------------------------------------------------
> ----------
> +------ # enable SDL library for graphics, default = 0 sdl=0
> +
> +#------------------------------------------------------------
> ----------
> +------ # enable VNC library for graphics, default = 1
> +vnc=1
> +
> +#------------------------------------------------------------
> ----------
> +------ # enable spawning vncviewer(only valid when vnc=1),
> default = 1
> +vncviewer=1
> +
> +#------------------------------------------------------------
> ----------
> +------
> +# no graphics, use serial port
> +#nographic=0
> +
> +
> +#------------------------------------------------------------
> -----------------
> +# enable audio support
> +#enable-audio=1
> +
> +
> +#------------------------------------------------------------
> -----------------
> +# set the real time clock to local time [default=0 i.e.
> set to utc]
> +#localtime=1
> +
> +
> +#------------------------------------------------------------
> -----------------
> +# start in full screen
> +#full-screen=1
> diff -Nurp
> xen-unstable.orig/tools/ioemu/target-i386-dm/Makefile
> xen-unstable/tools/ioemu/target-i386-dm/Makefile
> --- xen-unstable.orig/tools/ioemu/target-i386-dm/Makefile
> 2005-09-07 07:19:46.000000000 -0400
> +++ xen-unstable/tools/ioemu/target-i386-dm/Makefile
> 2005-09-12 14:31:08.000000000 -0400
> @@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk include
> config.mak override TARGET_ARCH=i386
>
> -INSTALL_DIR := $(DESTDIR)/usr/lib/xen/bin
> +INSTALL_DIR := $(DESTDIR)/usr/$(LIBDIR)/xen/bin
> TARGET_PATH=$(SRC_PATH)/target-$(TARGET_ARCH)
> VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio
> DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH)
> -I$(XEN_ROOT)/xen/include/public
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|