owrjeyz
Posts: 3
Joined: Fri Aug 28, 2015 3:55 pm

Install Gentoo on rpi2 but /usr/src is empty

Fri Aug 28, 2015 4:09 pm

I install gentoo on rpi2 according to Quick_Install_Guide using builded image armv7l, but when I try to install some driver like x11-drivers/xf86-video-omapfb-0.1.1.1_p1" the head of output is :

Code: Select all

* Unable to find kernel sources at /usr/src/linux
 * Please make sure that /usr/src/linux points at your running kernel, 
 * (or the kernel you wish to build against).
 * Alternatively, set the KERNEL_DIR environment variable to the kernel sources location
 * Unable to calculate Linux Kernel version for build, attempting to use running version
 * Checking for suitable kernel configuration options...    
and end up with "Makefile:478: recipe for target 'omapfb-xv-blizzard.lo' failed" so I guess the reason was lack of kernel source?
Can anyone privode any idea? :)
What confuse me most is the reason of lacking kernel source? : (
:P

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

Re: Install Gentoo on rpi2 but /usr/src is empty

Sat Aug 29, 2015 9:14 am

You can get the kernel source from https://github.com/raspberrypi/linux
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

owrjeyz
Posts: 3
Joined: Fri Aug 28, 2015 3:55 pm

Re: Install Gentoo on rpi2 but /usr/src is empty

Sun Aug 30, 2015 5:50 am

Thanks,Must I compile the source myself and replace Installed image? :shock:

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

Re: Install Gentoo on rpi2 but /usr/src is empty

Sun Aug 30, 2015 9:23 am

owrjeyz wrote:Thanks,Must I compile the source myself and replace Installed image? :shock:
https://wiki.gentoo.org/wiki/Raspberry_Pi
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

owrjeyz
Posts: 3
Joined: Fri Aug 28, 2015 3:55 pm

Re: Install Gentoo on rpi2 but /usr/src is empty

Sun Aug 30, 2015 2:08 pm

Yeah,I know the guide :) ,but I am not sure if it's necessary to compile a new kernel rather than get the /usr/src/linux->source for the running kernel :?

jjackowski
Posts: 44
Joined: Thu Jan 10, 2013 5:25 am

Re: Install Gentoo on rpi2 but /usr/src is empty

Mon Sep 07, 2015 11:24 pm

In case anyone else is still reading this thread, I keep seeing this and it has never been a problem. I put Gentoo on a Raspberry Pi maybe a couple years ago, and more recently on a 2B. I do build the kernel, but on another much faster computer. I do not move the kernel source over to the Raspberry Pi, but I do build everything I install on a Raspberry Pi with some help from distcc. These messages about the kernel source do show up regularly, but I keep ignoring them and nothing bad happens that I can attribute to lacking the kernel source.

heder
Posts: 1
Joined: Thu Sep 24, 2015 6:35 am

Re: Install Gentoo on rpi2 but /usr/src is empty

Thu Sep 24, 2015 6:50 am

I has problems compiling omapfb with the same errors. I has the kernel source and everything correct, yet the problem still occured.

I did a manual ebuild of the omapfb package, in the the middle of that process I patched all those
files that could compile. I added #include <xorg-server.h> to all the files that can't compile.

It's a old issue, and how it got back in there is a mistery to me.

Alternativly you could remove the omapfb from the X use flags (portage) when compilin, that should also work

EvadingGrid
Posts: 6
Joined: Thu Mar 17, 2016 1:02 pm

Re: Install Gentoo on rpi2 but /usr/src is empty

Sun May 08, 2016 9:18 am

I solved these issues by :

Using another computer with Git to pull in a pre-compiled Kernel and matching Source Code.
Then copied it all across to the Raspberry.

compiling git on the raspberry caused problems, which is why I did it on another computer.

The omap and other useless drivers problems can be solved by USE=" - video_not_wanted " like so :

USE=" -video_cards_omap -video_cards_omapfb -video_cards_exynos -video_cards_freedreno -video_cards_tegra"

Return to “Gentoo”