3 import os,sys,imp,string
5 #map current machine information from uname() to the mainarch we are running under
7 machinemap={ "i386" : "x86",
14 #map the mainarch we are running under to the mainarches we support for building
15 #stages and LiveCDs. (for example, on amd64, we can build stages for x86 or amd64.
17 targetmap={ "x86" : ["x86"],
18 "amd64" : ["x86","amd64"]
21 mymachine=os.uname()[4]
22 if not machinemap.has_key(mymachine):
23 print "Unknown machine type:",mymachine
25 hostarch=machinemap[mymachine]
26 print "Host architecture:",hostarch
27 print "Supported architecture targets:",string.join(targetmap[hostarch])
28 print "Loading plugins:",
30 for x in targetmap[hostarch]:
31 fh=open("arch/"+x+".py")
32 archmap[x]=imp.load_module(x,fh,"arch/"+x+".py",(".py","r",imp.PY_SOURCE))