This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to manually install Linux Headers for my BeagleBone

Hi Everybody

I'm using BeagleBone Black with pre-built Ubuntu Precise 12.04 LTS image at http://www.armhf.com/boards/beaglebone-black/bbb-sd-install/.

Everything's fine, but I need to install some packages that require Linux Header, and I found nothing match my kernel $(uname -r) 3.14.4.1-bone-armhf.com with using apt-cache search

linux-headers-$(uname-r)

Note that my command works fine on my PC.

apt-get install linux-headers-$(uname -r)

I found the Linux Header http://s3.armhf.com/dist/bone/linux-headers-3.14.4.1-bone-armhf.com.tar.xz, also released by them, but unfortunately, I don't know how to Install Linux Header Manually, or do something useful with it.

Sorry for my bad knowledge base of Linux, please give me some helps, thank you

Best Regards

  • Try to copy the headers (include) into your filesystem "/usr" directory.
    Also you can install the headers from your linux source directory.

    make headers_install INSTALL_HDR_PATH=< location > ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
    Be default location path is "usr" directory of linux source.

    Do some "make help" in your linux source and check out the "make headers_install" command.
  • Hi Titus, Thank you for your instruction, I'm following that , and then going through 2 documents below

    https://www.kernel.org/doc/Documentation/kbuild/headers_install.txt

    http://www.gnu.org/software/libc/manual/html_node/Linux.html

    Exactly what I was doing :

    1. Download and untar http://s3.armhf.com/dist/bone/linux-headers-3.14.4.1-bone-armhf.com.tar.xz

    2. Call 'make headers_install'

    ubuntu@ubuntu-armhf:/usr/src/linux-3.14.4.1-bone.armhf.com$ make headers_install ARCH=arm INSTALL_HDR_PATH=/usr/ CROSS_COMPILE=arm-linux-gnueabihf-

    3. Call dpkg -L to determine if I installed the headers successful.

    dpkg -L linux-headers-$(uname -r)

    and the result return :

    dpkg-query : package 'linux-headers-3.14.4.1-bone-armhf.com' is not installed
    Use dpkg --info (= dpkg-deb --info) to examine archive files
    and dpkg --contents (=dpkg-deb --contents) to list their contents.

    I think it's still not working. What else i need to do then?

    Thank you.

    Best Regards.