Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Custom Gentoo Raspberry Pi Dev Image with Tools
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
ocbMaurice
Tux's lil' helper
Tux's lil' helper


Joined: 14 Feb 2003
Posts: 90
Location: Switzerland

PostPosted: Tue Dec 03, 2013 1:56 am    Post subject: Custom Gentoo Raspberry Pi Dev Image with Tools Reply with quote

Hi everybody

Since a few weeks I'm a proud owner of a Raspberry Pi rev B and of course I had to put my favourite linux distro on to it. The basic installation went quite easy. But I also wanted to use the available libraries for the Raspberry PI and this turned out to be problematic. For that reason I decided to compile a base image, once everything was working ok for me. In the hope others may find this also usefull, I decided to publish it. I'm also planning to add some hands on examples for some of the Adafruit Breakout Boards. You can download it through a torrent client via this magnetized link (hope it's ok to post this):

magnet:?xt=urn:btih:696DDDAB0237EEB1659C03B8EDF18951C0E880B2&dn=gentoo-raspberry-031213.img.xz&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce

What does it provide

This image should give you a working gentoo environment for Raspberry Pi development in Python or Perl (or any other language). It will save you quite a lot of compile time and includes most needed utils for Raspberry Pi development (like i2c-tools). It contains some yet unique patches to run under Python 3 (most Python software for the Raspberry Pi seems to be only available for Python 2). You can think of it like a customized stage-3 install specific for the Raspberry Pi.

What is the root passord

The root password is "pi" (without quotes).

Additional base utils

- sys-apps/hdparm-9.39
- dev-util/strace-4.7
- app-misc/screen-4.0.3-r6
- app-editors/nano-2.3.2
- app-editors/vim-7.3.762
- sys-fs/squashmount-4.0
- sys-fs/unionfs-fuse-0.26
- app-portage/layman-2.0.0
- sys-apps/usbutils-006-r1
- sys-apps/i2c-tools-3.1.0-r1
- sys-power/cpufrequtils-008-r4
- app-portage/g-cpan-0.16.4-r1
- app-portage/gentoolkit-0.3.0.8-r2

Additional system services

- sys-devel/distcc-3.1-r9
- net-misc/ntp-4.2.6_p5-r7
- app-admin/syslog-ng-3.4.2 *
- sys-process/vixie-cron-4.1-r14 *
* not enabled, just installed

Sepcific Packages for Raspberry Pi

- sys-kernel/raspberrypi-sources-3.6.11-r20130711
- media-libs/raspberrypi-userland-0_pre20130705
- sci-astronomy/astrometry-0.45
- dev-perl/HiPi-0.33

Other presets

- Layman overlay zugaina and mv have been added
- Crosscompilation via distcc has been prepared
- Portage, src and db have been squashed (for size)
- Adafruit Raspberry Pi Python Code under /root/Adafruit
- I2C Modules are automatically loaded on boot

Local Overlay ebuilds

- dev-perl/HiPi-0.33 patched to build via portage
- sys-apps/i2c-tools-3.1.0 patched to build python3 smbus module
- sci-astronomy/astrometry-0.45 patched to build via portage/python3

I tried my best to create these patches (many only build related), but these are to be considered experimental. Although it worked without any issue so far for me. If you find a problematic python code, try to run it with python2 or convert it via "2to3 -w --no-diff".

How to use it

Once you downloaded the image you need to extract it (I packed it with xz for best size). There are also windows command line tools available. Once extracted you simply have to flash it on an SDCard. The image is about 3.8GB, so a 4GB card will be ok. You may want to resize the partition to fill the whole SDCard (ask google). I use virtualbox and a usb cardreader to write the image directly to the card via dd. IMO it should work as with all other Raspberry Pi Images. The rest should be clear: put it into your Raspberry Pi and boot it up.

Example with various i2c breakouts connected
Code:
raspberry ~ # i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --

Example for Adafruit PWM Servo Driver (PCA9685)
Code:
cd /root/Adafruit
./upgrade-to-python3.sh
cd Raspberry-Pi-Python-Code/Adafruit_PWM_Servo_Driver
python Servo_Example.py

Example for Astrometry
Code:
cd /var/lib/astrometry/
./get-index-4100.sh
cd /usr/share/doc/astrometry-0.45/examples
solve-field --scale-low 10 apod4.jpg

Last words

First, be aware that there is no graphical user interface. Console only. This is the first version of the image and I'll try to update it when I find new interesting stuff to include (suggestions welcome). It could probably need some more documentation, but I just thought I'd put it out there. My personal project is about motorizing a telescope, that's why I also included Astrometry. It's used to give you information about any excerpt (picture) of the sky you throw at it.

I'm sorry if the image contains errors or other nonsense, I tried my best to make this a robust "release". And I hope the download is working, I'm seeding with my gentoo server and transmission-daemon.

Best wishes and good luck
Maurice
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Tue Dec 03, 2013 2:22 am    Post subject: Reply with quote

Moved from Unsupported Software to Gentoo on Alternative Architectures. :wink:

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum