soc/build: Remove Migen Git SHA1 from auto-generated headers/bios (Hasn't been useful).

This commit is contained in:
Florent Kermarrec 2022-04-11 09:50:00 +02:00
parent c834600a5a
commit 9806f76619
3 changed files with 2 additions and 18 deletions

View File

@ -102,18 +102,6 @@ else:
def cygpath(p):
return p
def get_migen_git_revision():
import migen
d = os.getcwd()
os.chdir(os.path.dirname(migen.__file__))
try:
r = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"],
stderr=subprocess.DEVNULL)[:-1].decode("utf-8")
except:
r = "--------"
os.chdir(d)
return r
def get_litex_git_revision():
import litex
d = os.getcwd()
@ -128,9 +116,7 @@ def get_litex_git_revision():
def generated_banner(line_comment="//"):
r = line_comment + "-"*80 + "\n"
r += line_comment + " Auto-generated by Migen ({}) & LiteX ({}) on ".format(
get_migen_git_revision(),
get_litex_git_revision())
r += line_comment + " Auto-generated by LiteX ({}) on ".format(get_litex_git_revision())
r += "{}\n".format(datetime.datetime.fromtimestamp(time.time()).strftime("%Y-%m-%d %H:%M:%S"))
r += line_comment + "-"*80 + "\n"
return r

View File

@ -116,10 +116,9 @@ def get_linker_regions(regions):
# C Export -----------------------------------------------------------------------------------------
def get_git_header():
from litex.build.tools import get_migen_git_revision, get_litex_git_revision
from litex.build.tools import get_litex_git_revision
r = generated_banner("//")
r += "#ifndef __GENERATED_GIT_H\n#define __GENERATED_GIT_H\n\n"
r += f"#define MIGEN_GIT_SHA1 \"{get_migen_git_revision()}\"\n"
r += f"#define LITEX_GIT_SHA1 \"{get_litex_git_revision()}\"\n"
r += "#endif\n"
return r

View File

@ -113,7 +113,6 @@ __attribute__((__used__)) int main(int i, char **c)
#endif
crcbios();
printf("\n");
printf(" Migen git sha1: "MIGEN_GIT_SHA1"\n");
printf(" LiteX git sha1: "LITEX_GIT_SHA1"\n");
printf("\n");
printf("--=============== \e[1mSoC\e[0m ==================--\n");