Skip to content

Commit 3aa6138

Browse files
authored
CI: translate abspath in scons to relpath for relative path caching (#17)
* relpath * remove abspath * back to abspath * relpath * add print * relpath * relpath to sign_py
1 parent cad7ef4 commit 3aa6138

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

board/SConscript

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if os.getenv("RELEASE"):
3131
assert os.path.exists(cert_fn), 'Certificate file not found. Please specify absolute path'
3232
else:
3333
BUILD_TYPE = "DEBUG"
34-
cert_fn = File("../certs/debug").srcnode().abspath
34+
cert_fn = File("../certs/debug").srcnode().relpath
3535
common_flags += ["-DALLOW_DEBUG"]
3636

3737
if os.getenv("DEBUG"):
@@ -99,7 +99,7 @@ def to_c_uint32(x):
9999
def get_key_header(name):
100100
from Crypto.PublicKey import RSA
101101

102-
public_fn = File(f'../certs/{name}.pub').srcnode().abspath
102+
public_fn = f'../certs/{name}.pub'
103103
rsa = RSA.importKey(open(public_fn).read())
104104
assert(rsa.size_in_bits() == 1024)
105105

@@ -132,7 +132,7 @@ with open("obj/cert.h", "w") as f:
132132

133133
for project_name in build_projects:
134134
project = build_projects[project_name]
135-
linkerscript_fn = File(project["LINKER_SCRIPT"]).srcnode().abspath
135+
linkerscript_fn = File(project["LINKER_SCRIPT"]).srcnode().relpath
136136

137137
flags = [
138138
"-Wall",
@@ -193,5 +193,5 @@ for project_name in build_projects:
193193
main_bin = project_env.Objcopy(f"obj/{project_name}.bin", main_elf)
194194

195195
# Sign main
196-
sign_py = File("../crypto/sign.py").srcnode().abspath
196+
sign_py = File("../crypto/sign.py").srcnode().relpath
197197
panda_bin_signed = project_env.Command(f"obj/{project_name}.bin.signed", main_bin, f"SETLEN=1 {sign_py} $SOURCE $TARGET {cert_fn}")

0 commit comments

Comments
 (0)