Skip to content

Commit 1c88a62

Browse files
committed
asahi_firmware.isp: Remove entrypoint
This is from the old standalone extractor so it won't run. If someone really wants it back they can port it :p Signed-off-by: Hector Martin <[email protected]>
1 parent dce4eeb commit 1c88a62

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

asahi_firmware/isp.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -131,24 +131,3 @@ def load(self, source_path):
131131
def files(self):
132132
return self.fwfiles
133133

134-
if __name__ == '__main__':
135-
parser = argparse.ArgumentParser(prog="isp-extract", description='Extract ISP sensor calibration files')
136-
parser.add_argument('--input', help='path to appleh13camerad', default="appleh13camerad")
137-
parser.add_argument('--outdir', help='output directory prefix', default="/tmp/isp-extract")
138-
parser.add_argument('--install', help='install files (requires root)', action='store_true')
139-
args = parser.parse_args()
140-
141-
files = isp_extract(args.input)
142-
143-
if (args.install):
144-
if (platform.system() != "Linux"):
145-
raise RuntimeError("isp-extract: You can only install on linux")
146-
if (os.geteuid() != 0):
147-
raise RuntimeError("isp-extract: You must be root to install")
148-
outdir = os.path.join(ISP_INSTALL_PREFIX, ISP_DIRNAME)
149-
else:
150-
outdir = os.path.join(args.outdir, ISP_DIRNAME)
151-
152-
os.makedirs(outdir, exist_ok=True)
153-
for fname, dat in files:
154-
open(os.path.join(outdir, fname), "wb").write(dat)

0 commit comments

Comments
 (0)