Skip to content

Commit adeed75

Browse files
committed
toolkit/app-gen-toc.py: Remove updateDeviceConfig() function.
It doesn't do anything except give an error if the config file contains certain entries. There's no harm having these entries there, so just skip the validation altogether. Signed-off-by: Damien George <[email protected]>
1 parent b15e218 commit adeed75

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

toolkit/app-gen-toc.py

+1-28
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
import argparse
2222
from pathlib import Path
2323
import zlib
24-
import json
2524
import utils
26-
from utils.config import load_global_config, read_global_config
25+
from utils.config import load_global_config
2726
from utils.device_config import gen_device_config
2827
from utils.sign_image_util import sign_image
2928
from utils.printInfo import printInfo, verboseModeSet
@@ -615,31 +614,6 @@ def validateVersAttr(version):
615614
sys.exit(EXIT_WITH_ERROR)
616615

617616

618-
def updateDeviceConfig(file):
619-
# print('*** updateDeviceConfig: ', file)
620-
# Update the firewall configuration in the OEM DEVICE config file
621-
# This doesn't do anything except format the json file.
622-
# update_fw_cfg_oem(file)
623-
624-
cfg = read_global_config(file)
625-
if "miscellaneous" in cfg:
626-
unwanted_item = False
627-
for item in cfg["miscellaneous"]:
628-
if "sdesc" in item or "ldesc" in item or "options" in item:
629-
unwanted_item = True
630-
if unwanted_item:
631-
print(
632-
"[ERROR] File '"
633-
+ file.as_posix()
634-
+ "' should not contain 'miscellaneous' entry"
635-
)
636-
sys.exit(EXIT_WITH_ERROR)
637-
# Don't write out the json file, because it didn't change.
638-
return
639-
with open("build/config/" + file, "w") as json_file:
640-
json.dump(cfg, json_file, indent=2)
641-
642-
643617
def main():
644618
cwd_path = os.getcwd()
645619
os.chdir(cwd_path)
@@ -779,7 +753,6 @@ def main():
779753
binary = os.path.basename(input_device_config)
780754

781755
print("Generating Device Configuration for: " + binary)
782-
updateDeviceConfig(input_device_config)
783756
gen_device_config(input_device_config, False)
784757
sec["binary"] = (paths.OUTPUT_DIR / binary).with_suffix(".bin").as_posix()
785758

0 commit comments

Comments
 (0)