diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/exceptions.py | 6 | ||||
-rw-r--r-- | scripts/initialize.py | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/scripts/exceptions.py b/scripts/exceptions.py index 722c44a..5b55294 100644 --- a/scripts/exceptions.py +++ b/scripts/exceptions.py @@ -19,3 +19,9 @@ class PhaseMismatch(Exception): pass def __str__(self): return "Phase in " + conf.phase_file + " is unknown." + +class ConfigurationError(Exception): + def __init__(self, message): + self.message = message; + def __str__(self): + return "Configuration error: " + message diff --git a/scripts/initialize.py b/scripts/initialize.py index aca447d..4d14b1f 100644 --- a/scripts/initialize.py +++ b/scripts/initialize.py @@ -47,9 +47,12 @@ def gen_requred(): if (line[0] == '#') or (not '=' in line): continue indx = line.index('=') - if (line[indx + 1] == 'y' or line[indx + 1] == 'm'): + 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(srmap[line[7:indx]] + "\n") - elif (line[indx + 1] == 'n'): + elif (line[indx + 1] == 'n' or line[indx + 1] == 'm'): freq.write("-" + srmap[line[7:indx]] + "\n") else: fconf.write(line); + freq.write("-" + srmap["MODULES"] + "\n"); # force modules no |