Skip to content

toolkit/app-gen-toc.py: Remove updateDeviceConfig() function. #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: work-v1.104.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 1 addition & 28 deletions toolkit/app-gen-toc.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
import argparse
from pathlib import Path
import zlib
import json
import utils
from utils.config import load_global_config, read_global_config
from utils.config import load_global_config
from utils.device_config import gen_device_config
from utils.sign_image_util import sign_image
from utils.printInfo import printInfo, verboseModeSet
Expand Down Expand Up @@ -615,31 +614,6 @@ def validateVersAttr(version):
sys.exit(EXIT_WITH_ERROR)


def updateDeviceConfig(file):
# print('*** updateDeviceConfig: ', file)
# Update the firewall configuration in the OEM DEVICE config file
# This doesn't do anything except format the json file.
# update_fw_cfg_oem(file)

cfg = read_global_config(file)
if "miscellaneous" in cfg:
unwanted_item = False
for item in cfg["miscellaneous"]:
if "sdesc" in item or "ldesc" in item or "options" in item:
unwanted_item = True
if unwanted_item:
print(
"[ERROR] File '"
+ file.as_posix()
+ "' should not contain 'miscellaneous' entry"
)
sys.exit(EXIT_WITH_ERROR)
# Don't write out the json file, because it didn't change.
return
with open("build/config/" + file, "w") as json_file:
json.dump(cfg, json_file, indent=2)


def main():
cwd_path = os.getcwd()
os.chdir(cwd_path)
Expand Down Expand Up @@ -779,7 +753,6 @@ def main():
binary = os.path.basename(input_device_config)

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

Expand Down