12from __future__
import print_function
22 """Create the asset."""
24 print(
"Installing some cross-compiling packages. You may be asked for your sudo password")
25 subprocess.check_call([
26 "sudo",
"apt-get",
"install",
27 "libstdc++-10-dev-armhf-cross",
28 "libgcc-10-dev-armhf-cross",
29 "binutils-arm-linux-gnueabihf"
33 shutil.rmtree(target_dir)
34 shutil.copytree(
'/usr/arm-linux-gnueabihf', target_dir)
35 shutil.copytree(
'/usr/lib/gcc-cross/arm-linux-gnueabihf/10',
36 os.path.join(target_dir,
'gcc-cross'))
39 shutil.copy(
'/usr/lib/x86_64-linux-gnu/libbfd-2.37-armhf.so',
40 os.path.join(target_dir,
'lib'))
41 shutil.copy(
'/usr/lib/x86_64-linux-gnu/libopcodes-2.37-armhf.so',
42 os.path.join(target_dir,
'lib'))
43 shutil.copy(
'/usr/lib/x86_64-linux-gnu/libctf-armhf.so.0',
44 os.path.join(target_dir,
'lib'))
51 bad_libc = os.path.join(target_dir,
"lib",
"libc.so")
52 for line
in fileinput.input(bad_libc, inplace=
True):
53 if line.startswith(
"GROUP"):
54 print(
"GROUP ( libc.so.6 libc_nonshared.a "
55 "AS_NEEDED ( ld-linux-armhf.so.3 ) )")
61 if 'linux' not in sys.platform:
62 print(
'This script only runs on Linux.', file=sys.stderr)
64 parser = argparse.ArgumentParser()
65 parser.add_argument(
'--target_dir',
'-t', required=
True)
66 args = parser.parse_args()
70if __name__ ==
'__main__':
def print(*args, **kwargs)
def create_asset(chrome_src_path, browser_executable, target_dir, upload_to_partner_bucket, dm_path)