]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
ts-kernel-build: Refactor $archparams KernelImage handling
authorIan Campbell <ian.campbell@citrix.com>
Thu, 1 Oct 2015 09:39:24 +0000 (10:39 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 8 Oct 2015 16:19:13 +0000 (17:19 +0100)
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@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
ts-kernel-build

index c22c39fbdc3b99748dfae681b2d81c310d0b887e..639864ba323a0ab5533c0c2383667194638a6dbc 100755 (executable)
@@ -38,9 +38,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} };
 
@@ -375,7 +375,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