EDK2020-MinnowBoard featuring CdePkg (C Development Environment Package)
Get the MinnowBoard running with EDK2020 and VS2019
https://github.com/MinnowBoard-org/
This EDK2020-Minnowboard introduces the CdePkg and the CdePkgValidation to the UEFI/Tianocore open source community.
EDK2020-Minnowboard is the Git-Super-Project in the EDK2020-MinnowBoard project to build the MinnowBoard UEFI BIOS. It contains the tianocore edk2 as a Git-Sub-Project. tianocore edk2 can also be used stand alone in Emulation Mode (EmulatorPkg) (NOTE: In emulation mode timing calulation assumes to run a 1GHz platform).
The MinnowBoard familiy is an open source Personal Computer hardware originally created by a company called ADI Engineering, that now belongs to Silicom
Intel provides binary modules and maintains the build environment to get the MinnowBoard running with the open source UEFI BIOS Tianocore\EDK2
The MinnowBoard is the only free available hardware/PC platform to get UEFI Tianocore BIOS running.
EDK2020-MinnowBoard is the Git-Super-Project to build the MinnowBoard UEFI BIOS and demonstrates CdePkg and CdePkgValidation on real hardware.
-
The main aspect is, to introduce the CdePkg and the CdePkgValidation to the UEFI/Tianocore open source community.
-
get the MinnowBoard and the EDK2 Emulation (EmulatorPkg) running with the latest released EDK2020 and the latest Visual Studio VS2019 build environment
CdePkg is considered an improvement over traditional UEFI BIOS development, since it introduces
- stable, precise, chipset (ACPI timer) independent C library conform
clock()
for POST and UEFI Shell in millisecond resolution - unlimited (buffer less)
printf()
-family andscanf()
-family implementation - Standard C conform format specifiers for
printf()
-family andscanf()
-family - a library, which satisfies all the Microsoft C compiler intrinsic requirements with one and the same library (C++ not supported)
- Hosted Environment instead of Freestanding Environment for POST driver
This improvements shall enable UEFI and modernFW to provide a Standard C interface for any "C"-(open)source-based extention.
NOTE: Visual Studio is here only used for editing the project. The build process is still pure EDK! (the startup error message of VS2019 can be ignored)
-
install a build machine according to https://github.com/KilianKegel/HowTo-setup-an-UEFI-Development-PC#howto-setup-an-uefi-development-pc
-
clone the EDK2020-MinnowBoard project
--recursive
git.exe clone --progress --recursive -v "https://github.com/KilianKegel/EDK2020-MinnowBoard.git
-
To build the EDK emulation:
launch.bat
to setup EDK2 / emulation (EmulatorPkg) build environmentrd /s /q build
in theedk2
directory to clean previous EDK2 / emulation buildbldEMU.bat
to start the emulation build process in the EDK2 directorydbgemu.bat
to start the UEFI BIOS EMULATION
-
To build the MinnowBoard:
launchbat
to setup MinnowBoard (Vlv2TbltDevicePkg
) build environmentrd /s /q build
in the.\
directory to clean previousVlv2TbltDevicePkg
buildbldMNW.bat DEBUG/RELEASE
EDK2020-MinnowBoard is the Git-Superproject EDK2020-MinnowBoard to build the MinnowBoard UEFI BIOS.
It includes the edk2 which is the Git-Subproject edk2-vUDK2018, that in turn includes the Cde-directories as GIT-Subproject CdePkg and GIT-Subproject CdePkgValidation.
related project | annotation |
---|---|
Torito C Library | C Library for UEFI Shell only. All projects below are built on or derived from Torito C Library |
Visual ANSI C for UEFI Shell | Visual Studio for UEFI Shell for beginners. |
Visual DOS Tools for UEFI Shell | more command implementation |
Visual HWTools for UEFI Shell | HWTools: PCI- and GPIOSpy for Baytrail. MemSpy for all. |
CdePkg | Torito C Library redone for UEFI POST usage |
CdePkgValidation | Unit tests for CdePkg |
- update to TORO C Library 20230409
-
introduce
CDEABI
, an additional application binary interface ABI to ease coexistance ofCdePkg
based BIOS drivers with incomplete tianocore EDK2C Library
fragmentsNOTE:
CDEABI
uses the Microsoft DLL interface__declspec(dllimport)
for EDK2-built drivers . Technically this uses indirect function calls on machine code level. -
promote
CDETRACE()
, remove former, alternate trace method (CDEMOFINE()
) completely
-
add Microsoft C Library functions for UEFIShell 64Bit applications only
_mkdir()
_stat64i32()
that is the Microsoft version of POSIXstat()
add POSIX C Library functions
strnlen()
,wcsnlen()
- initial version of TORO C LIBRARY (
toroC64.lib
andtoroC32.lib
) - TORITO C LIBRARY is discontinued from now on
- add Microsoft C Library functions for UEFIShell 64Bit applications only
getc()
_findfirst()
_findnext()
_findclose()
- rename library file to
toroC64.lib
andtoroC32.lib
- add SMM support
- fixed bugs related to length modifiers for string format specifiers
wprintf()
with%ls
,%hs
and Microsoft specific%S
printf()
with%ls
,%hs
and Microsoft specific%S
- the string
(null)
was reported wrongly in wide format onNULL
pointer (e.g.wprintf()
or%ls
modifier)
- add Standard C Library functions
mblen()
mbstowcs()
mbtowc()
wcstombs()
wctomb()
wctob()
wmemchr()
vfwprintf()
- adjust
vfprintf()
andvfwprintf()
to redirectstdout
andstderr
toReportStatusCode
interface - change TimeStampCounter (TSC) calibration from RTC MC146818 to PIT i8254 base, since RTC is faulty on AMD systems.
- introduce new
IMAGE_ENTRY_POINT
:_cdeCRT0UefiPei
and respectively_cdeCRT0UefiPeiEDK
for EDK build_cdeCRT0UefiDxe
and respectively_cdeCRT0UefiDxeEDK
for EDK build_cdeCRT0UefiSmm
and respectively_cdeCRT0UefiSmmEDK
for EDK build_cdeCRT0UefiShell
and respectively_cdeCRT0UefiShellEDK
for EDK build
- adjust EMULATION time base to 2GHz
- add dedicated FATAL ERROR message to DXE+PEI CRT0 if CdeServices protocol fails to be located, due to DEPEX or APRIORI issue
- enable Tianocore DEBUG macro for CDE-based/injected drivers to allow usage of DEBUG traces with RELEASE BIOS versions
- add support for BIOS vendor (A)
- adjust include path
- provide component description and configuration files
- remove .xdata and .pdata sections (
$unwind$ and$pdata$ symbols) from .OBJ before binding the library
- source tree redesign
- torito C library redesign to coexist with / replace EDK2 driver functions
- configure CdePkg to support original tianocore DEBUG traces
- extend Microsft intrinsic __acrt_iob_func() to support variable length I/O buffer count
- improve EDK2 emulator support:
- check privileg level before _enable() and _disable()
- provide BREAKPOINT entries __cdeImageEntryPointPeiINT3(), __cdeImageEntryPointDxeINT3()
- remove dependancy from 'LoadOptions' CdePkg based drivers can start w/o LoadOptions and just get argv[0], argc == 1, if the LoadfOptions driver is not present in the system
- add missing UEFI SHELL Emulation support
- minor face lifts
- move forward to better module naming scheme with prefix '__cde'
- update EDK2 source to
edk2-stable202011
- NOTE: to run DEBUG build succesfully ASSERTS must be disabled
- fix EDK emulation
- update EDK2 source to
edk2-stable202008
- add to FmpMinnowMaxSystem.dsc, FmpBlueSampleDevice.dsc, FmpGreenSampleDevice.dsc, FmpRedSampleDevice.dsc
[LibraryClasses.common]
to prevent build failure:FmpDependencyLib|FmpDevicePkg\Library\FmpDependencyLib\FmpDependencyLib.inf
FmpDependencyCheckLib|FmpDevicePkg\Library\FmpDependencyCheckLibNull\FmpDependencyCheckLibNull.inf
FmpDependencyDeviceLib|FmpDevicePkg\Library\FmpDependencyDeviceLibNull\FmpDependencyDeviceLibNull.inf
- add to FmpMinnowMaxSystem.dsc, FmpBlueSampleDevice.dsc, FmpGreenSampleDevice.dsc, FmpRedSampleDevice.dsc
- add diagnostic driver CdeDiagTSCSync, that demonstrates syncrone timing of RTC and TSC-based <time.h> functions
- remove diagnostic driver CdeDiagPCI (PCI is available in BDS phase only)
- improved build configurations for all solution projects
- update all UEFI shell batch files to configure POST LoadOptions/command lines
setall.nsh
, to set command line defaults for all CdePkg driversenaclock.nsh
, to set command line defaults for CdeDiagTSCDiag and clock onlydisall.nsh
, to prevent known CdePkg drivers from beeing starteddelall.nsh
, to delete all CdePkg related command lines from flash- NOTE:
- run
setall.nsh
first disall.nsh
to prevent CdePkg drivers from beeing started if you don't want run all drivers- adjust
enaclock.nsh
to your needs
- run
- NOTE: This release is focused on real HW (MinnowBoard). Emulation mode doesn't allow hardware access (GPIO, RTC)
For Emulation Build the command lines are still stored in the
CdeLoadOptions.h
- add diagnostic drivers (CdeDiagGPIO, CdeDiagRTC, CdeDiagPCI, CdeDiagEFIVAR(iable)) for demonstration purpose (CdeDiagPCI under construction)
- implement command line support based on NVRAM variables for the MinnowBoard
- create/provide
LoadOption
tool to CdePkg (UEFIBinaries\LoadOption.efi) to create command lines stored in NVRAM variables
- integrate PreMemInit branch into master trunk
- reorganize flash layout to get 192kByte in the RECOVERY volume to hold additional PRE-memory PEI drivers
- remove UEFI SHELL from bios flash binary
- update EDK2 to edk2-stable202002
- implement new CdePkg POST driver command line model:
- each CdePkg driver listed in
CdeLoadOptions.h
gets the command line parameters passed - each CdePkg driver listed in
CdeLoadOptions.h
can be suppressed from beeing started by (rejectStart=1
) - each CdePkg driver NOT listed in
CdeLoadOptions.h
is started withargv[0] == "unknownCdeDriverDxe"
- each CdePkg driver listed in
- add *MdePkg to CdePkg convertion sample Ip4Dxe
- add overrides directory to PACKAGES_PATH
- patch WinHost.c to enable debugging in emulation mode
- introduce EDK2020
- add IASL version check
- add PYTHON version check
- add NASM version check
- add Dediprog flash update
- CdeValPkg branch merge
- add OpenSSL_1_1_0-stable to CryptoPkg\Library\OpensslLib
- improved build and startup batches
- convert EDK2 directory to submodule, to demonstrate CdePkg separated from entire MinnowBoard environment
- update EDK2 to 20190828/OpenSSL
- integrate Release 1.01 Firmware Download (Aug 2019) from https://firmware.intel.com/projects/minnowboard-max
- place CDE*.SLN solution files into EDK2 directory, to be able to use Visual Studio solutions EDK2 directory without MinnowBoard build environment
- improve CdePkgValidation
- add validation driver/executables for all
ctype.h
- andwctype.h
-related functions: (ctypeALLPei, ctypeALLDxe, wctypeALLPei, wctypeALLDxe) - remove previously used single function test drivers
- WinNTx86-64 (Microsoft C Library)
- WinNTx86-64 (Torito C Library)
- add all CTYPE.H() -functions to PEI post phase
- add all CTYPE.H-functions for DXE
- add clockPei()
- initial version of branch CdeValPkg
- add MFNBAR as bare/naked parameter for CDEMOFINE macro
- add clockDxe commandline to CdeLoadOptions.h
- update CdeSrcPkg/b81394c620206ebbc300216652cd43d7f4ac94e3
- add initial PEI Support, rudimentary functional range
- add VS2019 support (for both MinnowBoard- and Emulationbuild)
- removed CdePkg from main tree
- add submodules CdePkg and CdeSrcPkg
- CdePkg: initial revision - standard C Library and standard headerfile usage
- enable emulation build and debug
- improve MinnowBoard build
- added missing files from UDK2017 to build MinnowBoard in UDK2018
- fixed: build MinnowBoard
- downloaded the entire source code (see HowTo)
- configured as a VS2017 solution - just for editing the source
- not able to build