This! (added a dash in the package name)gregeric wrote:raspberrypi-kernel-headers is available by apt-get & gives you the headers matching the installed (by apt-get) kernel.
I've seen very few that include the kernel sources / headers by default. It's almost always a separate install-able package. And that's been try for a decade or more.justme123 wrote: Personally, for some specific and objective reasons, I'm not using Raspbian at all. Additionally, being a Linux veteran, using it for almost 2 decades, I never ever saw a serious Linux Distribution that was not containing the kernel sources in the official image!
This now makes little sense, If you're not using raspbian then why should they include the headers in the image?justme123 wrote:Hello kernel developers/compilers!
I'd like to ask you, if you are so kind, to include the kernel headers with the official Raspbian image from now on. The entire folders structure is around 71MB:
du -s -h /usr/src/linux-headers-4.4.48-v7+/
Code: Select all
$ sudo apt-get install raspberrypi-kernel-headers $ uname -a Linux pi3.local 4.9.24-v7+ #993 SMP Wed Apr 26 18:01:23 BST 2017 armv7l GNU/Linux $ du -chs /usr/src/linux-headers-4.9.24* 78M /usr/src/linux-headers-4.9.24+ 78M /usr/src/linux-headers-4.9.24-v7+ 156M total
Code: Select all
$ uname -a Linux Pi-64GB-1 4.9.25-v7+ #994 SMP Fri Apr 28 16:56:00 BST 2017 armv7l GNU/Linux $ sudo apt-get install raspberrypi-kernel-headers Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: raspberrypi-kernel-headers 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. Need to get 15.3 MB of archives. After this operation, 111 MB of additional disk space will be used. Get:1 http://archive.raspberrypi.org/debian/ jessie/main raspberrypi-kernel-headers armhf 1.20170427-1 [15.3 MB] Fetched 15.3 MB in 18s (851 kB/s) Selecting previously unselected package raspberrypi-kernel-headers. (Reading database ... 35028 files and directories currently installed.) Preparing to unpack .../raspberrypi-kernel-headers_1.20170427-1_armhf.deb ... Unpacking raspberrypi-kernel-headers (1.20170427-1) ... Setting up raspberrypi-kernel-headers (1.20170427-1) ... run-parts: executing /etc/kernel/header_postinst.d/dkms 4.9.24+ Error! Could not locate dkms.conf file. File: does not exist. run-parts: executing /etc/kernel/header_postinst.d/dkms 4.9.24-v7+ Error! Could not locate dkms.conf file. File: does not exist. du -chs /usr/src/linux-headers-* 78M /usr/src/linux-headers-4.9.24+ 78M /usr/src/linux-headers-4.9.24-v7+ 155M total
Yes, but if you have a kernel version that doesn't match what is available or been installed using apt-get then you will have an issue as my example shows. I have a clone of the linux source which goes back to 2011 or so not long after the git repo was originally created and I update it as required with git pull and it doesn't require downloading GBytes to update as @justme123 suggests. Even doing a new clone you can reduce the amount to download with git clone --depth=xxx etc. @justme123 take a look at man git-clone.gregeric wrote:raspberrypi-kernel-headers gives you the version matching the kernel available on apt-get. I assume your 4.9.25 came from rpi-update, in which case rpi-source is your friend.
Not sure what this is all about with dkms. Never ever used it and have no real idea what it does. I cross-compile a few out of tree wifi drivers, using a script I've developed, which are available for anyone using Raspbian kernels to download and I usually recompile every time there is an update to hexxeh/rpi-firmware as I regularly update my Pis using rpi-update. It only takes me a few minutes to re-compile the drivers for Pi 1 and Pi 2, cross-compiling on an old PC I have.There is something amiss with dkms, my (esp8089) driver being uninstalled and not automatically rebuilt on apt-get kernel updates. Quickly resolved with a manual "dkms install...", haven't looked further.
There is also Armbian Distro which is a Debian re-spinghans wrote:You need to use apt-get at least once to get matching kernel headers from the internet on Debian. This has
always been the case on the PCs and Laptops i've used Debian on, even when installed via the official (net)installer.
The foundation is actually involved in upstreaming their modifications to the kernel. They are making progress on all fronts.
Raspbian runs on other machines too. If you want to set up a Debian-style system without the
foundation mods you might want to look into raspbian-ua-netinst , which many people prefer for staying closer to how Debian is installed anc configured.