aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-07-24 18:17:47 +0200
committerKarel Kočí <cynerd@email.cz>2015-07-24 18:17:47 +0200
commita5b46f72ce599f8b03fb82e68fb197606855abae (patch)
treeffdcb38d7279460ee6ba3089b3bc6371eaae7836 /scripts
parentb6e75b3c98e9092a14a1a8d7142f43bb4cebc454 (diff)
downloadlinux-conf-perf-a5b46f72ce599f8b03fb82e68fb197606855abae.tar.gz
linux-conf-perf-a5b46f72ce599f8b03fb82e68fb197606855abae.tar.bz2
linux-conf-perf-a5b46f72ce599f8b03fb82e68fb197606855abae.zip
kernel.make is now copying linux image to jobfile folder
And make now returns name of image.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kernel.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/scripts/kernel.py b/scripts/kernel.py
index bfa1c50..092de1e 100644
--- a/scripts/kernel.py
+++ b/scripts/kernel.py
@@ -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'