From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) by mx.groups.io with SMTP id smtpd.web08.13494.1654371188492599725 for ; Sat, 04 Jun 2022 12:33:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=plAt9GBK; spf=pass (domain: gmail.com, ip: 209.85.166.44, mailfrom: ayushdevel1325@gmail.com) Received: by mail-io1-f44.google.com with SMTP id f4so8713228iov.2 for ; Sat, 04 Jun 2022 12:33:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/etRp8rpRlWSLJptmYbwr2Cu0JX9ZGO40h3ijFGMOjY=; b=plAt9GBKpIIHJxu4MTKO3eHxkoPw+7zDjr2lND9OZu2MCxZS5WSV8wbtGHzZ42CH/w 416fIfLWTuw8Ih3ghYm/uAoHRDuWglDBOm94jXwTjQjOKQijtGnPlksnpTdNqMn5RDAZ EN7D/LrUF+UdxX1bkWd5S3uI+fgen6lJn7H5UkqAqpcdR9vNpv85Gn/BWC+1URV7B+57 YTY5dUbEIc1p9mhLSaSm1dzg0+ySwkyWqR4S3Xg93HuD2LUgox1pTNqVIdou/JIwxeyj cwXkRL3jPXcTnHIZnM3Jp+6jwtn06Bs5BH96qAEBMdzyZzM6j4gnAmr8OXiF9X5HWWKq rCqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/etRp8rpRlWSLJptmYbwr2Cu0JX9ZGO40h3ijFGMOjY=; b=4uPNmWvsuJ3srQoPB/16FpWqEa2WPcEq5xcCONzzRm/DagAls1Ux2Yd6nfkgNN8/vH Qv26VKa0/pl61s2TE61Z8nvd3I0rykipu8cHciV2r2UTFJxjHo+AVKbjFetcJaAuqHgG ctVLYtkhSha8+3qXXzJOJ2WwmLMQsMAgSh1KVhFbsT+t0goLLkCTHTW5zt38FAWGpfVo X/NrHi9EAGCCYGkScDu+KHRs5EEM4hNtR0IHAXuc6tdSONvCZ6ts2AdEzAxb7evZDfds gYxB4nTLVlqM6UyR+CWjSyxPxVsPF7Dg4K36RZSUEkMViKZWSKwCvMdlPPnJNHEFV2Jg hAXw== X-Gm-Message-State: AOAM530nWD+C8pCdw6aswworhTm4ShQxBHYa0UDNySNVpt2pO6UEkF57 O4IoHLrBPS0CwVPimxLqaJ5Op+1GrAx83RNoePA= X-Google-Smtp-Source: ABdhPJzlK6D/ciuSiAHuYMM/yoljLCzTFNK98xdd5zEDT5wwN3W61mg4mI68nH6syjARPPOD6NFR3SaplH2cGQRfUXw= X-Received: by 2002:a05:6638:2615:b0:32e:d246:8e27 with SMTP id m21-20020a056638261500b0032ed2468e27mr8713802jat.7.1654371187812; Sat, 04 Jun 2022 12:33:07 -0700 (PDT) MIME-Version: 1.0 References: <42fc9038-82b7-692d-58e6-0b9d293d7bb3@hpe.com> In-Reply-To: <42fc9038-82b7-692d-58e6-0b9d293d7bb3@hpe.com> From: "Ayush Singh" Date: Sun, 5 Jun 2022 01:02:56 +0530 Message-ID: Subject: Re: [edk2-devel] Running and Testing Modules and Applications To: "Brian J. Johnson" Cc: edk2-devel-groups-io Content-Type: text/plain; charset="UTF-8" Hi Brian, thanks for the tip about vvfat. It's pretty neet for testing, especially since the whole build output folder can be mounted that way. I guess I will write a blog post or something so I don't forget it in the future. Also, I think it would be a great idea if BaseTools contained a script to run/test the applications in qemu. Ayush Singh On Sat, Jun 4, 2022 at 3:36 AM Brian J. Johnson wrote: > > Qemu's virtual VFAT (vvfat) disk type is a convenient way to test UEFI > applications. It presents a folder on the host as a VFAT file system to > the guest. It's not the fastest or the most stable disk type (be > careful not to modify files from the host while the guest is running), > but it's really handy. > > Another way to put a file on a UEFI VFAT disk image for qemu is to use > mtools (https://www.gnu.org/software/mtools/), a set of user-mode > programs which can manipulate FAT disk images. You can write some > scripts around them to automate your workflow, similarly to uefi-run. > I've done that quite a bit in the past. > > Good luck, > Brian J. Johnson > > -------- Original Message -------- > From: Ayush Singh [mailto:ayushdevel1325@gmail.com] > Sent: Friday, June 3, 2022, 11:49 AM > To: edk2-devel-groups-io > Subject: [edk2-devel] Running and Testing Modules and Applications > > Hello everyone, I wanted to ask everyone how most modules and > applications are run/tested in edk2. I will be working on Adding Rust > support for edk2 during GSoC and thus will probably have to do a lot > of primitive testing. I did look at the EmulationPkg but didn't really > understand how to use it. It simply drops me into gdb, although maybe > that's what it is supposed to do? > > There were also some GUI programs (VisualUefi) that can be used in > windows, but since I am in Linux, they aren't much useful. I also > found a tutorial to run it in a physical machine > (https://tait.tech/2021/04/18/uefi-development-environment/ > ), but that > seems more for the final testing rather than testing during > development. > > I have also tried using qemu for running applications, and I guess I > was somewhat successful by using the script: > `https://github.com/Richard-W/uefi-run` to test out uefi applications > in qemu. However, it builds a FAT filesystem around the EFI > application, so I was wondering if there was a better and simpler way > to do it. > > Ayush Singh > > > > >