mszabc
Posts: 8
Joined: Sun Apr 07, 2013 9:27 pm

[rpi2] new kernel installation

Fri Mar 06, 2015 8:33 pm

Hi,
I'm struggling with installation of new kernel on my rpi2 running raspbian. My fresh raspbian image uses kernel in version:

Code: Select all

[email protected] ~ $ uname -r
3.18.7-v7+
I would like to build new kernel with some specific options enabled (e.g I want to use HW events for profiling with perf). For simplicity I'm doing this on rpi2 itself.
I follow these instructions http://www.raspberrypi.org/documentatio ... uilding.md
Essentially it looks like:

Code: Select all

git clone --depth=1 https://github.com/raspberrypi/linux
$ cd linux
$ make bcmrpi_defconfig
$ make menuconfig
$ make
$ make modules
$ sudo make modules_install
$ sudo cp arch/arm/boot/Image /boot/kernel.img
Every step succeeds. I know that kernel in version 3.18.8 was built. After reboot 'uname -r' still shows "3.18.7-v7+" and HW events are still disabled. It looks like new kernel was newer installed, despite the fact that /boot/kernel.img was really replaced, because modification date and size are ok.
Looking forward to get some hints, because I have no idea what is going on.

Thanks, regards
MS

User avatar
DougieLawson
Posts: 35805
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: [rpi2] new kernel installation

Fri Mar 06, 2015 8:45 pm

RPi 2 uses kernel7.img not kernel.img
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

RobHenry
Posts: 452
Joined: Fri Sep 21, 2012 9:04 pm
Location: UK

Re: [rpi2] new kernel installation

Fri Mar 06, 2015 9:21 pm

DougieLawson wrote:RPi 2 uses kernel7.img not kernel.img
Unless kernel7.img is not found, in which case it reverts to kernel.img. Least destructive approach would be to rename kernel7.img to something else so it can be easily restored if necessary.

mszabc
Posts: 8
Joined: Sun Apr 07, 2013 9:27 pm

Re: [rpi2] new kernel installation

Fri Mar 06, 2015 9:29 pm

DougieLawson wrote:RPi 2 uses kernel7.img not kernel.img
Yeah, I though so, but when I replace last listed step with:

Code: Select all

$ sudo cp arch/arm/boot/Image /boot/kernel7.img
board doesn't boot at all.
Is there any other rpi2 specific difference in some previous step?

DirkS
Posts: 9902
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: [rpi2] new kernel installation

Fri Mar 06, 2015 9:38 pm

Is there any other rpi2 specific difference in some previous step?
Yes, the page you link to in your first page has been updated for the Pi2:
RASPBERRY PI 2 DEFAULT BUILD CONFIGURATION

$ cd linux
$ make bcm2709_defconfig

User avatar
eriktheitalian
Posts: 358
Joined: Thu Feb 19, 2015 1:03 pm

Re: [rpi2] new kernel installation

Sat Mar 07, 2015 1:27 am

Kernel image is selectable with config.txt option.
"kernel=selectedkernel.img"

and

Pls compile with bfs cpu scheduler patch. I'm using bfs.(no stability issue) I'm get good desktop gui latency. Lıke better. But i need other users confirmation.
I cant using enough English language. My writings can be wrong grammer.$
"in micro$oft we not trust"

mszabc
Posts: 8
Joined: Sun Apr 07, 2013 9:27 pm

Re: [rpi2] new kernel installation

Sat Mar 07, 2015 10:27 am

DirkS wrote:
Is there any other rpi2 specific difference in some previous step?
Yes, the page you link to in your first page has been updated for the Pi2:
RASPBERRY PI 2 DEFAULT BUILD CONFIGURATION

$ cd linux
$ make bcm2709_defconfig
Now new kernel works fine. Unfortunately for some reason HW counters are still disabled, but this is for another topic.
Thanks!

Return to “Raspbian”