Exemple #1
0
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)
Exemple #2
0
  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)
Exemple #3
0
  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)
Exemple #4
0
def test_build_bootstub_panda():
    build_st("obj/bootstub.panda.bin")
Exemple #5
0
def test_build_panda():
    build_st("obj/panda.bin")
Exemple #6
0
def test_build_panda():
  build_st("obj/panda.bin")
Exemple #7
0
def test_build_bootstub_legacy():
  build_st("obj/bootstub.comma.bin", "Makefile.legacy")
Exemple #8
0
def test_build_legacy():
  build_st("obj/comma.bin", "Makefile.legacy")
Exemple #9
0
def test_build_bootstub_panda():
  build_st("obj/bootstub.panda.bin")