Samstag, 27. Oktober 2012

Installing Bodhi Linux on Raspberry Pi

Bodhi Linux is a Linux Distribution leveraging the fast, customizable, and beautiful Enlightenment Desktop. Enlightenment coupled with a minimal set of utilities such as a browser, text editor, and package management tools form the solid foundation of Bodhi Linux.

This should also work for other distributions like Raspbian, Occidentalis, etc ... which are available as SD-Card image.

First download the Bodhi Linux ARMHF Image from Bodhi Linux


The files are hosted on Sourceforge and are available there: http://sourceforge.net/projects/bodhilinux/files/ARMHF/Pi/

There are also the md5sums and SHA1 checksums available to check your downloaded files, if the download worked correctly.
On any Linux machine there should be the md5sum command available.
For windows user are also programs like winmd5sum available to do this check. If this check was successful, can extract the *.tar.gz file.

Writing the image to Sd-Card 

For windows user there is the tool win32-image-writer available. You can download it from https://launchpad.net/win32-image-writer/+download. Do not try to drag and drop or otherwise copy over the image without using dd or Win32DiskImager – it won’t work. If this explanation doesn' t helped you, there is a beginners guide on http://elinux.org/RPi_Easy_SD_Card_Setup .

For the Linux/*nix Users:
Check your devices directory with
$ ls /dev/sd*
Insert your SD-Card to your sd-card slot on your computer.
Then check again your devices directory, the new device (your SD-card) should now be listed as a new entry in this directory. Your first Harddisk is normally /dev/sda, and /dev/sda1, /dev/sda2 for your partitions.
Your SD-Card should be something like /dev/sdb.

We can easily use the old unix tool dd.

The command needs the parameters InputFile and OutputFile and BlockSize.

dd if=image.img of=/path/to/drive bs=1M

Take care to don't mismatch if and of, or take the wrong device-path.

Then unmount the sd-card and insert it to your Raspberry Pi.

Your Raspberry Pi should boot now with Bodhi.

Check my other Tutoria for First Steps after Install


Montag, 22. Oktober 2012

overclocking Raspberry Pi & config.txt

There are a few settings in the config.txt file available to overclock the Raspberry Pi.


The Standard Settings should be 700MHz ARM CPU, 250MHz Core, 400Mhz SDRAM without overvolting.


 The easiest and fastest way is too use the raspi-config tool to overclock your Board. There is an overclock section, where you can set the maximum frequency for the CPU.


If your board is supporting the highest Turbo Mode, there is a performance improvement up to 50% compared to the 700Mhz. This is not only the
300Mhz+ CPU Speed, but also the faster RAM+25% and Core+100%.

A good and reliable power supply is suggested when you try overclocking. 

The raspi-config tool has 5 overclock presets. It is not guaranteed to work flawless. But it is improving. Try the modest or medium one for some weeks. If there are no problems you can take the next step. I have tested mine, with different Distributions and now it is running in Turbo (=highest) Mode without problems. Temperature in 24/7 mode stays at ~55°C in a Pibow case.
If you choose too high an overclock, your Pi may fail to boot, in which case holding down the shift key during boot up will disable the overclock for that boot, allowing you to select a lower level.

The Raspberry Pi enables dynamically overclocking and overvolting when the CPU is busy. !!!without affecting your warranty!!! If the BCM2835 is getting too hot (85°C) it limits the Turbo mode and the Raspberry Pi is running only in the normal mode. This should only happen, in really hot environments. 

 

config.txt or overclocking by hand

The config.txt file is stored on the first partition on the SD-Card. Your Raspi Linux System mounts the first partition to /boot , then config.txt is stored on /boot/config.txt. It is read by the GPU before the ARM Core is started. It is used to set system configuration parameters like, overscan, overclocking, display_modes, additional licenses for MPG-2/VC-1 codecs, ... 


Common Used parameters:

  • arm_freq Frequency of ARM in MHz. Default 700
  • core_freq Frequency of GPU processor core in MHz. It have an impact on ARM performance since it drives L2 cache. Default 250     
  • sdram_freq Frequency of SDRAM in MHz. Default 400       
  • over_voltage ARM/GPU core voltage adjust. [-16,8] equates to [0.8V,1.4V] with 0.025V steps. force_turbo will allow values higher than 6. Default 0 (1.2V)
  • force_turbo Disables dynamic cpufreq driver and minimum settings below. Enables h264/v3d/isp overclock options. Default 0
  • initial_turbo Enables turbo mode from boot for the given value in seconds (up to 60) or until cpufreq sets a frequency. Can help with sdcard corruption if overclocked. Default 0 
Detailed List is Here for more different Settings like arm_freq_min, core_freq_min or other settings to underclock, higher values or other tweaks.
Be carefull with overriding limits (current and temperature)!!!

Voiding Warranty

You will loose your warranty for your device if you use following settings combined.
(force_turbo || current_limit_override || temp_limit>85) && over_voltage>0

Forcing the Turbo Mode together with OverVoltag will set the Sticky Bit.
OR
Disabling the current limit together with overvoltage will set the Sticky Bit.
OR
Increasing the Templimit over 85°C together with overvoltage will set the Sticky Bit.

Sticky Bit

The Sticky Bit is a bit which is only readable in the CPU and gets set when some dangerous settings are combined. If you send your Raspberry Pi back to your seller because it is broken, they can find out if you have used too dangerous overclock settings. Then there will be no refund. 
You can check your sticky bit with
$ cat /proc/cpuinfo

In the line with revision there should be something like this, which shows which manufacturing revision you are holding in your hand.
Revision    : 0002

If the sticky bit is set it looks like this:
Revision    : 1000002

Checking Temperature and CPU Speed
If you want to know your CPU speed which is at the moment used, you can find out with following commands:
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
700000

pi@raspberrypi ~ $ cat /sys/class/thermal/thermal_zone0/temp
55148


The speed is measured in KHz, and has to be divided by 1000 to get the MHz. The temperature has also to be divided by 1000, to get the temperature in °C, which is in this example 55°C.

To test if the Raspberry Pi is using the CPU_driver when needed open a second SSH shell and type in the first something which needs really much CPU power, like:
$ sudo apt-get update

In the other window check your speed a ten times.
pi@raspberrypi ~ $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1000000

It should sometimes show the overclocked speed when needed. Only if there is Load on the CPU.


http://qdosmsq.dunbar-it.co.uk/blog/2012/09/give-your-raspberry-pi-turbo-mode/
Post from DOM in the Raspberry Pi Forum

Sonntag, 21. Oktober 2012

static IP address on a Raspberry Pi and Debian GNU/Linux

Connect to your Raspberry Pi with SSH

If you don't know your IP address, you can either use the hostname. The ipscanner from my former post should help you finding out the IP address from your Raspberry Pi.

# ssh pi@yourIPaddress
pi@raspberrypi.lan's password: 

pi@raspberrypi ~ $ cd /etc/network
pi@raspberrypi /etc/network $ sudo vi interfaces




The output should look similar like this.

auto lo

iface lo inet loopback
iface eth0 inet dhcp


auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
        wpa-ssid "my-network-ssid"
        wpa-psk "my-wifi-password"




now change the line"iface lo inet loopback" to your demands:

iface eth0 inet static
# your IP Address 
        address 10.0.0.220
your netmask
        netmask 255.255.255.0
 # your router/modem used as your gateway
        gateway 10.0.0.138


Lines starting with `#' are ignored. Note that end-of-line comments are NOT supported, comments must be on a line of their own.

Then make a reboot:

pi@raspberrypi ~ $ sudo reboot

Your Pi should reboot now with the new ip address.


There is a good manual available for the interface.

pi@raspberrypi ~ $ man interfaces


The static Method
       This method may be used to define Ethernet interfaces with statically allocated IPv4 addresses.
 

Options  
  • address address Address (dotted quad/netmask) required
  • netmask mask Netmask (dotted quad or CIDR)  
  • broadcast broadcast_address Broadcast address (dotted quad, + or -). Default value: "+"
  • gateway address - Default gateway (dotted quad)






To-Do after install on Raspberry Pi


First check your IP which your Raspberry Pi has got in your network from your DHCP Server or Router.

Angry IP Scanner (or simply ipscan) is an open-source and cross-platform network scanner designed to be fast and simple to use. It scans IP addresses and ports as well as has many other features.



If you found out your IP address connect with SSH to your Raspberry Pi.

with hostname

# ssh pi@raspberry.lan 
or with ip

# ssh pi@yourIPaddress

Standard Login: 
User:pi Password: raspberry

cave@cave:~> ssh pi@raspberrypi.lan
pi@raspberrypi.lan's password:

Linux raspberrypi 3.2.27+ #160 PREEMPT Mon Sep 17 23:18:42 BST 2012 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

Type 'startx' to launch a graphical session

Last login: Sun Oct 21 15:03:41 2012 from cave.lan
pi@raspberrypi ~ $ 




make an update for your Operating System.
# sudo apt-get update
# sudo apt-get upgrade


then you can run
# sudo raspi-config


Start the update at first. Then change your settings for following points.
  • change_pass - sets the password for your User "pi"
  • expand_rootfs - to grow the second partition and fill the SD-Card
  • keyboard
  • locales
  • timezone
  • memory split - define the amount of RAM CPU and GPU
  • update - update the raspi-config tool. 
  • overclock - sets 5 different overclock settings. With this tool it should not void your warranty. After your system is running without problems, try out some
After that, make a reboot, and connect again with SSH.

Now your system is updated and ready for use. You have also learned how to use the raspi-config tool.

Samstag, 20. Oktober 2012

Install Raspberry Pi images on SD-Card




The Raspberry Pi is supported from several different Linux distributions.
Here is a list of the most available distributions.



Debian


  • Bodhi Linux  - derived from Raspbian featuring the Enlightenment Desktop. Enlightenment is a lightweight Desktop Environment but also nice looking


  • Occidentalis - derived from Raspbian, Hardware-Hacking friendly. Comes with support for SPI, I2C, PWM, kernel Modules...





Arch

Arch Linux ARM is based on Arch Linux, which aims for simplicity and full control to the end user. Note that this distribution may not be suitable for beginners. The latest version of this image uses the hard-float ABI, and boots to a command prompt in around ten seconds.



HTPC

The Raspberry Pi can also be used as a Home Theater PC. The XBMC developers were provided with early Alpha Boards to port XBMC to the Raspberry Pi Board and support the Videocore IV GPU.
  • OpenELEC - Open Embedded Linux Entertainment Center, Image Download, distribution only developed for XBMC. Fast running 
  •  RaspBMC - Raspbmc is a minimal Linux distribution based on Debian that brings XBMC to your Raspberry Pi.

Installation with a Linux/Unix PC

  • Download and check the MD5SUM/SHA256SUM from the image after downloading.
  • put the SD-Card into your computer
  • check your actually mounted partitions with "ls /dev/sd*"
  • run the command "dmesg | tail" to see on witch path your sd-card is available. 
  • now there should be the new device available. check it with "ls /dev/sd*" 
  • One thing worth noting though is that /path/to/drive should not include any partition number. An example path would be something like: /dev/sdb 
  • sudo dd if=image.img of=/path/to/drive bs=1M  DD is a tool which reads data from if(Input File) and writes it to of(Output File). Please take care to not mix up the if & of parameters!!!

Repartitioning

After writing the image file onto the SD-Card there are two partitions on it. The first partiton /dev/sdb1 is a ~65MB FAT32 partition with the bootloader and ELF and config.txt files, etc ... . The second partition is mostly a ext partition with the root filesystem. But this partition is not as big as the SD-Card size. In Raspbian there is the Raspi-config tool, which offers a possibility to resize and grow the partition to use the whole SD-Card.

There are several partitioning tools available. But i mostly use the Program Gparted.
For this tool are 2 specialised LIVE Distros available.
With these tools it is easy to repartition the SD-Card, and grow and resize the second partition.