4

I would like to know if there is other straight forward way to upgrade Raspberry pi-4 directlly from UBUNTU 20.04 terminal command line.

1) I have read article below: Raspberry Pi 4 Bootloader

Latest release notes: Pi4 bootloader EEPROM release notes

2) And as far I can tell there is no direct way to upgrade "eeprom" firmware directlly ? I would love to be wrong on this...So please prove me wrong on this subject...

3) If I'm not wrong in point(2)..what is the fastest/easiest way to upgrade the firmware..? To use another SD card with RPI OS ?

Thank You so much for helping me in advance...

2

[The reply below applies only to Raspberry Pi 4B models, as i.e. the 3B(+)'s don't have a flashable EEPROM on-board.]

  • A "brief" forewarning: running EEPROM updates can include risks all the way to bricking your Raspberry Pi 4B, therefor I must emphasize that trying out anything mentioned in this reply is DOING SO AT YOUR OWN RISK. ALWAYS MAKE A BACKUP COPY OF YOUR EXISTING SYSTEM BEFORE ATTEMPTING AN EEPROM FLASH UPDATE. Especially a copy of the boot partition, which is quite easy (and small in file size) to backup to another computer by simply copying all files and directories that are inside the boot partition.

  • It is more than recommended that you backup the entire OS by creating an image clone of it - that is, with all partitions and their files etc. included), and then store them on a separate drive for safekeeping and reverting the process, should anything during update go wrong.

As for now (August 2020), the rpi-eeprom-update script that you can download from i.e. GitHub ( see: https://github.com/raspberrypi/rpi-eeprom ) is more or less broken on other distros apart from Raspbian/Raspberry OS (where it is supposed to be either pre-installed, or can be installed with sudo apt install rpi-eeprom-update without any extra hassle). This means that it might be risky to try to run the EEPROM updater from any other OS than the official Raspbian/Raspberry Pi OS's.

And that means that the initial answer to your question is:

Yes, you should run the EEPROM update from Raspberry OS / Raspbian version that is up-to-date -- and from no other OS at this point in time.

Since it's an EEPROM flash update , you should be able to use any installation you've had for Raspbian on the RPi4B -- as long as it's thoroughly updated first! Or, get a separate MicroSD card / USB boot stick for that purpose.

  • I would recommend a MicroSD rather than any USB device that you keep for now for firmware update use only, since the USB boot functionality altogether is still a somewhat work-in-progress, and things can get a bit wonky at times, especially if you're installing cutting-edge updates on the firmware side.

Getting the EEPROM update process started:

  • Boot into a Raspbian/Raspberry Pi OS and make sure it's up-to-date (run sudo apt update , sudo apt upgrade , sudo reboot now .)

  • Then, while still in Raspbian/RPiOS, run sudo rpi-eeprom-update from the Raspbian/RPiOS side and reboot back (to Raspbian/RPiOS).

  • Check the status and version of your EEPROM firmware by running sudo rpi-eeprom-update (with no extra commands) again. If the EEPROM appears to be the latest one, that's good.

  • In any case, read and proceed with the steps ahead (as needed.)

  • If everything now works as it should on the Raspbian/RPiOS side, do a sudo shutdown now, switch in your Ubuntu installation, power on and boot into Ubuntu.

  • When booted into Ubuntu, check the status of your firmware with sudo rpi-eeprom-update (with no command line options after that -- and, assuming you have it installed or available on the Ubuntu side nonetheless, if not, see below.)

  • sudo rpi-eeprom-update (with no added commands) should just list the version details and notify if an update is available that the script can see -- see if the output from that command matches the correct EEPROM firmware version you are trying to install.

If the firmware version doesn't match, or if you don't have the rpi-eeprom-update at all on your Ubuntu -- which wouldn't be a surprise, since Ubuntu for the RPi4B does not come with the rpi-eeprom-update pre-installed, nor can it be installed via apt or any PPA's that I know of as of writing this.

While still in Ubuntu's terminal:

  • Clone the Github repository for rpi-eeprom from https://github.com/raspberrypi/rpi-eeprom with git:

  • If you don't have git installed, first do: sudo apt install git

  • Then: git clone https://github.com/raspberrypi/rpi-eeprom

  • After cloning the Git repository, cd rpi-eeprom into the cloned git repo directory and copy the files from its stable/ -sub-directory into whatever is your firmware .bin file directory according to rpi-eeprom-update (see below.)

As you can see from the sudo rpi-eeprom-update example output below, in my Ubuntu 20.04LTS's case, the directory was: /usr/bin/firmware/stable

That worked for me, and now my Ubuntu 20.04LTS 64-bit on the RPi 4B is showing up the latest stable firmware like this:

BCM2711 detected
Dedicated VL805 EEPROM detected
BOOTLOADER: up-to-date
CURRENT: Fri 31 Jul 2020 01:43:39 PM UTC (1596203019)
 LATEST: Fri 31 Jul 2020 01:43:39 PM UTC (1596203019)
 FW DIR: /usr/bin/firmware/stable
VL805: up-to-date
CURRENT: 000138a1
 LATEST: 000138a1

If it feels like having a separate Raspbian MicroSD card is just extra hassle, keep in mind that a faulty EEPROM update can - in a worst case scenario - brick your Raspberry Pi completely.

Hence, with the rpi-eeprom-update tool being "the way it is", it's recommended to run updates via it only within Raspbian/Raspberry OS and nowhere else.

  • (Running sudo rpi-eeprom-update to list the version number on other distros shouldn't cause any sort of mayhem, but absolutely NO warranties here.)

  • **Do remember to keep your Raspbian/Raspberry OS updated, even (or especially) if you use it just to flash the EEPROM! Always run sudo apt update + sudo apt upgrade and REBOOT [!] BEFORE attempting to run rpi-eeprom-update (in some cases, sudo apt dist-upgrade / sudo apt full-upgrade might come in handy.

  • ALWAYS remember to reboot after running the forementioned set of apt updates + upgrades, otherwise you might not get the right information on your current firmware status or existing configurations and pending updates might overlap and cause havoc.)

If after going through all the steps above you are still unable to see a newer firmware in Ubuntu, try (inside Ubuntu):

  • Go to the directory where you have the rpi-eeprom-update script on your Ubuntu.

  • Edit it with i.e. sudo nano rpi-eeprom-update (or sudo vim if that's your preferred choice of editors.)

  • Find the row that says:

  • FIRMWARE_RELEASE_STATUS=${FIRMWARE_RELEASE_STATUS:-critical}

  • Change the part that says -critical into -stable, save and exit. Make sure you have the EEPROM and the recovery .bin files in the firmware directory inside your Ubuntu!

  • After that, re-run the sudo rpi-eeprom-update script and see what it says. The listing above should be what you get for the latest stable version of the RPi4B EEPROM firmware at the time of writing this (Aug. 18th, 2020) -- there also isn't currently a critical version of the EEPROM at the moment that would have direct USB MSD boot support in it.

  • Think of the stable version as being a nearly-finished, "late-beta" version of the firmware, that is still not yet quite there as for overall reliability. Again, if you run into problems, try to revert to i.e. an older version or try swapping between current versions of stable, beta and critical.

I got that output from my Ubuntu 20.04LTS 64-bit today on the RPi4B after poking around with the EEPROM updater for a while and getting the process finally DONE. * Whew! *

Additional notes:

  • The line above that you can edit in the rpi-eeprom-update script to change i.e. -critical into -stable, or, in other terms; to instruct rpi-eeprom-update on which firmware version to look for.

  • If you want to go really wild somewhere in the future, these instructions apply also to beta versions of the EEPROM firmware - just change the suffix into -beta, and copy the git repository's files accordingly, as explained in the instructions above. Switching to latest betas works by doing all the necessary steps as mentioned there, but with the directory for the firmware binaries (.bin) changed to beta/ instead of it being i.e. stable/ or critical/ .

  • NOTE: firmware beta versions are usually NOT recommended for novice users or in some cases even for the experienced. In fact, only the EEPROM firmware updates marked as "critical" are deemed as being "production-ready" (= safe and stable to use.) All of these warnings are by no means baseless -- if you look at i.e. threads on the Raspberry Pi forums, multiple users have ran their well-working RPi distro builds headlong into a ditch of random OS glitches and miseries alike after flashing in an EEPROM firmware's [unstable] beta version.

  • (See sudo rpi-eeprom-update --help for a list of all command line functionality.)

  • Whenever running sudo rpi-eeprom-update with no command line options, and if it prints out: *** UPDATE AVAILABLE ***, you can always (at least try to) apply the available update by running: sudo rpi-eeprom-update -a (as in, apply available update.) - however, at least in the case of my 20.04LTS build that was of no use within Ubuntu.

  • Equally unsuccessful was my attempt within Ubuntu to do a direct flash with sudo rpi-eeprom-update -a -f <eeprom's_local_filename.bin> after having downloaded the correct firmware binaries from Github. This type of straight flashing with user-defined .bin files are usually intended for special cases (and, again, should only be run inside Raspbian/RPiOS) -- this functionality is useful i.e. if you need to revert back to another firmware version due to instability issues, other bugs and whatnot.

  • I've had best results with rpi-eeprom-update by cloning it from Github whenever there's a new release out, sudo copying the subdirectories ( = stable/ , critical/ , beta/ ) underneath my firmware directory (in this case /usr/bin/firmware/ ) - be sure to be EXTREMELY cautious with that procedure though. I usually check each file against existing ones thoroughly before copying them to the firmware directories.

  • The rpi-eeprom-update and the rpi-eeprom-config scripts I've placed under /bin/ in my Ubuntu so that I can the EEPROM update from any directory, usually just to view what the current situation with the EEPROM version is.

  • A highly suggested URL for bookmarking is: https://github.com/raspberrypi/rpi-eeprom/blob/master/firmware/release-notes.md - all latest changes and new versions of the bootloader EEPROM are listed in there.

  • Should you run into trouble with the EEPROM updater itself or experience hiccups with the new firmware installed, it's recommended (especially when using beta/stable pre-release FW versions) to post the problem and ask for help on the official Raspberry Pi Forums at https://www.raspberrypi.org/forums/ - there is usually a dedicated thread for bug hunting considering betas & pre-release versions, just add that prayer to the prayer mill.

I hope this helped out at least somewhat - feel free to ask for more clarifications and/or comment if necessary.

If any (RPi) developers/code monkeys out there are eyeing this topic, a lot of things in the RPi4B's EEPROM update process could be made a helluva lot easier... and make them work straight on other distros than just Raspberry Foundation's very own "Lada-Linux"'s (= the only tool with them you need is a hammer, but they are rough and bulky as hell. :-D) Just sayin'! Cheers!

5

I did it in an easy way.
However, I have Ubuntu 20.04 64 bit and 2 packages was for Ubuntu 20.10.
Use at your own risk, although it worked fine for me.

curl -O http://ports.ubuntu.com/pool/universe/r/raspberrypi-userland/libraspberrypi0_0~20200520+git2fe4ca3-0ubuntu2_arm64.deb
sudo apt install ./libraspberrypi0_0~20200520+git2fe4ca3-0ubuntu2_arm64.deb 
curl -O http://ports.ubuntu.com/pool/universe/r/raspberrypi-
userland/libraspberrypi-bin_0~20200520+git2fe4ca3-0ubuntu2_arm64.deb 
sudo apt install ./libraspberrypi-bin_0~20200520+git2fe4ca3-0ubuntu2_arm64.deb 
sudo add-apt-repository ppa:waveform/eeprom
sudo apt update
sudo apt install rpi-eeprom -y

You can check for available firmware upgrade:

sudo rpi-eeprom-update

You can upgrade firmware using:

sudo rpi-eeprom-update -a

Then, you need to reboot:

sudo reboot
4
  • This worked for me but I had to use the armhf.deb packages... When it comes to this architecture level of Linux I just zone out. – joey_g216 Nov 2 '20 at 3:29
  • I used Ubuntu 20.04 64 bit . I updated my answer. – jwalker Nov 2 '20 at 12:51
  • Yeah, I'm on 20.04, but if I run dpkg --print-architecture it tells me armhf. It was getting hung up trying to install libc6:arm64... for some reason. But I had libc6:armhf packages installed so that led me down that path. I don't know if I need to use that --add-architecture command or if there's any downside of being on armhf as opposed to arm64. – joey_g216 Nov 2 '20 at 15:07
  • @joey_g216 So you have Ubuntu 20.04 32 bit. The packages in the URLs I mentioned are 64 bit. You need the 32 bit packages. – jwalker Nov 4 '20 at 7:35
1

@ebaruk @joey_g216

Using Ubuntu 20.04, it seems to be able to install rpi-eeprom packages in Ubuntu 20.10(multiverse).

https://packages.ubuntu.com/groovy/rpi-eeprom

Check the dependencies to install rpi-eeprom with dpkg.

apt-cache policy binutils libraspberrypi-bin linux-firmware-raspi2 pciutils python3 flashrom

If "Installed: (none)" packages exist, install them with apt. Only linux-firmware-raspi2 package needs after version 1.20190819.

Download rpi-eeprom .deb package on your browser (or curl/wget), download .deb file link from http://ports.ubuntu.com/pool/multiverse/r/rpi-eeprom/rpi-eeprom_9.0-1ubuntu1_arm64.deb (arm64 case) or http://ports.ubuntu.com/pool/multiverse/r/rpi-eeprom/rpi-eeprom_9.0-1ubuntu1_armhf.deb (armhf case).

On your terminal, execute below to install .deb package :

sudo dpkg -i ~/Downloads/DOWNLOADED_DEB_NAME

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.