# Install xf86-video-omapfb-0.1.1.1 on Raspberry Pi

## owrjeyz

Hi,all  :Wink:  I'm just trying install kodi on rpi but emerge failed because of t xf86-video-omapfb-0.1.1.1,

I installed gentoo on rpi according to https://wiki.gentoo.org/wiki/Raspberry_Pi/Quick_Install_Guide the head of the output of emerge is 

 :Shocked:  '''

```
 * Determining the location of the kernel source code

 * 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

 * Unable to check for the following kernel config options due

 * to absence of any configured kernel sources or compiled

 * config:

 *  - INPUT_EVDEV

 * You're on your own to make sure they are set if needed.
```

......

skip

Makefile:478: recipe for target 'omapfb-xv-blizzard.lo' failed

......

'''  :Shocked: 

So I guess the reason is lacking of the kernel source and config file,Am I right? : )  :Rolling Eyes: 

 what confuse me most is why /usr/src is empty and where can i get a copy of it,because reinstall kernel on rpi is much more difficult than simply geting the code and .config ; ) 

Oh right emerge --info output is:

```
!!! Repository 'x-portage' is missing masters attribute in '/usr/local/portage/metadata/layout.conf'

!!! Set 'masters = gentoo' in this file for future compatibility

Portage 2.2.20.1 (python 2.7.9-final-0, default/linux/arm/13.0/armv7a/desktop, gcc-4.8.4, glibc-2.20-r2, 4.0.9-v7+ armv7l)

=================================================================

System uname: Linux-4.0.9-v7+-armv7l-with-gentoo-2.2

KiB Mem:      948252 total,    168176 free

KiB Swap:    1049596 total,   1046216 free

Timestamp of repository gentoo: Wed, 12 Aug 2015 08:30:01 +0000

sh bash 4.3_p33-r2

ld GNU ld (Gentoo 2.24 p1.4) 2.24

app-shells/bash:          4.3_p33-r2::gentoo

dev-java/java-config:     2.2.0::gentoo

dev-lang/perl:            5.20.2::gentoo

dev-lang/python:          2.7.9-r1::gentoo, 3.4.1::gentoo

dev-util/cmake:           2.8.12.2-r1::gentoo

dev-util/pkgconfig:       0.28-r2::gentoo

sys-apps/baselayout:      2.2::gentoo

sys-apps/openrc:          0.17::gentoo

sys-apps/sandbox:         2.6-r1::gentoo

sys-devel/autoconf:       2.69::gentoo

sys-devel/automake:       1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo

sys-devel/binutils:       2.24-r3::gentoo

sys-devel/gcc:            4.8.4::gentoo

sys-devel/gcc-config:     1.7.3::gentoo

sys-devel/libtool:        2.4.6::gentoo

sys-devel/make:           4.1-r1::gentoo

sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)

sys-libs/glibc:           2.20-r2::gentoo

Repositories:

gentoo

    location: /usr/portage

    sync-type: rsync

    sync-uri: rsync://rsync.gentoo.org/gentoo-portage

    priority: -1000

x-portage

    location: /usr/local/portage

    masters: gentoo

    priority: 0

ACCEPT_KEYWORDS="arm"

ACCEPT_LICENSE="* -@EULA"

CBUILD="armv7a-hardfloat-linux-gnueabi"

CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"

CHOST="armv7a-hardfloat-linux-gnueabi"

CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/qmail/alias /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -pipe -march=armv7-a"

FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"

FFLAGS="-O2 -pipe -march=armv7-a"

GENTOO_MIRRORS="ftp://de-mirror.org/gentoo/ ftp://files.gentoo.gr ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.dei.uc.pt/pub/linux/gentoo/ ftp://ftp.df.lth.se/pub/gentoo/ ftp://ftp.fi.muni.cz/pub/linux/gentoo/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ ftp://ftp.gtlib.gatech.edu/pub/gentoo ftp://ftp.halifax.rwth-aachen.de/gentoo/ ftp://ftp.heanet.ie/pub/gentoo/ ftp://ftp.iij.ad.jp/pub/linux/gentoo/ ftp://ftp.jaist.ac.jp/pub/Linux/Gentoo/ ftp://ftp.kaist.ac.kr/gentoo/ ftp://ftp.las.ic.unicamp.br/pub/gentoo/ ftp://ftp.lecl.net/pub/gentoo/ ftp://ftp.linux.org.tr/gentoo/ ftp://ftp.mirrorservice.org/sites/distfiles.gentoo.org/ ftp://ftp.ntua.gr/pub/linux/gentoo/ ftp://ftp.rnl.tecnico.ulisboa.pt/pub/gentoo/gentoo-distfiles/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ ftp://ftp.swin.edu.au/gentoo ftp://ftp.twaren.net/Linux/Gentoo/ ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.vectranet.pl/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://gentoo.bloodhost.ru/ ftp://gentoo.c3sl.ufpr.br/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.imj.fr/pub/gentoo/ ftp://gentoo.kiev.ua/ ftp://gentoo.mirror.dkm.cz/pub/gentoo/ ftp://gentoo.mirror.web4u.cz/ ftp://gentoo.mirrors.ovh.net/gentoo-distfiles/ ftp://gentoo.mirrors.pair.com/ ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ ftp://gentoo.wheel.sk/pub/linux/gentoo/ ftp://lug.mtu.edu/gentoo/ ftp://mirror.bytemark.co.uk/gentoo/ ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://mirror.isoc.org.il/gentoo/ ftp://mirror.leaseweb.com/gentoo/ ftp://mirror.mdfnet.se/gentoo ftp://mirror.neolabs.kz/gentoo/pub ftp://mirror.netcologne.de/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/ ftp://mirror.yandex.ru/gentoo-distfiles/ ftp://mirrors.linuxant.fr/distfiles.gentoo.org/ ftp://mirrors.rit.edu/gentoo/ ftp://mirrors.tera-byte.com/pub/gentoo ftp://mirrors.xmu.edu.cn/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://trumpetti.atm.tut.fi/gentoo/ ftp://tux.rainside.sk/gentoo/ ftp://xeon.gentoo.ru/mirrors/gentoo/distfiles/ http://de-mirror.org/gentoo/ http://files.gentoo.gr http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://ftp.daum.net/gentoo/ http://ftp.dei.uc.pt/pub/linux/gentoo/ http://ftp.df.lth.se/pub/gentoo/ http://ftp.fi.muni.cz/pub/linux/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.heanet.ie/pub/gentoo/ http://ftp.iij.ad.jp/pub/linux/gentoo/ http://ftp.jaist.ac.jp/pub/Linux/Gentoo/ http://ftp.kaist.ac.kr/pub/gentoo/ http://ftp.lecl.net/pub/gentoo/ http://ftp.linux.org.tr/gentoo/ http://ftp.ntua.gr/pub/linux/gentoo/ http://ftp.rnl.tecnico.ulisboa.pt/pub/gentoo/gentoo-distfiles/ http://ftp.romnet.org/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp.swin.edu.au/gentoo http://ftp.twaren.net/Linux/Gentoo/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp.vectranet.pl/gentoo/ http://gd.tuwien.ac.at/opsys/linux/gentoo/ http://gentoo-euetib.upc.es/mirror/gentoo/ http://gentoo.aditsu.net:8000/ http://gentoo.bloodhost.ru/ http://gentoo.c3sl.ufpr.br/ http://gentoo.cites.uiuc.edu/pub/gentoo/ http://gentoo.cs.uni.edu/ http://gentoo.gossamerhost.com http://gentoo.iteam.net.ua/ http://gentoo.kiev.ua/ftp/ http://gentoo.mirror.dkm.cz/pub/gentoo/ http://gentoo.mirror.pw.edu.pl/ http://gentoo.mirror.web4u.cz/ http://gentoo.mirrors.easynews.com/linux/gentoo/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/ http://gentoo.mirrors.pair.com/ http://gentoo.mirrors.tds.net/gentoo http://gentoo.mirrors.tera-byte.com/ http://gentoo.modulix.net/gentoo/ http://gentoo.netnitco.net http://gentoo.osuosl.org/ http://gentoo.prz.rzeszow.pl http://gentoo.supp.name/ http://gentoo.wheel.sk/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://lug.mtu.edu/gentoo/ http://mirror.bytemark.co.uk/gentoo/ http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://mirror.iawnet.sandia.gov/gentoo/ http://mirror.isoc.org.il/pub/gentoo/ http://mirror.leaseweb.com/gentoo/ http://mirror.lug.udel.edu/pub/gentoo/ http://mirror.mdfnet.se/gentoo http://mirror.neolabs.kz/gentoo/pub http://mirror.netcologne.de/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ http://mirror.switch.ch/ftp/mirror/gentoo/ http://mirror.usu.edu/mirrors/gentoo/ http://mirror.yandex.ru/gentoo-distfiles/ http://mirrors.163.com/gentoo/ http://mirrors.linuxant.fr/distfiles.gentoo.org/ http://mirrors.rit.edu/gentoo/ http://mirrors.telepoint.bg/gentoo/ http://mirrors.xmu.edu.cn/gentoo http://mirrors.xservers.ro/gentoo/ http://trumpetti.atm.tut.fi/gentoo/ http://tux.rainside.sk/gentoo/ http://www.gtlib.gatech.edu/pub/gentoo http://www.las.ic.unicamp.br/pub/gentoo/ http://www.mirrorservice.org/sites/distfiles.gentoo.org/ rsync://de-mirror.org/gentoo/ rsync://ftp-stud.hs-esslingen.de/gentoo/ rsync://ftp.df.lth.se/pub/gentoo/ rsync://ftp.fi.muni.cz/pub/linux/gentoo/ rsync://ftp.halifax.rwth-aachen.de/gentoo/ rsync://ftp.heanet.ie/pub/gentoo/ rsync://ftp.iij.ad.jp/pub/linux/gentoo/ rsync://ftp.jaist.ac.jp/pub/Linux/Gentoo/ rsync://ftp.linux.org.tr/gentoo-distfiles/ rsync://ftp.rnl.tecnico.ulisboa.pt/pub/gentoo/gentoo-distfiles/ rsync://ftp.snt.utwente.nl/gentoo rsync://ftp.vectranet.pl/gentoo/ rsync://ftp6.linux.cz/pub/linux/gentoo/ rsync://gentoo.bloodhost.ru/gentoo-distfiles rsync://gentoo.c3sl.ufpr.br/gentoo/ rsync://gentoo.cs.uni.edu/gentoo-distfiles rsync://gentoo.gossamerhost.com/gentoo-distfiles/ rsync://gentoo.kiev.ua/gentoo-distfiles rsync://gentoo.mirror.dkm.cz/gentoo/ rsync://gentoo.prz.rzeszow.pl/gentoo rsync://mirror.bytemark.co.uk/gentoo/ rsync://mirror.leaseweb.com/gentoo/ rsync://mirror.neolabs.kz/gentoo rsync://mirror.netcologne.de/gentoo/ rsync://mirrors.rit.edu/gentoo/ rsync://mirrors.tera-byte.com/gentoo rsync://mirrors.xmu.edu.cn/gentoo/ rsync://rsync.gtlib.gatech.edu/gentoo rsync://rsync.mirrorservice.org/distfiles.gentoo.org/ rsync://trumpetti.atm.tut.fi/gentoo/"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

USE="X a52 aac acl acpi alsa arm armv5te armv6 armv6t2 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jpeg lcms ldap libnotify mad mng modules mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support qt4 readline sdl session spell ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets xcb xml xv xvid zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap omapfb dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
```

-------------------------------------------------------------------I'm dividing line----------------------------------------------------------------------------

If you have any idea about this please tell me,I'll appreciate it  :Razz: 

----------

## Leio

xf86-video-omapfb has no business being on a RPi - there is no OMAP in raspberry. You'd want xf86-video-fbdev or preferably xf86-video-fbturbo (from an overlay still afaik), but omapfb would do no good for you anyways. It probably wants some omap specific system headers, which you don't have, or some such.

RPi has a broadcom chip with their own VideoCore4 GPU or whatnot inside the SoC. To drive that in 2D, you'd want mentioned xf86-video-fbdev for starters for X, and fbturbo later for optimizations (or immediately once easily accessible or don't mind getting it from the start) - those optimization are mostly targeted at ARM specific of framebuffer usage, like making use of NEON and such, but I believe there are some raspberry specific DMA things in there to speed things a bit further. For 3D you want raspberrypi-userland (main tree might be severely outdated for the snapshot version) or the new mesa VC4 driver. I hear arm official overlay might have something these days for the latter, and possibly also the former.

Not sure if this is still an issue, some random search found this month old post. I monitor alternative architectures category for raspberry specific posts to help out with, not kernel one - and xf86-video-omapfb has little to do with kernel.

But in short - go over your VIDEO_CARDS variable in make.conf to tune what gets pulled in by xorg-drivers meta package, and it should probably be VIDEO_CARDS="fbdev" on RPi, with later xf86-video-fbturbo package added manually (or maybe in VIDEO_CARDS once things get integrated nicely in main tree).

----------

## EvadingGrid

Solution : apply a patch

"0007-always_include_xorg_server.h.patch"

Bug 549264 

https://bugs.gentoo.org/show_bug.cgi?id=549264

----------

## Leio

The solution is to not build omapfb for a platform that isn't OMAP and has no use for it, as said above. But yes, if you actually have an OMAP based board, not rpi, then the patch is useful to get a more optimized driver (if it's better than fbturbo, modesetting or some such at all).

----------

## EvadingGrid

 *Leio wrote:*   

> The solution is to not build omapfb for a platform that isn't OMAP and has no use for it, as said above. But yes, if you actually have an OMAP based board, not rpi, then the patch is useful to get a more optimized driver (if it's better than fbturbo, modesetting or some such at all).

 

I totally agree . . . 

The problem is that if you do it by the book VIDEO_CARDS="correct_one" That it will still insist on "omap"

USE="-omap" will not work, because it is not a USE Flag.

If some body could post a more elegant solution, I would be most grateful.

----------

## Leio

Set VIDEO_CARDS in make.conf. That's how USE_EXPAND flags work.

So for raspberry you might want this in your make.conf alongside your USE flags:

VIDEO_CARDS="fbdev"

profiles/desc/video_cards.desc has the options.

It actually also expands to USE flags like video_cards_*, so -video_cards_omapfb or something in USE will disable it, but that's not how they are meant to be used - just set VIDEO_CARDS var like USE, but those aren't cumulative like USE are, so just setting it should override omapfb without negative entries.

The USE flag expand can be useful for e.g python flags (python_single_target_python2_7 and such) for per-package setting - thoguh it also has a syntax to handle it as a USE_EXPAND variable, but that syntax is a bit underdocumented and less official, so I use the expanded USE flag names to tweak what python supports I have per-package. But VIDEO_CARDS is a global thing, no need to mess with it there, just set in make.conf

Though you are saying it isn't disabling it like this? My experience was different when set in make.conf and I don't have any omapfb business going on

----------

## NeddySeagoon

owrjeyz,

```
VIDEO_CARDS="exynos fbdev omap omapfb dummy v4l"
```

includes drivers you have no use for.

VIDEO_CARDS="fbdev"  should be enough, Xorg might prefer modesetting over fbdev but neither provide any hardware acceleration at all, so meanwhile, there are no performance advantages.

----------

## EvadingGrid

VIDEO_CARDS="fbdev" 

While in theory that should not pull in omap, I can assure readers it most certainly is pulling it in as a dependency.

Next time I do it, I will try the USE="-video_cards_omapfb" and see if that fixes it.

----------

## NeddySeagoon

EvadingGrid,

Add -t and -v to your emerge command so we can see whats pulling it in and why.

DOn't run the emerge we just want the indented package list with the USE flag settings.

Wild guess .. its not something you have in /etc/portage/package.use is it? 

The contents of that file/dir will override make.cont on a per package basis.

----------

## EvadingGrid

/usr/portage/profiles/arch/arm/make.defaults

# Main ARM profile

ARCH="arm"

ACCEPT_KEYWORDS="arm"

CHOST="arm-unknown-linux-gnu"

CFLAGS="-O2"

CXXFLAGS="${CFLAGS}"

FFLAGS="${CFLAGS}"

FCFLAGS="${CFLAGS}"

MULTILIB_ABIS="arm"

DEFAULT_ABI="arm"

ABI=${DEFAULT_ABI}

LIBDIR_arm="lib"

CHOST_arm="${CHOST}"

# 2006/08/18 - Donnie Berkholz <dberkholz@gentoo.org>

# Defaults for video drivers

VIDEO_CARDS="exynos fbdev omap omapfb"

----------

## Yamakuzure

 *EvadingGrid wrote:*   

> /usr/portage/profiles/arch/arm/make.defaults

 Yes. There are more ARM platforms out there than the Raspberry PI...

Take a look here if you like:

https://dri.freedesktop.org/wiki/VC4/

----------

## EvadingGrid

One thought I had, was that after the Stage-3 went on - I did eselect set profile desktop

I wonder, if I had just before doing the profile switch, point set VIDEO_CARDS="fbdev" -  if that would have made any difference.

Anyway, if somebody wanted omap, that does not circumvent the fact that it aint gonna compile until a dev adds the extra patch to the e-build.

----------

