[RPI] How to update the kernel and the firmware?

Other operating systems
Post Reply
Administrator
Site Admin
Posts: 81
Joined: 26-Feb-2014, 17:54

[RPI] How to update the kernel and the firmware?

Post by Administrator » 07-Aug-2014, 13:06

We need internet connection and terminal window (or PuTTY).
Use Win32DiskImager to make backup-file of your SD card.

If your Raspberry PI uses small SD-card ( < 4GB) you can get the "out of free space" error. Try to delete temporary files and unused downloaded package files (.deb files) in "/var/cache/apt/archives". You can remove these in order to free up space with
sudo apt-get clean
The official documentation says that there are two steps to upgrading. First, run
sudo apt-get update
in order to synchronise the database of available software packages and the versions available. Next, run
sudo apt-get upgrade
which will cause any packages with newer versions available to be updated.
This can take more than an hour.
Doing this regularly will keep your installation up to date and it will be equivalent to the latest released image.

The kernel and firmware are installed as a Debian package. These packages are updated infrequently.

If you want to try more recent experimental software, it's also easy to update to the latest available version using
sudo rpi-update
and try the latest firmware. A
sudo reboot
is needed now. The firmware update is safe and painless.
Spoiler:
Some earlier releases of Raspbian OS didn't have rpi-update installed by default. So we should install it:
sudo apt-get install rpi-update

To get the Raspbian "metapackage linux kernel" with corresponding linux-headers do the following:
sudo apt-get install linux-image-rpi-rpfv
Edit "/boot/config.txt" file and append at end of this file command to boot new kernel:

Code: Select all

kernel=vmlinuz-3.12-1-rpi
initramfs initrd.img-3.12-1-rpi followkernel
Now you can reboot your Raspberry PI to test the new kernel and check it version with
uname -a
At last you can download Linux headers for your new kernel
sudo apt-get install linux-headers-rpi-rpfv
apt-get install linux-headers-rpi
P.S. Some kernel-builds does not include support for SPI, I2C e.t.c.

Done!
Spoiler:
Useful commands:

Code: Select all

uname -a
find / |grep spi
modprobe spidev
sudo nano /etc/modprobe.d/raspi-blacklist.conf
sudo service ssh start
sudo shutdown -h now

To set the root password:
  sudo passwd root
http://neophob.com/2012/08/raspberry-pi ... pi-device/
http://www.eevblog.com/forum/reviews/ho ... h-headers/

Post Reply