Rik van Riel
2005-Sep-12 17:23 UTC
[Xen-devel] [PATCH] install to /usr/$(LIB)/ instead of /usr/lib
This trivial patch makes sure that mem-map.sxp and the qemu bits get installed in /usr/lib64 on distributions that want things there. Signed-off-by: Rik van Riel <riel@redhat.com> --- xen-unstable/tools/examples/Makefile.lib64 2005-09-12 13:19:52.000000000 -0400 +++ xen-unstable/tools/examples/Makefile 2005-09-12 13:20:09.000000000 -0400 @@ -21,7 +21,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/$(LIB)/xen/boot XEN_BOOT = mem-map.sxp all: --- xen-unstable/tools/ioemu/target-i386-dm/Makefile.lib64 2005-09-12 13:19:07.000000000 -0400 +++ xen-unstable/tools/ioemu/target-i386-dm/Makefile 2005-09-12 13:19:33.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@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2005-Sep-12 18:03 UTC
Re: [Xen-devel] [PATCH] install to /usr/$(LIB)/ instead of /usr/lib
On 12 Sep 2005, at 18:23, Rik van Riel wrote:> This trivial patch makes sure that mem-map.sxp and the qemu bits > get installed in /usr/lib64 on distributions that want things > there.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? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Rik van Riel
2005-Sep-12 18:38 UTC
Re: [Xen-devel] [PATCH] install to /usr/$(LIB)/ instead of /usr/lib
On Mon, 12 Sep 2005, Keir Fraser wrote:> On 12 Sep 2005, at 18:23, Rik van Riel wrote: > > > This trivial patch makes sure that mem-map.sxp and the qemu bits > > get installed in /usr/lib64 on distributions that want things > > there. > > 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. Signed-off-by: Rik van Riel <riel@redhat.com> 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@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Pratt
2005-Sep-13 19:33 UTC
RE: [Xen-devel] [PATCH] install to /usr/$(LIB)/ instead of /usr/lib
> > 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@redhat.com> > > 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@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2005-Sep-13 19:36 UTC
Re: [Xen-devel] [PATCH] install to /usr/$(LIB)/ instead of /usr/lib
On 13 Sep 2005, at 20:38, Kamble, Nitin A wrote:> The vmxloader install path also needs to be changed with the rik''s > patch.Actually, it''s probably correct to always put vmxloader in /usr/lib, as it''s a 32-bit binary. So probably one line of Rik''s patch should be reverted? Now I think about it, mem-map.sxp is not different on a 64-bit build either. Perhaps only qemu-dm need ever be installed under /usr/lib64? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kamble, Nitin A
2005-Sep-13 19:38 UTC
RE: [Xen-devel] [PATCH] install to /usr/$(LIB)/ instead of /usr/lib
The vmxloader install path also needs to be changed with the rik''s patch. # HG changeset patch # User nitin@los-vmm.sc.intel.com # Node ID dc54c0a1649d8044150de1b1fa0a7c3d30ddf780 # Parent 0064f626444517b852a946315d8ec13321750d0a Bugfix for 64bit path Signed-off-by: Nitin Kamble <nitin.a.kamble@intel.com> diff -r 0064f6264445 -r dc54c0a1649d tools/firmware/Makefile --- a/tools/firmware/Makefile Tue Sep 13 17:42:00 2005 +++ b/tools/firmware/Makefile Tue Sep 13 19:36:55 2005 @@ -2,7 +2,7 @@ include $(XEN_ROOT)/tools/Rules.mk TARGET := vmxassist/vmxloader -INSTALL_DIR := $(DESTDIR)/usr/lib/xen/boot +INSTALL_DIR := $(DESTDIR)/usr/$(LIBDIR)/xen/boot SUBDIRS : SUBDIRS += rombios Thanks & Regards, Nitin ------------------------------------------------------------------------ ----------- Sr Software Engineer Open Source Technology Center, Intel Corp>-----Original Message----- >From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel- >bounces@lists.xensource.com] On Behalf Of Rik van Riel >Sent: Monday, September 12, 2005 11:38 AM >To: Keir Fraser >Cc: xen-devel@lists.xensource.com >Subject: Re: [Xen-devel] [PATCH] install to /usr/$(LIB)/ instead of >/usr/lib > >On Mon, 12 Sep 2005, Keir Fraser wrote: >> On 12 Sep 2005, at 18:23, Rik van Riel wrote: >> >> > This trivial patch makes sure that mem-map.sxp and the qemu bits >> > get installed in /usr/lib64 on distributions that want things >> > there. >> >> The default script that uses them (tools/examples/xmexample.vmx) will >> not look under lib64. Can you come up with a clean way to determinethe>> 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. > >Signed-off-by: Rik van Riel <riel@redhat.com> > > 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-1214: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-scriptsinstall-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 willsee,>-# 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 itexits.>-# The default is ''onreboot'', which restarts the domain when it shutsdown>-# 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 willsee,>+# 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 itexits.>+# The default is ''onreboot'', which restarts the domain when it shutsdown>+# 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/Makefile2005-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@lists.xensource.com >http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2005-Sep-13 20:21 UTC
Re: [Xen-devel] [PATCH] install to /usr/$(LIB)/ instead of /usr/lib
On 13 Sep 2005, at 20:36, Keir Fraser wrote:>> The vmxloader install path also needs to be changed with the rik''s >> patch. > > Actually, it''s probably correct to always put vmxloader in /usr/lib, > as it''s a 32-bit binary. So probably one line of Rik''s patch should be > reverted? > > Now I think about it, mem-map.sxp is not different on a 64-bit build > either. Perhaps only qemu-dm need ever be installed under /usr/lib64?Well, I have a patch almost ready to apply, but I''m really not sure where vmxloader and mem-map.sxp ought to go. vmxloader is not a localhost executable or linkable object. It is a piece of binary code that runs in 32-bit protected mode within the vmx guest. mem-map.sxp is a config file, common to both i386 and x86_64, that describes the fake physical memory map for the vmx guest. Should these go under /usr/lib64, or under /usr/lib, or somewhere else entirely? :-( -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Nakajima, Jun
2005-Sep-13 20:38 UTC
RE: [Xen-devel] [PATCH] install to /usr/$(LIB)/ instead of /usr/lib
Keir Fraser wrote:> On 13 Sep 2005, at 20:38, Kamble, Nitin A wrote: > >> The vmxloader install path also needs to be changed with the rik''s >> patch. > > Actually, it''s probably correct to always put vmxloader in /usr/lib, > as it''s a 32-bit binary. So probably one line of Rik''s patch should be > reverted?vmxloader must be identical for both 32-bit and 64-bit.> > Now I think about it, mem-map.sxp is not different on a 64-bit build > either. Perhaps only qemu-dm need ever be installed under /usr/lib64?Yes, only qemu-dm is architecture-dependent, and it should there.> > -- Keir > >Jun --- Intel Open Source Technology Center _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel