Skip to content
Snippets Groups Projects
Commit e467ed13 authored by Guillaume Endignoux's avatar Guillaume Endignoux
Browse files

Fix Python formatting.

parent 4b9486d0
No related branches found
No related tags found
No related merge requests found
...@@ -304,7 +304,8 @@ class OpenSKInstaller: ...@@ -304,7 +304,8 @@ class OpenSKInstaller:
def build_tockos(self): def build_tockos(self):
info("Building Tock OS for board {}".format(self.args.board)) info("Building Tock OS for board {}".format(self.args.board))
props = SUPPORTED_BOARDS[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) os.makedirs(out_directory, exist_ok=True)
self.checked_command_output(["make"], cwd=props.path) self.checked_command_output(["make"], cwd=props.path)
...@@ -418,8 +419,9 @@ class OpenSKInstaller: ...@@ -418,8 +419,9 @@ class OpenSKInstaller:
def install_tock_os(self): def install_tock_os(self):
board_props = SUPPORTED_BOARDS[self.args.board] board_props = SUPPORTED_BOARDS[self.args.board]
kernel_file = os.path.join("third_party", "tock", "target", board_props.arch, kernel_file = os.path.join("third_party", "tock", "target",
"release", "{}.bin".format(self.args.board)) board_props.arch, "release",
"{}.bin".format(self.args.board))
info("Flashing file {}.".format(kernel_file)) info("Flashing file {}.".format(kernel_file))
with open(kernel_file, "rb") as f: with open(kernel_file, "rb") as f:
kernel = f.read() kernel = f.read()
...@@ -481,8 +483,9 @@ class OpenSKInstaller: ...@@ -481,8 +483,9 @@ class OpenSKInstaller:
if self.args.tockos: if self.args.tockos:
# Process kernel # Process kernel
kernel_path = os.path.join("third_party", "tock", "target", board_props.arch, kernel_path = os.path.join("third_party", "tock", "target",
"release", "{}.bin".format(self.args.board)) board_props.arch, "release",
"{}.bin".format(self.args.board))
with open(kernel_path, "rb") as kernel: with open(kernel_path, "rb") as kernel:
kern_hex = intelhex.IntelHex() kern_hex = intelhex.IntelHex()
kern_hex.frombytes(kernel.read(), offset=board_props.kernel_address) kern_hex.frombytes(kernel.read(), offset=board_props.kernel_address)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment