From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web08.10715.1620155584694775879 for ; Tue, 04 May 2021 12:13:05 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=T3mMmBGo; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620155583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kCO4iiv5TkKW7Q99VrMdvCRcvPukYaEpw+OIgnZHWBY=; b=T3mMmBGokWmfgHGf1vZ9ZRnClq+7mxcL8u/fTGwdVv7CejE17nWZmQ/lgi8zHPjipsbgjO VMl161PZqFuYTZ+imBVzSPeu7AY1YckU1ELNdVfFEa2Zx6y/iHfkL0aKNAyZU69gnBh9zl 9HLgb+gTgSluk9XKfGWhFliSn9BD9RI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-106-ixdyEkfFMfqZm6rR_q3Vww-1; Tue, 04 May 2021 15:13:00 -0400 X-MC-Unique: ixdyEkfFMfqZm6rR_q3Vww-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E483818B62A8; Tue, 4 May 2021 19:12:59 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-105.ams2.redhat.com [10.36.113.105]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B62E5D6D1; Tue, 4 May 2021 19:12:58 +0000 (UTC) Subject: Re: [edk2-devel] Booting UEFI with QEMU arm To: devel@edk2.groups.io, pintu.ping@gmail.com, edk2-devel References: From: "Laszlo Ersek" Message-ID: <9ef009c3-7df7-3032-474a-f09437165809@redhat.com> Date: Tue, 4 May 2021 21:12:58 +0200 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 05/04/21 13:32, Pintu Agarwal wrote: > Hi, > Is it possible to boot UEFI on a qemu arm based emulator? > Since I am working from home and my uefi related work leads to device crash > many times, which becomes painful for me. > > So I wanted to do all my experiments on a qemu environment before I verify > the final changes on a real hardware. > So, I am just wondering is this possible? > > According to my search I see its possible but still I could not find a > proper way to do it. > Please help me if someone has already tried it. > > I already have the qemu-arm setup on my Linux/Ubuntu PC. >>From "qemu-system-arm", it seems like you really mean 32-bit ARM. Yes, there is support for that in edk2. Build: $ git submodule update --init --force $ . edksetup.sh $ nice make -C "$EDK_TOOLS_PATH" -j $(getconf _NPROCESSORS_ONLN) $ build -a ARM -b DEBUG -p ArmVirtPkg/ArmVirtQemu.dsc -t GCC5 $ for FD in QEMU_EFI.fd QEMU_VARS.fd; do cat -- \ "$WORKSPACE/Build/ArmVirtQemu-ARM/DEBUG_GCC5/FV/$FD" \ /dev/zero \ | head -c 64m >| /tmp/"$FD.padded" done Run: $ if ! [ -e vars.fd ]; then cp /tmp/QEMU_VARS.fd.padded vars.fd fi $ qemu-system-arm \ -M virt \ -cpu cortex-a15 \ -m 1024 \ -serial stdio \ -drive if=pflash,unit=0,format=raw,readonly=on,file=/tmp/QEMU_EFI.fd.padded \ -drive if=pflash,unit=1,format=raw,file=vars.fd \ -device virtio-gpu-pci \ -device id=xhci0,driver=qemu-xhci \ -device usb-kbd,bus=xhci0.0 \ -boot menu=on,splash-time=5000 \ [...] HTH Laszlo > > > Thanks, > Pintu > > > > > >