We have lift off! (2026/07/23)

Note: Lift off does not mean; getting more than 3 feet of the ground, imploding, surviving, getting back in one peice, getting to orbit, even moving much. So I was looking into the double cdev_add stuff which was causing a panic earlier, and two things. Firstly on linux if you try to re-register the same chardev thingy, it doestn go to panic, and secondly on FreeBSD when you try to make a chardev thingy which already exists, it defaults to panic unless you pass a certain flag.

To fix this, I just modified the linuxkpi implementation of cdev_add and added in the flag. [put in the reviews.freebsd.org link here

Otherwise, after fixing that, we have another weird issue. It tries to create it n amount of times, fails, then says it cannot be initlised, but the /dev/kfd thing exists??? even tho it should've been destructed.

To add to whatever I was complaining about yesterday, the amdgpu, and amdkfd driver for some reason do not have a standard prefix. If you've ever worked with C libraries, you'll know what they always have a prefix for that specific library. Like SDL has SDL_, stb has like stbtt, or wtv. Now AMD for some reason does not. I've seen; amdgpu_, kfd_, pm_, and at least 1 other. Which is a pain in the ahh. Like I was trying to look at all the undefined symboles (via nm -u amdgpu.ko | vim -), and I'd search like kfd_, see nothing, think I'm good. THEN BOOM nothing works cause there's some new stuff. Anyways, after a bit of pain that got fixed.

Beyond that, for some reason, ROCM/llvm-project does not build with ninja???? I don't know why. I'm not gonna ask

Here is the command Im using now btw, I need to build it on the strix halo desktop than move to my laptop since it uses over 100gb which I don't have

    cmake -S llvm -B build \ -DLLVM_ENABLE_PROJECTS="clang;lld" \ -DLLVM_EXTERNAL_PROJECTS="amd-device-libs;comgr" \ -DLLVM_EXTERNAL_AMD_DEVICE_LIBS_SOURCE_DIR="/root/dev/llvm-project/amd/device-libs" \ -DLLVM_EXTERNAL_COMGR_SOURCE_DIR="/root/dev/llvm-project/amd/comgr" \ -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" -DCMAKE_INSTALL_PREFIX=/opt/rocm -DCMAKE_C_FLAGS="-march=znver4" -DCMAKE_CXX_FLAGS="-march=znver4" \ -