From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4EFBB1A2078 for ; Thu, 22 Sep 2016 20:33:03 -0700 (PDT) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DAA5A4B0C1; Fri, 23 Sep 2016 03:33:02 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-4.phx2.redhat.com [10.3.116.4]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8N3X1Q5018325; Thu, 22 Sep 2016 23:33:02 -0400 To: Saqib Khan References: <2c8f7b31-7cc5-38cf-a56f-d60229ace8e9@redhat.com> Cc: edk2-devel@ml01.01.org From: Laszlo Ersek Message-ID: Date: Fri, 23 Sep 2016 05:33:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 23 Sep 2016 03:33:02 +0000 (UTC) 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: Fri, 23 Sep 2016 03:33:03 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 09/22/16 13:25, Saqib Khan wrote: > 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? The header file that you are trying to include, in the source code of another module, is actually a library-internal header file: IntelFrameworkModulePkg/Library/LegacyBootMaintUiLib/LegacyBootMaintUi.h Library class header files that define public APIs always have pathnames with the pattern FooPkg/Include/Library/BarLib.h I'm getting confused about what you want to achieve. You wrote "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)." To my knowledge, if you have a UEFI boot option for a legacy OS (with the BBS devpath stuff in it), then EfiBootManagerBoot() in UefiBootManagerLib can boot it transparently, assuming all the legacy support has been built in (see my previous email). Ultimately the legacy OS is booted with the EFI_LEGACY_BIOS_PROTOCOL.LegacyBoot(), which takes the BBS device path as a parameter. See LegacyBmBoot() in "IntelFrameworkModulePkg/Library/LegacyBootManagerLib/LegacyBm.c". Anyway I think this would be best discussed with Ray, as I'm just another user of UefiBootManagerLib, through OVMF's PlatformBDS. What you are trying to do doesn't seem like regular boot manager / Platform BDS behavior. Laszlo