From 707943982ba299c5720f7d7065d00c1ab0fd01da Mon Sep 17 00:00:00 2001 From: Renato Aguiar Date: Mon, 24 Feb 2020 22:36:40 -0800 Subject: [PATCH] Only set root partition start on pinebookpro --- mkimage.sh.in | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mkimage.sh.in b/mkimage.sh.in index 27a9fc5..a995728 100644 --- a/mkimage.sh.in +++ b/mkimage.sh.in @@ -166,8 +166,14 @@ if [ "$BOOT_FSTYPE" = "vfat" ]; then fi BOOT_START=2048 +ROOT_START= case "$PLATFORM" in - pinebookpro*) BOOT_START=32768 ;; + pinebookpro*) + BOOT_START=32768 + # Without this, sfdisk creates root partition starting at + # 2048, overlapping u-boot reserved space and boot partition. + ROOT_START=$BOOT_START + ;; esac case "$PLATFORM" in @@ -190,7 +196,7 @@ _EOF sfdisk "${FILENAME}" <<_EOF label: dos ${BOOT_START},${BOOT_FSSIZE},b,* -+${BOOT_FSSIZE},+,L +${ROOT_START},+,L _EOF LOOPDEV=$(losetup --show --find --partscan "$FILENAME") # Normally we need to quote to prevent argument splitting, but