]> rtime.felk.cvut.cz Git - linux-conf-perf.git/commitdiff
kernel.make is now copying linux image to jobfile folder
authorKarel Kočí <cynerd@email.cz>
Fri, 24 Jul 2015 16:17:47 +0000 (18:17 +0200)
committerKarel Kočí <cynerd@email.cz>
Fri, 24 Jul 2015 16:17:47 +0000 (18:17 +0200)
And make now returns name of image.

scripts/kernel.py

index bfa1c507c0cb0506b9621f9129a255602d7d5900..092de1e0b85e41064ad5faba52a62319d650fb6b 100644 (file)
@@ -1,6 +1,7 @@
 import os
 import sys
 import subprocess
+import shutil
 
 from conf import conf
 from conf import sf
@@ -31,7 +32,7 @@ def config(cfile):
 #                      stdout=subprocess.DEVNULL, env=utils.get_kernel_env())
 #      os.chdir(wd)
 
-def make():
+def make(confhash):
        wd = os.getcwd()
        os.chdir(sf(conf.linux_sources))
        if conf.kernel_make_output:
@@ -39,10 +40,7 @@ def make():
        else:
                subprocess.call(conf.build_command, stdout=subprocess.DEVNULL,
                                env=utils.get_kernel_env())
-
-       try:
-               os.symlink(sf(conf.linux_image), sf(conf.jobfolder_linux_image))
-       except FileExistsError:
-               pass
-
+       jobimage = os.path.join(sf(conf.build_folder), confhash + '_linux.img')
+       shutil.move(sf(conf.linux_image), jobimage)
        os.chdir(wd)
+       return confhash + '_linux.img'