aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile8
-rw-r--r--conf.py27
-rwxr-xr-xscripts/confmk.py2
-rw-r--r--scripts/solution.py2
4 files changed, 27 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index d9a2c2c..a933cbb 100644
--- a/Makefile
+++ b/Makefile
@@ -31,14 +31,14 @@ help:
@echo "clean_buildroot - Executes 'make clean' in buildroot folder."
@echo "distclean_buildroot - Executes 'make distclean' in buildroot folder."
-mbuildroot: scripts/buildroot/.config scripts/buildroot/system/skeleton/usr/bin/linux-conf-perf $(BENCHMARK_FILES)
- $(MAKE) -C scripts/buildroot menuconfig
+mbuildroot: buildroot/.config buildroot/system/skeleton/usr/bin/linux-conf-perf
+ $(MAKE) -C buildroot menuconfig
mlinux:
- ARCH=$(SRCARCH) $(MAKE) -C linux menuconfig
+ ARCH=$(ARCH) $(MAKE) -C linux menuconfig
deflinux:
- ARCH=$(SRCARCH) $(MAKE) -C linux defconfig
+ ARCH=$(ARCH) $(MAKE) -C linux defconfig
init: initialize
initialize: parse_kconfig picosat
diff --git a/conf.py b/conf.py
index 0d7a487..9e6d094 100644
--- a/conf.py
+++ b/conf.py
@@ -1,27 +1,40 @@
import os
-# Global configs
-SRCARCH = 'x86' # Kernel architecture
-ARCH = SRCARCH
+## Global configs
+# ARCH
+# This defines environment variable for linux kernel.
+# Change this to change target architecture
+ARCH = 'x86'
+# SRCARCH
+# This defines environment variable for linux kernel.
+# You most probably don't want to changing this.
+SRCARCH = ARCH
+# linux_make_args
+# These are arguments passed to make when linux is build
linux_make_args = ['-j8']
+# novaboot_args
+# These are arguments passed to novaboot,
+# but only if you don't remove it from boot_command.
novaboot_args = ['--qemu=qemu-system-x86_64']
gen_all_solution_oninit = True # If True, all solutions are generated at initialization.
+boot_command = [conf.novaboot, conf.nbscript] + novaboot_args
picosat_args = []
-# Programs output show/hide
+## Programs output show/hide
parse_kconfig_output = False
picosat_output = False
kernel_config_output = True
kernel_make_output = True
boot_output = True
-# Configs for debugging
+## Configs for debugging
step_by_step = False # Executes only single step and exits.
single_loop = False # Executes only one loop and exits.
only_config = True # Executes only to configuration phase. Building and booting phases are skipped.
ignore_misconfig = False
#######################################
-# Path settings
+# Most probably you don't want touch rest of these.
+## Path settings
dot_confmk = '.conf.mk'
dot_config = 'dot_config'
@@ -55,7 +68,7 @@ log_folder = 'log/'
nbscript = 'scripts/nbscript'
-# Programs paths
+## Programs paths
parse_kconfig = 'scripts/parse_kconfig/parse'
write_config = 'scripts/write_config/write'
novaboot = 'scripts/novaboot/novaboot'
diff --git a/scripts/confmk.py b/scripts/confmk.py
index 030e764..c688ed9 100755
--- a/scripts/confmk.py
+++ b/scripts/confmk.py
@@ -11,7 +11,7 @@ def gen_confmk():
with open(conf.dot_confmk, 'w') as f:
f.write("# This file is generated. Please don't edit this file.\n")
- f.write("SRCARCH := " + conf.SRCARCH + "\n")
+ f.write("ARCH := " + conf.SRCARCH + "\n")
f.write("\n")
f.write("BUILDROOT_INITRAM := " + conf.buildroot_initram + "\n")
f.write("BUILDROOT_INITTAB_DIRECTIVE := " + conf.buildroot_inittab_directive + "\n")
diff --git a/scripts/solution.py b/scripts/solution.py
index f9f605b..1ee1664 100644
--- a/scripts/solution.py
+++ b/scripts/solution.py
@@ -101,11 +101,13 @@ def apply():
solved = set()
solution = []
+ # Load set of solved solutions
if os.path.isfile(sf(config_solved_file)):
with open(sf(conf.config_solved_file)) as f:
for ln in f:
solved.add(ln.strip())
+ # Load one solution if it is not in solved
with open(sf(conf.config_map_file)) as f:
while True:
w = f.readline().split(sep=':')