T-DeckLoader/custom_bootloader.py
2024-06-09 01:14:09 -04:00

13 lines
382 B
Python

import os
import shutil
Import("env")
def copy_bootloader(source, target, env):
custom_bootloader = os.path.join("blob", "tdboot_bootloader.bin")
target_bootloader = os.path.join(env.subst("$BUILD_DIR"), "bootloader.bin")
shutil.copyfile(custom_bootloader, target_bootloader)
print("Bootloader replaced successfully.")
env.AddPreAction("upload", copy_bootloader)