You are not logged in.

#1 2014-04-12 16:23:42

dsc3507
Member
Registered: 2014-04-12
Posts: 8

Getting kernel headers

I have newly installed archlinux on the beaglebone black. I need to compile some code that requires kernel source or at a minimum kernel source. I goggled this and it said to download the linux-am33x-headers package. If I can get this package is this all I need? Does this cover my running kernel. I need to run code (modules) against my running kernel.

The Linux Kernel and modules - TI AM335x Beaglebone (Black)
core/linux-am33x-headers 3.13.6-3

I am not sure if this is correct. I get the following error.... any help would be appreciated.

[root@alarm src]# pacman -S linux-am33x-headers
resolving dependencies...
looking for inter-conflicts...

Packages (1): linux-am33x-headers-3.13.6-3

Total Download Size:    5.75 MiB
Total Installed Size:   38.37 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages ...
error: failed retrieving file 'linux-am33x-headers-3.13.6-3-armv7h.pkg.tar.xz' from mirror.archlinuxarm.org : The requested URL returned error: 404 Not Found
warning: failed to retrieve some files
error: failed to commit transaction (download library error)
Errors occurred, no packages were upgraded.

[root@alarm src]# uname -r
3.8.13-17-ARCH

Offline

#2 2014-04-12 16:37:50

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Getting kernel headers

Update your system first, install new software later.

I think questions regarding ARM architecture belong on the Arch Linux ARM forum https://bbs.archlinux.org/viewtopic.php?id=153431

Offline

#3 2014-04-12 17:15:35

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,586

Re: Getting kernel headers

What Karol did not come right out and say is to perform a pacman -Syu
Arch is a rolling release and packages are continuously updated.  The database on your system has references to outdated packages that have been replaced on the mirrors by newer packages -- the version your machine is looking for is 404.  the -Syu switch tells pacman to obtain a new database, then, find which packages in that database are newer than those you've installed, and update them.

Welcome to Arch Linux.   Remember that we are not Arch Arm, so if something comes up that is Arm specific, you will receive the suggestion to check the Arch Arm site.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2014-04-12 18:47:10

dsc3507
Member
Registered: 2014-04-12
Posts: 8

Re: Getting kernel headers

Ok great...

I did that and downloaded the latest linux-am33x-headers and I get -

[root@alarm src]# ls
linux-3.14.0-2-ARCH  utils

My kernel is -

[root@alarm src]# uname -r
3.8.13-17-ARCH

So does this mean I need to recompile from source?  I guess this would always be a moving target and maybe archlinux is not the right platform. My code is connected to the kernel so however I compile my code it it has to be run with a compatible kernel. The build link was created in /lib/modules/3.14.0-2-ARCH    so I guess the running kernel has to match???

Offline

#5 2014-04-12 18:47:58

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,165
Website

Re: Getting kernel headers

Have you rebooted to use the latest kernel?


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#6 2014-04-12 19:19:10

dsc3507
Member
Registered: 2014-04-12
Posts: 8

Re: Getting kernel headers

yes at reboot I get -

[root@BBBdoug ~]# uname -r
3.8.13-19-ARCH

[root@BBBdoug ~]# ls /lib/modules
3.14.0-2-ARCH  3.8.13-19-ARCH  extramodules-3.8--am33x-legacy

Closest I can find is

linux-headers-am33x-legacy 3.8.13-19

Still confused as to what it is I need?

[root@BBBdoug ~]# pacman -Ss am33x
core/linux-am33x 3.14.0-2
    The Linux Kernel and modules - TI AM335x Beaglebone (Black)
core/linux-am33x-headers 3.14.0-2 [installed]
    Header files and scripts for building modules for linux kernel - TI AM335x
    Beaglebone (Black)
core/linux-am33x-legacy 3.8.13-19 [installed]
    The Linux Kernel and modules - am33x processors
core/linux-headers-am33x-legacy 3.8.13-19
    Header files and scripts for building modules for linux kernel - am33x
    processors

Offline

#7 2014-04-12 19:23:27

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,165
Website

Re: Getting kernel headers

Sounds like you haven't updated grub to account for the fact that you have a new kernel package installed, because you have two different am33x kernels installed now.


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#8 2014-04-12 23:36:49

dsc3507
Member
Registered: 2014-04-12
Posts: 8

Re: Getting kernel headers

OK the  3.14.0-2-ARCH is just headers. I downloaded this.

The 3.8.13-19-ARCH  is my current kernel

[root@BBBdoug ~]# uname -r
3.8.13-19-ARCH

There obviously are modules in that directory but I have no headers for it.  I did an update and this is the version I got.

I just need to know how to get headers for the kernel I have.  Or how to update to a newer one that has headers available.

This should not be so complicated. I have done this in centos, Debian, Ubuntu, etc. 

I guess my confusion is who maintains the machine specific patches?  In Debian you download the kernel  then apply machine specific patches.  Is everything I need at the repository?

Offline

#9 2014-04-13 10:00:11

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,165
Website

Re: Getting kernel headers

Ignoring the point you didn't use code tags, is this still true?:

[root@BBBdoug ~]# pacman -Ss am33x
core/linux-am33x 3.14.0-2
    The Linux Kernel and modules - TI AM335x Beaglebone (Black)
core/linux-am33x-headers 3.14.0-2 [installed]
    Header files and scripts for building modules for linux kernel - TI AM335x
    Beaglebone (Black)
core/linux-am33x-legacy 3.8.13-19 [installed]
    The Linux Kernel and modules - am33x processors
core/linux-headers-am33x-legacy 3.8.13-19
    Header files and scripts for building modules for linux kernel - am33x
    processors

According to this, you've installed the headers for the linux-am33x kernel, but haven't installed the linux-am33x kernel with the linux-am33x-headers package.

According to that output, you also installed the linux-am33x-legacy kernel, but haven't installed the corresponding headers with the linux-headers-am33x-legacy package.

If you don't see what's going on, read this comment again until you do.

Last edited by clfarron4 (2014-04-13 10:04:03)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#10 2014-04-13 13:54:29

dsc3507
Member
Registered: 2014-04-12
Posts: 8

Re: Getting kernel headers

Yes you are right. I only had to read it once!  It was the legacy part that got me. Here is what it did -

[root@BBBdoug utils]# pacman -S linux-headers-am33x-legacy
resolving dependencies...
looking for inter-conflicts...
:: linux-headers-am33x-legacy and linux-am33x-headers are in conflict (linux-headers). Remove linux-am33x-headers? [y/N] y

Packages (2): linux-am33x-headers-3.14.0-2 [removal]  linux-headers-am33x-legacy-3.8.13-19

Total Download Size:    5.38 MiB
Total Installed Size:   35.72 MiB
Net Upgrade Size:       -2.69 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages ...
linux-headers-am33x-legacy-3.8.13-19-...     5.4 MiB  1352K/s 00:04 [######################################] 100%
(1/1) checking keys in keyring                                       [######################################] 100%
(1/1) checking package integrity                                     [######################################] 100%
(1/1) loading package files                                          [######################################] 100%
(1/1) checking for file conflicts                                    [######################################] 100%
(2/2) checking available disk space                                  [######################################] 100%
(1/1) removing linux-am33x-headers                                   [######################################] 100%
(1/1) installing linux-headers-am33x-legacy                          [######################################] 100%

and I have the right headers!

Thanks for your help.

Offline

#11 2014-04-13 22:39:22

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,586

Re: Getting kernel headers

If this is solved, please edit your first post in the thread, edit the title, and prepend [SOLVED] to the thread title.
Also, please, please, learn to use BBCode code and quote tags.  The link I provided is the same link provided under all of the post boxes on these forums.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB