mirror of
https://github.com/QuixiAI/nvdriver.git
synced 2026-12-06 14:38:47 +00:00
- Updated tools/post_reboot.sh to check kernel oops taint bit and stuck driver tasks instead of <86400s uptime - Level 7 hardware regression passed on 0000:b3:00.0 (module 37e6fa430835eee2b426019db3ad70eeb7a9e9070c09c84bd9b973cf56cbe529, 107 inventory words, 0 static mismatches, CUDA baseline verified before and after) - Updated .gitignore to exclude build archives (*.a, *.rlib), __pycache__, and raw trace dumps
34 lines
2.1 KiB
Makefile
34 lines
2.1 KiB
Makefile
# Paths may be overridden for an explicit kernel/header tree and staging area.
|
|
KERNEL_UNAME ?= $(shell uname -r)
|
|
KERNEL_SOURCES ?= $(if $(SYSSRC),$(SYSSRC),/lib/modules/$(KERNEL_UNAME)/build)
|
|
KERNEL_OUTPUT ?= $(if $(SYSOUT),$(SYSOUT),$(KERNEL_SOURCES))
|
|
OBJCOPY ?= objcopy
|
|
RUSTC ?= $(HOME)/.cargo/bin/rustc
|
|
RUST_KERNEL_TARGET := x86_64-unknown-none
|
|
# Kernel target supplies a soft-float, no-SSE core; explicit flags document ABI.
|
|
RUST_KERNEL_FLAGS := --edition=2021 --crate-type=lib --target=$(RUST_KERNEL_TARGET) \
|
|
--emit=obj -C opt-level=2 -C panic=abort -C relocation-model=static \
|
|
-C code-model=kernel -C no-redzone=yes -C force-frame-pointers=yes \
|
|
-C overflow-checks=yes -C debuginfo=1
|
|
|
|
# Matching580 conftest product selectors: ANY nonempty value enables a role.
|
|
# Export passes both inherited environment and explicit `make NAME=value` as data. No CPUID/Xen detection.
|
|
export VGX_BUILD VGX_KVM_BUILD VGX_DEVICE_VM_BUILD
|
|
RUST_BUILD_PRODUCT_RECEIPT := $(ROOT)/target/build-product/config.json
|
|
# GNU Make's $(shell) does not receive newly exported command-line variables.
|
|
# Single-quote each resolved Make value, including literal quotes/dollars/newlines.
|
|
nv_rs_shell_quote = '$(subst ','"'"',$(1))'
|
|
RUST_BUILD_PRODUCT_FLAGS := $(shell VGX_BUILD=$(call nv_rs_shell_quote,$(VGX_BUILD)) VGX_KVM_BUILD=$(call nv_rs_shell_quote,$(VGX_KVM_BUILD)) VGX_DEVICE_VM_BUILD=$(call nv_rs_shell_quote,$(VGX_DEVICE_VM_BUILD)) python3 $(ROOT)/tools/timer-timeout-build-product.py --receipt $(RUST_BUILD_PRODUCT_RECEIPT))
|
|
ifeq ($(strip $(RUST_BUILD_PRODUCT_FLAGS)),)
|
|
$(error Cannot resolve Rust build-product configuration)
|
|
endif
|
|
RUST_KERNEL_FLAGS += $(RUST_BUILD_PRODUCT_FLAGS)
|
|
# Explicit absolute targets work before OUT is assigned by src/nvidia/Makefile.
|
|
# EXTRA_PREREQS preserves the original first prerequisite used by rustc $<.
|
|
# A changed product receipt invalidates every Rust artifact using these cfgs.
|
|
NV_RS_PRIOR_DEFAULT_GOAL := $(.DEFAULT_GOAL)
|
|
$(ROOT)/kernel-open/nvidia/libnv_rs_abi.rlib \
|
|
$(ROOT)/kernel-open/nvidia/libnv_rs_core.rlib \
|
|
$(ROOT)/kernel-open/nvidia/libnv_rs_kernel.a: .EXTRA_PREREQS := $(RUST_BUILD_PRODUCT_RECEIPT)
|
|
.DEFAULT_GOAL := $(NV_RS_PRIOR_DEFAULT_GOAL)
|