diff options
author | Alper Nebi Yasak <alpernebiyasak@gmail.com> | 2021-06-21 21:51:54 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-07-05 22:28:32 +0300 |
commit | f9abaa53ec82613ce0f578e9742092a987e8c6e6 (patch) | |
tree | 052fe307dc3db61ae3a5d84ff941ca3ca6e54e57 /tools/docker | |
parent | 99f5303c8b857320b00a63dca81d1f6f7c75c636 (diff) | |
download | u-boot-f9abaa53ec82613ce0f578e9742092a987e8c6e6.tar.xz |
tools: docker: Install a readable kernel for libguestfs-tools
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 <alpernebiyasak@gmail.com>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'tools/docker')
-rw-r--r-- | tools/docker/Dockerfile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index d2f0074ee8..579df82b56 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* + # 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 |