Wrong kernel source for 14.1

The SARPi project forum. For anything and everything relating to Slackware ARM on a Raspberry Pi 1, 2, and 3. This forum is NOT a replacement or substitute for the Slackware (ARM) forums on Linux Questions website! Please try to seek help there first about any issues you may be experiencing, or question you might have, before posting on here.
User avatar
Kimdino
Registered user
Registered user
Posts: 11
Joined: Wed Aug 12 2015 - 03:50:25
Location: Dorset, UK

Wrong kernel source for 14.1

Postby Kimdino » Tue Aug 18 2015 - 05:49:24

Hi folks,

I have been trying to build lirc (ver. 0.9.0) on my Pi 2 model B, but I get an error telling me that I have an invalid kernel configuration. I am asked to run 'make oldconfig' to fix it but this is not possible as it appears that I have the code for the wrong kernel version.

'uname -r' tells me that I am using kernel 3.18.9-v7-arm, but I have the system has installed the source for 3.10.17-arm-2. Executing 'slackpkg search header' tells me that 'kernel-headers-3.10.17-arm-2' is the only version available.

Can anyone help?
Thanks in advance, Kimdino

User avatar
Exaga
FatDog Network Administrator
FatDog Network Administrator
Posts: 205
Joined: Wed Apr 18 2012 - 02:01:03
Location: England [UK]

Re: Wrong kernel source for 14.1

Postby Exaga » Tue Aug 18 2015 - 08:27:50

You might want to try rpi-update and see if it's an 'incomplete update' issue. rpi-update will install the latest firmware, kernel and kernel modules in an apt-get fashion, which isn't the Slackware way of doing things but it may solve your problem(s). ;)
Exaga

====
__ KEEP THE DOG ALIVE!!!
()'`; /
/\|` W00f W00f W00f
www.fatdog.eu

User avatar
Kimdino
Registered user
Registered user
Posts: 11
Joined: Wed Aug 12 2015 - 03:50:25
Location: Dorset, UK

Re: Wrong kernel source for 14.1

Postby Kimdino » Tue Aug 18 2015 - 22:16:37

Hi Exaga,
'rpi-update' updated the kernel but not the 'src'.

Would the problem not lie in the repository?

How much variation is there from kernel.org's version. Would it be safe to use that?

Cheers, Kimdino

P.S. ;) I like the 'apt-get' fashion, I use 'slapt-get' & 'GSlapt' on my main box. Whatever does the job with the least hassle. "Gimme slack" :ok:

User avatar
linicks
Registered user
Registered user
Posts: 126
Joined: Mon Oct 27 2014 - 20:26:01
Location: Pompey, England

Re: Wrong kernel source for 14.1

Postby linicks » Thu Aug 20 2015 - 19:20:55

Kimdino wrote:
How much variation is there from kernel.org's version. Would it be safe to use that?

Cheers, Kimdino



I run stock kernels on x86 and amd64 (until the box died). They just slot in.

Alas, the build on the arm doesn't include the /proc/config.gz option (this is a kernel option to include kernel build .config file in virtual FS /proc/config.gz)

So I just get the stock kernel, untar in my home directory, cd to it, issue 'make mrproper', then do 'zcat /proc/config.gz > .config', then do the 'make oldconfig'.

There needs to be a bit of messing with this, I think. But the stock kernel, using the same or similar options should work OK.

Nick
https://linicks.net/

Q. What is the difference between a duck and an elephant?
A. You can't get down off an elephant.

User avatar
Exaga
FatDog Network Administrator
FatDog Network Administrator
Posts: 205
Joined: Wed Apr 18 2012 - 02:01:03
Location: England [UK]

Re: Wrong kernel source for 14.1

Postby Exaga » Thu Aug 20 2015 - 19:35:47

Hi Kimdino,

Yes that's correct. rpi-update does not install the kernel source. It only installs updated RPi firmware, kernel, and kernel modules.

I've never tried to config a kernel from kernel.org for the RPi. I've always used the official Raspberry Pi Foundation repository. That's the only resource we use at FatDog.eu to build our Slackware ARM installer and packages for the RPi and RPi2.

Seems like Nick has more experience in this area. :D
Exaga

====
__ KEEP THE DOG ALIVE!!!
()'`; /
/\|` W00f W00f W00f
www.fatdog.eu

User avatar
linicks
Registered user
Registered user
Posts: 126
Joined: Mon Oct 27 2014 - 20:26:01
Location: Pompey, England

Re: Wrong kernel source for 14.1

Postby linicks » Fri Aug 21 2015 - 16:37:10

Exaga wrote:
Seems like Nick has more experience in this area. :D


Yes, on conventional x86 architecture - but I am lost without lilo, so don't know how to get a new kernel to boot on the Pi, plus rpi-update will over write it, so can't see how to update firmware otherwise.

Mind you, been so busy at work lately, so haven't really had a good time when I am not tired to look into all this.

Nick
https://linicks.net/

Q. What is the difference between a duck and an elephant?
A. You can't get down off an elephant.

User avatar
Exaga
FatDog Network Administrator
FatDog Network Administrator
Posts: 205
Joined: Wed Apr 18 2012 - 02:01:03
Location: England [UK]

Re: Wrong kernel source for 14.1

Postby Exaga » Fri Aug 21 2015 - 23:02:16

linicks wrote:Yes, on conventional x86 architecture - but I am lost without lilo, so don't know how to get a new kernel to boot on the Pi, plus rpi-update will over write it, so can't see how to update firmware otherwise.


The RPi firmware handles the bootloading sequence, which passes it onto the kernel and, subsequently, the operating system. No need for lilo, or grub, etc.
Exaga

====
__ KEEP THE DOG ALIVE!!!
()'`; /
/\|` W00f W00f W00f
www.fatdog.eu

User avatar
Kimdino
Registered user
Registered user
Posts: 11
Joined: Wed Aug 12 2015 - 03:50:25
Location: Dorset, UK

Re: Wrong kernel source for 14.1

Postby Kimdino » Fri Aug 28 2015 - 00:33:05

Hi folks,

Thanks for the info. I'll try linicks' suggestion, but need a few days to undo rpi_update, make backup etc first. Will let you know how it goes.

Thanks, Kimdino

User avatar
Kimdino
Registered user
Registered user
Posts: 11
Joined: Wed Aug 12 2015 - 03:50:25
Location: Dorset, UK

Re: Wrong kernel source for 14.1

Postby Kimdino » Tue Sep 01 2015 - 03:52:09

Hi again folks,

Sorry, still cannot get things to work. Nicks suggestion almost worked except the closest version I can get find the official Raspberry Pi Foundation repository is 3.18.20 which, even though I've tried to fool the system into believing it is actually 3.18.9, is not accepted. I managed to find 3.18.9-201 in Fedora core 21, but cannot get this to work either.

As well as building 'lirc' I will also need to develop a kernel module to drive a VFD display. I suppose I could roll-my-own kernel but the loss of a supporting repository would make the project unfeasible.

Where is the source that SARPI2 was actually built with? Someone must have a copy as no serious development can be done without it? And its availability is actually a requirement of the GPL. Cannot someone put it in the repos, on on this page [url]SARPI2 downloads page | http://rpi2.fatdog.eu/index.php?p=downloads[/url] alongside the other system packages?

Cheers, Kimdino

User avatar
Exaga
FatDog Network Administrator
FatDog Network Administrator
Posts: 205
Joined: Wed Apr 18 2012 - 02:01:03
Location: England [UK]

Re: Wrong kernel source for 14.1

Postby Exaga » Tue Sep 01 2015 - 09:52:07

Kimdino wrote:Where is the source that SARPI2 was actually built with? Someone must have a copy as no serious development can be done without it? And its availability is actually a requirement of the GPL. Cannot someone put it in the repos, on on this page [url]SARPI2 downloads page | http://rpi2.fatdog.eu/index.php?p=downloads[/url] alongside the other system packages?


We download the firmware and source media via git from https://github.com/raspberrypi which is the only source we use to build the SARPi2 installer.

git clone git://github.com/raspberrypi/firmware.git
git clone git://github.com/raspberrypi/linux.git

It states on the website that "This installer is optimised for the Raspberry Pi 2 and uses the latest kernel and firmware from the official Raspberry Pi Foundation GitHub Repository." (with a link to the repository) on the microSD card config page.

It also states "The Slackware ARM installer has been created specifically for the Raspberry Pi 2 model B. It incorporates the kernel_rpi2, kernel-modules-rpi2, and rpi2-boot-firmware packages, which have been built using the latest source from the official Raspberry Pi Foundation GitHub repository." (with a link to the repository) on the Downloads page.
Exaga

====
__ KEEP THE DOG ALIVE!!!
()'`; /
/\|` W00f W00f W00f
www.fatdog.eu

User avatar
linicks
Registered user
Registered user
Posts: 126
Joined: Mon Oct 27 2014 - 20:26:01
Location: Pompey, England

Re: Wrong kernel source for 14.1

Postby linicks » Tue Sep 01 2015 - 21:04:35

Kimdino wrote:Hi again folks,

Sorry, still cannot get things to work. Nicks suggestion almost worked


Well, what is needed is the kernel config option:

http://cateee.net/lkddb/web-lkddb/IKCONFIG_PROC.html

If that is in the original build, then just a 'zcat /proc/config.gz > ./.config' will give you the starting point to do an *exact* build from any current kernel source code.

If that is not there, then it's just a guessing game. Can anyone here pester them to add that kernel build option - it was put there *just* for this type of issue.

Nick
https://linicks.net/

Q. What is the difference between a duck and an elephant?
A. You can't get down off an elephant.

User avatar
Kimdino
Registered user
Registered user
Posts: 11
Joined: Wed Aug 12 2015 - 03:50:25
Location: Dorset, UK

[Solved] Wrong kernel source for 14.1

Postby Kimdino » Wed Sep 02 2015 - 15:29:52

Hi again :D ,

Sussed it. I discovered that '3.18.9' is the branch labelled as '3.18.y-rebase' on your github link. I had previously avoided this after seeing '3.18.y' (=3.18.20) as I was staying well away from anything that smacked of extra 'enhancements' (someday I'll get a proper brain).

Then Nicks stuff worked perfectly.

'lirc' is still being a pain to build but that's another story.

Now, is there a way to mark this thread as 'Solved"?

Thanks guys, Kimdino

P.S. Nick, I'm told getting elephants down is easy, it just takes a 458 Winchester Magnum rifle ;).

User avatar
linicks
Registered user
Registered user
Posts: 126
Joined: Mon Oct 27 2014 - 20:26:01
Location: Pompey, England

Re: Wrong kernel source for 14.1

Postby linicks » Sat Sep 05 2015 - 12:59:35

Where did you get the original .config build file from?

Nick
https://linicks.net/

Q. What is the difference between a duck and an elephant?
A. You can't get down off an elephant.

User avatar
Kimdino
Registered user
Registered user
Posts: 11
Joined: Wed Aug 12 2015 - 03:50:25
Location: Dorset, UK

Re: Wrong kernel source for 14.1

Postby Kimdino » Mon Dec 21 2015 - 06:55:26

Hi Nick,
Sorry about my delay in answering but I missed your post & did not see it until I revisited the thread just now.

I used the method exactly as suggested by you above to get the '.config' i.e. 'zcat /proc/config.gz > .config' etc.

Cheers, Kimdino

User avatar
linicks
Registered user
Registered user
Posts: 126
Joined: Mon Oct 27 2014 - 20:26:01
Location: Pompey, England

Re: Wrong kernel source for 14.1

Postby linicks » Mon Dec 21 2015 - 16:33:59

That's strange - none of my Pi's have the /proc/config.gz kernel option file.

Nick :?:
https://linicks.net/

Q. What is the difference between a duck and an elephant?
A. You can't get down off an elephant.

User avatar
Kimdino
Registered user
Registered user
Posts: 11
Joined: Wed Aug 12 2015 - 03:50:25
Location: Dorset, UK

Re: Wrong kernel source for 14.1

Postby Kimdino » Wed Dec 23 2015 - 00:30:31

Hi Nick,

I have one on mine - running 'ls -l /proc/config.gz' gives:-
-r--r--r--r-- 1 root root 25593 (current date & time) /proc/config.gz

Using 'less' show what looks like a valid kernel config file.

This was fresh after a reboot, ( & running 'fsck -y /dev/sda3' to tell the complete truth).

My installation is the stock 'rpi2-slackwarearm-install_13Mar15_fd.img'. However I am in the process of trying to build 'linux-rpi-3.18.y-rebase.zip' (no 'smsc95xx.ko' module file in install :!: ) and used your 'make mrproper, zcat /proc/config.gz > .config, make oldconfig'. However, I cannot see that any of the above should affect it as /proc/ is in RAM and I have since rebooted. Also, I haven't installed anything from any other build.

Don't know what else I can say to help.
Sorry (confused), Kimdino

User avatar
linicks
Registered user
Registered user
Posts: 126
Joined: Mon Oct 27 2014 - 20:26:01
Location: Pompey, England

Re: Wrong kernel source for 14.1

Postby linicks » Wed Dec 23 2015 - 21:31:15

OK, what I mean/meant is that to include the /proc/config.gz file is a specific kernel option to include it - but none of the kernels on my Pi's have it, i.e. that build option wasn't included.

So I don't know where yours came from.

Maybe over Xmas break I will have a look (and dare update one of them to see).

Thanks,

Nick
https://linicks.net/

Q. What is the difference between a duck and an elephant?
A. You can't get down off an elephant.

Return to “SARPi Project - Slackware ARM on a Raspberry Pi”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests