penguin: Make fedora/rockylinux to boot (#181)

* 🐧 Add fedora and rockylinux

* 🐧 Add tools to fedora/rh images

* 🤖 Add tests to circleci

* 🤖 Configure the CPU required for running rhel on vms

* Enable ttys

* 🤖 Disable tests on fedora/rockylinux

QEMU TCG doesn't support AVX:
https://developers.redhat.com/blog/2021/01/05/building-red-hat-enterprise-linux-9-for-the-x86-64-v2-microarchitecture-level#recommendations_for_rhel_9

* 🤖 Don't release rockylinux/fedora
This commit is contained in:
Ettore Di Giacinto 2022-10-05 21:45:09 +02:00 committed by Itxaka
parent 0e496b67b5
commit df59351bf1

View File

@ -164,6 +164,8 @@ framework:
IF [ "$FLAVOR" == "ubuntu-rolling" ]
ARG TOOLKIT_IMG="ubuntu"
ELSE IF [ "$FLAVOR" == "rockylinux" ]
ARG TOOLKIT_IMG="fedora"
ELSE IF [ "$FLAVOR" != "ubuntu" ] && [ "$FLAVOR" != "opensuse" ] && [ "$FLAVOR" != "fedora" ]
ARG TOOLKIT_IMG="opensuse"
ELSE
@ -173,7 +175,7 @@ framework:
RUN luet install -y --system-target /framework \
system/elemental-toolkit-$TOOLKIT_IMG
IF [ "$WITH_KERNEL" = "true" ] || [ "$FLAVOR" = "alpine" ] || [ "$FLAVOR" = "fedora" ] || [ "$FLAVOR" = "rockylinux" ] || [ "$FLAVOR" = "alpine-arm-rpi" ]
IF [ "$WITH_KERNEL" = "true" ] || [ "$FLAVOR" = "alpine" ] || [ "$FLAVOR" = "alpine-arm-rpi" ]
RUN luet install -y --system-target /framework \
distro-kernels/opensuse distro-initrd/opensuse
END
@ -250,6 +252,15 @@ docker:
# Regenerate initrd if necessary
IF [ "$FLAVOR" = "opensuse" ] || [ "$FLAVOR" = "opensuse-arm-rpi" ] || [ "$FLAVOR" = "tumbleweed-arm-rpi" ]
RUN mkinitrd
ELSE IF [ "$FLAVOR" = "fedora" ] || [ "$FLAVOR" = "rockylinux" ]
RUN kernel=$(ls /boot/vmlinuz-* | head -n1) && \
ln -sf "${kernel#/boot/}" /boot/vmlinuz
RUN kernel=$(ls /lib/modules | head -n1) && \
dracut -v -N -f "/boot/initrd-${kernel}" "${kernel}" && \
ln -sf "initrd-${kernel}" /boot/initrd
RUN kernel=$(ls /lib/modules | head -n1) && depmod -a "${kernel}"
# https://github.com/kairos-io/elemental-cli/blob/23ca64435fedb9f521c95e798d2c98d2714c53bd/pkg/elemental/elemental.go#L553
RUN rm -rf /boot/initramfs-*
ELSE IF [ "$FLAVOR" = "ubuntu" ] || [ "$FLAVOR" = "ubuntu-rolling" ]
RUN kernel=$(ls /boot/vmlinuz-* | head -n1) && \
ln -sf "${kernel#/boot/}" /boot/vmlinuz