From 830b0f48706e73f0f52a08854705b92f3e7eea36 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Sun, 19 Dec 2021 21:17:33 -0500 Subject: [PATCH] Fix RPI boot by copying the first 8k of existing image --- scripts/extract_build.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/extract_build.sh b/scripts/extract_build.sh index f3614bd..f457451 100755 --- a/scripts/extract_build.sh +++ b/scripts/extract_build.sh @@ -2,17 +2,17 @@ dd if=/dev/zero of=build/rpi.img bs=1M count=4096 # Copy the first 8k from the original rpi.img, which seems to have -# non-zeroed content -#dd if=rpi.img of=build/rpi.img bs=8192 count=1 conv=notrunc +# non-zeroed content. Without this, the Pi doesn't seem to boot. +# It could be that there is the binary boot blob for the GPU +# in that section? +dd if=rpi.img of=build/rpi.img bs=8192 count=1 conv=notrunc sudo losetup -Pf build/rpi.img # Partition: # start: 8192, size 256M typ W95 FAT32 DEVICE=$(losetup -j build/rpi.img | cut -d ':' -f 1) -mkfs.msdos "${DEVICE}" -sfdisk "${DEVICE}" <