[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH OSSTEST 4/8] ts-kernel-build: Refactor $archparams KernelImage handling



This is always arch/$karch/boot/$img. Store $img in %archparms and use
%arch_debian2linux to construct the full path as needed.

This makes the $archparams less verbose.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 ts-kernel-build | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/ts-kernel-build b/ts-kernel-build
index 8443754..7240b5e 100755
--- a/ts-kernel-build
+++ b/ts-kernel-build
@@ -42,9 +42,9 @@ selectbuildhost(\@ARGV);
 builddirsprops();
 
 my $archparms = {
-    'armhf' => { DefConfig => 'multi_v7', KernelImage => 
'arch/arm/boot/zImage' },
-    'i386'  => {                          KernelImage => 
'arch/x86/boot/bzImage' },
-    'amd64' => {                          KernelImage => 
'arch/x86/boot/bzImage' }
+    'armhf' => { DefConfig => 'multi_v7', Image => 'zImage' },
+    'i386'  => {                          Image => 'bzImage' },
+    'amd64' => {                          Image => 'bzImage' }
 };
 my $parms = $archparms->{ $r{arch} };
 
@@ -379,7 +379,9 @@ END
 
 sub kinstall () {
     my $kernfile= $r{kimagefile};
-    $kernfile= $parms->{KernelImage} if !defined $kernfile;
+    my $karch = $arch_debian2linux{$r{arch}};
+    $kernfile = "arch/$karch/boot/$parms->{Image}"
+       if !defined $kernfile;
 
     target_cmd_build($ho, 300, $builddir, <<END);
        mkdir -p dist/boot dist/lib/modules
-- 
2.5.3


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.