Revert "build/openocd: Allow config file to be searched from local dirs"

This reverts commit a7d441488c.
This commit is contained in:
Gwenhael Goavec-Merou 2024-03-20 16:44:58 +01:00
parent 46ff7cdee5
commit 8f04542c15
2 changed files with 3 additions and 8 deletions

View File

@ -24,7 +24,6 @@ class GenericProgrammer:
self.flash_proxy_repos = [
"https://github.com/quartiq/bscan_spi_bitstreams/raw/master/",
]
self.config_dirs = ["prog"]
self.config_repos = [
"https://raw.githubusercontent.com/litex-hub/litex-boards/master/litex_boards/prog/",
]
@ -66,11 +65,9 @@ class GenericProgrammer:
if os.path.exists(fullname):
return self.config
# Search in local config directory
for d in self.config_dirs:
fulldir = os.path.abspath(os.path.expanduser(d))
fullname = tools.cygpath(os.path.join(fulldir, self.config))
if os.path.exists(fullname):
return fullname
fullname = tools.cygpath(os.path.join(self.prog_local, self.config))
if os.path.exists(fullname):
return fullname
# Search in repositories and download it
import requests
os.makedirs(self.prog_local, exist_ok=True)

View File

@ -17,8 +17,6 @@ class OpenOCD(GenericProgrammer):
def __init__(self, config, flash_proxy_basename=None):
GenericProgrammer.__init__(self, flash_proxy_basename)
self.config = config
self.config_dirs.append("/usr/share/openocd/scripts")
self.config_dirs.append("/usr/local/share/openocd/scripts")
def load_bitstream(self, bitstream):
config = self.find_config()