You are not logged in.
I'm going through Linux Device Drivers 3rd edition to start learn about the kernel and drivers. I know it's outdated, but from my understanding the "high level" of it still applies. Also, I found this repository that has more up-to-date examples from the book. My current issue is that I'm missing linux/init.h which I think I'm supposed to get from the linux-headers package.
From some posts I've seen around the web, installing this should be done with something like
linux-headers-$(uname -r)
but I don't see anything in the Arch repo that differs on that the kernel, only linux-headers. My current version (from uname -r) is 6.16.0-arch2-1 but what's out in the Arch repos is 6.16.1.arch1-1. I'm not sure if the versioning difference matters in this scenario. I figured I would try to install it and see if it works/breaks. When doing so though I get;
sudo pacman -S linux-headers
resolving dependencies...
looking for conflicting packages...
Packages (2) pahole-1:1.30-2 linux-headers-6.16.arch2-1
Total Download Size: 52.45 MiB
Total Installed Size: 245.65 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst failed to download
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from america.mirror.pkgbuild.com : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from losangeles.mirror.pkgbuild.com : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from nl.arch.niranjan.co : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from us.arch.niranjan.co : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from berlin.mirror.pkgbuild.com : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from at.arch.niranjan.co : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from mirror.theo546.fr : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from mirror.moson.org : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from london.mirror.pkgbuild.com : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from mirror.sunred.org : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from mirror.ubrco.de : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from repo.jing.rocks : SSL: no alternative certificate subject name matches target hostname 'repo.jing.rocks'
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from singapore.mirror.pkgbuild.com : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from taipei.mirror.pkgbuild.com : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from johannesburg.mirror.pkgbuild.com : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from de.arch.niranjan.co : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from mirror.cyberbits.asia : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from nz.arch.niranjan.co : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from mirror.lcarilla.de : The requested URL returned error: 404
error: failed retrieving file 'linux-headers-6.16.arch2-1-x86_64.pkg.tar.zst' from in.arch.niranjan.co : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (failed to retrieve some files)
Errors occurred, no packages were upgraded.
Which would make sense, since the repo has a different version than my local system. Using pacman -S linux-headers-$(uname -r) gives me a "target not found", as expected. So, my questions are...
- Am I looking in the right place for these headers or is there a better way I should acquire these?
- If the arch repo isn't the best place for me to get them, where should I look?
- If it is the correct place, what package should I be looking for?
Last edited by mu40u_n1k4 (2025-08-19 19:01:41)
Offline
it's in /usr/lib/modules/$(uname -r)/build/include/linux/init.h
you got 404 errors because the previous version has been removed from the repos, refresh your databases via upgrading often to prevent that
Last edited by iwuvkittens (2025-08-19 18:57:33)
gnu/linux/tux
Offline
Ah, just updating my system with a good ol' pacman -Syu worked. Silly me.
Offline