Re: History of Driver/Features in edk2-platforms
Hi Jeff,toggle quoted messageShow quoted text
The general idea behind putting the drivers and feature code into edk2-platforms came from the concept of advanced feature packages from the MinPlatform specification<https://tianocore-docs.github.io/edk2-MinimumPlatformSpecification/draft/8_stage_6_advanced_feature_selection/#8-stage-6-advanced-feature-selection>.
So edk2-platforms/Features provides the catalog of available features. Use of these features is convenient due to AdvancedFeaturePkg providing easy to use FixedAtBuild PCDs for turning individual features on and off: https://github.com/tianocore/edk2-platforms/blob/master/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
Another benefit to this layout is having AdvancedFeaturePkg and MinPlatformPkg co-located enables greater simplicity in our build scripts.
With regard to the idea of pairing down the packages in your formal release repo, that is certainly one method of focusing the codebase on your platform. However, we have found that doing that can make cherry-picks from upstream to downstream (or vice versa) to be more difficult than desirable. At Intel we use git’s sparse checkout feature in lieu of wholesale deletion of packages from the repository.
The usage of several git repositories in a typical modern EDK II project has made fetching code somewhat tedious in general. To make this easier we created the EdkRepo tool, which automates many of these common workflows. In addition to automating cloning and fetching across multiple repositories, EdkRepo manages the git sparse checkout list, automates deployment of client side git hooks and commit templates, and several other useful features.
If you would like to give it a try, the newest release is available here: https://github.com/tianocore/edk2-edkrepo/releases/tag/edkrepo-v2.1.2
To install EdkRepo, the following software is needed:
* Git 2.13.x or later (Git 2.27.0<https://github.com/git-for-windows/git/releases/download/v2.27.0.windows.1/Git-2.27.0-64-bit.exe> recommended)
* Python 3.5 or later (Python 3.8.10<https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe> recommended)
After you have EdkRepo, run the following command:
edkrepo clone <path-to-some-folder> Intel-MinPlatform
After that is done, change to the directory edk2-platforms/Platform/Intel and run the following command:
build_bios.py -p WilsonCityRvp -t VS2015x85 -d
build_bios.py -p WilsonCityRvp -t VS2015x86 -r
-d is for debug, -r is for release. You can also use -t VS2017/VS2019 if you prefer. On Linux, use -t GCC5.
I hope that helps. Thank you again for reaching out, let us know if you have any questions!
With Best Regards,
From: email@example.com <firstname.lastname@example.org> On Behalf Of Jeff Brasen via groups.io
Sent: Thursday, September 16, 2021 9:37 AM
Subject: [edk2-discuss] History of Driver/Features in edk2-platforms
Was curious if there was a reason why the top level drivers and features code was added into edk2-platforms instead of edk2 or a new repo. These modules seem different than the rest of the code in edk2-platforms as they are not really platform or silicon related code but general features. We are looking at how to both release support for our platforms into tianocore as well as a separate fork that will be used for our actual formal release and it may be preferable to not have all of the other platform/silicon code that is not relevant to our project.