build-vm: handle multiple kernels either again

KFLAVOURS can describe more than one kernel, get iterator back.

Fixes: 27674e297b
This commit is contained in:
Anton Midyukov 2019-08-20 22:31:56 +07:00 committed by Michael Shigorin
parent d135272a2d
commit a8b1f11f2e

View File

@ -12,10 +12,12 @@ kver="$(rpm -qa 'kernel-image*' \
cd /boot
make-initrd -N -k "$kver" AUTODETECT= \
FEATURES+="$GLOBAL_VM_INITRDFEATURES" \
MODULES_ADD+="$GLOBAL_VM_INITRDMODULES" \
|| { echo "** Error: make-initrd failed" >&2; exit 1; }
for KVER in $kver; do
make-initrd -N -k "$KVER" AUTODETECT= \
FEATURES+="$GLOBAL_VM_INITRDFEATURES" \
MODULES_ADD+="$GLOBAL_VM_INITRDMODULES" \
|| { echo "** Error: make-initrd failed" >&2; exit 1; }
done
# NB: e2k kernel builds "image" instead of "vmlinuz"
[ -f vmlinuz-$kver ] && ln -s vmlinuz-$kver vmlinuz ||: