Driver Toolkit: Get kernel version from bootc image
When building the driver-toolkit image, It is cumbersome to find kernel
version that matches the future nvidia-bootc and intel-bootc images.
However, the kernel version is stored as a label on the rhel-bootc
images, which are exposed as the FROM variable in the Makefile.
This change collects the kernel version using skopeo inspect and jq.
The DRIVER_TOOLKIT_BASE_IMAGE variable is introduced in the Makefile
to dissociate it from the FROM variable that is used as the nvidia-bootc
and intel-bootc base image.
The user can now specify something like:
make nvidia-bootc \
FROM=quay.io/centos-bootc/centos-bootc:stream9 \
DRIVER_TOOLKIT_BASE_IMAGE=quay.io/centos/centos:stream9
Also, the VERSION variable in /etc/os-release is the full version, so
this change modifies the command to retrieve the OS_VERSION_MAJOR
value.
Driver Toolkit: Get kernel version from bootc image
When building the
driver-toolkit
image, It is cumbersome to find kernel version that matches the futurenvidia-bootc
andintel-bootc
images. However, the kernel version is stored as a label on therhel-bootc
images, which are exposed as theFROM
variable in the Makefile.This change collects the kernel version using
skopeo inspect
andjq
.The
DRIVER_TOOLKIT_BASE_IMAGE
variable is introduced in the Makefile to dissociate it from theFROM
variable that is used as thenvidia-bootc
andintel-bootc
base image.The user can now specify something like:
Also, the
VERSION
variable in/etc/os-release
is the full version, so this change modifies the command to retrieve theOS_VERSION_MAJOR
value.Signed-off-by: Fabien Dupont fdupont@redhat.com