aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-05-10 16:03:15 +0200
committerKarel Kočí <cynerd@email.cz>2015-05-10 16:03:15 +0200
commitf99099cbe511dc81ba58f4097462b7270a826d6f (patch)
tree17e557abd9b13e5b9a9d23cfe7af8f1b6accc3e4
parent0e28187dca6fe44c5a319045012d4e9927c6158f (diff)
downloadlinux-conf-perf-f99099cbe511dc81ba58f4097462b7270a826d6f.tar.gz
linux-conf-perf-f99099cbe511dc81ba58f4097462b7270a826d6f.tar.bz2
linux-conf-perf-f99099cbe511dc81ba58f4097462b7270a826d6f.zip
Add initialize messages and initialize sourcing from dot_config not from linux/.config
-rw-r--r--conf.py2
-rwxr-xr-xscripts/initialize.py29
2 files changed, 16 insertions, 15 deletions
diff --git a/conf.py b/conf.py
index 829aecd..0d7a487 100644
--- a/conf.py
+++ b/conf.py
@@ -23,7 +23,7 @@ ignore_misconfig = False
#######################################
# Path settings
dot_confmk = '.conf.mk'
-benchmark_python = 'benchmark.py'
+dot_config = 'dot_config'
linux_sources = 'linux/'
linux_kconfig_head = linux_sources + 'Kconfig'
diff --git a/scripts/initialize.py b/scripts/initialize.py
index 8a1dce8..38d17be 100755
--- a/scripts/initialize.py
+++ b/scripts/initialize.py
@@ -20,6 +20,7 @@ def all():
solution.generate()
def base():
+ print('Initialize base...')
try: os.mkdir(sf(conf.build_folder))
except FileExistsError:
pass
@@ -37,6 +38,7 @@ def base():
def parse_kconfig():
"Execute parse_kconfig in linux_sources directory."
+ print('Executing parse_kconfig...')
env = dict(os.environ)
wd = os.getcwd()
os.chdir(sf(conf.linux_sources))
@@ -50,6 +52,7 @@ def parse_kconfig():
def gen_requred():
"Generates required depenpency from .config file in linux source tree."
+ print('Generating required configuration...')
if not os.path.isfile(sf(conf.linux_dot_config)):
raise exceptions.MissingFile(sf(conf.linux_dot_config),
@@ -58,27 +61,25 @@ def gen_requred():
utils.build_symbol_map() # Ensure smap existence
srmap = {value:key for key, value in utils.smap.items()}
- shutil.copy(sf(conf.linux_dot_config), sf(conf.dot_config_back_file))
+ shutil.copy(sf(conf.dot_config), sf(conf.dot_config_back_file))
- with open(sf(conf.linux_dot_config), 'r') as f:
+ with open(sf(conf.dot_config), 'r') as f:
with open(sf(conf.required_file), 'w') as freq:
- with open(sf(conf.dot_config_fragment_file), 'w') as fconf:
- for line in f:
- if (line[0] == '#') or (not '=' in line):
- continue
- indx = line.index('=')
- if (line[7:indx] == "MODULES"): # skip if modules set
+ for line in f:
+ if (line[0] == '#') or (not '=' in line):
+ continue
+ indx = line.index('=')
+ if (line[indx + 1] == 'y'):
+ if line[7:indx] == "MODULES": # skip if modules set
raise exceptions.ConfigurationError("Initial kernel configuration must have MODULES disabled.")
- if (line[indx + 1] == 'y'):
- freq.write(str(srmap[line[7:indx]]) + "\n")
- elif (line[indx + 1] == 'n' or line[indx + 1] == 'm'):
- freq.write("-" + str(srmap[line[7:indx]]) + "\n")
- else:
- fconf.write(line);
+ freq.write(str(srmap[line[7:indx]]) + "\n")
+ elif (line[indx + 1] == 'n' or line[indx + 1] == 'm'):
+ freq.write("-" + str(srmap[line[7:indx]]) + "\n")
freq.write("-" + str(srmap["MODULES"]) + "\n"); # force modules no
def gen_nbscript():
+ print('Generating nbscript...')
if os.path.isfile(sf(conf.nbscript)):
print("Warning: file " + conf.nbscript +
" already exists. Generation skipped.")