@@ -616,7 +616,6 @@ def validateVersAttr(version):
616616
617617
618618def updateDeviceConfig (file ):
619- file = paths .CONFIG_INPUT_DIR / file
620619 # print('*** updateDeviceConfig: ', file)
621620 # Update the firewall configuration in the OEM DEVICE config file
622621 # This doesn't do anything except format the json file.
@@ -708,7 +707,6 @@ def main():
708707 # Set paths given on command line.
709708 paths .TOOLKIT_DIR = Path (os .path .dirname (__file__ ))
710709 paths .CERT_INPUT_DIR = paths .TOOLKIT_DIR / "cert"
711- paths .CONFIG_INPUT_DIR = Path (args .config_dir )
712710 paths .FIRMWARE_INPUT_DIR = Path (args .firmware_dir )
713711 paths .OUTPUT_DIR = Path (args .output_dir )
714712
@@ -770,8 +768,11 @@ def main():
770768 continue
771769
772770 print ("Generating Device Configuration for: " + sec ["binary" ])
773- updateDeviceConfig (sec ["binary" ])
774- gen_device_config (sec ["binary" ], False )
771+ input_device_config = sec ["binary" ]
772+ if not os .path .isabs (input_device_config ):
773+ input_device_config = os .path .join (args .config_dir , input_device_config )
774+ updateDeviceConfig (input_device_config )
775+ gen_device_config (input_device_config , False )
775776 sec ["binary" ] = (
776777 (paths .OUTPUT_DIR / sec ["binary" ]).with_suffix (".bin" ).as_posix ()
777778 )
0 commit comments