5 ms·
This isn't documented anywhere I can find, but I think it should also be possible to flash the firmware from a 64-bit Ubuntu distribution. Afaik, the vcgencmd i
by scottlamb 7y ago
This isn't documented anywhere I can find, but I think it should also be possible to flash the firmware from a 64-bit Ubuntu distribution. Afaik, the vcgencmd it needs is available is closed-source and only available as 32-bit binaries that also need some 32-bit shared libraries. Also, the Ubuntu PPA [1] that someone created only goes up to bionic, and I'm running the latest release, eoan. Still, with multiarch support, [2] this seems to create a working vcgencmd:
$ sudo dpkg --add-architecture armhf
$ sudo add-apt-repository ppa:ubuntu-raspi2/ppa
$ sudo perl -pi -e 's/eoan/bionic' /etc/apt/sources.list.d/ubuntu-raspi2-ubuntu-ppa-eoan.list
$ sudo apt update
$ sudo apt install libraspberrypi-bin:armhf
and from there it looks like you can get the firmware updater stuff to run:
$ git clone https://github.com/raspberrypi/rpi-eeprom
$ cd rpi-eeprom
$ cat > from-ubuntu <<EOF
#!/bin/bash
export FIRMWARE_ROOT=$(pwd)/firmware
export FIRMWARE_RELEASE_STATUS=beta
export VCMAILBOX=/usr/bin/vcmailbox
mkdir backup
export FIRMWARE_BACKUP_DIR=$(pwd)/backup
export BOOTFS=/boot/firmware
# Seems to want the vl805 executable from within $FIRMWARE_ROOT to be in the
# path.
export PATH=$FIRMWARE_ROOT:$PATH
. $(pwd)/rpi-eeprom-update "$@"
EOF
$ sudo ./from-ubuntu -a
*** INSTALLING EEPROM UPDATES ***
BOOTLOADER: update required
CURRENT: Fri May 10 18:40:36 UTC 2019 (1557513636)
LATEST: Mon Nov 18 11:06:55 UTC 2019 (1574075215)
VL805: update required
CURRENT: 00013701
LATEST: 000137ab
EEPROM updates pending. Please reboot to apply the update.
When I reboot, I see the firmware update has actually taken.
[1] https://wiki.ubuntu.com/ARM/RaspberryPi https://wiki.ubuntu.com/ARM/RaspberryPi
[2] https://wiki.debian.org/Multiarch/HOWTO https://wiki.debian.org/Multiarch/HOWTO
- zachberger 7y agoThanks for this. A few weeks ago I struggled for an hour to update my firmware from Ubuntu 19.10. Eventually I gave up and figured it would be easier to go through the normal channels so I created a second SD card with Raspbian to do firmware updating.
- scottlamb 7y agoYeah, I almost ended up doing the same thing. Another thing I haven't tried yet is the network/USB booting support in the beta firmware. It doesn't help you with the initial upgrade of course, but once you've done that it gives you two more alternatives to the second microSD card.
- esotericn 7y agoI don't believe that the beta has USB boot support - isn't it just network boot at the moment?
- scottlamb 7y agoI think you're right; I mixed up what's planned [1] with what's available in beta. [1] https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md https://www.raspberrypi.org/documentation/hardware/raspberry... says "The current schedule is to release network boot first, then USB boot."
- dividuum 7y agoActually the flashing process was simplified compared to previously. It now relies on the reboot you mentioned with the following mechanism: You need the following files from https://github.com/raspberrypi/rpi-eeprom/tree/master/firmware/beta https://github.com/raspberrypi/rpi-eeprom/tree/master/firmwa...: * recovery.bin * One of the pieeprom files. Rename it to pieeprom.upd * One of the vl805 files. Rename it to vl805.bin * Generate the SHA256 sums of both files and place them in pieeprom.sig and vl805.sig Reboot. The Pi4 will see the recovery.bin and load it. It will detect the pieeprom.upd file and will then flash both pieeprom.upd and vl805.bin, rename itself to recovery.001 and reboot. During that next boot the recovery.bin doesn't exist any longer as it has been renamed and the boot process continues normally. The key here is the name of the pieeprom.upd file. You can also name it pieeprom.bin, but in that case the recovery.bin isn't renaming itself and you'll have to manually delete the files from the SD card.
- esotericn 7y agoRight. The main thing is that the recovery.bin and piupdate files are on the boot partition. I updated 4 RPi4's recently by just inserting the card; renaming recovery.000 to recovery.bin; and repeating for each device.
- ImprovedSilence 7y agodoesn't the regular firmware update come with an apt upgrade? or am I missing something?
- scottlamb 7y agoOn Raspbian, yes. On Ubuntu, no. You can probably get the Raspbian packages to install on Ubuntu, but 64-bit Ubuntu is a little more complicated because Raspbian is 32-bit only.