From patchwork Sun Jun 13 14:07:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alper Nebi Yasak X-Patchwork-Id: 1491439 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=TavvJRkv; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G2xJS3sB4z9sT6 for ; Mon, 14 Jun 2021 00:08:40 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 444BD80ECC; Sun, 13 Jun 2021 16:08:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="TavvJRkv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A710B80ECB; Sun, 13 Jun 2021 16:08:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,T_SPF_HELO_TEMPERROR autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AE3C0803B2 for ; Sun, 13 Jun 2021 16:08:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alpernebiyasak@gmail.com Received: by mail-ej1-x62d.google.com with SMTP id nd37so4340353ejc.3 for ; Sun, 13 Jun 2021 07:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7izaBcvWIfI0hX8X8BNsw4tPTdWUKWjKEtqBhNGHc/E=; b=TavvJRkvm375Xj2Rjluvs6JSNqrdZ3G9WPTYeyuUs4mto35QjxmPb4VwQ56Ug3h+O6 0yfF73VzKMvt8svaGhqipEnrCzEJkOlDZMbM/r+G9mEAwJQ3OffQS8rY42KOWcliUNR6 MwL59WnpfD8lx8RWdj8mI4U7pnU11dbVRZGM7HG0xRbFSn3Af7RTLH1YmruYgEvguDhJ LYweah/WCkZ7Bc5ZgncXRDMnSJkX79LqG4W4Oi5aoklbh4/a38cGhc6x7Hyu1isTowzI D/5WzodF/JWNF7iduXt5xbI375BHrETonVLZ7B44iarmj2SqwL9BoVXpktRm6UUrAung tEdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7izaBcvWIfI0hX8X8BNsw4tPTdWUKWjKEtqBhNGHc/E=; b=BVdLtIDpy/YCMGou6ByWQ3pKjz3SsYDf1/L5f1s8zelaj/2M9M+4oozfmmBhZC46I1 uON8+GNkkM/nM87RL39Q4wPTf5WDgJxfIKENQoLeAS0X5dyCCZzIpC3Jpu49r7G0AMql 3/d6JaRTxogwckV0OIYbuULZBMleE97gch1Fn9Y3cfeHwfOm/slALTMrBO1wFj5j53yf 3I823nJOcXMppRxAgeptXz1/+h490us5dd82BzQzN7lJjAPcQxZc7ZCTY2du6DT+B52I rW7qPgQENnji0eIxsfjV3v1tncE76cAgErFlS1WG42q+iZg3roqzjUH7Lc9NPDP/V2/y cA6g== X-Gm-Message-State: AOAM533ZFIRKFELZG82mcLYCmpKlume4bCihOc/C8qreYXFuFi3iAnDM tsD2cu5svdinYCzR2JIKUMai9D8q3kU= X-Google-Smtp-Source: ABdhPJywT6bWPPGiE9A131ne2OulxyTZag1ma4+Ua2+EgBGK46MlNZd6Ql1Oow1Eci0nmmHOWrQ1Hw== X-Received: by 2002:a17:906:988a:: with SMTP id zc10mr11078463ejb.62.1623593288077; Sun, 13 Jun 2021 07:08:08 -0700 (PDT) Received: from localhost.localdomain ([178.233.26.119]) by smtp.gmail.com with ESMTPSA id n15sm5929803eds.28.2021.06.13.07.08.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Jun 2021 07:08:07 -0700 (PDT) From: Alper Nebi Yasak To: u-boot@lists.denx.de Cc: AKASHI Takahiro , Bin Meng , Tom Rini , Simon Glass , Daniel Schwierzeck , Marek Vasut , Heinrich Schuchardt , Alper Nebi Yasak Subject: [PATCH v2 1/3] tools: docker: Install a readable kernel for libguestfs-tools Date: Sun, 13 Jun 2021 17:07:28 +0300 Message-Id: <20210613140731.16254-2-alpernebiyasak@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210613140731.16254-1-alpernebiyasak@gmail.com> References: <20210613140731.16254-1-alpernebiyasak@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean The filesystem and EFI (capsule and secure boot) test setups try to use guestmount and virt-make-fs respectively to prepare disk images to run tests on. However, these libguestfs tools need a kernel image and fail with the following message (revealed in debug/trace mode) if it can't find one: supermin: failed to find a suitable kernel (host_cpu=x86_64). I looked for kernels in /boot and modules in /lib/modules. If this is a Xen guest, and you only have Xen domU kernels installed, try installing a fullvirt kernel (only for supermin use, you shouldn't boot the Xen guest with it). This failure then causes these tests to be skipped in CIs. Install a kernel package in the Docker containers so the CIs can run these tests with libguestfs tools again (assuming the container is run with necessary host devices and privileges). As this kernel would be only used for virtualization, we can use the kernel package specialized for that. On Ubuntu systems kernel images are not readable by non-root users, so explicitly add read permissions with chmod as well. Signed-off-by: Alper Nebi Yasak Acked-by: Heinrich Schuchardt --- Changes in v2: - Add tag "Acked-by: Heinrich Schuchardt " tools/docker/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index d2f0074ee8a6..563b16639e54 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -71,6 +71,7 @@ RUN apt-get update && apt-get install -y \ libssl-dev \ libudev-dev \ libusb-1.0-0-dev \ + linux-image-kvm \ lzma-alone \ lzop \ mount \ @@ -99,6 +100,9 @@ RUN apt-get update && apt-get install -y \ zip \ && rm -rf /var/lib/apt/lists/* +# Make kernels readable for libguestfs tools to work correctly +RUN chmod +r /boot/vmlinu* /lib/modules/*/vmlinu* || true + # Manually install libmpfr4 for the toolchains RUN wget http://mirrors.kernel.org/ubuntu/pool/main/m/mpfr4/libmpfr4_3.1.4-1_amd64.deb && dpkg -i libmpfr4_3.1.4-1_amd64.deb && rm libmpfr4_3.1.4-1_amd64.deb