Raspberry Pi-4 firmware upgrade (eeprom), over UBUNTU 20.04

ebaruk

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...

WhatOnEarthOrOutsideIt

[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!

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

stop booting ubuntu 20.04 on a raspberry pi 4 from SSD after upgrade

From Dev

XRDP from Windows 10 to Ubuntu Mate 20 (Raspberry PI 4) - Error: Could not acquire name on session bus

From Dev

upgrade opencv on raspberry pi

From Dev

Testing bcache with raspberry pi 4 on ubuntu

From Dev

Can you install Ubuntu on the Raspberry Pi 4

From Dev

Connect raspberry pi 4 with ubuntu server to wifi

From Dev

KVM Bridge on Ubuntu 20.04 on Raspberry Pi 4

From Dev

HC - SR04 raspberry pi

From Dev

Problem with wireless networking for ubuntu server on a Raspberry pi 4

From Dev

Setup ubuntu server on Raspberry Pi 4 without keyboard

From Dev

Raspberry Pi 4 Ubuntu 19.10 cannot enable cgroup memory at boostrap

From Dev

wlan0 does not appear in Ubuntu server and raspberry pi 4

From Dev

Default login credentials are not working Ubuntu 20.04 on Raspberry Pi 4

From Dev

Connect to Raspberry Pi 4 with Ubuntu Core 18 via serial cable

From Dev

Automatic underclocking processor at high temperatures for raspberry pi 4 with ubuntu 20.04

From Dev

Can't connect with SSH to Ubuntu server (20.04) on raspberry pi 4

From Dev

how to run Moneydance 2021 on Ubuntu 20.10 on a Raspberry Pi 4

From Dev

Communicating with raspberry pi over internet

From Dev

Can a Raspberry Pi run Ubuntu?

From Dev

Can a Raspberry Pi run Ubuntu?

From Dev

Install ubuntu 18.04 on Raspberry Pi

From Dev

Is Python installed: (Raspberry Pi Ubuntu)

From Dev

How to share a folder on Ubuntu to Raspberry Pi 3 over local WiFi network?

From Dev

Installing Steam on Raspberry Pi 4

From Dev

Raspberry Pi 4 updated bootloader

From Dev

Python Socket over wifi in raspberry pi

From Dev

Communicating between Raspberry Pi and Arduino over LAN

From Dev

Python Socket over wifi in raspberry pi

From Dev

Ubuntu Server ARM or Ubuntu Server Raspberry Pi?

Related Related

  1. 1

    stop booting ubuntu 20.04 on a raspberry pi 4 from SSD after upgrade

  2. 2

    XRDP from Windows 10 to Ubuntu Mate 20 (Raspberry PI 4) - Error: Could not acquire name on session bus

  3. 3

    upgrade opencv on raspberry pi

  4. 4

    Testing bcache with raspberry pi 4 on ubuntu

  5. 5

    Can you install Ubuntu on the Raspberry Pi 4

  6. 6

    Connect raspberry pi 4 with ubuntu server to wifi

  7. 7

    KVM Bridge on Ubuntu 20.04 on Raspberry Pi 4

  8. 8

    HC - SR04 raspberry pi

  9. 9

    Problem with wireless networking for ubuntu server on a Raspberry pi 4

  10. 10

    Setup ubuntu server on Raspberry Pi 4 without keyboard

  11. 11

    Raspberry Pi 4 Ubuntu 19.10 cannot enable cgroup memory at boostrap

  12. 12

    wlan0 does not appear in Ubuntu server and raspberry pi 4

  13. 13

    Default login credentials are not working Ubuntu 20.04 on Raspberry Pi 4

  14. 14

    Connect to Raspberry Pi 4 with Ubuntu Core 18 via serial cable

  15. 15

    Automatic underclocking processor at high temperatures for raspberry pi 4 with ubuntu 20.04

  16. 16

    Can't connect with SSH to Ubuntu server (20.04) on raspberry pi 4

  17. 17

    how to run Moneydance 2021 on Ubuntu 20.10 on a Raspberry Pi 4

  18. 18

    Communicating with raspberry pi over internet

  19. 19

    Can a Raspberry Pi run Ubuntu?

  20. 20

    Can a Raspberry Pi run Ubuntu?

  21. 21

    Install ubuntu 18.04 on Raspberry Pi

  22. 22

    Is Python installed: (Raspberry Pi Ubuntu)

  23. 23

    How to share a folder on Ubuntu to Raspberry Pi 3 over local WiFi network?

  24. 24

    Installing Steam on Raspberry Pi 4

  25. 25

    Raspberry Pi 4 updated bootloader

  26. 26

    Python Socket over wifi in raspberry pi

  27. 27

    Communicating between Raspberry Pi and Arduino over LAN

  28. 28

    Python Socket over wifi in raspberry pi

  29. 29

    Ubuntu Server ARM or Ubuntu Server Raspberry Pi?

HotTag

Archive