Page 1 of 10

Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 12:53 pm
by asb
If you're running an older version of the Raspbian images from the Foundation download page, this guides you how you can make modifications to match the latest release.

Updating firmware

You can get all the benefits from the latest firmware from a

Code: Select all

sudo apt-get update && sudo apt-get install raspberrypi* raspi-config
, but there are a few other tweaks in the default setup that you might want to try. This is faster and more direct than sudo apt-get update && sudo apt-get upgrade, but of course you won't get updates to other packages. You can now play with the overclock presets via `sudo raspi-config`. You might also want to

Code: Select all

sudo apt-get install smartsim penguinspuzzle
Improving WiFi config

For better out of the box wireless config, first upgrade the firmware as described above and then:
* sudo apt-get install wpagui
* add the following to /etc/network/interfaces (edit with e.g. sudo nano
/etc/network/interfaces)

Code: Select all

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
* Now create /etc/wpa_supplicant/wpa_supplicant.conf with the following
contents:

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
* `sudo chmod 600 /etc/wpa_supplicant/wpa_supplicant.conf`
* sudo adduser pi netdev
* A final tweak you might like is to edit
/lib/udev/rules.d/75-persistent-net-generator.rules and disable persistent
renaming of wlan interfaces by changing:

Code: Select all

# device name whitelist
KERNEL!="eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end"
to:

Code: Select all

# device name whitelist
KERNEL!="ath*|msh*|ra*|sta*|ctc*|lcs*|hsi*", \
          GOTO="persistent_net_generator_end"
* Create a desktop icon for wpa_gui with `cp /usr/share/applications/wpa_gui.desktop ~/Desktop`

Misc minor tweaks
Another minor bug fix, edit /etc/fstab to set the pass field for / and /boot,
so fsck will not be skipped when forced. New fstab looks like:

Code: Select all

proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, so no using swapon|off from here on, use  dphys-swapfile swap[on|off]  for that
If you were using the 'boot straight to desktop' setting in raspi-config (or otherwise logging in via lightdm) you may have noticed the PATH doesn't get set to its usual value. This is because /etc/profile and ~/.profile aren't sourced when lightm logs you in. Fix this by creating
/etc/X11/Xsession.d/75source-profile with contents:

Code: Select all

    [ -f /etc/profile ] && . /etc/profile
    [ -f "$HOME/.profile" ] && . "$HOME/.profile"

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 1:09 pm
by Tozzi
How can this be implemented for us running another image then wheezy? ie xbian, openelec, raspbmc etc.

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 1:12 pm
by dom
Tozzi wrote:How can this be implemented for us running another image then wheezy? ie xbian, openelec, raspbmc etc.
I guess you wait for Sam/Stephan to release a new image that supports it.

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 1:15 pm
by Coxeroni
But with xbian you can also update the firmware with the commands above, or am I wrong?

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 1:16 pm
by asb
Coxeroni wrote:But with xbian you can also update the firmware with the commands above, or am I wrong?
If XBian is derived from the Raspbian images on our download page then yes, that should be possible. You'd be best off asking the Xbian creator for support on this though.

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 1:22 pm
by dom
dom wrote:
Tozzi wrote:How can this be implemented for us running another image then wheezy? ie xbian, openelec, raspbmc etc.
I guess you wait for Sam/Stephan to release a new image that supports it.
http://forum.stmlabs.com/showthread.php?tid=2868
"In RC5"

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 1:23 pm
by Norefall
This is just awesome!
What does the audio update do, and do I get it by just doing apt-get update/upgrade?

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 1:25 pm
by asb
Norefall wrote:This is just awesome!
What does the audio update do, and do I get it by just doing apt-get update/upgrade?
We all have Dom to thank for the audio improvements (better quality output through the analog jack). Yes, just upgrade your firmware and you will have it.

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 1:30 pm
by dom
Norefall wrote:This is just awesome!
What does the audio update do, and do I get it by just doing apt-get update/upgrade?
Read here for the details of the audio fix:
http://www.raspberrypi.org/phpBB3/viewt ... 38&t=10538

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 1:46 pm
by nommo
pi@raspberrypi ~/get_iplayer $ sudo apt-get update && sudo apt-get install raspberrypi* raspi-config
Hit http://archive.raspberrypi.org wheezy InRelease
Hit http://mirrordirector.raspbian.org wheezy InRelease
Hit http://archive.raspberrypi.org wheezy/main armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/main armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/contrib armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/non-free armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/rpi armhf Packages
Ign http://archive.raspberrypi.org wheezy/main Translation-en_GB
Ign http://archive.raspberrypi.org wheezy/main Translation-en
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'raspberrypi-artwork' for regex 'raspberrypi*'
Note, selecting 'libraspberrypi0' for regex 'raspberrypi*'
Note, selecting 'raspberrypi-bootloader' for regex 'raspberrypi*'
Note, selecting 'libraspberrypi-bin' for regex 'raspberrypi*'
Note, selecting 'libraspberrypi-dev' for regex 'raspberrypi*'
Note, selecting 'libraspberrypi-doc' for regex 'raspberrypi*'
libraspberrypi-bin is already the newest version.
libraspberrypi-dev is already the newest version.
libraspberrypi-doc is already the newest version.
libraspberrypi0 is already the newest version.
raspberrypi-artwork is already the newest version.
raspberrypi-bootloader is already the newest version.
The following extra packages will be installed:
triggerhappy
The following NEW packages will be installed:
triggerhappy
The following packages will be upgraded:
raspi-config
1 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 37.3 kB of archives.
After this operation, 133 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main triggerhappy armhf 0.3.4-2 [31.2 kB]
Get:2 http://archive.raspberrypi.org/debian/ wheezy/main raspi-config all 20120918 [6,092 B]
Fetched 37.3 kB in 0s (45.3 kB/s)
Selecting previously unselected package triggerhappy.
(Reading database ... 60848 files and directories currently installed.)
Unpacking triggerhappy (from .../triggerhappy_0.3.4-2_armhf.deb) ...
Preparing to replace raspi-config 20120815 (using .../raspi-config_20120918_all.deb) ...
Unpacking replacement raspi-config ...
Processing triggers for man-db ...
Setting up triggerhappy (0.3.4-2) ...
Error opening '/dev/input/event*': No such file or directory
Setting up raspi-config (20120918) ...
Should I be worried about "Error opening '/dev/input/event*': No such file or directory" ??

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 1:47 pm
by asb
nommo wrote: Should I be worried about "Error opening '/dev/input/event*': No such file or directory" ??
I guess you're running headless?

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 1:50 pm
by RazorJack
I have a problem.
I'm using some minimal image from the raspbian site, based on wheezy.
apt-get update and upgrade finish ok, but when i try:
apt-get install raspberrypi* raspi-config
it sais:
Reading state information... Done
E: Unable to locate package raspberrypi*
E: Couldn't find any package by regex 'raspberrypi*'
E: Unable to locate package raspi-config

what to do to enable the dynamic overclocking?

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 1:51 pm
by meltwater
Is there a way to see the current CPU speeds etc, and the core temperatures?
That would be very useful.

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 1:54 pm
by RaTTuS
/opt/vc/bin/vcgencmd measure_temp
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 1:55 pm
by asb
RazorJack wrote:I have a problem.
I'm using some minimal image from the raspbian site, based on wheezy.
apt-get update and upgrade finish ok, but when i try:
apt-get install raspberrypi* raspi-config
it sais:
Reading state information... Done
E: Unable to locate package raspberrypi*
E: Couldn't find any package by regex 'raspberrypi*'
E: Unable to locate package raspi-config

what to do to enable the dynamic overclocking?
I guess they're not using our deb packages from archive.raspberrypi.org. You could either try to install those debs (so add "deb http://archive.raspberrypi.org/debian/ wheezy main" to your /etc/apt/sources.list), or you could update firmware using rpi-update and then install raspi-config http://archive.raspberrypi.org/debian/p ... 18_all.deb with dpkg -i.

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 1:56 pm
by RaTTuS
what are the default overclock options

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 2:01 pm
by asb
RaTTuS wrote:what are the default overclock options
No overclock is enabled out of the box. The default clocks are documented here http://elinux.org/RPi_config.txt#Overcl ... figuration

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 2:07 pm
by nommo
asb wrote:I guess you're running headless?
Yes :) So it's something to do with displays? (I did try to google/search first ;))

Cheers

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 2:09 pm
by asb
nommo wrote:
asb wrote:I guess you're running headless?
Yes :) So it's something to do with displays? (I did try to google/search first ;))

Cheers
Well I guess I'm misusing the term headless (though to be headless normally implies you don't have a keyboard and mouse connected either :)). Anyway, it's just because you have no keyboard and mouse and so the /dev/input/event* device nodes don't exist. It's harmless.

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 2:12 pm
by dom
RaTTuS wrote:/opt/vc/bin/vcgencmd measure_temp
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

Code: Select all

cat /sys/class/thermal/thermal_zone0/temp
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
is a better way. Temperature is in milli-degrees C. Freq in kHz.

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 2:17 pm
by RaTTuS
asb wrote:
RaTTuS wrote:what are the default overclock options
No overclock is enabled out of the box. The default clocks are documented here http://elinux.org/RPi_config.txt#Overcl ... figuration
I was asking about :-
You can now choose from one of five overclock presets in raspi-config, the highest of which runs the ARM at 1GHz. The level of stable overclock you can achieve will depend on your specific Pi and on the quality of your power supply; we suggest that Quake 3 is a good stress test for checking if a particular level is completely stable. 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.
as I dont seem to have any overclock mentioned in my raspi-config

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 2:18 pm
by RazorJack
asb wrote: I guess they're not using our deb packages from archive.raspberrypi.org. You could either try to install those debs (so add "deb http://archive.raspberrypi.org/debian/ wheezy main" to your /etc/apt/sources.list), or you could update firmware using rpi-update and then install raspi-config http://archive.raspberrypi.org/debian/p ... 18_all.deb with dpkg -i.
thanks, that seems to work. i added the line to sources.list and i was able to install raspi-config.
is there a way to verify that the dynamic overclocking actually works?
cat /proc/cpuinfo shows the CPU is still at 700 mhz ...

Is there a way to monitor the CPU speed in real time? (from the console i mean)

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 2:31 pm
by smonkey
RazorJack wrote:
asb wrote: I guess they're not using our deb packages from archive.raspberrypi.org. You could either try to install those debs (so add "deb http://archive.raspberrypi.org/debian/ wheezy main" to your /etc/apt/sources.list), or you could update firmware using rpi-update and then install raspi-config http://archive.raspberrypi.org/debian/p ... 18_all.deb with dpkg -i.
thanks, that seems to work. i added the line to sources.list and i was able to install raspi-config.
is there a way to verify that the dynamic overclocking actually works?
cat /proc/cpuinfo shows the CPU is still at 700 mhz ...

Is there a way to monitor the CPU speed in real time? (from the console i mean)
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 2:41 pm
by SSilver2k2
This is really awesome news. So much stuff to test and report back on!!

Re: Updating to the 2012-09-18-wheezy-raspbian image

Posted: Wed Sep 19, 2012 2:57 pm
by meltwater
smonkey wrote:
RazorJack wrote:
asb wrote: I guess they're not using our deb packages from archive.raspberrypi.org. You could either try to install those debs (so add "deb http://archive.raspberrypi.org/debian/ wheezy main" to your /etc/apt/sources.list), or you could update firmware using rpi-update and then install raspi-config http://archive.raspberrypi.org/debian/p ... 18_all.deb with dpkg -i.
thanks, that seems to work. i added the line to sources.list and i was able to install raspi-config.
is there a way to verify that the dynamic overclocking actually works?
cat /proc/cpuinfo shows the CPU is still at 700 mhz ...

Is there a way to monitor the CPU speed in real time? (from the console i mean)
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
Thanks for the commands, I've added them to my startup scripts since very useful to keep an eye on.

The CPU reports 700000 (700MHz) most the time, but it did report 1000000 (1GHz) one of the times, so I guess it is working. What is the logic on the speed, is it demand and the temperature? If so what is the temperature limit (I got just under 50degC on one of the 1GHz points)?