From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 5643521A143C3 for ; Tue, 13 Jun 2017 16:11:56 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jun 2017 16:13:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,339,1493708400"; d="scan'208";a="273879851" Received: from orsmsx108.amr.corp.intel.com ([10.22.240.6]) by fmsmga004.fm.intel.com with ESMTP; 13 Jun 2017 16:13:10 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.128]) by ORSMSX108.amr.corp.intel.com ([169.254.2.100]) with mapi id 14.03.0319.002; Tue, 13 Jun 2017 16:13:10 -0700 From: "Kinney, Michael D" To: Leif Lindholm , "Yao, Jiewen" , "Kinney, Michael D" CC: "edk2-devel@lists.01.org" , Ryan Harkin , Ard Biesheuvel , "Chenhui Sun" , Andrew Fish , Alan Ott , "Richardson, Brian" , "Duran, Leo" , "haojian.zhuang@linaro.org" , Linaro UEFI , "Heyi Guo" Thread-Topic: [edk2] [RFC] migration of OpenPlatformPkg to tianocore Thread-Index: AQHSxGBoIftOZn2lrUSePM4Ws3w6M6HmOGmAgDPxKYCACXVWYA== Date: Tue, 13 Jun 2017 23:13:08 +0000 Message-ID: References: <20170503225539.GQ1657@bivouac.eciton.net> <74D8A39837DF1E4DA445A8C0B3885C503A939E61@shsmsx102.ccr.corp.intel.com> <20170607145815.GE7556@bivouac.eciton.net> In-Reply-To: <20170607145815.GE7556@bivouac.eciton.net> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWIxNWZlNmEtOTNlZi00NWExLTkzZGUtNjhhMjY3NjczYjAwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlJpV2VRZzBFUXluWnZ2VXRMYXVSZ1dQUTFnUkgzcjd5Z1wvWEhcL2VGOHVVTT0ifQ== dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.22.254.138] MIME-Version: 1.0 Subject: Re: [RFC] migration of OpenPlatformPkg to tianocore X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jun 2017 23:11:56 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Leif, I pulled the latest versions of the repos and I was able to complete a build with no errors and without using symbolic links. The change I made is to set WORKSPACE to the directory immediately above the repos and set PACKAGES_PATH to directories that contain the packages required for the platform to build. This is the same technique used to build QuarkPlatformPkg that uses content from both the edk2 and the edk2-non-osi repos. See the Readme.md in the QuarkPlatformPkg with instructions for setting up the build env for Linux and Windows for an example. https://github.com/tianocore/edk2/tree/master/QuarkPlatformPkg I wrote a small shell script that I put in the directory above the repos to setup the build environment for the JunoPkg platform. export GCC5_AARCH64_PREFIX=3Daarch64-linux-gnu- export WORKSPACE=3D$PWD export PACKAGES_PATH=3D\ $WORKSPACE/edk2:\ $WORKSPACE/edk2-platforms/Platform/ARM:\ $WORKSPACE/edk2-non-osi cd edk2 make -C BaseTools . edksetup.sh BaseTools build -a AARCH64 -t GCC5 -p JunoPkg/ArmJuno.dsc =3D=3D=3D end of build log =3D=3D=3D Generate Region at Offset 0x0 Region Size =3D 0xF8000 Region Name =3D FV Generating FVMAIN_COMPACT FV #### Generating FVMAIN FV #################################### ######################################## ######################################## ######################################## ################################ Generate Region at Offset 0x0 Region Size =3D 0xF8000 Region Name =3D FV GUID cross reference file can be found at /home/mdkinney/GitHub/tianocore/B= uild/ArmJuno/DEBUG_GCC5/FV/Guid.xref FV Space Information FVMAIN_COMPACT [94%Full] 1015808 total, 956200 used, 59608 free FVMAIN [99%Full] 8237696 total, 8237688 used, 8 free - Done - Build end time: 18:49:57, Jun.13 2017 Build total time: 00:04:22 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D If you want to support building any of the platforms, then PACKAGES_PATH can be set as follows: export PACKAGES_PATH=3D\ $WORKSPACE/edk2:\ $WORKSPACE/edk2-platforms/Silicon/Hisilicon:\ $WORKSPACE/edk2-platforms/Silicon/AMD:\ $WORKSPACE/edk2-platforms/Platform/Hisilicon:\ $WORKSPACE/edk2-platforms/Platform/Marvell:\ $WORKSPACE/edk2-platforms/Platform/ARM:\ $WORKSPACE/edk2-non-osi/Silicon/Intel:\ $WORKSPACE/edk2-non-osi/Silicon/AMD/Styx: Best regards, Mike -----Original Message----- From: Leif Lindholm [mailto:leif.lindholm@linaro.org]=20 Sent: Wednesday, June 7, 2017 7:58 AM To: Yao, Jiewen Cc: edk2-devel@lists.01.org; Ryan Harkin ; Ard Bies= heuvel ; Chenhui Sun ; A= ndrew Fish ; Alan Ott ; Richardson, B= rian ; Duran, Leo ; haojian.= zhuang@linaro.org; Linaro UEFI ; Kinney, Mich= ael D ; Heyi Guo Subject: Re: [edk2] [RFC] migration of OpenPlatformPkg to tianocore Hi all, OK, so I have now updated both edk2-non-osi and edk2-platforms (devel-OpenPlatformPkg branches) with package renaming, and updating .dsc/.fdf files to .=20 It appears the problems I'm facing are mainly caused by the GenFds stage not seeing a view consistent with the actual compilation stage. To demonstrate, I build the Juno platform: $ . edksetup.sh $ make -C BaseTools $ PACKAGES_PATH=3D/work/git/edk2-platforms/Platform/ARM \ GCC5_AARCH64_PREFIX=3Daarch64-linux-gnu- build -n 9 -a AARCH64 \ -t GCC5 -p JunoPkg/ArmJuno.dsc -b RELEASE This build fails with: --- Fd File Name:BL33_AP_UEFI Generate Region at Offset 0x0 Region Size =3D 0xF8000 Region Name =3D FV Generating FVMAIN_COMPACT FV #### Generating FVMAIN FV GenFds.py... : error F003: Output file for RAW section could not be found for JunoPkg/AcpiTables/AcpiTables.inf build.py... : error 7000: Failed to execute command GenFds -f /work/git/edk2-platforms/Platform/ARM/JunoPkg/ArmJuno.fdf --conf=3D/work/git/edk2/Conf -o /work/git/edk2/Build/ArmJuno/RELEASE_GCC5 -t GCC5 -b RELEASE -p /work/git/edk2-platforms/Platform/ARM/JunoPkg/ArmJuno.dsc -a AARCH64 -D "EFI_SOURCE=3D/work/git/edk2/EdkCompatibilityPkg" -D "EDK_SOURCE=3D/work/git/edk2/EdkCompatibilityPkg" -D "TOOL_CHAIN_TAG=3DGCC5" -D "TOOLCHAIN=3DGCC5" -D "TARGET=3DRELEASE" -D "FAMILY=3DGCC" -D "WORKSPACE=3D/work/git/edk2" -D "EDK_TOOLS_PATH=3D/work/git/edk2/BaseTools" -D "ARCH=3DAARCH64" -D "ECP_SOURCE=3D/work/git/edk2/EdkCompatibilityPkg" [/work/git/edk2] - Failed - --- , but if I add the symlink ln -s edk2-platforms/Platform/ARM/JunoPkg/ Build/ArmJuno/RELEASE_GCC5/AARCH= 64/ it completes successfully on the next pass. Same when building VExpressPkg/ArmVExpress-FVP-AArch64.dsc ln -s edk2-platforms/Platform/ARM/VExpressPkg \ Build/ArmVExpress-FVP-AArch64/RELEASE_GCC5/AARCH64/ resolves the build error. Similarly, when I build the Overdrive/Overdrive.dsc, using: $ PACKAGES_PATH=3D/work/git/edk2-platforms/Platform/AMD:/work/git/edk2-plat= forms/Silicon/AMD:/work/git/edk2-non-osi/Silicon/AMD/Styx:/work/git/edk2-no= n-osi/Platform/AMD \ GCC5_AARCH64_PREFIX=3Daarch64-linux-gnu- build -n 9 -a AARCH64 -t GCC5 -p OverdriveBoard/OverdriveBoard.dsc -b RELEASE this fails with --- Fd File Name:STYX_ROM Generate Region at Offset 0x0 Region Size =3D 0x200000 Region File Name =3D /work/git/edk2/../edk2-non-osi/Platform/AMD/OverdriveBoard/PreUefiFir= mware.bin Generate Region at Offset 0x200000 Region Size =3D 0x260000 Region Name =3D FV Generating STYX_EFI FV ################Return Value =3D 2 GenFw: ERROR 0001: Error opening file /work/git/edk2/Build/Overdrive/RELEASE_GCC5/AARCH64/StyxPkg/Drivers/PlatI= nitPei/PlatInitPei/OUTPUT/PlatInitPei.efi GenFds.py... ### ['GenFw', '-t', '-o', ### '/work/git/edk2/Build/Overdrive/RELEASE_GCC5/FV/Ffs/769694a4-2572-4f29-= a5bb-33d7df7be001PlatInitPei/769694a4-2572-4f29-a5bb-33d7df7be001Te.raw', ### '/work/git/edk2/Build/Overdrive/RELEASE_GCC5/AARCH64/StyxPkg/Drivers/Pl= atInitPei/PlatInitPei/OUTPUT/PlatInitPei.efi'] : error 7000: Failed to generate firmware image build.py... : error 7000: Failed to execute command GenFds -f /work/git/edk2-platforms/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf --conf=3D/work/git/edk2/Conf -o /work/git/edk2/Build/Overdrive/RELEASE_GCC5 -t GCC5 -b RELEASE -p /work/git/edk2-platforms/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc -a AARCH64 -D "EFI_SOURCE=3D/work/git/edk2/EdkCompatibilityPkg" -D "EDK_SOURCE=3D/work/git/edk2/EdkCompatibilityPkg" -D "TOOL_CHAIN_TAG=3DGCC5" -D "TOOLCHAIN=3DGCC5" -D "TARGET=3DRELEASE" -D "FAMILY=3DGCC" -D "WORKSPACE=3D/work/git/edk2" -D "FIRMWARE_VER=3Db941c34" -D "EDK_TOOLS_PATH=3D/work/git/edk2/BaseTools" -D "ARCH=3DAARCH64" -D "ECP_SOURCE=3D/work/git/edk2/EdkCompatibilityPkg" [/work/git/edk2] - Failed - --- Again, resolved by ln -s edk2-platforms/Silicon/AMD/StyxPkg/ Build/Overdrive/RELEASE_GCC5/AARC= H64/ Am I doing something wrong here? Are there any magic runes that could help out? / Leif On Fri, May 05, 2017 at 01:45:51PM +0000, Yao, Jiewen wrote: > HI Leif > It is great that you are adding more platform to edk2-platforms. >=20 > We (Intel) also have plan to add more boards there. In general, we are ve= ry close on having silicon and platform folder. >=20 > I have a quick look. One minor suggestions here: > Take Arm folder as example. (I assume Juno is one package, and VExpress i= s the other package.) > Can we name Juno to be JunoPkg, and VExpress to be VExpressPkg ? > We do not add "Pkg" to a folder. And we usually add "Pkg" suffix to a pac= kage. >=20 > In general, I think it is a very good start. > I may review the content in more detail and provide more feedback. >=20 >=20 > Thank you > Yao Jiewen >=20 >=20 > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Le= if Lindholm > Sent: Thursday, May 4, 2017 6:56 AM > To: edk2-devel@lists.01.org > Cc: Ryan Harkin ; Ard Biesheuvel ; Chenhui Sun ; Andrew Fish ; Alan Ott ; Richardson, Brian ; Duran, Leo ; haojian.zhuang@linaro.org; Lina= ro UEFI ; Kinney, Michael D ; Heyi Guo > Subject: [edk2] [RFC] migration of OpenPlatformPkg to tianocore >=20 > Hi all, >=20 > As some of you may be aware, I have been working around the lack of > a clear upstreaming strategy for platform support by keeping such code > in a dedicated repository I set up at Linaro for that purpose: > https://git.linaro.org/uefi/OpenPlatformPkg.git >=20 > During discussions at the last Seattle plugfest we finally agreed on > the (theoretical) details of how to use the edk2-platforms repository. > After that I promised to migrate OpenPlatformPkg across to the > edk2-platforms and edk2-non-osi structure, with the explicit end goal > from my side that this should become the master branch for each. >=20 > And now, before the release of HURD 1.0, I have. >=20 > Current limitations (that I can remember): > - A few references to OpenPlatformPkg remain, in ways that do not > appear to break any of the platform builds. Most likely this affects > dead code, but in case it's been accidentally orphaned, I thought it > best to > - I have simply nuked all references to Ebl (used in _addition_ to the > UEFI shell, which was never the intent) and the efi-toolkit > ramdisk driver. > - The Marvell Yukon driver that I sent out for review last week has > not migrated anywhere, and so has been temporarily disabled > Mike suggested I should > - USB support on the LeMaker Cello board depends on the patch > "OptionRomPkg: add firmware loader driver for Renesas PD72020x" > sent out by Ard on 18th of April. > - I have dropped some of the binary-only modules from OpenPlatformPkg, > and contacted the platform owners with requests for modifications. > - The git history is quite messy and will be cleaned up, but I wanted > to keep the transition quite visible in the RFC. > - I haven't filled anything into the Maintainers.txt files - I am in > favour of moving to a fully machine-readable format with wildcards > as Laszlo has proposed in the past, and think this would be an > excellent point to have that discussion (which can be had separately > for edk2-platforms and edk2-non-osi from edk2). > - Few of the platforms complete the FV generation stage, and I've > inserted a couple of silly hacks to get them to get as far as they > do. I think that either I am missing some points of how > PACKAGES_PATH is intended to work, or I'm simply hitting corner > cases no one has come across before. I could really use some help > debugging these issues. (examples below). >=20 > The below depends on the 3-part series I sent out today for importing > DwEmmcDxe and EfiTimeBaseLib from OpenPlatformPkg. But apart from > that, I have uploaded branches called devel-OpenPlatformPkg to: >=20 > https://github.com/tianocore/edk2-platforms/tree/devel-OpenPlatformPkg > https://github.com/tianocore/edk2-non-osi/tree/devel-OpenPlatformPkg >=20 > These branches _will_ be rebased occasionally until they get to a > point where they can move out of devel- stage (and hopefully onto > master). >=20 >=20 > Build issue description > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > So, one of the hopefully easier ones is what I'm seeing when trying to > build the Juno platform: >=20 > $ PACKAGES_PATH=3D"/work/maint/edk2-platforms:/work/maint/edk2-non-osi" G= CC5_AARCH64_PREFIX=3Daarch64-linux-gnu- build -a AARCH64 -t GCC5 -p Platfor= m/ARM/Juno/ArmJuno.dsc -b RELEASE -n 9 >=20 > results in: >=20 > <<< > GenFds.py... > : error F003: Output file for RAW section could not be found for > Platform/ARM/Juno/AcpiTables/AcpiTables.inf >=20 > ### >=20 >=20 > build.py... > : error 7000: Failed to execute command > GenFds -f /work/maint/edk2-platforms/Platform/ARM/Juno/ArmJuno.f= df --conf=3D/work/maint/edk2/Conf -o /work/maint/edk2/Build/ArmJuno/RELEASE= _GCC5 -t GCC5 -b RELEASE -p /work/maint/edk2-platforms/Platform/ARM/Juno/Ar= mJuno.dsc -a AARCH64 -D "EFI_SOURCE=3D/work/maint/edk2/EdkCompatibilityPkg"= -D "EDK_SOURCE=3D/work/maint/edk2/EdkCompatibilityPkg" -D "TOOL_CHAIN_TAG= =3DGCC5" -D "TOOLCHAIN=3DGCC5" -D "TARGET=3DRELEASE" -D "FAMILY=3DGCC" -D "= WORKSPACE=3D/work/maint/edk2" -D "EDK_TOOLS_PATH=3D/work/maint/edk2/BaseToo= ls" -D "ARCH=3DAARCH64" -D "ECP_SOURCE=3D/work/maint/edk2/EdkCompatibilityP= kg" > [/work/maint/edk2] >=20 > - Failed - > >>> >=20 > And when I copy and paste the above command manually, I get: >=20 > <<< > GenFds.py... > /work/maint/edk2-platforms/Platform/ARM/Juno/ArmJuno.dsc(34): error > 000E: File/directory not found in workspace > /work/maint/edk2-platforms/Platform/ARM/Juno/Platform/ARM/VExpres= s/ArmVExpress.dsc.inc > /work/maint/edk2/Platform/ARM/VExpress/ArmVExpress.dsc.inc > >>> >=20 > So, to an uniformed observer, it seems the portion > !include Platform/ARM/VExpress/ArmVExpress.dsc.inc > from ArmJuno.dsc > gets expanded to "directory ArmJuno.dsc is in" + "Platform/ARM/VExpress/A= rmVExpress.dsc.inc" > whereas I was hoping for it to try to find a match for > "Platform/ARM/VExpress/ArmVExpress.dsc.inc" along PACKAGES_PATH (and > find one in edk2-platforms). >=20 > I also have the impression that something similar is happening in > ArmJuno.fdf for the line > INF RuleOverride=3DACPITABLE Platform/ARM/Juno/AcpiTables/AcpiTables.in= f > generating the error message from the original build command. >=20 > But I'm not quite sure how to debug these issues (short of fully > figuring out the innards of MultipleWorkspace.py, MetaFileParser.py > and a few others). > Any ideas of where to look, or even what is going on? > Would these cases be expected to work? >=20 > / > Leif > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel