From 879641fc1503656d3173eeb7928783fd0fc512de Mon Sep 17 00:00:00 2001 From: tim Date: Thu, 28 Oct 2021 17:25:10 +0100 Subject: [PATCH] Readme: Add docs for examining the contents of boot.img --- Readme.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+), 0 deletions(-) diff --git a/Readme.md b/Readme.md index cbefe26..e399766 100644 --- a/Readme.md +++ b/Readme.md @@ -121,6 +121,24 @@ sudo ../tools/make-boot-image -d secure-boot-files -o boot.img -b pi4 The maximum supported size for boot.img is currently 96 megabytes. +#### Verify the boot image +To verify that the boot image has been created correctly use losetup to mount the .img file. + +```bash +sudo su +mkdir -p boot-mount +LOOP=$(losetup -f) +losetup -f boot.img +mount ${LOOP} boot-mount/ + + echo boot.img contains +find boot-mount/ + +umount boot-mount +losetup -d ${LOOP} +rmdir boot-mount +``` + #### Sign the boot image ```bash ../tools/rpi-eeprom-digest -i boot.img -o boot.sig -k "${KEY_FILE}" -- libgit2 0.21.4