메뉴
HN
Hacker News 26일 전

NetBSD에 벌컨(Vulkan) 그래픽 스택이 정식으로 도입되었습니다

IMP
6/10
핵심 요약

주요 BSD 운영체제 중 유일하게 벌컨(Vulkan)을 지원하지 않았던 NetBSD에 소프트웨어 기반의 벌컨 드라이버(Mesa / Lavapipe)가 성공적으로 포팅되었습니다. 이 프로젝트는 복잡한 빌드 과정을 자동화하고 기록하여, 일반 사용자도 소스 코드를 컴파일하지 않고 벌컨 환경을 구축할 수 있도록 하는 것을 목표로 합니다. 현재 드라이버 설치까지 검증되었으며, 실행에 필요한 로더와 사전 빌드된 패키지 제공이 진행 중입니다.

번역된 본문

이 프로젝트는 벌컨(Vulkan) 소프트웨어 스택(Mesa / Lavapipe)을 NetBSD로 가져오고, 해당 과정을 문서화 및 자동화하여 누구나 쉽게 재현하고 유지 보수할 수 있도록 하는 노력의 일환입니다.

현재 상태: 베타(Beta) Lavapipe 벌컨 드라이버가 NetBSD에서 성공적으로 빌드, 설치 및 등록되었습니다.

달성한 이정비: Mesa가 LLVM 19.1.7을 기반으로 NetBSD 10.1 amd64 환경에서 Lavapipe 소프트웨어 벌컨 드라이버를 구성, 컴파일, 링크, 설치 및 등록했습니다. 드라이버(libvulkan_lvp.so, 약 17 MB)는 /usr/pkg/lib에 설치되며, ICD 매니페스트(Vulkan API 1.4 지원 명시)는 /usr/pkg/share/vulkan/icd.d/에 설치됩니다. 이를 통해 시스템의 벌컨 로더가 해당 드라이버를 인식할 수 있습니다. 모든 종속성(dependency) 문제 없이 깔끔하게 해결되었습니다. 환경 설정, 종속성 빌드, Mesa 빌드 및 설치에 이르는 전체 과정이 종단 간(end-to-end) 자동화되어 새로 설치된 시스템에서도 그대로 재현할 수 있습니다.

사전 빌드된 바이너리(Prebuilt binaries)가 곧 제공될 예정입니다. 빌드, 식별 및 게시를 위한 도구는 이미 마련되었으며, 빌드 스크립트는 소스 코드부터 빌드하는 대신 미리 컴파일된 일치하는 바이너리를 가져와 설치하는 방법을 이미 알고 있습니다. 빌드 머신이 릴리스를 게시하기 시작하면, 드라이버 설치는 몇 시간씩 걸리는 빌드 과정이 아니라 단순한 다운로드로 끝나게 될 것입니다. 이것이 가까운 미래의 방향입니다.

아직 지원되지 않는 기능 (What this is NOT yet): 벌컨 프로그램을 실행하려면 로더(loader)가 필요합니다. 이 프로젝트는 벌컨 드라이버(Lavapipe ICD)를 빌드하고 설치합니다. 하지만 벌컨 애플리케이션을 실제로 실행하려면 다음으로 구성해야 할 필수 구성 요소인 벌컨 로더(libvulkan.so.1)가 필요합니다. 따라서 아직 런타임 실행은 검증되지 않았습니다.

일시적인 해결 방법(workaround)이 여전히 적용되어 있습니다. 현재 빌드 시 NetBSD에서 Mesa의 %m 형식 지정자를 거부하는 GCC 문제를 우회하기 위해 -Wno-error=format 플래그를 적용하고 있습니다. 근본적인 수정(strerror(errno) 사용)은 아직 상류(Upstream)로 제출되지 않은 보류 상태입니다.

로더와 릴리스 파이프라인이 완전히 갖춰짐에 따라 향후 단계, 스크립트 및 문서는 계속해서 변경될 것입니다.

목표 NetBSD는 현재 벌컨을 지원하지 않는 유일한 주요 BSD 운영체제입니다. 이 프로젝트의 목표는 다음과 같습니다:

  • NetBSD에서 벌컨 소프트웨어 스택(Mesa의 Lavapipe 드라이버, GPU 없이 LLVM을 통해 CPU에서 실행됨)을 빌드합니다.
  • 막다른 길(dead ends)을 포함한 모든 단계를 문서화하여 과정을 재현 가능하게 만듭니다.
  • 몇 개의 스크립트만으로 새로운 머신을 빌드 준비 상태로 만들 수 있도록 설정을 자동화합니다.
  • 궁극적으로 필요한 수정 사항을 상류 프로젝트(Mesa 및 pkgsrc)에 반영하고, 사전 빌드된 바이너리 또는 pkgsrc 패키지를 제공하여, 소스에서 빌드할 필요 없이 NetBSD에서 벌컨을 간단히 설치할 수 있도록 만듭니다.

범위 및 환경 대상 OS: NetBSD 10.1 (amd64), 최소 ISO 설치. 호스트: VirtualBox 가상 머신(VM). 빌드 목표 한정: 벌컨 스택의 컴파일 및 링크를 목표로 합니다. VirtualBox에서는 런타임 GPU 가속을 사용할 수 없으므로, 소프트웨어 드라이버(Lavapipe)가 대상입니다.

저장소 구조 vulkan-netbsd/ ├── docs/ │ ├── 01-environment-setup.md 기본 시스템 + pkgsrc + 빌드 종속성 │ ├── 02-source-dependencies.md pkgsrc에 없는 종속성 (소스에서 빌드) │ ├── 03-mesa-build.md Mesa(Lavapipe) 구성 + 컴파일, 포팅 노트 │ └── 04-prebuilt-artifacts.md 한 번 빌드 / 사전 빌드된 바이너리 재사용 └── scripts/ ├── setup-env.sh 환경 설정 자동화 ├── build-glslang.sh glslang 빌드 (Mesa에 필요, pkgsrc에 없음) ├── build-mesa.sh Mesa(Lavapipe) 복제 + 구성 + 컴파일 ├── install-mesa.sh 빌드된 드라이버 + ICD 매니페스트 설치 ├── lib-artifacts.sh 공통: 식별 + 사전 빌드된 파일 가져오기 헬퍼 └── package-artifacts.sh 빌드된 바이너리를 릴리스 tarball로 패키징

시작하기 새로 설치된 최소 구성의 NetBSD 10.1 (amd64) 환경에서 root 권한으로 다음 명령어를 실행합니다: cd /root ftp https://raw.githubusercontent.com/segaboy/vulkan-netbsd/main/scripts/setup-env.sh sh setup-env.sh . /root/.profile ftp https://raw.githubusercontent.com/segaboy/vulkan-netbsd/main/scripts/build-glslang.sh sh build-glslang.sh ftp https://raw.githubusercontent.com/segaboy/vulkan-netbsd/main/scripts/build-mesa.sh sh build-mesa.sh --build ftp https://raw.githubusercontent.com/segaboy/vulkan-netbsd/main/scripts/install-mesa.sh sh install-mesa.sh (참고: build-mesa.sh --build 명령은 저장소를 복제하고 구성 및 컴파일을 진행합니다.)

원문 보기
원문 보기 (영어)
vulkan-netbsd An effort to bring the Vulkan software stack (Mesa / Lavapipe) to NetBSD , and to document and automate the process so it can be reproduced and maintained. Status: beta — Lavapipe Vulkan driver builds, installs, and registers on NetBSD Milestone reached: Mesa configures, compiles, links, installs , and registers the Lavapipe software Vulkan driver on NetBSD 10.1 amd64, against LLVM 19.1.7. The driver ( libvulkan_lvp.so , ~17 MB) installs into /usr/pkg/lib , and its ICD manifest (advertising Vulkan API 1.4) installs into /usr/pkg/share/vulkan/icd.d/ , so a Vulkan loader on the system can discover it. ldd resolves every dependency cleanly. The entire process — environment setup, dependency builds, the Mesa build, and installation — is automated end to end and reproducible on a fresh install. Prebuilt binaries are coming. The tooling to build, fingerprint, and publish prebuilt artifacts is in place, and the build scripts already know how to fetch and install a matching prebuilt instead of building from source. Once a build machine is publishing releases, installing the driver will be a download rather than a multi-hour build. That's the near-term direction. What this is NOT (yet): Running Vulkan programs needs the loader. This project builds and installs the Vulkan driver (the Lavapipe ICD). Actually executing a Vulkan application also requires the Vulkan loader ( libvulkan.so.1 ), which is the next component to bring up. Runtime execution is therefore not yet verified. One workaround is still in place. The build applies -Wno-error=format to sidestep GCC rejecting Mesa's %m format specifier on NetBSD. A proper upstreamable fix (using strerror(errno) ) is pending. Steps, scripts, and documents will continue to change as the loader and the release pipeline come together. Goal NetBSD is currently the only major BSD without Vulkan support. The aim of this project is to: Build the Vulkan software stack (Mesa's Lavapipe driver, which runs on the CPU via LLVM and needs no GPU) on NetBSD. Document every step, including the dead ends, so the process is reproducible. Automate the setup so a fresh machine can be brought to a build-ready state with a couple of scripts. Eventually feed the necessary fixes upstream (to Mesa and to pkgsrc) and provide prebuilt binaries or a pkgsrc package, so that Vulkan on NetBSD becomes something you can simply install rather than build from source. Scope and environment Target OS: NetBSD 10.1 (amd64), minimal ISO install. Host: VirtualBox VM. Build goal only: This targets compilation and linkage of the Vulkan stack. Runtime GPU acceleration is not available under VirtualBox; the software driver (Lavapipe) is the target. Repository layout vulkan-netbsd/ ├── docs/ │ ├── 01-environment-setup.md Base system + pkgsrc + build deps │ ├── 02-source-dependencies.md Dependencies not in pkgsrc (built from source) │ ├── 03-mesa-build.md Configure + compile Mesa (Lavapipe); port notes │ └── 04-prebuilt-artifacts.md Build-once / reuse prebuilt binaries └── scripts/ ├── setup-env.sh Automates the environment setup ├── build-glslang.sh Builds glslang (required by Mesa; not in pkgsrc) ├── build-mesa.sh Clones + configures + compiles Mesa (Lavapipe) ├── install-mesa.sh Installs the built driver + ICD manifest ├── lib-artifacts.sh Shared: fingerprint + prebuilt fetch helpers └── package-artifacts.sh Packages built binaries into release tarballs Getting started On a fresh, minimal NetBSD 10.1 (amd64) install, as root: cd /root ftp https://raw.githubusercontent.com/segaboy/vulkan-netbsd/main/scripts/setup-env.sh sh setup-env.sh . /root/.profile ftp https://raw.githubusercontent.com/segaboy/vulkan-netbsd/main/scripts/build-glslang.sh sh build-glslang.sh ftp https://raw.githubusercontent.com/segaboy/vulkan-netbsd/main/scripts/build-mesa.sh sh build-mesa.sh --build ftp https://raw.githubusercontent.com/segaboy/vulkan-netbsd/main/scripts/install-mesa.sh sh install-mesa.sh build-mesa.sh --build clones, configures, and compiles Mesa, producing the Lavapipe Vulkan driver ( libvulkan_lvp.so ). install-mesa.sh then installs that driver and its ICD manifest into /usr/pkg and verifies the registration. If a build is interrupted or the machine crashes, re-run the same command — the build scripts detect the existing build and resume automatically. Together, these scripts take a fresh minimal install all the way to an installed, registered Vulkan software driver. See docs/01-environment-setup.md for the full, commented walkthrough and notes on running over SSH. Contributing / following along This is a personal work-in-progress. Expect churn. The documentation is written as a running record of what actually worked (and what didn't), so it doubles as field notes for anyone attempting the same port. License The original work in this repository — the scripts, documentation, and any patches authored here — is released under the MIT License (see LICENSE ). This project builds, installs, and (optionally) redistributes third-party software that is not covered by that license and retains its own: Mesa — primarily MIT-licensed (some components under other permissive licenses). glslang — permissive licenses (BSD-style, Apache 2.0, and Khronos terms). LLVM — Apache 2.0 with LLVM Exceptions. LLVM is installed separately via pkgsrc and is not redistributed by this project. Prebuilt artifacts produced by scripts/package-artifacts.sh bundle the relevant upstream license texts (under share/licenses/ ) so that binary redistribution preserves each project's attribution. If you publish artifacts, keep those files intact.