Switch from Makefile to GN

GN makes it easier for us to have a modular build where we can define
tests and reuse code without having to hack on Makefiles. It also has
tools to analyze the build and comes with extensive documentation.

Change-Id: Ib28bc7b68d429e3c3193784c7a80d05ee35c6295
diff --git a/build/image/convert_to_binary.py b/build/image/convert_to_binary.py
new file mode 100644
index 0000000..7900cf2
--- /dev/null
+++ b/build/image/convert_to_binary.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+
+"""Convert a file to binary format.
+
+Calls objcopy to convert a file into raw binary format.
+"""
+
+import argparse
+import os
+import subprocess
+import sys
+
+def Main():
+  parser = argparse.ArgumentParser()
+  parser.add_argument("--tool_prefix", required=True)
+  parser.add_argument("--input", required=True)
+  parser.add_argument("--output", required=True)
+  args = parser.parse_args()
+  raw = subprocess.check_output([
+      "{}objcopy".format(args.tool_prefix),
+      "-O",
+      "binary",
+      args.input,
+      args.output])
+  return 0
+
+if __name__ == "__main__":
+  sys.exit(Main())