diff options
| author | Tadas Sutkaitis <tadasas@gmail.com> | 2023-07-20 23:44:37 +0200 |
|---|---|---|
| committer | Tadas <tadasas@gmail.com> | 2024-02-08 02:16:05 +0200 |
| commit | 3ee1a82d8761902a75e075ccbcd8e9e02a226051 (patch) | |
| tree | 135f2a4ac40e295f3e70c921c882276cc8c4e8f4 /kolla/common | |
| parent | 9ebd51f7991a76059e91be98ac579ff705954337 (diff) | |
| download | kolla-3ee1a82d8761902a75e075ccbcd8e9e02a226051.tar.gz kolla-3ee1a82d8761902a75e075ccbcd8e9e02a226051.zip | |
add: cross-compile support
The main goal is to be able to build ARM
images on standard x86 hardware. Add simple
functions supported by python-py and
podman-py to enable creation of container
images on emulated architectures.
Change-Id: I1526b460f6e271c2ec63ab3a3b1dc348d742e96d
Diffstat (limited to 'kolla/common')
| -rw-r--r-- | kolla/common/config.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kolla/common/config.py b/kolla/common/config.py index 03616fe87..af5dab963 100644 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -138,6 +138,10 @@ _PROFILE_OPTS = [ hostarch = os.uname()[4] +# NOTE: Apple Silicon reports as arm64 which is aarch64 +if hostarch == "arm64": + hostarch = "aarch64" + _CLI_OPTS = [ cfg.StrOpt('base', short='b', default='rocky', choices=BASE_OS_DISTRO, @@ -174,6 +178,10 @@ _CLI_OPTS = [ help='The network mode for Docker build. Example: host'), cfg.BoolOpt('cache', default=True, help='Use the container engine cache when building'), + cfg.StrOpt('platform', default=None, + help=('The platform to use for a cross-compile build. Should ' + 'be set in conjunction with "--base-arch" argument. ' + 'Example: "--platform linux/arm64 --base-arch aarch64"')), cfg.MultiOpt('profile', types.String(), short='p', help=('Build a pre-defined set of images, see [profiles]' ' section in config. The default profiles are:' |
