From b1dca89bdb39c9df4adcf6204a9c9864a4556f5a Mon Sep 17 00:00:00 2001 From: Tech Guy <84954628+lukiod@users.noreply.github.com> Date: Wed, 26 Aug 2026 18:44:13 +0530 Subject: [PATCH] Guard unzboot copy by arch, amd64 doesn't have the binary install.sh only builds/installs unzboot on aarch64 (EPEL, zboot kernels), but ocp_dtk_entrypoint's shared-dir prep copied it unconditionally, so DTK mode crash-loops on amd64 before any build starts: cp: cannot stat '/usr/bin/unzboot': No such file or directory. Guards both copy sites (shared-dir prep and the later bin staging) behind an aarch64 check using the same TARGETARCH/DRIVER_ARCH normalization already used elsewhere in this file and in install.sh. Verified by extracting both changed blocks and running them under bash with TARGETARCH set to each value: amd64 skips the copy cleanly with no missing-file error, arm64 with a real file present still copies it correctly. --- rhel10/ocp_dtk_entrypoint | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/rhel10/ocp_dtk_entrypoint b/rhel10/ocp_dtk_entrypoint index 6dc1af0d8..bc515f57c 100755 --- a/rhel10/ocp_dtk_entrypoint +++ b/rhel10/ocp_dtk_entrypoint @@ -39,10 +39,16 @@ nv-ctr-run-with-dtk() { /usr/local/bin/nvidia-driver \ /usr/local/bin/common.sh \ /usr/local/bin/extract-vmlinux \ - /usr/bin/unzboot \ /drivers \ "$DRIVER_TOOLKIT_SHARED_DIR/" + # unzboot is only built/installed on aarch64 (see install.sh); it doesn't + # exist on amd64 images, so only copy it there. + DTK_PREP_ARCH=${TARGETARCH/amd64/x86_64} && DTK_PREP_ARCH=${DTK_PREP_ARCH/arm64/aarch64} + if [[ "$DTK_PREP_ARCH" == "aarch64" ]]; then + cp /usr/bin/unzboot "$DRIVER_TOOLKIT_SHARED_DIR/" + fi + if [[ -f "/usr/local/bin/vgpu-util" ]]; then cp /usr/local/bin/vgpu-util "$DRIVER_TOOLKIT_SHARED_DIR/" fi @@ -172,9 +178,12 @@ dtk-build-driver() { "$DRIVER_TOOLKIT_SHARED_DIR/nvidia-driver" \ "$DRIVER_TOOLKIT_SHARED_DIR/common.sh" \ "$DRIVER_TOOLKIT_SHARED_DIR/extract-vmlinux" \ - "$DRIVER_TOOLKIT_SHARED_DIR/unzboot" \ "${DRIVER_TOOLKIT_SHARED_DIR}/bin" + if [[ "$DRIVER_ARCH" == "aarch64" ]]; then + cp -v "$DRIVER_TOOLKIT_SHARED_DIR/unzboot" "${DRIVER_TOOLKIT_SHARED_DIR}/bin" + fi + if [[ -f "$DRIVER_TOOLKIT_SHARED_DIR/vgpu-util" ]]; then cp -v "$DRIVER_TOOLKIT_SHARED_DIR/vgpu-util" "$DRIVER_TOOLKIT_SHARED_DIR/bin" fi