Files
linux-kernel-module-cheat/zip-img
Ciro Santilli 58de3f7243 port bisect-linux-boot-gem5 and zip-img
fix m5 build and a bunch other things
2018-09-08 23:46:29 +01:00

18 lines
565 B
Python
Executable File

#!/usr/bin/env python3
import os
import subprocess
import zipfile
import common
outfile = os.path.join(common.out_dir, 'lkmc-{}.zip'.format(common.sha))
if os.path.exists(outfile):
os.unlink(outfile)
zipf = zipfile.ZipFile(outfile, 'w', zipfile.ZIP_DEFLATED)
for arch in common.arches:
common.setup(common.get_argparse(default_args={'arch': arch}))
zipf.write(common.qcow2_file, arcname=os.path.relpath(common.qcow2_file, common.root_dir))
zipf.write(common.linux_image, arcname=os.path.relpath(common.linux_image, common.root_dir))
zipf.close()