make mini opt-in
This commit is contained in:
parent
a20104dcb4
commit
f3d08daab8
@ -57,6 +57,10 @@ TFTPGRP="root"
|
|||||||
# (and thus doesn't fit on a normal CD. Still fits on DVDs and USBs though!)
|
# (and thus doesn't fit on a normal CD. Still fits on DVDs and USBs though!)
|
||||||
MULTIARCH="yes"
|
MULTIARCH="yes"
|
||||||
|
|
||||||
|
# If you would like to build an iPXE-enabled *mini* ISO *in addition to* the ful ISO,
|
||||||
|
# set this to "yes". Otherwise, just build the full ISO.
|
||||||
|
BUILDMINI="no"
|
||||||
|
|
||||||
# set to "yes" to enable pushing new changes to a git repo/committing to a local repo
|
# set to "yes" to enable pushing new changes to a git repo/committing to a local repo
|
||||||
GIT="no"
|
GIT="no"
|
||||||
|
|
||||||
@ -151,7 +155,6 @@ if [ -z "${MULTIARCH}" ];
|
|||||||
then
|
then
|
||||||
MULTIARCH="y"
|
MULTIARCH="y"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MULTIARCH=${MULTIARCH:0:1}
|
MULTIARCH=${MULTIARCH:0:1}
|
||||||
MULTIARCH=$(echo ${MULTIARCH} | tr [[:upper:]] [[:lower:]])
|
MULTIARCH=$(echo ${MULTIARCH} | tr [[:upper:]] [[:lower:]])
|
||||||
|
|
||||||
@ -160,6 +163,13 @@ if [ -z "${I_AM_A_RACECAR}" ];
|
|||||||
then
|
then
|
||||||
I_AM_A_RACECAR="n"
|
I_AM_A_RACECAR="n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
I_AM_A_RACECAR=${I_AM_A_RACECAR:0:1}
|
I_AM_A_RACECAR=${I_AM_A_RACECAR:0:1}
|
||||||
I_AM_A_RACECAR=$(echo ${I_AM_A_RACECAR} | tr [[:upper:]] [[:lower:]])
|
I_AM_A_RACECAR=$(echo ${I_AM_A_RACECAR} | tr [[:upper:]] [[:lower:]])
|
||||||
|
|
||||||
|
# BUILD MINI?
|
||||||
|
if [ -z "${BUILDMINI}" ];
|
||||||
|
then
|
||||||
|
BUILDMINI="n"
|
||||||
|
fi
|
||||||
|
BUILDMINI=${BUILDMINI:0:1}
|
||||||
|
BUILDMINI=$(echo ${BUILDMINI} | tr [[:upper:]] [[:lower:]])
|
||||||
|
@ -278,20 +278,24 @@ EOF
|
|||||||
-output "${ISODIR}/${ISOFILENAME}" "${TEMPDIR}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
-output "${ISODIR}/${ISOFILENAME}" "${TEMPDIR}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
|
||||||
## Build the mini-ISO ##
|
## Build the mini-ISO ##
|
||||||
|
if [[ "${BUILDMINI}" == "y" ]];
|
||||||
|
then
|
||||||
echo "Now generating the iPXE images; please wait..."
|
echo "Now generating the iPXE images; please wait..."
|
||||||
|
git submodule init >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
git submodule update >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
cd ${BASEDIR}/src/ipxe/src
|
cd ${BASEDIR}/src/ipxe/src
|
||||||
git clean -xdf > /dev/null 2>&1
|
git clean -xdf > /dev/null 2>&1
|
||||||
git reset --hard HEAD >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
git reset --hard HEAD >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
git checkout master >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
git checkout master >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
git pull >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
git pull >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
git checkout master >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
git checkout master >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
for i in $(find ${BASEDIR}/src/ipxe_local/patches/ -type f -iname "*.patch" -printf '%P\n');
|
for i in $(find ${BASEDIR}/src/ipxe_local/patches/ -type f -iname "*.patch" -printf '%P\n' | sort);
|
||||||
do
|
do
|
||||||
patch -Np2 < ${BASEDIR}/src/ipxe_local/patches/${i} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
patch -Np2 < ${BASEDIR}/src/ipxe_local/patches/${i} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
done
|
done
|
||||||
#make everything EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
#make everything EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
make bin/ipxe.eiso EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
make bin-i386-efi/ipxe.efi bin-x86_64-efi/ipxe.efi EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
make bin/ipxe.usb EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
make bin/ipxe.eiso bin/ipxe.usb EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
# Change this to USB-only...
|
# Change this to USB-only...
|
||||||
#make all EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
#make all EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
mv -f ${BASEDIR}/src/ipxe/src/bin/ipxe.usb ${ISODIR}/${USBFILENAME}
|
mv -f ${BASEDIR}/src/ipxe/src/bin/ipxe.usb ${ISODIR}/${USBFILENAME}
|
||||||
@ -302,17 +306,23 @@ EOF
|
|||||||
git checkout -- HEAD > /dev/null 2>&1
|
git checkout -- HEAD > /dev/null 2>&1
|
||||||
#git reset --hard HEAD > /dev/null 2>&1
|
#git reset --hard HEAD > /dev/null 2>&1
|
||||||
echo
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
#isohybrid ${ISOFILENAME}
|
#isohybrid ${ISOFILENAME}
|
||||||
cd ${ISODIR}
|
cd ${ISODIR}
|
||||||
${RACECAR_CHK}sha256sum ${ISOFILENAME} > ${ISOFILENAME}.sha256
|
${RACECAR_CHK}sha256sum ${ISOFILENAME} > ${ISOFILENAME}.sha256
|
||||||
|
if [[ "${BUILDMINI}" == "y" ]];
|
||||||
|
then
|
||||||
${RACECAR_CHK}sha256sum ${MINIFILENAME} > ${MINIFILENAME}.sha256
|
${RACECAR_CHK}sha256sum ${MINIFILENAME} > ${MINIFILENAME}.sha256
|
||||||
${RACECAR_CHK}sha256sum ${USBFILENAME} > ${USBFILENAME}.sha256
|
${RACECAR_CHK}sha256sum ${USBFILENAME} > ${USBFILENAME}.sha256
|
||||||
|
fi
|
||||||
cd ..
|
cd ..
|
||||||
echo "=ISO="
|
echo "=ISO="
|
||||||
echo "Size: $(ls -lh ${ISODIR}/${ISOFILENAME} | awk '{print $5}')"
|
echo "Size: $(ls -lh ${ISODIR}/${ISOFILENAME} | awk '{print $5}')"
|
||||||
echo "SHA256: $(awk '{print $1}' ${ISODIR}/${ISOFILENAME}.sha256)"
|
echo "SHA256: $(awk '{print $1}' ${ISODIR}/${ISOFILENAME}.sha256)"
|
||||||
echo "Location: ${ISODIR}/${ISOFILENAME}"
|
echo "Location: ${ISODIR}/${ISOFILENAME}"
|
||||||
|
if [[ "${BUILDMINI}" == "y" ]];
|
||||||
|
then
|
||||||
echo "=Mini="
|
echo "=Mini="
|
||||||
echo "Size: $(ls -lh ${ISODIR}/${MINIFILENAME} | awk '{print $5}')"
|
echo "Size: $(ls -lh ${ISODIR}/${MINIFILENAME} | awk '{print $5}')"
|
||||||
echo "SHA256: $(awk '{print $1}' ${ISODIR}/${MINIFILENAME}.sha256)"
|
echo "SHA256: $(awk '{print $1}' ${ISODIR}/${MINIFILENAME}.sha256)"
|
||||||
@ -321,6 +331,7 @@ EOF
|
|||||||
echo "Size: $(ls -lh ${ISODIR}/${USBFILENAME} | awk '{print $5}')"
|
echo "Size: $(ls -lh ${ISODIR}/${USBFILENAME} | awk '{print $5}')"
|
||||||
echo "SHA256: $(awk '{print $1}' ${ISODIR}/${USBFILENAME}.sha256)"
|
echo "SHA256: $(awk '{print $1}' ${ISODIR}/${USBFILENAME}.sha256)"
|
||||||
echo "Location: ${ISODIR}/${MINIFILENAME}"
|
echo "Location: ${ISODIR}/${MINIFILENAME}"
|
||||||
|
fi
|
||||||
#rm -rf ${TEMPDIR}/*
|
#rm -rf ${TEMPDIR}/*
|
||||||
|
|
||||||
# are we rsyncing?
|
# are we rsyncing?
|
||||||
@ -329,14 +340,14 @@ EOF
|
|||||||
echo
|
echo
|
||||||
echo "Now sending to ${RSYNC_HOST} via rsync. This may take a while..."
|
echo "Now sending to ${RSYNC_HOST} via rsync. This may take a while..."
|
||||||
echo "Sending TFTP files..."
|
echo "Sending TFTP files..."
|
||||||
rsync -a --info=progress2 ${TFTPDIR} ${RSYNC_HOST}:${RSYNC_DEST}/.
|
rsync -az --info=progress2 ${TFTPDIR} ${RSYNC_HOST}:${RSYNC_DEST}/.
|
||||||
echo "Sending HTTP files..."
|
echo "Sending HTTP files..."
|
||||||
rsync -a --info=progress2 ${HTTPDIR} ${RSYNC_HOST}:${RSYNC_DEST}/.
|
rsync -az --info=progress2 ${HTTPDIR} ${RSYNC_HOST}:${RSYNC_DEST}/.
|
||||||
# rsync -a ${TEMPDIR}/boot/${UXNAME}.* ${RSYNC_HOST}:${RSYNC_DEST}/http/.
|
# rsync -a ${TEMPDIR}/boot/${UXNAME}.* ${RSYNC_HOST}:${RSYNC_DEST}/http/.
|
||||||
echo "Sending the image files..."
|
echo "Sending the image files..."
|
||||||
rsync -a --info=progress2 ${ISODIR} ${RSYNC_HOST}:${RSYNC_DEST}/.
|
rsync -az --info=progress2 ${ISODIR} ${RSYNC_HOST}:${RSYNC_DEST}/.
|
||||||
echo "Sending extra files..."
|
echo "Sending extra files..."
|
||||||
rsync -a --info=progress2 ${ROOTDIR}/extra/packages.* ${RSYNC_HOST}:${RSYNC_DEST}/.
|
rsync -az --info=progress2 ${ROOTDIR}/extra/packages.* ${RSYNC_HOST}:${RSYNC_DEST}/.
|
||||||
rsync -a --info=progress2 ${ROOTDIR}/VERSION_INFO.txt ${RSYNC_HOST}:${RSYNC_DEST}/.
|
rsync -az --info=progress2 ${ROOTDIR}/VERSION_INFO.txt ${RSYNC_HOST}:${RSYNC_DEST}/.
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user