Skip to content

Commit 7079439

Browse files
renatoaguiarthe-maldridge
authored andcommitted
Only set root partition start on pinebookpro
1 parent 4861b76 commit 7079439

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

mkimage.sh.in

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,14 @@ if [ "$BOOT_FSTYPE" = "vfat" ]; then
166166
fi
167167

168168
BOOT_START=2048
169+
ROOT_START=
169170
case "$PLATFORM" in
170-
pinebookpro*) BOOT_START=32768 ;;
171+
pinebookpro*)
172+
BOOT_START=32768
173+
# Without this, sfdisk creates root partition starting at
174+
# 2048, overlapping u-boot reserved space and boot partition.
175+
ROOT_START=$BOOT_START
176+
;;
171177
esac
172178

173179
case "$PLATFORM" in
@@ -190,7 +196,7 @@ _EOF
190196
sfdisk "${FILENAME}" <<_EOF
191197
label: dos
192198
${BOOT_START},${BOOT_FSSIZE},b,*
193-
+${BOOT_FSSIZE},+,L
199+
${ROOT_START},+,L
194200
_EOF
195201
LOOPDEV=$(losetup --show --find --partscan "$FILENAME")
196202
# Normally we need to quote to prevent argument splitting, but

0 commit comments

Comments
 (0)