build: allow UEFI override
This commit is contained in:
parent
4cc5caf256
commit
dbe29b5a31
3
Makefile
3
Makefile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue