Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hw-accel: use multi-stage image in firmware test #38

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions tests/hw-accel/kmm/internal/kmmparams/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,16 @@ WORKDIR /build/
RUN git clone https://github.com/cdvultur/simple-kmod.git && \
cd simple-kmod && \
make all KVER=$KERNEL_VERSION KMODVER=$KMODVER && \
make install KVER=$KERNEL_VERSION KMODVER=$KMODVER && \
mkdir -p /opt/lib/modules/$KERNEL_VERSION && \
cp /lib/modules/$KERNEL_VERSION/simple-*.ko /lib/modules/$KERNEL_VERSION/modules.* /opt/lib/modules/$KERNEL_VERSION
make install KVER=$KERNEL_VERSION KMODVER=$KMODVER

FROM registry.redhat.io/ubi9/ubi-minimal
ARG KERNEL_VERSION
RUN microdnf -y install kmod

COPY --from=builder /etc/driver-toolkit-release.json /etc/
COPY --from=builder /lib/modules/$KERNEL_VERSION/simple-*.ko /opt/lib/modules/${KERNEL_VERSION}/
COPY --from=builder /lib/modules/$KERNEL_VERSION/modules.* /opt/lib/modules/${KERNEL_VERSION}/
cdvultur marked this conversation as resolved.
Show resolved Hide resolved
RUN depmod -b /opt ${KERNEL_VERSION}

RUN mkdir /firmware
RUN echo -n "simple_kmod_firmware validation string" >> /firmware/simple_kmod_firmware.bin
Expand Down
Loading