aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / native / linux / aien-gpu / Makefile
| 1 | # aien-gpu: the Linux host shim for our own GB10 GPU driver (L332 rung 2). Build only; loading it is a |
| 2 | # coordinator-scheduled window step (docs/GPU_DRIVER.md, evidence/own-gpu-driver/rung2/RUNBOOK.md). |
| 3 | # make the module (needs /lib/modules/$(uname -r)/build) |
| 4 | # make tools aien_gpu_check and aien_gsp_boot (user space; the start-up tool links the AGPL driver core) |
| 5 | # make sim-test aien_gsp_boot built against the simulated SEC2 + GSP, plain and sanitized, then |
| 6 | # evidence/own-gpu-driver/rung2/window1_sim_test.sh on both |
| 7 | KDIR ?= /lib/modules/$(shell uname -r)/build |
| 8 | CORE := $(CURDIR)/../../kernel |
| 9 | OUT ?= $(CURDIR)/build |
| 10 | CC ?= cc |
| 11 | TCFLAGS := -std=c11 -D_POSIX_C_SOURCE=200809L -D_DEFAULT_SOURCE -O2 -g -Wall -Wextra -Werror \ |
| 12 | -I$(CORE)/gpu -I$(CORE)/dev -I$(CURDIR) |
| 13 | BOOT_SRCS := aien_gsp_boot.c $(CORE)/gpu/gsp_mmio.c $(CORE)/gpu/gsp_seq.c $(CORE)/dev/gb10_gsp_boot.c |
| 14 | SIM_TEST := $(CURDIR)/../../../evidence/own-gpu-driver/rung2/window1_sim_test.sh |
| 15 | all: |
| 16 | $(MAKE) -C $(KDIR) M=$(CURDIR) modules |
| 17 | tools: $(OUT)/aien_gpu_check $(OUT)/aien_gsp_boot |
| 18 | $(OUT)/aien_gpu_check: aien_gpu_check.c aien_gpu_uapi.h |
| 19 | @mkdir -p $(OUT) |
| 20 | $(CC) $(TCFLAGS) -o $@ aien_gpu_check.c |
| 21 | $(OUT)/aien_gsp_boot: $(BOOT_SRCS) aien_gpu_uapi.h |
| 22 | @mkdir -p $(OUT) |
| 23 | $(CC) $(TCFLAGS) -o $@ $(BOOT_SRCS) |
| 24 | $(OUT)/aien_gsp_boot_sim: $(BOOT_SRCS) $(CORE)/gpu/gsp_sim.c |
| 25 | @mkdir -p $(OUT) |
| 26 | $(CC) $(TCFLAGS) -DAIEN_GSP_BOOT_SIM -o $@ $(BOOT_SRCS) $(CORE)/gpu/gsp_sim.c |
| 27 | $(OUT)/aien_gsp_boot_sim_san: $(BOOT_SRCS) $(CORE)/gpu/gsp_sim.c |
| 28 | @mkdir -p $(OUT) |
| 29 | $(CC) $(TCFLAGS) -O1 -fsanitize=address,undefined -fno-sanitize-recover=all -DAIEN_GSP_BOOT_SIM -o $@ \ |
| 30 | $(BOOT_SRCS) $(CORE)/gpu/gsp_sim.c |
| 31 | sim-test: $(OUT)/aien_gsp_boot_sim $(OUT)/aien_gsp_boot_sim_san |
| 32 | bash $(SIM_TEST) $(OUT)/aien_gsp_boot_sim $(CURDIR)/aien_gpu.c |
| 33 | bash $(SIM_TEST) $(OUT)/aien_gsp_boot_sim_san $(CURDIR)/aien_gpu.c |
| 34 | clean: |
| 35 | $(MAKE) -C $(KDIR) M=$(CURDIR) clean |
| 36 | rm -rf $(OUT) |
| 37 | .PHONY: all tools sim-test clean |