build: allow UEFI override

This commit is contained in:
Franco Fichtner 2016-07-11 08:50:39 +02:00
parent 4cc5caf256
commit dbe29b5a31
5 changed files with 12 additions and 4 deletions

View File

@ -27,6 +27,7 @@ FLAVOUR?= OpenSSL
SETTINGS?= 16.1
DEVICE?= a10
SPEED?= 115200
UEFI?= yes
MIRRORS?= https://opnsense.c0urier.net \
http://mirrors.nycbug.org/pub/opnsense \
http://mirror.wdc1.us.leaseweb.net/opnsense \
@ -79,5 +80,5 @@ ${STEP}: lint
-C ${COREDIR} -R ${PORTSREFDIR} -t ${TYPE} -k "${PRIVKEY}" \
-K "${PUBKEY}" -l "${SIGNCHK}" -L "${SIGNCMD}" -d ${DEVICE} \
-m ${MIRRORS:Ox:[1]} -o "${STAGEDIRPREFIX}" -c ${SPEED} \
${${STEP}_ARGS}
-u "${UEFI:tl}" ${${STEP}_ARGS}
.endfor

View File

@ -84,6 +84,7 @@ Available build options are:
* SETTINGS: the name of the selected settings in config/
* SPEED: serial speed, e.g. "115200" (default)
* TYPE: the name of the meta package to be installed
* UEFI: "yes" for amd64 hybrid images with optional UEFI boot
* VERSION: a version tag (if applicable)
Build the userland binaries, bootloader and administrative

View File

@ -60,7 +60,7 @@ tmpfs /tmp tmpfs rw,mode=01777 0 0
EOF
UEFIBOOT=
if [ ${ARCH} = "amd64" ]; then
if [ ${ARCH} = "amd64" -a -n "${PRODUCT_UEFI}" ]; then
dd if=/dev/zero of=${STAGEDIR}/efiboot.img bs=4k count=200
DEV=$(mdconfig -a -t vnode -f ${STAGEDIR}/efiboot.img)
newfs_msdos -F 12 -m 0xf8 /dev/${DEV}

View File

@ -40,7 +40,7 @@ usage()
exit 1
}
while getopts C:c:d:f:K:k:L:l:m:n:o:P:p:R:S:s:T:t:v: OPT; do
while getopts C:c:d:f:K:k:L:l:m:n:o:P:p:R:S:s:T:t:u:v: OPT; do
case ${OPT} in
C)
export COREDIR=${OPTARG}
@ -124,6 +124,12 @@ while getopts C:c:d:f:K:k:L:l:m:n:o:P:p:R:S:s:T:t:v: OPT; do
export PRODUCT_TYPE=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
u)
if [ "${OPTARG}" = "yes" ]; then
export PRODUCT_UEFI=${OPTARG}
fi
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
v)
export PRODUCT_VERSION=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift

View File

@ -57,7 +57,7 @@ EOF
makefs -B little -o label=${LABEL} ${STAGEDIR}/root.part ${STAGEDIR}/work
UEFIBOOT=
if [ ${ARCH} = "amd64" ]; then
if [ ${ARCH} = "amd64" -a -n "${PRODUCT_UEFI}" ]; then
UEFIBOOT="-p efi:=${STAGEDIR}/work/boot/boot1.efifat"
fi