From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 22CB61A1F46 for ; Thu, 22 Sep 2016 04:25:38 -0700 (PDT) Received: by mail-it0-x234.google.com with SMTP id 186so78360880itf.0 for ; Thu, 22 Sep 2016 04:25:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=4WwZL0LNCjx3VswauQaYu3Xw3/UtSnTM4qMoez6Gcdo=; b=02COpNO/Bdgnj4EPQMGsGBZEHK7CGHTJpOJX/9tMkVOKelmAXPGMMHJ6NlJDcgsdBe EzKqE6APOysaXdLC6n0z71RS4GqGiug1nFZwT84ekQ0nqG587WtomFb8VbG/bnHE5GyQ mLYzId6YKpquKJg+rbaRX6qm3oUmR2Axg8Ra2Xale//4jYKHI7AaGnvdgRZvm751Ntb0 U+buA4jUT/Y01lCpSFCUEym+ICyEozFAHITSwtryc+uM9g/SJqrX88xQrF4XP3pLbEgJ R2O7Nafjmyl2YOzbKAGSjrLmXaydeIjD6GSh7fgt2eUH7uocJDalm+iQihjXLPMvuF1d VFVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=4WwZL0LNCjx3VswauQaYu3Xw3/UtSnTM4qMoez6Gcdo=; b=XIEvVTybq1dUE/r9PKzfYwq75GA3VSmP/F7lYiedRC40HTBFGf5z8Hi3yEmU5PhUX1 ht42dVPa10ary1DjQBV/SwXjae7xQ86lnnKrQvC6gY1RWN/hptrJNzGwGUtgLtf2yoSI ClUGcGnFhzYNtMahJFiHQN/lDkV1dsdmTzSa0j2OuQZ1fY1VSSQjfWDEXCoso/7owUPM agAm+tYHNW6yzb71BnvHbYu//fNLg9MsCaC8hhnuph7raVC6X3jZ9QSeza+/bLgvkmfr ktLepFLI1/cF2UrFY01xni8lc8EiEwa+Mw/YrWP9ID7iSgjjNv/w3PhvcJuUVKvNLP2M 9x1A== X-Gm-Message-State: AE9vXwOHWns3ZXihOQSJBhFqZtcogT4aPBLitP8hBaaqMHwZK/fR7UYxxSbaTpz7w8v+EUqYO1akOK/zOixq1w== X-Received: by 10.36.225.11 with SMTP id n11mr2235923ith.90.1474543537270; Thu, 22 Sep 2016 04:25:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.196.214 with HTTP; Thu, 22 Sep 2016 04:25:36 -0700 (PDT) In-Reply-To: References: <2c8f7b31-7cc5-38cf-a56f-d60229ace8e9@redhat.com> From: Saqib Khan Date: Thu, 22 Sep 2016 16:25:36 +0500 Message-ID: To: Laszlo Ersek Cc: edk2-devel@lists.01.org X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: Help Required legacy booting from an EFI X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 11:25:38 -0000 Content-Type: text/plain; charset=UTF-8 okay so i started with "MdeModulePkg\Application\BootManagerMenuApp" addded follwoing package in inf file 1. IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec 2. IntelFrameworkPkg/IntelFrameworkPkg.dec and follwing libraries 1. LegacyBootManagerLib 2. LegacyBootMaintUiLib and then i added library reference in C:\efi\test\edk2\DuetPkg/DuetPkgX6.dsc 1. LegacyBootManagerLib|IntelFrameworkModulePkg/Library/LegacyBootManagerLib/LegacyBootManagerLib.inf 2. LegacyBootMaintUiLib|IntelFrameworkModulePkg/Library/LegacyBootMaintUiLib/LegacyBootMaintUiLib.inf Then in included in \MdeModulePkg\Application\BootManagerMenuApp\BootManagerMenuApp.h then i attempted top call " GetLegacyOptions " then i built it with *Build -a X64 -p DuetPkg/DuetPkgX64.dsc * It is unable to find LegacyBootMaintUi.h also .i am unable find where i am wrong ...i have followed build path from https://github.com/tianocore/tianocore.github.io/wiki/Getting-Started-Writing-Simple-Application can any one point out where i am wrong? On Wed, Sep 21, 2016 at 12:13 AM, Laszlo Ersek wrote: > CC'ing Ray > > On 09/20/16 20:38, Saqib Khan wrote: > > > > > > On Mon, Sep 19, 2016 at 10:49 PM, Laszlo Ersek > > wrote: > > > > On 09/19/16 17:00, Saqib Khan wrote: > > > Hello all, this is my first post to this list and i am very new to > edk2 > > > development. > > > > > > I started by building BootManagerMenuApp with following > functionality > > > > > > - Boot from BootManagerManueApp > > > - Run an Helloworld EFI > > > - Run windows 7 EFI to boot windows 7 > > > > > > Now i want to develop an EFI which will first run Helloworld EFI > then it > > > will boot windows 7 which is installed on legacy boot (NOT EFI). > > > > > > I have looked through http://bluestop.org/edk2/docs/trunk/ > > documentation > > > thoroughly but i am not able to get any thing for legacy boot from > an EFI. > > > > > > > > > It will be helpful if someone guide me the flow for legacy booting > from an > > > EFI . > > > > You can add your EFI application to a SysPrep#### load option, then > the > > legacy-booted Windows OS to a normal Boot#### load option. > > > > > > Sysprep is not my option . :-( > > > > > > > > > > See "3.1.7 Required System Preparation Applications" in the UEFI-2.6 > > spec, about the ordering between SysPrep#### and Boot####. > > > > Furthermore, legacy boot can be triggered by using a BBS (BIOS Boot > > Specification) device path in the Boot#### option. This devpath node > > type is documented in UEFI-2.6 "Table 98. Device Node Table", and in > the > > Compatibility Support Module Specification, rev 0.98, "3.2.1 Legacy > BIOS > > Protocol", near BBS_BBS_DEVICE_PATH. > > > > > > > > Booting using BBS is my option,i was already looking for this and I have > > attempted to modify EFIBootManagerMenuApp to work with legacy boot used > (). > > > > I have system with CSM support so essentially i will be doing all my > > work on physical system not on virtual machine. > > > > The detail you provided about BBS device path and then adding it to boot > > menu is abstract for me .if you can detail this procedure a bit it will > > be helpful, if required I can share the code snippet with you > > It's been some time since I last tried CSM / legacy boot, but I think > when your platform BDS (= PlatformBootManagerLib instance) calls the > UefiBootManagerLib function called EfiBootManagerRefreshAllBootOption(), > that should generate (among other boot options) BBS boot options for all > suitable legacy OSes. > > It seems that for this, you should link > > IntelFrameworkModulePkg/Library/LegacyBootManagerLib/ > LegacyBootManagerLib.inf > > into all the drivers and modules in your firmware -- via NULL library > resolution -- that consume UefiBootManagerLib. In OVMF's case at least, > the set of affected drivers is: > > MdeModulePkg/Application/UiApp/UiApp.inf > MdeModulePkg/Universal/BdsDxe/BdsDxe.inf > MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf > NetworkPkg/HttpBootDxe/HttpBootDxe.inf > > The important ones from these modules are likely the first two, UiApp > and BdsDxe. > > (Theoretically any consumer of UefiBootManagerLib could call > EfiBootManagerRefreshAllBootOption(), and at that point you might want > LegacyBootManagerLib to have registered its "RefreshLegacyBootOption" > callback at construction time.) > > In addition, > > IntelFrameworkModulePkg/Library/LegacyBootMaintUiLib/ > LegacyBootMaintUiLib.inf > > should likely be linked, via NULL resolution, into > > MdeModulePkg/Application/UiApp/UiApp.inf > > minimally. > > (Example: please see the CSM_ENABLE parts under > "MdeModulePkg/Universal/BdsDxe/BdsDxe.inf" and > "MdeModulePkg/Application/UiApp/UiApp.inf" in OvmfPkg/OvmfPkg*dsc. > You'll find the above NULL library resolutions there.) > > > > > Apart from this I am facing another issue, i created a boot-able USB > > with EFI 2.0 shell in it . I have gabby motherboard(gigabyte h97- hd3) , > > I am not able to launch EFI shell with any configuration it directly > > boots windows no matter what I do, I attempted all USB port, and all > > configuration like "boot from UEFI only" disabling secure boot. when I > > plug US > > B in another system which support UEFI but not CSM it works fine after > > adding shell entry from USB. what might I be missing here?can you guide > > in this case? > > No clue. My take would have been "disable secure boot because your shell > binary is not signed", but you already tried that. Platform BDS is > platform-dependent, as its name says. Get another development board? > > Laszlo > -- Regards Saqib Ahmed Khanzada