tests/docker: convert riscv64-cross to lcitool

We still need to base this on Debian Sid until riscv64 is promoted to
a release architecture (or another distro provides a full cross
compile target). We use the new qemu-minimal project description to
avoid bringing in all the extra dependencies because every extra
package is another chance for sid to fail.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230630180423.558337-16-alex.bennee@linaro.org>
This commit is contained in:
Alex Bennée 2023-06-30 19:04:00 +01:00
parent b911b9001e
commit 0101dd71b0
2 changed files with 83 additions and 46 deletions

View file

@ -63,12 +63,12 @@ add_user_mapping = [
" id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi\n"
]
def generate_dockerfile(host, target, cross=None, trailer=None):
def generate_dockerfile(host, target, project="qemu", cross=None, trailer=None):
filename = Path(src_dir, "tests", "docker", "dockerfiles", host + ".docker")
cmd = lcitool_cmd + ["dockerfile"]
if cross is not None:
cmd.extend(["--cross", cross])
cmd.extend([target, "qemu"])
cmd.extend([target, project])
if trailer is not None:
trailer += "\n".join(add_user_mapping)
@ -164,6 +164,12 @@ try:
trailer=cross_build("powerpc64le-linux-gnu-",
"ppc64-softmmu,ppc64-linux-user"))
generate_dockerfile("debian-riscv64-cross", "debian-sid",
project="qemu-minimal",
cross="riscv64",
trailer=cross_build("riscv64-linux-gnu-",
"riscv64-softmmu,riscv64-linux-user"))
generate_dockerfile("debian-s390x-cross", "debian-11",
cross="s390x",
trailer=cross_build("s390x-linux-gnu-",