summaryrefslogtreecommitdiff
path: root/lib/kconfig.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-09-17 13:46:33 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2020-09-17 13:46:33 +0200
commit1b79f8510362da33c09f6e2c18740dce2cd24e5c (patch)
treecaa98d51ee8ad47fa13fd14f7440336f1d39d3b9 /lib/kconfig.py
parent31a6f42e08a0285b2f6153a91605a400089d1199 (diff)
configurable Kconfig filename and randconfig command
now also works with busybox
Diffstat (limited to 'lib/kconfig.py')
-rw-r--r--lib/kconfig.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/kconfig.py b/lib/kconfig.py
index 6ae947a..52615e3 100644
--- a/lib/kconfig.py
+++ b/lib/kconfig.py
@@ -80,10 +80,12 @@ class KConfig:
self.clean_command = "make clean"
self.build_command = "make"
self.attribute_command = "make attributes"
+ self.randconfig_command = "make randconfig"
+ self.kconfig = "Kconfig"
def randconfig(self):
status = subprocess.run(
- ["make", "randconfig"],
+ self.randconfig_command.split(),
cwd=self.cwd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
@@ -131,7 +133,7 @@ class KConfig:
"--randconfig_seed",
self.randconfig(),
"--kconfig_hash",
- self.file_hash(f"{self.cwd}/Kconfig"),
+ self.file_hash(f"{self.cwd}/{self.kconfig}"),
"--project_version",
self.git_commit_id(),
"--project_root",
@@ -156,7 +158,7 @@ class KConfig:
return True
def run_exploration_from_file(self, config_file):
- kconfig_file = f"{self.cwd}/Kconfig"
+ kconfig_file = f"{self.cwd}/{self.kconfig}"
kconf = kconfiglib.Kconfig(kconfig_file)
kconf.load_config(config_file)
symbols = list(kconf.syms.keys())