Skip to content
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

CI: Translate abspath to relpath for build. #1783

Merged
merged 2 commits into from
Dec 22, 2023
Merged
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
10 changes: 5 additions & 5 deletions SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BUILDER = "DEV"

common_flags = []

panda_root = Dir('.').abspath
panda_root = Dir('.')

if os.getenv("RELEASE"):
BUILD_TYPE = "RELEASE"
Expand All @@ -16,7 +16,7 @@ if os.getenv("RELEASE"):
assert os.path.exists(cert_fn), 'Certificate file not found. Please specify absolute path'
else:
BUILD_TYPE = "DEBUG"
cert_fn = File("./certs/debug").srcnode().abspath
cert_fn = File("./certs/debug").srcnode().relpath
common_flags += ["-DALLOW_DEBUG"]

if os.getenv("DEBUG"):
Expand All @@ -35,7 +35,7 @@ def get_version(builder, build_type):
def get_key_header(name):
from Crypto.PublicKey import RSA

public_fn = File(f'./certs/{name}.pub').srcnode().abspath
public_fn = File(f'./certs/{name}.pub').srcnode().get_path()
with open(public_fn) as f:
rsa = RSA.importKey(f.read())
assert(rsa.size_in_bits() == 1024)
Expand Down Expand Up @@ -63,7 +63,7 @@ def to_c_uint32(x):


def build_project(project_name, project, extra_flags):
linkerscript_fn = File(project["LINKER_SCRIPT"]).srcnode().abspath
linkerscript_fn = File(project["LINKER_SCRIPT"]).srcnode().relpath

flags = project["PROJECT_FLAGS"] + extra_flags + common_flags + [
"-Wall",
Expand Down Expand Up @@ -123,7 +123,7 @@ def build_project(project_name, project, extra_flags):
main_bin = env.Objcopy(f"obj/{project_name}.bin", main_elf)

# Sign main
sign_py = File(f"{panda_root}/crypto/sign.py").srcnode().abspath
sign_py = File(f"{panda_root}/crypto/sign.py").srcnode().relpath
env.Command(f"obj/{project_name}.bin.signed", main_bin, f"SETLEN=1 {sign_py} $SOURCE $TARGET {cert_fn}")


Expand Down
Loading