Circle Device


Techie Stuff


Quick Reference

Will be moved to Quick Reference soon

Raspberry Pi with Gentoo

Installing Gentoo on Raspberry Pi

The installation, most of it is covered very well on the Gentoo Wiki website or here so I will not repeat all that here.

Hardware Configuration

I found some areas on the wiki lacking, mainly on sound configuration. But I also have a 5" touch screen and wanted to use excellerated OpenGL ES 2.0 on my Pi.

Sound Configuration

Firstly, install some utilities so we can check that the device is being detected:

emerge alsa-utils

Then you can modprobe the sound module:

modprobe snd_bcm2835

And check that it was infact loaded:


Now try and change the volume:


Didn't work? no, so what you need to do is provide an option in the /boot/config.txt file to enable it.


Once you do that, and reboot, you should be able to see the volume control in alsamixer.

More information on changing the output to HDMI/analogue is available in the references section

# Turn on Analogue output
amixer cset numid=3 1
# Turn on HDMI output
amixer cset numid=3 2

Touch Screen Configuration

My touch screen is a 5" 800x480 cheap-o from ebay, and if you don't have one I suggest you get one! It is really cool.

# /boot/config.txt
# Video Parameters
hdmi_cvt=800 480 60 6
# Touch Screen Configuration

The following should all be on one line! (not including the #comment, of course). Please see references for some detail on the HDMI options for config.txt.

# /etc/modules
ads7846_device model=7846 cs=1 gpio_pendown=25 speed=1000000 
  keep_vref_on=1 swap_xy=1 pressure_max=255 x_plate_ohms=150 
  x_min=184 x_max=3869 y_min=141 y_max=3959

I am only really worried about mouse input and will be looking into console or raw interaction with the device, if you care about X and whatnot please see the references.

Turning Off Video output

There is a utility for this called tvservice. This will allow you to turn off the HDMI output and change various other properties... the only thing is it is not included... this is simple to fix:

emerge raspberrypi-userland

Once installed you should have some nice tools in /opt/vc/bin to change the power mode use:

# Turn off HDMI output
tvservice -o
# Turn on HDMI output
tvservice --preferred
# See Status
tvservice -s
# As usual, more can be found in the POSIX way
tvservice --help

Cool! you will have a white screen if you have one of the 5" HDMI screens like mine but if you have a soldering iron and some time you can put a transistor in place of that switch and perhaps activate it through one of the free GPIOs?

VC4 Video on Raspberry Pi

More to come...


Quick Links: Techie Stuff | General | Personal | Quick Reference