aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2023-03-22 09:02:52 -0700
committerChristian Lamparter <chunkeey@gmail.com>2023-05-18 16:17:52 +0200
commit7519b35881149427c48d2c81a6c154ef3471d566 (patch)
treed9aa55462dcf68d521d0fb5a3a91e988c194346d
parent39e60394103368dc24f010ceda5667ef058ba2ba (diff)
downloadupstream-7519b35881149427c48d2c81a6c154ef3471d566.tar.gz
upstream-7519b35881149427c48d2c81a6c154ef3471d566.tar.bz2
upstream-7519b35881149427c48d2c81a6c154ef3471d566.zip
scripts/gen_image_generic.sh: allow passing in partition offset
Allow passing in an optional offset (PARTOFFSET) for the first partition. If not specified this will default to 256K (512 blocks) as it has before. For example if you want to start partition data at a 16M offset instead of 256K, specify 'PARTOFFSET=16M'. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
-rwxr-xr-xscripts/gen_image_generic.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index ef13624402..5c88dcea80 100755
--- a/scripts/gen_image_generic.sh
+++ b/scripts/gen_image_generic.sh
@@ -19,7 +19,7 @@ head=16
sect=63
# create partition table
-set $(ptgen -o "$OUTPUT" -h $head -s $sect ${GUID:+-g} -p "${KERNELSIZE}m" -p "${ROOTFSSIZE}m" ${ALIGN:+-l $ALIGN} ${SIGNATURE:+-S 0x$SIGNATURE} ${GUID:+-G $GUID})
+set $(ptgen -o "$OUTPUT" -h $head -s $sect ${GUID:+-g} -p "${KERNELSIZE}m${PARTOFFSET:+@$PARTOFFSET}" -p "${ROOTFSSIZE}m" ${ALIGN:+-l $ALIGN} ${SIGNATURE:+-S 0x$SIGNATURE} ${GUID:+-G $GUID})
KERNELOFFSET="$(($1 / 512))"
KERNELSIZE="$2"