To debug bash scripts such as this, turn on the verbose and xtrace options:
$ bash
$ set -vx
$ . ./coreboot_util.sh
. ./coreboot_util.sh
+ . ./coreboot_util.sh
#!/bin/bash
# shellcheck disable=SC2034
# - Ignore unused variable warnings - many variables in this script are used
⋮
# Start of main script
# let's do stuff
check_root
++ check_root
++ [[ 1000 != 0 ]]
++ die 'This script must be run as root; re-run prefixed with sudo'
++ local 'msg=This script must be run as root; re-run prefixed with sudo'
++ '[' -n 'This script must be run as root; re-run prefixed with sudo' ']'
++ echo ''
++ echo -e 'This script must be run as root; re-run prefixed with sudo'
This script must be run as root; re-run prefixed with sudo
++ echo ''
++ kill -s TERM 14957
exit 1
+++ exit 1
$
Use a live USB with PureOS 10.3, then follow these instructions below instead.
There are two ways to upgrade PureBoot using this script:
Flash Coreboot first, then reboot into the PureOS live USB and flash PureBoot over that.
If you already have PureBoot, which you do, and follow the script for upgrading, the script will instead build a firmware image. You can place the firmware image onto another USB drive or other removable media, enter PureBoot on the Librem 14, and upgrade from there using the firmware image.