def _parse_args(): parser = argparse.ArgumentParser() parser.add_argument( "--builddir", metavar="DIR", type=file_util.str_to_resolved_path, help="directory in which to build", required=True, ) parser.add_argument("--machine", metavar="STRING", help="Machine to build.", required=True) parser.add_argument( "--distro", metavar="STRING", help="Name of the distro to build.", default="mbl-development", required=False, ) parser.add_argument( "--command", metavar="STRING", help="Bash command to run in build environment.", required=True, ) args, _ = parser.parse_known_args() file_util.ensure_is_directory(args.builddir) return args
def _parse_args(): parser = argparse.ArgumentParser() parser.add_argument( "--builddir", metavar="DIR", type=file_util.str_to_resolved_path, help="directory in which to build", required=True, ) parser.add_argument( "--outputdir", metavar="PATH", type=file_util.str_to_resolved_path, help="directory in which to place build artifacts", required=True, ) parser.add_argument("--machine", metavar="STRING", help="Machine to build.", required=True) parser.add_argument( "--distro", metavar="STRING", help="Name of the distro to build.", default="mbl-development", required=False, ) parser.add_argument( "--image", metavar="STRING", help="Name of the image to build.", default="mbl-image-development", required=False, ) parser.add_argument( "--repo-host", dest="extra_ssh_hosts", metavar="HOST", action="append", help=("Add a trusted git repository host to the build environment." " Can be specified multiple times."), default=[], ) args, _ = parser.parse_known_args() file_util.ensure_is_directory(args.builddir) file_util.ensure_is_directory(args.outputdir) return args
def _parse_args(): parser = argparse.ArgumentParser() parser.add_argument( "--builddir", metavar="DIR", type=file_util.str_to_resolved_path, help="directory in which to build", required=True, ) parser.add_argument( "--outputdir", metavar="PATH", type=file_util.str_to_resolved_path, help="directory in which to place build artifacts", required=True, ) parser.add_argument("--machine", metavar="STRING", help="Machine to build.", required=True) parser.add_argument( "--distro", metavar="STRING", help="Name of the distro to build.", default="mbl-development", required=False, ) parser.add_argument( "--image", metavar="STRING", help="Name of the image to build.", default="mbl-image-development", required=False, ) args, _ = parser.parse_known_args() file_util.ensure_is_directory(args.builddir) file_util.ensure_is_directory(args.outputdir) return args
def _parse_args(): parser = argparse.ArgumentParser() parser.add_argument( "--builddir", metavar="DIR", type=_str_to_resolved_path, help="directory in which to build", required=True, ) parser.add_argument( "--branch", metavar="BRANCH", help="branch of the manifest repo to use", required=True, ) parser.add_argument( "--manifest-repo", metavar="REPO", help=("manifest repo to use. Default is " '"{}"'.format(DEFAULT_MANIFEST_REPO)), default=DEFAULT_MANIFEST_REPO, ) parser.add_argument( "--image", metavar="STRING", help="bitbake image to build", default=DEFAULT_IMAGE, ) parser.add_argument( "--inject-mcc", metavar="FILE", type=_str_to_resolved_path, help="add a cloud client credentials file to the build", default=[], action="append", ) parser.add_argument( "--inject-key", metavar="FILE", type=_str_to_resolved_path, help="add key or certificate to the build", default=[], action="append", ) parser.add_argument( "--downloaddir", metavar="PATH", type=_str_to_resolved_path, help="directory used for BitBake's download cache (sets DL_DIR)", required=False, ) parser.add_argument( "--outputdir", metavar="PATH", type=_str_to_resolved_path, help="directory in which to place build artifacts", required=False, ) parser.add_argument( "--parent-command-line", metavar="STRING", help=("Specify the command line that was used to invoke the" "script that invokes build.sh."), required=False, ) parser.add_argument( "--mbl-tools-version", metavar="STRING", help="Specify the version of mbl-tools that this script came from.", required=False, ) args, unknown = parser.parse_known_args() if len(unknown) > 0: warning("unsupported arguments: {}".format(unknown)) if len(args.inject_mcc) < 3: print("build.py: error: 3 of the following arguments are required: " "--inject-mcc") print("expecting - upgradeCA.cert, mbed_cloud_dev_credentials.c & " "update_default_resources.c") print(" E.g. - manifest-tool cert create -C UK -S CAMBS -L Cambridge " "-O arm.com -U arm -V 90 -K upgradeCA.key -o upgradeCA.cert") print(" E.g. - https://os.mbed.com/docs/mbed-linux-os/v0.5/" "getting-started/preparing-device-management-sources.html") exit(2) if len(args.inject_key) < 3: print("build.py: error: 3 of the following arguments are required: " "--inject-key") print("expecting - rot_key.pem, mbl-fit-rot-key.key & " "mbl-fit-rot-key.crt") print(" E.g. - openssl genrsa 2048 > boot-keys/rot_key.pem") print(" E.g. - openssl genrsa 2048 > boot-keys/mbl-fit-rot-key.key") print(" E.g. - openssl req -batch -new -x509 -key " "boot-keys/mbl-fit-rot-key.key > boot-keys/mbl-fit-rot-key.crt") exit(2) file_util.ensure_is_directory(args.builddir) for path in args.inject_mcc: file_util.ensure_is_regular_file(path) return args
def _parse_args(): parser = argparse.ArgumentParser() parser.add_argument( "--builddir", metavar="DIR", type=file_util.str_to_resolved_path, help="directory in which to build", required=True, ) parser.add_argument( "--branch", metavar="BRANCH", help="branch of the manifest repo to use", required=True, ) parser.add_argument( "--manifest", metavar="MANIFEST", help=("manifest xml to use. Default is " '"{}"'.format(DEFAULT_MANIFEST_XML)), default=DEFAULT_MANIFEST_XML, ) parser.add_argument( "--manifest-repo", metavar="REPO", help=("manifest repo to use. Default is " '"{}"'.format(DEFAULT_MANIFEST_REPO)), default=DEFAULT_MANIFEST_REPO, ) parser.add_argument( "--downloaddir", metavar="PATH", type=file_util.str_to_resolved_path, help="directory used for BitBake's download cache (currently ignored)", required=False, ) parser.add_argument( "--outputdir", metavar="PATH", type=file_util.str_to_resolved_path, help="directory in which to place build artifacts", required=False, ) parser.add_argument( "--parent-command-line", metavar="STRING", help=("Specify the command line that was used to invoke the" "script that invokes build.sh."), required=False, ) parser.add_argument( "--mbl-tools-version", metavar="STRING", help="Specify the version of mbl-tools that this script came from.", required=False, ) parser.add_argument( "--accept-eula", metavar="STRING", help="Automatically accept any EULAs required for building MACHINE", required=False, ) parser.add_argument( "--machine", metavar="STRING", help="Machine to build. The only supported machine is imxmmevk", required=False, default="imx8mmevk", ) parser.add_argument( "--build-tag", metavar="STRING", help="Specify a unique version tag to identify the build.", required=False, ) parser.add_argument( "--jobs", "-j", metavar="STRING", help="Set the number of parallel processes. " "Default # CPU on the host.", required=False, ) parser.add_argument( "-x", action="store_true", help="Enable debugging. Currently ignored.", required=False, ) parser.add_argument( "--artifactory-api-key", metavar="STRING", help="Artifactory API key. Currently ignored.", required=False, ) parser.add_argument( "--image", metavar="STRING", help="Name of the image to build.", default="core-image-minimal", required=False, ) args, unknown = parser.parse_known_args() if len(unknown) > 0: warning("unsupported arguments: {}".format(unknown)) file_util.ensure_is_directory(args.builddir) return args