Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/56955 )

Change subject: scons: Hook up oldconfig and olddefconfig.
......................................................................

scons: Hook up oldconfig and olddefconfig.

These two utilities help update an old config to add settings for new
config options. The difference between them is that oldconfig asks what
new settings you want to use, while olddefconfig automatically picks the
defaults.

Change-Id: Icd3e57f834684e620705beb884faa5b6e2cc7baa
---
M SConstruct
M site_scons/gem5_scons/kconfig.py
2 files changed, 33 insertions(+), 0 deletions(-)



diff --git a/SConstruct b/SConstruct
index cc823e0..92d69dd 100755
--- a/SConstruct
+++ b/SConstruct
@@ -214,6 +214,8 @@
     'guiconfig',
     'listnewconfig',
     'menuconfig',
+    'oldconfig',
+    'olddefconfig',
     'savedefconfig',
     'setconfig',
 )
@@ -652,6 +654,11 @@
         elif kconfig_action == 'menuconfig':
kconfig.menuconfig(env, kconfig_file.abspath, config_file.abspath,
                     variant_path)
+        elif kconfig_action == 'oldconfig':
+ kconfig.oldconfig(env, kconfig_file.abspath, config_file.abspath)
+        elif kconfig_action == 'olddefconfig':
+            kconfig.olddefconfig(env, kconfig_file.abspath,
+                    config_file.abspath)
         elif kconfig_action == 'savedefconfig':
             defconfig_key = 'DEFCONFIG'
             defconfig_path = ARGUMENTS.get(defconfig_key, None)
diff --git a/site_scons/gem5_scons/kconfig.py b/site_scons/gem5_scons/kconfig.py
index da7141b..ed113fc 100644
--- a/site_scons/gem5_scons/kconfig.py
+++ b/site_scons/gem5_scons/kconfig.py
@@ -33,6 +33,8 @@
     'GUICONFIG_PY': 'guiconfig.py',
     'LISTNEWCONFIG_PY': 'listnewconfig.py',
     'MENUCONFIG_PY': 'menuconfig.py',
+    'OLDCONFIG_PY': 'oldconfig.py',
+    'OLDDEFCONFIG_PY': 'olddefconfig.py',
     'SAVEDEFCONFIG_PY': 'savedefconfig.py',
     'SETCONFIG_PY': 'setconfig.py',
 }
@@ -86,6 +88,16 @@
     if kconfig_env.Execute('"${LISTNEWCONFIG_PY}" "${BASE_KCONFIG}"') != 0:
         error("Failed to run listnewconfig")

+def oldconfig(env, base_kconfig, config_path):
+    kconfig_env = _prep_env(env, base_kconfig, config_path)
+    if kconfig_env.Execute('"${OLDCONFIG_PY}" "${BASE_KCONFIG}"') != 0:
+        error("Failed to run oldconfig")
+
+def olddefconfig(env, base_kconfig, config_path):
+    kconfig_env = _prep_env(env, base_kconfig, config_path)
+    if kconfig_env.Execute('"${OLDDEFCONFIG_PY}" "${BASE_KCONFIG}"') != 0:
+        error("Failed to run oldconfig")
+
 def menuconfig(env, base_kconfig, config_path, main_menu_text,
         style='aquatic'):
     kconfig_env = _prep_env(env, base_kconfig, config_path)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/56955
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Icd3e57f834684e620705beb884faa5b6e2cc7baa
Gerrit-Change-Number: 56955
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to