edk2 with corebootPkg
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Patrick Georgi c34edd83b0 Document corebootFb 5 years ago
AppPkg AppPkg/Applications/Python/Python-2.7.10: Initial Checkin part 5/5. 5 years ago
ArmPkg ArmPkg: update RVCT assembly functions to use new RVCT_ASM_EXPORT macro 5 years ago
ArmPlatformPkg ArmPlatformPkg: remove ArmGlobalVariable PCD, GUID and PPI definitions 5 years ago
ArmVirtPkg ArmVirtPkg: HighMemDxe: add memory space for the high memory nodes 5 years ago
BaseTools BaseTools PatchCheck.py: Support binary diff 5 years ago
BeagleBoardPkg BeagleBoardPkg: remove ArmPlatformGlobalVariableLib resolution 5 years ago
Conf EDK II: Add .gitignore 6 years ago
CorebootModulePkg CorebootModulePkg:Removing EFI_RESOURCE_ATTRIBUTE_TESTED 5 years ago
CorebootPayloadPkg CorebootPayloadPkg PlatformHookLib: Fix GCC build failure 5 years ago
CryptoPkg CryptoPkg: Disable VS2015 warning C4311 in OpensslLib 5 years ago
DuetPkg DuetPkg: exit pci function loops early if device is not multi-function 5 years ago
EdkCompatibilityPkg EdkCompatibilityPkg: Remove gZeroGuid def in FrameworkHiiOnUefiHiiThunk 5 years ago
EdkShellBinPkg */Contributions.txt: Update example email address 6 years ago
EdkShellPkg */Contributions.txt: Update example email address 6 years ago
EmbeddedPkg EmbeddedPkg/AndroidFastboot: drop bogus ArmGlobalVariable dependencies 5 years ago
EmulatorPkg EmulatorPkg: Fix GCC49 build hang in PeiCore 5 years ago
FatBinPkg FatBinPkg: Update EBC/IA32/X64/IPF binaries 5 years ago
IntelFrameworkModulePkg IntelFrameworkModulePkg: remove unreachable code 5 years ago
IntelFrameworkPkg IntelFrameworkPkg: Update DEC and DSC version from 0.94 to 0.96 5 years ago
IntelFspPkg Handle extra module patchable PCD variable in Linux map. 5 years ago
IntelFspWrapperPkg Publish FspHob to PEI Hob by default. 5 years ago
MdeModulePkg MdeModulePkg: Fix VS2015 warning C4311 & C4312 in RegularExpressionDxe 5 years ago
MdePkg MdePkg: Disable VS2015 warning C4701 & C4703 5 years ago
NetworkPkg NetworkPkg: Fix a bug in HttpBootDriverBindingStop() when destroying child. 5 years ago
Nt32Pkg MdeModulePkg:Refine the UiApp 5 years ago
Omap35xxPkg Omap35xxPkg SerialPortLib: Implement Get(Set)Control/SetAttributes 5 years ago
OptionRomPkg OptionRomPkg: Remove redundant included header file defintion in Ax88772.h and Ax88772b.h files 5 years ago
OvmfPkg OvmfPkg: Fix VS2015 warning C4459 in XenBusDxe 5 years ago
PcAtChipsetPkg PcAtChipsetPkg SerialIoLib: Implement Get(Set)Control/SetAttributes 5 years ago
PerformancePkg PerformancePkg\Dp_App: Add NULL check to pointer returned from 'AllocateZeroPool'. 5 years ago
SecurityPkg SecurityPkg: put missing empty lines at the end of some header files 5 years ago
ShellBinPkg ShellBinPkg: Arm/AArch64 Shell binary update. 5 years ago
ShellPkg ShellPkg: Fix wrong return status for Ifconfig.c 5 years ago
SourceLevelDebugPkg SourceLevelDebugPkg: DebugAgent: Set Local APIC SoftwareEnable 5 years ago
StdLib StdLib: remove mention of ARMGCC 5 years ago
StdLibPrivateInternalFiles */Contributions.txt: Update example email address 6 years ago
UefiCpuPkg UefiCpuPkg/CpuS3DataDxe: Add more detailed description on GUID in INF 5 years ago
UnixPkg UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg) 7 years ago
Vlv2DeviceRefCodePkg Vlv2TbltDevicePkg/Vlv2DeviceRefCodePkg: 5 years ago
Vlv2TbltDevicePkg Vlv2TbltDevicePkg: Sync the branch changes to Trunk, 5 years ago
corebootPkg Add coreboot fb driver 5 years ago
.gitignore EDK II: Add .gitignore 6 years ago
BuildNotes2.txt Update to new SVN URL in readme.txt 7 years ago
Edk2Setup.bat BaseTools: Update Edk2Setup.bat to support multiple workspaces 5 years ago
Maintainers.txt edk2: Change BaseTools owner in Maintainers.txt 5 years ago
README.md Document corebootFb 5 years ago
edksetup.bat BaseTools: Add VS2015 tool chain in tools_def.template 5 years ago
edksetup.sh BaseTools: Update edksetup.sh to support multiple workspaces 5 years ago

README.md

Tianocore as coreboot payload

This branch introduces the corebootPkg. It allows to easily build a tianocore image that is suitable as coreboot payload.

First you need to set up your EDK2 environment. You can try to use your host gcc for which edk2 provides toolchain configurations GCC44 through GCC49. You also need iasl and nasm installed.

You will also need the EDK2 base tools, which can be generated through

(cd BaseTools/Source/C; make)

After entering the environment (". edksetup.sh"), build corebootPkg using one of

build -t YOURTOOLCHAIN -a IA32 -p corebootPkg/corebootPkg.dsc
build -t YOURTOOLCHAIN -a X64 -p corebootPkg/corebootPkg.dsc

This ideally creates Build/coreboot$ARCH/DEBUG_YOURTOOLCHAIN/FV/COREBOOT.fd, the payload image. Use -b RELEASE for release builds and -b NOOPT for no-optimization builds, which also end up in their respective paths.

Configure coreboot to use a Tianocore payload and point it to the COREBOOT.fd created before.

Build, run, have fun. If (no, when) you find bugs, I'd love to see your patches that fix them :-)

CSM Support

It's possible to run corebootPkg with SeaBIOS as CSM. David Woodhouse did the necessary work at http://git.infradead.org/users/dwmw2/edk2.git which I integrated (Thanks David!).

  1. Fetch SeaBIOS master (eg. git clone http://review.coreboot.org/seabios.git).
  2. Build SeaBIOS as CSM (General Features - Build Target - Build as Compatibility Support Module ...)
  3. Copy $SEABIOS/out/Csm16.bin to $TIANO/corebootPkg/Csm/Csm16/Csm16.bin
  4. Add -D CSM_ENABLE=TRUE to the tiano build line above

From here, proceed as usual (add COREBOOT.fd as payload).

Please note that the vgabios-cirrus.bin shipped with QEmu/KVM isn't exactly in the format CSM expects. See https://lists.gnu.org/archive/html/qemu-devel/2013-01/msg03650.html

Using SeaBIOS' vgabios implementation for QEmu from latest master should work.

Build Options

Following options exist to change the default:

  • CSM_ENABLE=TRUE: Expect Csm16.bin and build support for it
  • SECURE_BOOT_ENABLE=TRUE: Build with SecureBoot support (broken because we lack nonvolatile variables)
  • NO_PCI_ENUMERATION=FALSE: Build with PciBus drivers that re-enumerate and re-configure the entire PCI bus hierarchy.
  • NETWORK_IP6_ENABLE=TRUE: Compile in IPv6 support

CorebootFb

To enable video output with corebootPkg, it expects coreboot to initialize the graphics and leave it in a graphics mode (not VGA's text16!).

To facilitate this, you'll need VGABIOS or native graphics init in coreboot, and its config options FRAMEBUFFER_SET_VESA_MODE and FRAMEBUFFER_KEEP_VESA_MODE.

Native graphics init on QEmu

There's some issue that prevents the cirrus native graphics driver in coreboot from initializing framebuffers over a certain size (1024x768 or larger, ie. what Windows 8 requires). To boot with native graphics on QEmu, use -vga std, which works.

Credits

corebootPkg is a collaborative work. First, it's standing on the shoulders of giants, namely the Tianocore project, from which it was branched from. Hopefully we'll eventually get far enough to merge the coreboot support there.

It was started as kind of a dare, which at times seems to be the main driver of coreboot innovation. "Thanks" Stefan Reinauer ;-)

He also contributed a bunch of interoperability patches, most importantly memory table support.

David Woodhouse did the CSM port and provided some guidance when it came to integration.

Scott Duplichan is (to my knowledge) the first one to seriously try to get it running on real hardware. Some of the emulator-specific bits that corebootPkg inherited from OVMF are gone thanks to his code slaying prowess.

Vladimir 'phcoder' Serbinenko added corebootPkg support to GRUB2's coreboot loader, so it can chainload into UEFI.

-- Patrick Georgi