ppc64: must boot vmlinux else initrd will not be loaded

When we install a kernel for ppc64 we must actually use the vmlinux
to boot.  If we do not the initrd will be ignored and the kernel
boot will fail.  When we use a compressed image use vmlinuz-autotest
else vmlinux-autotest.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@397 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/bin/kernel.py b/client/bin/kernel.py
index 37de9eb..93a689e 100755
--- a/client/bin/kernel.py
+++ b/client/bin/kernel.py
@@ -261,18 +261,26 @@
 		if not os.path.isdir(self.boot_dir):
 			os.mkdir(self.boot_dir)
 
-		image = glob.glob('arch/*/boot/' + self.build_target)[0]
+		images = glob.glob('arch/*/boot/' + self.build_target)
+		if len(images):
+			image = images[0]
+		else:
+			image = self.build_target
 
 		# remember installed files
-		self.image = self.boot_dir + '/vmlinuz-' + tag
 		self.vmlinux = self.boot_dir + '/vmlinux-' + tag
+		if (image != 'vmlinux'):
+			self.image = self.boot_dir + '/vmlinuz-' + tag
+		else:
+			self.image = self.vmlinux
 		self.system_map = self.boot_dir + '/System.map-' + tag
 		self.config = self.boot_dir + '/config-' + tag
 		self.initrd = ''
 
 		# copy to boot dir
-		force_copy(image, self.image)
 		force_copy('vmlinux', self.vmlinux)
+		if (image != 'vmlinux'):
+			force_copy(image, self.image)
 		force_copy('System.map', self.system_map)
 		force_copy('.config', self.config)
 
@@ -390,7 +398,7 @@
 			target_arch = get_current_kernel_arch()
 			if target_arch == 'ppc64':
 				if self.build_target == 'bzImage':
-					self.build_target = 'zImage'
+					self.build_target = 'vmlinux'
 			
 		return                 # HACK. Crap out for now.