Preserve bootstub binary output modes

This commit is contained in:
Dom
2026-10-23 01:17:30 -05:00
parent 4e74d8890d
commit 22b2f2a898
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -121,7 +121,9 @@ def build_project(project_name, project, main, extra_flags):
"./board/crypto/sha.c",
"./board/bootstub.c",
])
bs_env.Objcopy(f"./board/obj/bootstub.{project_name}.bin", bs_elf)
bs_bin = bs_env.Objcopy(f"./board/obj/bootstub.{project_name}.bin", bs_elf)
# Bootstubs are data images; objcopy must not inherit the ELF executable mode.
bs_env.AddPostAction(bs_bin, Chmod("$TARGET", 0o644))
# Build + sign main (aka app)
main_elf = env.Program(f"{project_dir}/main.elf", [