aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--conf.py1
-rw-r--r--scripts/boot.py2
-rwxr-xr-xscripts/initialize.py17
-rw-r--r--scripts/kernel.py6
-rw-r--r--scripts/nbscript4
6 files changed, 11 insertions, 21 deletions
diff --git a/.gitignore b/.gitignore
index 8c11245..b3c0b2b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,5 +10,3 @@ log
result
dot_config
__*__
-
-scripts/nbscript
diff --git a/conf.py b/conf.py
index 8700111..b4b392a 100644
--- a/conf.py
+++ b/conf.py
@@ -54,6 +54,7 @@ buildroot_initscript = 'scripts/buildroot_recipe/linux-conf-perf'
buildroot_initram = 'buildroot/output/images/rootfs.cpio.gz'
build_folder = 'jobfiles/'
+jobfolder_linux_image = build_folder + 'linuxImage'
phase_file = build_folder + 'phase'
symbol_map_file = build_folder + 'symbol_map' # Also defined in parse_kconfig
rules_file = build_folder + 'rules' # Also defined in parse_kconfig
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