Skip to content
Snippets Groups Projects
Verified Commit 22c666cd authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

build_iso.sh: Allow IPXE_TARGET to be passed as cli parameter

parent 4cb5a868
No related branches found
No related tags found
1 merge request!2Add config for rancher-node-staging-rke2-metal01
......@@ -4,6 +4,10 @@ set -e
BASEDIR=$(readlink -f "$(dirname "$0")/..")
HOSTNAME=$1
# Allow to define the intermediary IPXE_TARGET folder. This can pose problem
# on old hardware (e.g. beaubourg generated iso would not boot on the default
# path, we had to rename it to bin/ipxe.iso )
IPXE_TARGET=${2-bin-x86_64-efi/ipxe.iso}
CONFIG="${BASEDIR}/configs/${HOSTNAME}.yaml"
IPXE_SCRIPT="${BASEDIR}/configs/${HOSTNAME}.ipxe"
......@@ -19,7 +23,6 @@ j2 -f yaml "${BASEDIR}/configs/template.ipxe.j2" "${CONFIG}" >"${IPXE_SCRIPT}"
# If not provided in the hostname configuration, fallback to the net0
sed -i s'/{{IPXE_NET}}/net0/g' "${IPXE_SCRIPT}"
IPXE_TARGET=bin-x86_64-efi/ipxe.iso
make -C "${BASEDIR}/src" -j8 "${IPXE_TARGET}" EMBED="${IPXE_SCRIPT}" DEBUG=eth_slow NO_WERROR=1
mv "${BASEDIR}/src/${IPXE_TARGET}" "${BASEDIR}/configs/${HOSTNAME}.iso"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment