Isaac Oram 3b368b33e9 WhitleyOpenBoardPkg: Update to Whitley FSP 4.2.0.2A | 1 year ago | |
---|---|---|
.. | ||
Aowanda | 1 year ago | |
BiosInfo | 2 years ago | |
BoardPortTemplate | 1 year ago | |
CooperCityRvp | 2 years ago | |
Cpu | 1 year ago | |
Features | 1 year ago | |
Include | 1 year ago | |
JunctionCity | 1 year ago | |
Library | 1 year ago | |
Platform | 1 year ago | |
Uba | 1 year ago | |
Universal | 1 year ago | |
WilsonCityRvp | 2 years ago | |
DynamicExPcd.dsc | 2 years ago | |
FspFlashOffsets.fdf | 2 years ago | |
PlatformPkg.dec | 1 year ago | |
PlatformPkg.dsc | 1 year ago | |
PlatformPkg.fdf | 2 years ago | |
PlatformPkgConfig.dsc | 1 year ago | |
Readme.md | 2 years ago | |
StructurePcd.dsc | 1 year ago | |
StructurePcdCpx.dsc | 1 year ago |
There are currently three board ports:
There are corresponding binaries in edk2-non-osi/WhitleyOpenBoardBinPkg.
And there is a template for board porting, BoardPortWhitley. See below for detailed instructions on creating a new board port.
This template profides basic instructions for how to customize the WhitleyOpenBoardPkg for a new system board.
The naming of boards within the filesystem is only loosely affiliated with naming used in code.
The convention TypeBoardName shows up in code in several ways:
«BoardPortTemplate» is used in the board porting template for both board directory name and within the consistent TypeBoardName code.
There is no requirement for board directory naming to match code. The most important thing is for developers to match the source code with their hardware. Consistency is desirable, but it is very common for one board port to support multiple board and system products and thus consistent naming between file system and code content is not required.
It is desirable to pick a fairly unique name as WhitleyOpenBoardPkg UBA feature is designed to make it easy to support many boards in a single binary. For the purposes of this example, «MyBoard» is the board name in code and filesystem.
Add a new EFI_PLATFORM_TYPE enum in edk2-platforms\Silicon\Intel\WhitleySiliconPkg\Include\PlatformInfoTypes.h, e.g.
TypeMyBoard, // 0x80
Please update the comment for TypeBoardPortTemplate to match the new maximum used, e.g.
TypeBoardPortTemplate // 0x81
Update the PcdBoardId for your board in the WhitleyOpenBoardPkg/MyBoard/PlatformPkg.dsc, e.g.
gPlatformTokenSpaceGuid.PcdBoardId|0x80 # TypeMyBoard
Update each INF in WhitleyOpenBoardPkg/MyBoard/Uba with new GUID filename
Add a DXE UBA protocol GUID to WhitleyOpenBoardPkg/PlatformPkg.dec, with a new GUID
gEfiPlatformTypeMyBoardProtocolGuid = { 0xa68228c5, 0xc00f, 0x4d9a, { 0x8d, 0xed, 0xb9, 0x6b, 0x9e, 0xef, 0xab, 0xca } }
Add your board to the switch statement in BoardInitDxeDriverEntry (); in WhitleyOpenBoardPkg/Uba/BoardInit/Dxe/BoardInitDxe.c
case TypeMyBoard:
Status = gBS->InstallProtocolInterface (
&Handle,
&gEfiPlatformTypeMyBoardProtocolGuid,
EFI_NATIVE_INTERFACE,
NULL
);
ASSERT_EFI_ERROR (Status);
break;
Add the gEfiPlatformTypeMyBoardProtocolGuid to the WhitleyOpenBoardPkg/Uba/BoardInit/Dxe/BoardInitDxe.inf
Add a build option to edk2-platforms/Platform/Intel/build.cfg. e.g.
MyBoard = WhitleyOpenBoardPkg/MyBoard/build_config.cfg
At this point, you can build from edk2-platforms/Platform/Intel, e.g.
build_bios.py -p MyBoard -t VS2015x86 -d
At this point, customization is not scripted. The following are common customization areas: MyBoard/Uba/TypeBoardPortTemplate/Pei
GPIO
VR, IMON
SKU info
Board layout, sockets, memory
Soft straps, PCH, config, USB OC
PCI, KTI, IO port bifurcation MyBoard/Uba/TypeBoardPortTemplate/Dxe
IIO config update
Slot config update
USB overcurrent update
Building with the python script
| Argument | Function | | ———————-|————————————-| | -h, –help | show this help message and exit | | –platform, -p | the platform to build | | –toolchain, -t | tool Chain to use in build process | | –DEBUG, -d | debug flag | | –RELEASE, -r | release flag | | –TEST_RELEASE, -tr | test Release flag | | –RELEASE_PDB, -rp | release flag | | –list, -l | lists available platforms | | –cleanall | cleans all | | –clean | cleans specified platform | | –capsule | capsule build enabled | | –silent | silent build enabled | | –performance | performance build enabled | | –fsp | fsp wrapper build enabled | | –fspapi | API mode fsp wrapper build enabled | | –hash | Enable hash-based caching | | –binary-destination | create cache in specified directory | | –binary-source | Consume cache from directory | | |