From patchwork Fri Oct 8 12:25:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 515566 Delivered-To: patch@linaro.org Received: by 2002:adf:fbc8:0:0:0:0:0 with SMTP id d8csp2865944wrs; Fri, 8 Oct 2021 05:33:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVJhD3gzkOjb+K358VegDk/T/BNQOSsFVnZDj9e2zwGuPy5mLcqFcL1Tf09XDYdITVEari X-Received: by 2002:a1f:d0c4:: with SMTP id h187mr9040125vkg.1.1633696402162; Fri, 08 Oct 2021 05:33:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633696402; cv=none; d=google.com; s=arc-20160816; b=Do+zQAX1zWNyaOiQqJk7glo/GDphzfpK4PdsGR+/WDYIT4Tr5RTauitNriD3LHTRVY JcpDPm5HJl1b5ioGzTPhspEs8MFKN6oOAFf0d1naCZfGO9RcQQ3t5ZyN6RAUEViVSm1g 2L76owwtJBKNrECEkgr7XLzn8nNscI3ALhQfqCAIW3u8IvTk5j7gtDg7f9gYgeLh6+Rw DRZ7hIFxZ3wyioyGpU+OnaWXVaAGGuIfI/Ga31JoaJdR5mTsS2/dlVUhdx5n9rmWYebX +2Mr1AYi6KpbAu2ph2iaWx7QQRcEvm5K40TQFD0qjxkQOJdN0sp4S1SSfSSBEQMqT6W9 6+zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=QfgsiyjPNCvJW2ICwHEKbAih/Gq9LuRXM/hG4XuMnM0=; b=BX+i1cVb/ho22SW1A/6YutgqHkdm2fPvX+BQhW74szasuibLYGHMYwTycGYBmAvH6t annl9K+zkle3BUI3RIoZy9UQfU4zQ5I8OIx7H5Dv8GaP2qB9plKuWkZbnhHhvzH1rEQz xjS56kxU2Me8X5uxZc60M1pQ94cyfIh69gJhg9RWzXB71uBH9/D8uIWyNhK71p+6Yykb CbGQTz8ZFBzLURHI/ST/JhwihK+9W54i+u8Nopckn+Dl18Qh8nd67c/KitEvYdqjWTvP zbJONZP+kMJ8UcodxCMeyneCUadPtbxUdDYehs4KEV966BDHvGrV9ZSWT4mM0pN+jt72 65xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=yWET4QsX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p12si665527vsh.52.2021.10.08.05.33.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Oct 2021 05:33:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=yWET4QsX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYp3x-0000zL-En for patch@linaro.org; Fri, 08 Oct 2021 08:33:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYoww-00030Q-Ov for qemu-devel@nongnu.org; Fri, 08 Oct 2021 08:26:06 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:44966) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYowu-0006ty-Te for qemu-devel@nongnu.org; Fri, 08 Oct 2021 08:26:06 -0400 Received: by mail-wr1-x429.google.com with SMTP id s15so29381665wrv.11 for ; Fri, 08 Oct 2021 05:26:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QfgsiyjPNCvJW2ICwHEKbAih/Gq9LuRXM/hG4XuMnM0=; b=yWET4QsX+cqaWKXvCvQfJL2D9yBrw/QfNyvbnX2mBkwrWJpfcvGtCiYSDm3fn6lW60 uP/tNpkTxXEZkxTWfE9iRHsWZR01cQqkGloQ3TE4Hc4kyJv8746l63r/oPlqF1gBzAou kKdgRBpRvwPmP6R0Ak0zXINjtvYilbqldJ0MeGrHUdsKHO1wEp3jBxG3RQMAVL1XTO5n +KoJ127x0dv0nsRvTzigCjWE5/xskkxg+m1pzyAt1epa79NWerWFKk3xEqGyDt6mfTrZ 2ZB70KNVJhLolWuKTf4S8/9rdre5C6PLOTH5tkJ3QC0E8yPJBR1MuFaa2CsgBE3weSG+ /++g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QfgsiyjPNCvJW2ICwHEKbAih/Gq9LuRXM/hG4XuMnM0=; b=Imx1TmwYpEjZtw4lxFZs0y8+UuGCI4kcPYazKn2WonzShfWtfZIECWJxkw1xe5trxs OGjbnMTuENJkWYuU/yX2cuSiH6vaRnIuJ6qgPS0CJAfjxObt5jwnAGhsTO81pj7l5D0U ufiYrMJl5d5WNBRL/CTaF0BgZ+RaLF1wgxq9/iVeacVGEuNtMlBLfe1ia3qw0khmubMv WfiM14EDrXDE4PE5aGZ6hSX4mTes0sOKVzGsS7X7wgJuscmOyl2/uD6G8eLWZAsLElew fXTDgLOk4z2KkkeqwZe8wgIspXu/1SEYLKSHJrvGrYBzRPVv1ncaVzVDDATmwD+Q0aD8 EHKw== X-Gm-Message-State: AOAM5339EokbXfyYCi/mybWLUSpsWJp9oHCI64QsGvcQGtoRuN5AgFQv 4LuSB7x/hVRnQStc99f+6qWUnw== X-Received: by 2002:a1c:7c02:: with SMTP id x2mr2940701wmc.165.1633695963392; Fri, 08 Oct 2021 05:26:03 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k6sm2469253wri.83.2021.10.08.05.25.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 05:26:00 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 848271FF9B; Fri, 8 Oct 2021 13:25:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: richard.henderson@linaro.org Subject: [PULL 04/12] tests/docker: promote debian-riscv64-cross to a full image Date: Fri, 8 Oct 2021 13:25:48 +0100 Message-Id: <20211008122556.757252-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211008122556.757252-1-alex.bennee@linaro.org> References: <20211008122556.757252-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Thomas Huth , =?utf-8?q?Da?= =?utf-8?q?niel_P=2E_Berrang=C3=A9?= , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe?= =?utf-8?q?_Mathieu-Daud=C3=A9?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" To be able to cross build QEMU itself we need to include a few more libraries. These are only available in Debian's unstable ports repo for now so we need to base the riscv64 image on sid with the the minimal libs needed to build QEMU (glib/pixman). The result works but is not as clean as using build-dep to bring in more dependencies. However sid is by definition a shifting pile of sand and by keeping the list of libs minimal we reduce the chance of having an image we can't build. It's good enough for a basic cross build testing of TCG. Cc: "Daniel P. Berrangé" Signed-off-by: Richard Henderson Message-Id: <20210914185830.1378771-2-richard.henderson@linaro.org> [AJB: tweak allow_failure] Signed-off-by: Alex Bennée Message-Id: <20210917162332.3511179-5-alex.bennee@linaro.org> -- 2.30.2 diff --git a/.gitlab-ci.d/container-cross.yml b/.gitlab-ci.d/container-cross.yml index 0fcebe363a..a3b5b90552 100644 --- a/.gitlab-ci.d/container-cross.yml +++ b/.gitlab-ci.d/container-cross.yml @@ -134,7 +134,8 @@ ppc64el-debian-cross-container: riscv64-debian-cross-container: extends: .container_job_template stage: containers-layer2 - needs: ['amd64-debian10-container'] + # as we are currently based on 'sid/unstable' we may break so... + allow_failure: true variables: NAME: debian-riscv64-cross diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 0806c6f726..450c76a3ca 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -141,7 +141,6 @@ docker-image-debian-mips64-cross: docker-image-debian10 docker-image-debian-mips64el-cross: docker-image-debian10 docker-image-debian-mipsel-cross: docker-image-debian10 docker-image-debian-ppc64el-cross: docker-image-debian10 -docker-image-debian-riscv64-cross: docker-image-debian10 docker-image-debian-s390x-cross: docker-image-debian10 docker-image-debian-sh4-cross: docker-image-debian10 docker-image-debian-sparc64-cross: docker-image-debian10 @@ -180,7 +179,6 @@ DOCKER_PARTIAL_IMAGES += debian-arm64-test-cross DOCKER_PARTIAL_IMAGES += debian-powerpc-test-cross DOCKER_PARTIAL_IMAGES += debian-hppa-cross DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross -DOCKER_PARTIAL_IMAGES += debian-riscv64-cross DOCKER_PARTIAL_IMAGES += debian-sh4-cross debian-sparc64-cross DOCKER_PARTIAL_IMAGES += debian-tricore-cross DOCKER_PARTIAL_IMAGES += debian-xtensa-cross diff --git a/tests/docker/dockerfiles/debian-riscv64-cross.docker b/tests/docker/dockerfiles/debian-riscv64-cross.docker index 2bbff19772..594d97982c 100644 --- a/tests/docker/dockerfiles/debian-riscv64-cross.docker +++ b/tests/docker/dockerfiles/debian-riscv64-cross.docker @@ -1,12 +1,48 @@ # -# Docker cross-compiler target +# Docker cross-compiler target for riscv64 # -# This docker target builds on the debian Buster base image. +# Currently the only distro that gets close to cross compiling riscv64 +# images is Debian Sid (with unofficial ports). As this is a moving +# target we keep the library list minimal and are aiming to migrate +# from this hack as soon as we are able. # -FROM qemu/debian10 +FROM docker.io/library/debian:sid-slim + +# Add ports +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=noninteractive eatmydata apt update -yy && \ + DEBIAN_FRONTEND=noninteractive eatmydata apt upgrade -yy + +# Install common build utilities +RUN DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy \ + bc \ + build-essential \ + ca-certificates \ + debian-ports-archive-keyring \ + dpkg-dev \ + gettext \ + git \ + ninja-build \ + pkg-config \ + python3 + +# Add ports and riscv64 architecture +RUN echo "deb http://ftp.ports.debian.org/debian-ports/ sid main" >> /etc/apt/sources.list +RUN dpkg --add-architecture riscv64 + +# Duplicate deb line as deb-src +RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list RUN apt update && \ DEBIAN_FRONTEND=noninteractive eatmydata \ apt install -y --no-install-recommends \ - gcc-riscv64-linux-gnu \ - libc6-dev-riscv64-cross + gcc-riscv64-linux-gnu \ + libc6-dev-riscv64-cross \ + libffi-dev:riscv64 \ + libglib2.0-dev:riscv64 \ + libpixman-1-dev:riscv64 + +# Specify the cross prefix for this image (see tests/docker/common.rc) +ENV QEMU_CONFIGURE_OPTS --cross-prefix=riscv64-linux-gnu- +ENV DEF_TARGET_LIST riscv64-softmmu,riscv64-linux-user