Minor refactor of wwinit and build-ipxe scripts

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-10-31 09:49:55 -06:00
parent f3a1b43360
commit 36d8984d96
2 changed files with 7 additions and 23 deletions

View File

@@ -5,21 +5,13 @@ echo "Hello from WWINIT"
. /warewulf/config
myPATH=/warewulf/init.d
while read -r NAME; do
# if [ -x $myPATH/$NAME ]
# then
echo "Launching: $NAME"
sh "$myPATH/$NAME"
# fi
done <<EOF
# `ls $myPATH/*.sh`
`ls $myPATH/`
EOF
ls -1 $myPATH/ | while read -r NAME; do
echo "Launching: $NAME"
sh "$myPATH/$NAME"
done
echo "Calling $WWINIT..."
echo
sleep 2
exec $WWINIT

View File

@@ -3,10 +3,6 @@
set -e
TARGETS=${TARGETS:-"bin-x86_64-pcbios/undionly.kpxe bin-x86_64-efi/snponly.efi bin-arm64-efi/snponly.efi"}
TARGS="bin-x86_64-pcbios/undionly.kpxe
bin-x86_64-efi/snponly.efi
bin-arm64-efi/snponly.efi"
IPXE_BRANCH=${IPXE_BRANCH:-master}
DESTDIR=${DESTDIR:-/usr/local/share/ipxe}
@@ -43,7 +39,8 @@ main() {
cd ipxe/src
while read -r target; do
echo $TARGETS | sed 's/ */\n/g' | while read -r target
do
if $(echo "$target" | grep -q "\-arm64-")
then
if ! which aarch64-linux-gnu-gcc >/dev/null 2>&1
@@ -60,17 +57,13 @@ while read -r target; do
destname=$(echo $target | tr / -)
make -j $CPUS CROSS="${CROSS}" $target "$@" && cp -v $target ${DESTDIR}/${destname}
restore_config
done <<EOF
$TARGS
EOF
done
}
configure_arm64() {
# CONSOLE_SERIAL causes build failure for aarch64, so omitting here
# https://github.com/ipxe/ipxe/issues/658
ls -l config >> /root/args
sed -i.bak \
-e 's,//\(#define.*CONSOLE_FRAMEBUFFER.*\),\1,' \
config/console.h
@@ -84,7 +77,6 @@ configure_arm64() {
configure_x86_64() {
ls -l config >> /root/args
sed -i.bak \
-e 's,//\(#define.*CONSOLE_SERIAL.*\),\1,' \
-e 's,//\(#define.*CONSOLE_FRAMEBUFFER.*\),\1,' \