From 1f03ca6d0f0c82b45c2e7c658a0c36100e24349f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 18 May 2015 13:21:07 +0200 Subject: Make nbscript not generated --- scripts/boot.py | 2 -- scripts/initialize.py | 17 ----------------- scripts/kernel.py | 6 ++++++ scripts/nbscript | 4 ++++ 4 files changed, 10 insertions(+), 19 deletions(-) create mode 100644 scripts/nbscript (limited to 'scripts') diff --git a/scripts/boot.py b/scripts/boot.py index a055998..3e715aa 100644 --- a/scripts/boot.py +++ b/scripts/boot.py @@ -11,8 +11,6 @@ from conf import sf from exceptions import MissingFile def boot(): - if not os.path.isfile((conf.nbscript)): - initialize.gen_nbscript() try: os.mkdir(sf(conf.output_folder)) except FileExistsError: diff --git a/scripts/initialize.py b/scripts/initialize.py index e38e2b8..da54aee 100755 --- a/scripts/initialize.py +++ b/scripts/initialize.py @@ -15,7 +15,6 @@ import exceptions def all(): base() - gen_nbscript() parse_kconfig() gen_requred() if conf.gen_all_solution_oninit: @@ -87,22 +86,6 @@ def gen_requred(): freq.write("-" + str(srmap[line[7:indx]]) + "\n") -def gen_nbscript(): - print('Generating nbscript...') - if os.path.isfile(sf(conf.nbscript)): - print("Warning: file " + conf.nbscript + - " already exists. Generation skipped.") - return - - wd = os.getcwd() - os.chdir(os.path.dirname(sf(conf.nbscript))) - prefix = os.path.relpath(conf.absroot) - os.chdir(wd) - with open(sf(conf.nbscript), 'w') as f: - f.write('# generated novaboot script. Please don\'t edit unless you know what are you doing.\n') - f.write('load ' + os.path.join(prefix, conf.linux_image) + ' console=ttyS0,115200\n') - f.write('load ' + os.path.join(prefix, conf.buildroot_initram) + '\n') - ################################################################################# if __name__ == '__main__': diff --git a/scripts/kernel.py b/scripts/kernel.py index 71ad1ac..372e111 100644 --- a/scripts/kernel.py +++ b/scripts/kernel.py @@ -43,4 +43,10 @@ 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 + os.chdir(wd) diff --git a/scripts/nbscript b/scripts/nbscript new file mode 100644 index 0000000..ef99dd8 --- /dev/null +++ b/scripts/nbscript @@ -0,0 +1,4 @@ +#!/usr/bin/env novaboot +# Novaboot script +load ../jobfiles/linuxImage console=ttyS0,115200 +load ../buildroot/output/images/rootfs.cpio.gz -- cgit v1.2.3