def get_firmware_fn(): signed_fn = os.path.join(BASEDIR, "board", "obj", "panda.bin.signed") if os.path.exists(signed_fn): cloudlog.info("Using prebuilt signed firmware") return signed_fn else: cloudlog.info("Building panda firmware") fn = "obj/panda.bin" build_st(fn, clean=False) return os.path.join(BASEDIR, "board", fn)
def recover(self): from panda import BASEDIR, build_st if self.legacy: fn = "obj/bootstub.comma.bin" print("building legacy bootstub") build_st(fn, "Makefile.legacy") else: fn = "obj/bootstub.panda.bin" print("building panda bootstub") build_st(fn) fn = os.path.join(BASEDIR, "board", fn) with open(fn, "rb") as f: code = f.read() self.program_bootstub(code)
def recover(self): from panda import BASEDIR, build_st if self.legacy: fn = "obj/bootstub.comma.bin" print("building legacy bootstub") build_st(fn, "Makefile.legacy") else: fn = "obj/bootstub.panda.bin" print("building panda bootstub") build_st(fn) fn = os.path.join(BASEDIR, "board", fn) with open(fn) as f: code = f.read() self.program_bootstub(code)
def test_build_bootstub_panda(): build_st("obj/bootstub.panda.bin")
def test_build_panda(): build_st("obj/panda.bin")
def test_build_bootstub_legacy(): build_st("obj/bootstub.comma.bin", "Makefile.legacy")
def test_build_legacy(): build_st("obj/comma.bin", "Makefile.legacy")