On Sat, Dec 26, 2020 at 11:24:42AM +0800, Xiao Shenwei wrote:
On Fri, Dec 25, 2020 at 04:07:04PM +0800, Liu Yinsi wrote:
in x86_64 debian machine, UEFI support for qemu is ovmf/OVMF.fd,
libvirt can use edk2 generater file as loader
xsw@crystal ~% ll /usr/share/edk2/aarch64 total 131M -rw-r--r--. 1 root root 64M 2020-03-22 18:44 vars-template-pflash.raw -rw-r--r--. 1 root root 768K 2020-03-22 18:44 QEMU_VARS.fd -rw-r--r--. 1 root root 64M 2020-03-22 18:44 QEMU_EFI-pflash.raw -rw-r--r--. 1 root root 2.0M 2020-03-22 18:44 QEMU_EFI.fd
you can search this file on x86_64, then check them can be use, may be we can remove this container
debian有支持的软件包,下载就能用,不用在机器上搜 https://packages.debian.org/buster/qemu-efi-aarch64 https://packages.debian.org/sid/misc/ovmf
Thanks, Shenwei
Thanks, Shenwei
different arch use different UEFI support.
Signed-off-by: Liu Yinsi liuyinsi@163.com
container/qemu-efi/Dockerfile | 4 +++- container/qemu-efi/build | 5 ++++- container/qemu-efi/install | 6 +++++- 3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/container/qemu-efi/Dockerfile b/container/qemu-efi/Dockerfile index e1087c5..46f442e 100644 --- a/container/qemu-efi/Dockerfile +++ b/container/qemu-efi/Dockerfile @@ -3,9 +3,11 @@
FROM debian
+ARG UEFI
ENV DEBIAN_FRONTEND noninteractive
COPY conf/sources.list* /etc/apt/ RUN apt-get update && \ apt-get install -y --no-install-recommends apt-utils > /dev/null 2>&1 && \
- apt-get install -y qemu-efi-aarch64
- apt-get install -y $UEFI
diff --git a/container/qemu-efi/build b/container/qemu-efi/build index 1238e67..cac9426 100755 --- a/container/qemu-efi/build +++ b/container/qemu-efi/build @@ -2,4 +2,7 @@ # SPDX-License-Identifier: MulanPSL-2.0+ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
-docker build -t debian:qemu-efi . +[ $(arch) == "aarch64" ] && uefi=qemu-efi-aarch64 +[ $(arch) == "x86_64" ] && uefi=ovmf
+docker build -t debian:qemu-efi --build-arg UEFI=$uefi . diff --git a/container/qemu-efi/install b/container/qemu-efi/install index 96be9aa..04bf581 100755 --- a/container/qemu-efi/install +++ b/container/qemu-efi/install @@ -11,5 +11,9 @@ cmd=( )
"${cmd[@]}" -docker cp qemu-efi:/usr/share/qemu-efi-aarch64 /usr/share/qemu-efi-aarch64
+[ $(arch) == "aarch64" ] && uefi=qemu-efi-aarch64 +[ $(arch) == "x86_64" ] && uefi=ovmf
+docker cp qemu-efi:/usr/share/$uefi /usr/share/$uefi docker_rm qemu-efi -- 2.23.0