From 07459c88d5f25c418280242138688768d6d705b8 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 19 Oct 2021 09:56:21 +0200 Subject: [PATCH 1/2] Add riscv64 to --arch parameter values lxc-attach uses an --arch parameter. 'riscv64' should be a usable value. Signed-off-by: Heinrich Schuchardt --- config/bash/lxc.in | 2 +- src/lxc/confile.c | 1 + src/tests/arch_parse.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/bash/lxc.in b/config/bash/lxc.in index dd9770425..6672bf02d 100644 --- a/config/bash/lxc.in +++ b/config/bash/lxc.in @@ -285,7 +285,7 @@ _lxc_attach() { ;; --arch | -a ) # https://github.com/lxc/lxc/blob/stable-4.0/src/tests/arch_parse.c#L37 - COMPREPLY=( $( compgen -W 'arm armel armhf armv7l athlon i386 i486 i586 i686 linux32 mips mipsel ppc powerpc x86 aarch64 amd64 arm64 linux64 mips64 mips64el ppc64 ppc64el ppc64le powerpc64 s390x x86_64' -- "${cur}" ) ) + COMPREPLY=( $( compgen -W 'arm armel armhf armv7l athlon i386 i486 i586 i686 linux32 mips mipsel ppc powerpc x86 aarch64 amd64 arm64 linux64 mips64 mips64el ppc64 ppc64el ppc64le powerpc64 riscv64 s390x x86_64' -- "${cur}" ) ) return ;; --elevated-privileges | -e ) diff --git a/src/lxc/confile.c b/src/lxc/confile.c index fafcc7ba9..e706092ee 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -3215,6 +3215,7 @@ int lxc_config_parse_arch(const char *arch, signed long *persona) { "ppc64el", PER_LINUX }, { "ppc64le", PER_LINUX }, { "powerpc64", PER_LINUX }, + { "riscv64", PER_LINUX }, { "s390x", PER_LINUX }, { "x86_64", PER_LINUX }, }; diff --git a/src/tests/arch_parse.c b/src/tests/arch_parse.c index f8a0a46d2..38ec972d3 100644 --- a/src/tests/arch_parse.c +++ b/src/tests/arch_parse.c @@ -38,7 +38,7 @@ static const char *const arches[] = { "arm", "armel", "armhf", "armv7l", "athlon", "i386", "i486", "i586", "i686", "linux32", "mips", "mipsel", "ppc", "powerpc", "x86", "aarch64", "amd64", "arm64", "linux64", "mips64", "mips64el", - "ppc64", "ppc64el", "ppc64le", "powerpc64", "s390x", "x86_64", + "ppc64", "ppc64el", "ppc64le", "powerpc64", "riscv64", "s390x", "x86_64", }; static bool parse_valid_architectures(void) From 0a2ffe123c889e4d07762884022370d6cb8035d3 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 19 Oct 2021 13:16:33 +0200 Subject: [PATCH 2/2] README.md: mention RISC-V architecture Signed-off-by: Heinrich Schuchardt --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 116dbbeef..5a2456fce 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ features. This includes (but isn't limited to): - i686 - x86_64 - ppc, ppc64, ppc64le +- riscv64 - s390x - armvl7, arm64