$ librem5-flash-image --stable --variant plain
2024-01-16 16:38:38,016 INFO Looking for librem5r4 plain byzantium image
2024-01-16 16:38:43,447 INFO Found disk image Build "stable" 'Last stable librem5r4 build' from Fri Jun 23 22:43:18 2023
2024-01-16 16:38:49,150 INFO Found uboot Build 85 from Thu Aug 25 09:22:41 2022
2024-01-16 16:38:49,151 INFO Downloading to ./tmp_librem5-flash-image_oe5a1sq0
2024-01-16 16:38:49,471 INFO Downloading image from https://storage.puri.sm/librem5/images/byzantium/latest/librem5r4/plain/artifact/librem5r4.img.xz
2024-01-16 16:40:41,162 INFO Calculating sha256sum of ./tmp_librem5-flash-image_oe5a1sq0/librem5r4.img
2024-01-16 16:42:30,519 ERROR Checksum of image 27107f77b443a65e0446aec11c79754fdc623e3a40328d898b5fb0c0188fed70 does not match 6cfc1c2671a76baf3fc72ca611856143e3b74c969239ac8a695ce881a1467672
Created an updated meta-issue to tie together all the info for proper (i.e. robust) usage of the hardware boot partitions:
OS-issues#347 "Robust A/B Bootloader&Recovery Installs and Updates (to interoperable, hardware separated eMMC boot partitions)"
It may be handy to actually boot the freshly flashed image automatically instead of relying on user to do it manually.
Closes #7
It's not used for flashing production devices so safe to merge.
@angus.ainslie ping, would be nice to merge this.
I have a Librem5 currently running u-boot 2022.10 and pmOS.
After downloading plain (no LUKS) image from https://storage.puri.sm/librem5/images I run the following to flash it to an SD card
unxz ./librem5r4.img.xz
sudo dd if=./librem5r4.img of=/dev/sdb bs=4M iflag=fullblock oflag=direct conv=fsync status=progress
I can then boot the image by holding volume down while powering on the Librem5.
I see the boot splash from PureOS, but it never completes the boot. I can then press the power down button and I see the log attached:
pmOS doesn't use systemd, so the PureOS rootFS is clearly being mounted, but it doesn't work correctly.
I have tried a range of different images yet still nothing works. I have tried both LUKS and plain images, from Jenkins and older PureOS releases. It's a brand new SD card, so it shouldn't be failing either.
I have a Librem5 currently running u-boot 2022.10 and pmOS.
After downloading plain (no LUKS) image from https://storage.puri.sm/librem5/images I run the following to flash it to an SD card
unxz ./librem5r4.img.xz
sudo dd if=./librem5r4.img of=/dev/sdb bs=4M iflag=fullblock oflag=direct conv=fsync status=progress
I can then boot the image by holding volume down while powering on the Librem5.
I see the boot splash from PureOS, but it never completes the boot. I can then press the power down button and I see the log attached:
pmOS doesn't use systemd, so the PureOS rootFS is clearly being mounted, but it doesn't work correctly.
I have tried a range of different images yet still nothing works. I have tried both LUKS and plain images, from Jenkins and older PureOS releases. It's a brand new SD card, so it shouldn't be failing either.
The code of the librem5-flash-image/scripts/librem5_flash_image.py script verifies that the downloaded image file is the correct size in bytes and its SHA256 hashing checksum is correct. However, it doesn’t verify whether the downloaded u-boot file is correct. From a security point of view, the u-boot file is arguably just as important as the image.
We symlink it to the flash directory.
Closes: #12
I remember doing it very long time ago, but can recheck.
Did you check if the DP firmware gets picked up when there's only a bootloader in the boot partition?
Looks good to me, let's just have @angus.ainslie have a look in case this affects the factory floor flashing.
We're still defaulting to plain
. luks
variant isn't experimental anymore and should probably be used by default now.
Closes #14
This allows for flashing bootloader-less images. In order to support images with specific bootloader needs, "--embedded-boot" option is introduced which makes the device boot from the user eMMC partition.
Closes #13
Closes #14
Closes #7