-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
95 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,74 @@ | ||
PKGNAMESUFFIX= -csm | ||
PORTNAME= uefi-edk2-bhyve-csm | ||
DISTVERSIONPREFIX= v | ||
DISTVERSION= 0.2 | ||
PORTREVISION= 3 | ||
PORTEPOCH= 1 | ||
CATEGORIES= sysutils | ||
|
||
COMMENT= UEFI-EDK2 firmware for bhyve with CSM | ||
MAINTAINER= [email protected] | ||
COMMENT= UEFI EDK2 firmware for bhyve with CSM (16-bit BIOS) | ||
|
||
MASTERDIR= ${.CURDIR}/../uefi-edk2-bhyve | ||
LICENSE= bsd2 | ||
|
||
WITH_CSM= yes | ||
ONLY_FOR_ARCHS= amd64 | ||
|
||
.include "${MASTERDIR}/Makefile" | ||
BUILD_DEPENDS= bash:shells/bash \ | ||
nasm:devel/nasm \ | ||
${PYTHON_LIBDIR}/lib-dynload/_sqlite3.so:databases/py-sqlite3@${PY_FLAVOR} | ||
|
||
USES= gmake \ | ||
python:2.7,build | ||
USE_GCC= 4.8 | ||
USE_GITHUB= yes | ||
GH_ACCOUNT= freebsd | ||
GH_PROJECT= uefi-edk2 | ||
GH_TAGNAME= aa8d718 | ||
|
||
PLIST_FILES= ${PREFIX}/share/uefi-firmware/BHYVE_UEFI_CSM.fd | ||
|
||
OPTIONS_DEFINE= DEBUG | ||
|
||
DEBUG_VARS= uefi_target=DEBUG | ||
DEBUG_VARS_OFF= uefi_target=RELEASE | ||
|
||
MAKE_ARGS+= AS=${LOCALBASE}/bin/as \ | ||
AR=${LOCALBASE}/bin/ar \ | ||
LD=${LOCALBASE}/bin/ld \ | ||
OBJCOPY=${LOCALBASE}/bin/objcopy \ | ||
CC=${LOCALBASE}/bin/gcc48 \ | ||
CXX=${LOCALBASE}/bin/g++48 | ||
|
||
BUILD_ARGS=-DDEBUG_ON_SERIAL_PORT=TRUE -D FD_SIZE_2MB -DCSM_ENABLE=TRUE | ||
|
||
post-extract: | ||
@${REINPLACE_CMD} -e 's|python|${PYTHON_CMD}|' ${WRKSRC}/BaseTools/Tests/GNUmakefile \ | ||
${WRKSRC}/BaseTools/BinWrappers/PosixLike/* | ||
|
||
do-build: | ||
unset ARCH; unset MAKEFLAGS; ${MAKE_CMD} ${MAKE_ARGS} -C ${BUILD_WRKSRC}/BaseTools | ||
${MKDIR} ${BUILD_WRKSRC}/Build; | ||
${LN} -sf ${LOCALBASE}/bin/gcc48 ${BUILD_WRKSRC}/Build/gcc | ||
${LN} -sf ${LOCALBASE}/bin/ld ${BUILD_WRKSRC}/Build/ld | ||
${LN} -sf ${LOCALBASE}/bin/gmake ${BUILD_WRKSRC}/Build/make | ||
${LN} -sf ${LOCALBASE}/bin/ar ${BUILD_WRKSRC}/Build/ar | ||
${LN} -sf ${LOCALBASE}/bin/objcopy ${BUILD_WRKSRC}/Build/objcopy | ||
${LN} -sf ${LOCALBASE}/bin/nasm ${BUILD_WRKSRC}/Build/nasm | ||
bash -c " \ | ||
cd ${BUILD_WRKSRC}; \ | ||
source edksetup.sh;\ | ||
unset ARCH; unset MAKEFLAGS; \ | ||
${MAKE_CMD} ${MAKE_ARGS} GCC48_BIN=${BUILD_WRKSRC}/Build/ -C ${BUILD_WRKSRC}/BhyvePkg/Csm/BhyveCsm16/" | ||
bash -c " \ | ||
cd ${BUILD_WRKSRC}; \ | ||
source edksetup.sh;\ | ||
unset ARCH; unset MAKEFLAGS; \ | ||
export GCC48_BIN=${BUILD_WRKSRC}/Build/; \ | ||
build -t GCC48 -a X64 -b ${UEFI_TARGET} -p BhyvePkg/BhyvePkgX64.dsc ${BUILD_ARGS} \ | ||
" | ||
|
||
do-install: | ||
${MKDIR} ${STAGEDIR}${PREFIX}/share/uefi-firmware/ | ||
${INSTALL} ${BUILD_WRKSRC}/Build/BhyveX64/${UEFI_TARGET}_GCC48/FV/BHYVE.fd \ | ||
${STAGEDIR}${PREFIX}/share/uefi-firmware/BHYVE_UEFI_CSM.fd | ||
|
||
.include <bsd.port.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TIMESTAMP = 1548651484 | ||
SHA256 (freebsd-uefi-edk2-v0.2-aa8d718_GH0.tar.gz) = 749ef1ec3fdb37434745a7ecf7f3d41e6c84aeb906d52e5f8ce85527a06a472e | ||
SIZE (freebsd-uefi-edk2-v0.2-aa8d718_GH0.tar.gz) = 30986800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
UEFI EDK2 firmware for bhyve with CSM (16-bit BIOS) support. | ||
|
||
From https://github.com/tianocore/tianocore/wiki/UEFI : | ||
"The Unified Extensible Firmware Interface, or UEFI, specifies the | ||
firmware layer between an operating system and platform hardware. UEFI | ||
replaces the legacy Basic Input Output System (BIOS)." | ||
|
||
EDK2 is the project from TianoCore (https://tianocore.org) that provides | ||
"a modern, feature-rich, cross-platform development environment for the | ||
UEFI and UEFI Platform Initialization (PI) specifications." | ||
|
||
It's open source under the BSD-2-Clause-Patent license. | ||
|
||
This port provides an EDK2 firmware build for x86_64 with 'CSM' support. | ||
CSM is the Compatibility Support Module, compatibility code to allow | ||
operating systems which expect a 16-bit BIOS, and which don't know | ||
about UEFI, to boot. | ||
|
||
This CSM port provides an older version of EDK2 for use with VMs | ||
running operating systems which don't have UEFI support. | ||
|
||
WWW: https://github.com/freebsd/uefi-edk2/tree/bhyve/UDK2014.SP1 |