]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
ts-kernel-build: Include dtbs in dist file
authorIan Campbell <ian.campbell@citrix.com>
Thu, 1 Oct 2015 10:08:49 +0000 (11:08 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 8 Oct 2015 16:19:14 +0000 (17:19 +0100)
These are installed to $(INSTALL_PATH)/dtbs/$(KERNEL_RELEASE) where
$(INSTALL_PATH) defaults to /boot but we override it to our staging
/boot.

Note that ts-host-install will install the OS dtbs directly into
/boot/dtbs without the subdirectory, so this won't clash and could be
considered a fallback hence I don't propose to move those ones.

The install_dtbs target has been available since v3.14, wherease we
only test v3.16 onwards on ARM, hence no arrangements are needed to
conditionalise this installation over and above the per-arch
arrangements made here.

Having now set $(INSTALL_PATH) I think the "install" target could now
take over the installation of System.map, vmlinux and .config into
/boot but I've not checked this with all historical kernel versions
and don't intend to make this change now.

Remove any previous dist dir on install, otherwise the kernel tends to
create dist/boot/dtbs.old with the previous contents on repeated use.
Seems like good hygiene anyway.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
ts-kernel-build

index d6f3adcde46008bf23eb8aedaf96eb7af52dac17..56bcfbde14fe800b5a97e705c255994865c9740c 100755 (executable)
@@ -38,10 +38,10 @@ selectbuildhost(\@ARGV);
 builddirsprops();
 
 my $archparms = {
-    'arm64' => {                          Image => 'Image' },
-    'armhf' => { DefConfig => 'multi_v7', Image => 'zImage' },
-    'i386'  => {                          Image => 'bzImage' },
-    'amd64' => {                          Image => 'bzImage' }
+    'arm64' => {                          Image => 'Image',  Dtbs => 1 },
+    'armhf' => { DefConfig => 'multi_v7', Image => 'zImage', Dtbs => 1 },
+    'i386'  => {                          Image => 'bzImage'           },
+    'amd64' => {                          Image => 'bzImage'           }
 };
 my $parms = $archparms->{ $r{arch} };
 
@@ -380,10 +380,17 @@ sub kinstall () {
     $kernfile = "arch/$karch/boot/$parms->{Image}"
        if !defined $kernfile;
 
+    my $dtbs_install = '';
+    $dtbs_install = 'dtbs_install' if $parms->{Dtbs};
+
     target_cmd_build($ho, 300, $builddir, <<END);
+       rm -rf dist
        mkdir -p dist/boot dist/lib/modules
        cd linux
-       make $makeflags INSTALL_MOD_PATH=$builddir/dist modules_install
+       make $makeflags \\
+               INSTALL_PATH=$builddir/dist/boot \\
+               INSTALL_MOD_PATH=$builddir/dist \\
+               modules_install $dtbs_install
        cp System.map $builddir/dist/boot/
        cp $kernfile $builddir/dist/boot/vmlinuz
        cp .config $builddir/dist/boot/config