From: Kevin Hilman <[email protected]>

- cross-compilation: (cross-compile.patch)

Currently this is done simply by adding args to the set_cross_cc()
method allowing the job script to call it before it is called by
build().  This is still kinda clumsy, but at least a start.  I'm open to
suggestions for other ways this should be done.

- building an already uncompressed/patched kernel (kernel-dir.patch)

This allows you to build from a tree checked out from git, or otherwise
uncompressed or prepatched kernel, and pass in the dir instead of a
kernel tarball

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

mbligh also renamed get_arch / get_host_arch according to:

Probably also I should change get_target_arch() to go off the
current uname, which is the arch of the kernel, rather than the
cpu. So perhaps renaming things still makes sense ... but we
have "get the arch of the cpu" and "get the arch of the kernel".
So perhaps get_arch and get_target_arch should be named
get_cpu_arch and get_kernel_arch ? 



git-svn-id: http://test.kernel.org/svn/autotest/trunk@161 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/bin/autotest_utils.py b/bin/autotest_utils.py
index 0c2e344..7ddd411 100755
--- a/bin/autotest_utils.py
+++ b/bin/autotest_utils.py
@@ -169,7 +169,7 @@
 	return '/lib/modules/%s/kernel' % kernel_version
 
 
-def get_arch():
+def get_cpu_arch():
 	"""Work out which CPU architecture we're running on"""
 	f = open('/proc/cpuinfo', 'r')
 	cpuinfo = f.readlines()
@@ -192,11 +192,11 @@
 		return 'i386'
 
 
-def get_target_arch():
-	"""Work out the target architecture."""
-	arch = get_arch()
-	if arch.startswith('power'):
-		return 'ppc64'
+def get_kernel_arch():
+	"""Work out the current kernel architecture (as a kernel arch)"""
+	arch = os.popen('uname -m').read().rstrip()
+	if ((arch == 'i586') or (arch == 'i686')):
+		return 'i386'
 	else:
 		return arch