diff options
author | Ewan Mellor <ewan@xensource.com> | 2006-10-23 10:15:39 +0100 |
---|---|---|
committer | Ewan Mellor <ewan@xensource.com> | 2006-10-23 10:15:39 +0100 |
commit | 7c0553c867e4a218a5a0254001b26576432d63e9 (patch) | |
tree | 3beb91628f2d9b71feb435ac37acd42c91124114 /tools/xm-test/lib | |
parent | 3c1dd690bcbe9455f16ae1ac0d084a6f0e8f0f41 (diff) | |
download | xen-7c0553c867e4a218a5a0254001b26576432d63e9.tar.gz xen-7c0553c867e4a218a5a0254001b26576432d63e9.tar.bz2 xen-7c0553c867e4a218a5a0254001b26576432d63e9.zip |
Add configuration data for powerpc.
Allows for building of initrd, and running of tests.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Diffstat (limited to 'tools/xm-test/lib')
-rw-r--r-- | tools/xm-test/lib/XmTestLib/arch.py | 26 | ||||
-rw-r--r-- | tools/xm-test/lib/XmTestReport/arch.py | 6 |
2 files changed, 32 insertions, 0 deletions
diff --git a/tools/xm-test/lib/XmTestLib/arch.py b/tools/xm-test/lib/XmTestLib/arch.py index 8ecc755b36..07df8a352d 100644 --- a/tools/xm-test/lib/XmTestLib/arch.py +++ b/tools/xm-test/lib/XmTestLib/arch.py @@ -80,6 +80,26 @@ ia_HVMDefaults = {"memory" : 64, } # End : Intel ia32 and ia64 as well as AMD 32-bit and 64-bit processors +# Begin: PowerPC +def ppc_minSafeMem(): + return 64 + +def ppc_getDefaultKernel(): + """Get the path to the default DomU kernel""" + dom0Ver = commands.getoutput("uname -r"); + domUVer = dom0Ver.replace("xen0", "xenU"); + + return "/boot/vmlinux-" + domUVer; + +ppc_ParavirtDefaults = {"memory" : 64, + "vcpus" : 1, + "kernel" : ppc_getDefaultKernel(), + "root" : "/dev/ram0", + "ramdisk" : getRdPath() + "/initrd.img", + "extra" : "xencons=tty128 console=tty128", +} +# End : PowerPC + """Convert from uname specification to a more general platform.""" _uname_to_arch_map = { "i386" : "x86", @@ -87,6 +107,8 @@ _uname_to_arch_map = { "i586" : "x86", "i686" : "x86", "ia64" : "ia64", + "ppc" : "powerpc", + "ppc64" : "powerpc", } # Lookup current platform. @@ -98,5 +120,9 @@ if _arch == "x86" or _arch == "ia64": configDefaults = ia_HVMDefaults else: configDefaults = ia_ParavirtDefaults +elif _arch == "powerpc": + minSafeMem = ppc_minSafeMem + getDefaultKernel = ppc_getDefaultKernel + configDefaults = ppc_ParavirtDefaults else: raise ValueError, "Unknown architecture!" diff --git a/tools/xm-test/lib/XmTestReport/arch.py b/tools/xm-test/lib/XmTestReport/arch.py index 24bf985323..e4fd16273d 100644 --- a/tools/xm-test/lib/XmTestReport/arch.py +++ b/tools/xm-test/lib/XmTestReport/arch.py @@ -29,6 +29,8 @@ _uname_to_arch_map = { "i586" : "x86", "i686" : "x86", "ia64" : "ia64", + "ppc" : "powerpc", + "ppc64" : "powerpc", } _arch = _uname_to_arch_map.get(os.uname()[4], "Unknown") @@ -38,5 +40,9 @@ if _arch == "x86": elif _arch == "ia64": cpuValues = {"arch" : "Unknown", "features" : "Unknown"} +elif _arch == "powerpc": + cpuValues = {"cpu" : "Unknown", + "platform" : "Unknown", + "revision" : "Unknown"} else: raise ValueError, "Unknown architecture!" |