Fix Python formatting.

This commit is contained in:
Guillaume Endignoux
2020-04-08 15:55:51 +02:00
parent 4b9486d0bd
commit e467ed1344

View File

@@ -304,7 +304,8 @@ class OpenSKInstaller:
def build_tockos(self):
info("Building Tock OS for board {}".format(self.args.board))
props = SUPPORTED_BOARDS[self.args.board]
out_directory = os.path.join("third_party", "tock", "target", props.arch, "release")
out_directory = os.path.join("third_party", "tock", "target", props.arch,
"release")
os.makedirs(out_directory, exist_ok=True)
self.checked_command_output(["make"], cwd=props.path)
@@ -418,8 +419,9 @@ class OpenSKInstaller:
def install_tock_os(self):
board_props = SUPPORTED_BOARDS[self.args.board]
kernel_file = os.path.join("third_party", "tock", "target", board_props.arch,
"release", "{}.bin".format(self.args.board))
kernel_file = os.path.join("third_party", "tock", "target",
board_props.arch, "release",
"{}.bin".format(self.args.board))
info("Flashing file {}.".format(kernel_file))
with open(kernel_file, "rb") as f:
kernel = f.read()
@@ -481,8 +483,9 @@ class OpenSKInstaller:
if self.args.tockos:
# Process kernel
kernel_path = os.path.join("third_party", "tock", "target", board_props.arch,
"release", "{}.bin".format(self.args.board))
kernel_path = os.path.join("third_party", "tock", "target",
board_props.arch, "release",
"{}.bin".format(self.args.board))
with open(kernel_path, "rb") as kernel:
kern_hex = intelhex.IntelHex()
kern_hex.frombytes(kernel.read(), offset=board_props.kernel_address)