LucidEye
Posts: 78
Joined: Sun Aug 04, 2013 2:20 pm

Tutorial for updating R-Pi firmware in ARCH LINUX

Sun Aug 25, 2013 2:36 am

I had considerable trouble trying to find clear instructions on how to update the Raspberry Pi firmware in ARCH LINUX. Most of the other instructions out there are written for Linux distros other than Arch and the CLIs don't work for Arch. So I decided to help out here and offer some simple instructions for getting your Arch Pi updated to the latest firmware to make sure it's running smoothly :D

Now supposedly the latest firmware is downloaded when you run a system update using "sudo pacman -Syu" , however I can not confirm this as I do not see any references to firmware packages being downloaded and installed while the system update is running... and after running "sudo pacman -Syu" I can run the "rpi-update" utility and see the firmware update... which means that pacman -Syu is NOT updating firmware to the very latest version but is only updating the firmware to the version compiled for whatever latest version of the Arch kernel that pacman -Syu is downloading... at least that's how I understand this is working.

SO, through some trial and error, I have figured out (more or less) how to install the Hexxeh rpi-update utility in Arch so I can manually update the firmware when I want. Keep in mind this may not work for everyone's different configurations of Arch... AND IT MAY BREAK SOME THINGS as you will be installing newer firmware than your Arch kernel is matched with. I did this on a fairly fresh install with most of the "basic" packages recommended in the ARCH Wiki setup guide so it should work for most people. You can find the setup guide here... https://wiki.archlinux.org/index.php/Beginners%27_Guide

Before doing anything, make sure your system clock is set correctly either by manually setting it to the correct time and date in your time zone or by using the NTP app to sync it via your internet connection. This will prevent some possible errors later.

NOTE - the following CLI code assumes you are running as a sudo user and NOT as the root account. If you are doing this directly from the root account (which you really shouldn't be) you can omit the "sudo" preceding each command.

First, make sure you run a system update for Arch. This insures that all your software is up to date and that pacman is looking for the latest repository packages... this helps avoid any "404 not found" errors.

Run system update...

Code: Select all

sudo pacman -Syu
Then install the git core...

Code: Select all

sudo pacman -S git
Then run the following line of code...

Code: Select all

sudo wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
You may see a lot of messages scroll by when you run this code... there may be some errors relating to dependent packages that aren't installed. Scroll back through the text and READ CAREFULLY to see what it's telling you may need to be installed... BUT FIRST... try installing the following 2 packages... they should get the "rpi-update" utility working...

Install ca-certificates...

Code: Select all

sudo pacman -S ca-certificates
Next, install binutils...

Code: Select all

sudo pacman -S binutils
After this the firmware update utility is now installed and you can upgrade the firmware on your Pi any time you want by simply running...

Code: Select all

sudo rpi-update
The update will take some time and you will be asked to reboot when it's finished.
Go ahead and reboot and your Pi will be running with the latest firmware.

Hope this helps some people :)

drirr
Posts: 54
Joined: Sun Sep 09, 2012 8:06 am

Re: Tutorial for updating R-Pi firmware in ARCH LINUX

Sun Aug 25, 2013 7:26 am

Running "pacman -Syu" periodically and you will get the correctly packaged version whenever it's updated. By sidestepping the normal package management you might end up breaking things.

Is there a specific reason to why you don't prefer the arch packaged firmware updates?
Raspberry Pi (rev 000f, 512MB RAM) with heatsinks and a modmypi case running Arch Linux ARM (armv6h) hooked up to a 750GB 2.5" USB-harddrive

LucidEye
Posts: 78
Joined: Sun Aug 04, 2013 2:20 pm

Re: Tutorial for updating R-Pi firmware in ARCH LINUX

Sun Aug 25, 2013 9:39 am

Yes, thank you .. I do believe I did mention that in bold type in my original post. Some people may want the newer firmware without having to wait for the distro update.

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: Tutorial for updating R-Pi firmware in ARCH LINUX

Sun Aug 25, 2013 1:09 pm

You realise rpi-update script doesn't pull binaries direct from source? Like arch someone has to also work upon it to give latest.
Kernel and firmware updates will be available later today, built from latest source

surfatwork
Posts: 62
Joined: Mon May 06, 2013 8:26 am

Re: Tutorial for updating R-Pi firmware in ARCH LINUX

Wed Aug 28, 2013 1:12 pm

OP, with all due respect, I dont think this is a good idea.
The latest linux kernels are usually available on Arch before any other distro. pacman -Syu does update the rpi firmware. So I am not sure why you would want to go down this route - with considerable risk of flat-lining your Arch installation.
At the very least, please update your post to recommend that users back up their arch image < dd if=/dev/mmcblk0 of=<file> bs=1M > on a separate machine before doing this.

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Tutorial for updating R-Pi firmware in ARCH LINUX

Thu Aug 29, 2013 6:57 am

I also would not want to risk picking and choosing what basic arch packages (including the firmware) from git instead of our official alarm repositories.

If someone wants to just update the firmware, that can be done with the latest firmware that is in the official mirrors. I update via dialup so found it too intense to run a complete frequently. But when I was trying to do that, I used pacman to install all the current firmware from our repository, and then updated the other packages. You might have already seen my offline package management page. While my pi does have internet, the connection can crash so I handle package installation using offline techniques, just to make sure I have more control of what is going on. And I agree, no firmware updating without a full system backup as everything could break.

http://sdjf.esmartdesign.com/raspberrypi/pacman.html
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

fgarcia
Posts: 1
Joined: Sat Sep 28, 2013 12:02 pm

Re: Tutorial for updating R-Pi firmware in ARCH LINUX

Sun Jan 05, 2014 3:19 pm

I tried several times the above described steps and the result was no booting at all. The last part of the message is attached.
Thank in advance!
Attachments
ArchFirmwareUpdate.png
Message during booting
ArchFirmwareUpdate.png (37.22 KiB) Viewed 25866 times

User avatar
Hayden_James
Posts: 24
Joined: Thu Dec 19, 2013 10:10 am
Contact: Website

Re: Tutorial for updating R-Pi firmware in ARCH LINUX

Wed Jan 15, 2014 2:15 am

hmm... Why would/should one do this?

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Tutorial for updating R-Pi firmware in ARCH LINUX

Wed Jan 15, 2014 3:50 am

Either for the challenge and experience, or because someone does not want to wait the week or two before updates trickle down to our repository. Might be some feature or bug fix they really want or need and cannot wait for.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

adsicks
Posts: 4
Joined: Fri Apr 04, 2014 6:32 am

Re: Tutorial for updating R-Pi firmware in ARCH LINUX

Sat Apr 12, 2014 5:32 pm

Is there a way to switch back to pacman after using rpi-update? It seems when I first set up my Pi I used the rpi-update utility, but now when I do a:

Code: Select all

pacman -Syu
My firmwares are out of sync and pacman won't let me upgrade because they exist. I have a:

Code: Select all

IgnorePkg=
line in pacman.conf for now, but I think it would be better to get everything from pacman. I guess I was kind of Pi and Arch stupid when I first set this all up. I have experience with Gentoo on Intels.....

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: Tutorial for updating R-Pi firmware in ARCH LINUX

Sat Apr 12, 2014 8:48 pm

Code: Select all

pacman -Sy --force raspberrypi-firmware-bootloader linux-raspberrypi
sync
reboot

adsicks
Posts: 4
Joined: Fri Apr 04, 2014 6:32 am

Re: Tutorial for updating R-Pi firmware in ARCH LINUX

Sun Apr 13, 2014 2:04 am

Thank you. The good old force option...duh.

Return to “Arch”