mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-27 13:31:56 +01:00
Correct partition layout calculation code
The CURR counter wasn't being correctly incremented for the stateful partition resulting in an invalid layout BUG=chromium-os:34715 TEST=Build image and verify it can be installed Change-Id: Ie2f90d2e51e34e2056414363d7b2b42413018322 Reviewed-on: https://gerrit.chromium.org/gerrit/33928 Reviewed-by: Don Garrett <dgarrett@chromium.org> Reviewed-by: Olof Johansson <olofj@chromium.org> Tested-by: Olof Johansson <olofj@chromium.org>
This commit is contained in:
parent
e82e99e999
commit
53fbca3fdb
@ -157,8 +157,8 @@ def WriteLayoutFunction(sfile, func_name, image_type, config):
|
|||||||
|
|
||||||
# Pass 1: Set up the expanding partition size.
|
# Pass 1: Set up the expanding partition size.
|
||||||
for partition in partitions:
|
for partition in partitions:
|
||||||
|
partition["var"] = partition["blocks"]
|
||||||
if partition["type"] != "blank":
|
if partition["type"] != "blank":
|
||||||
partition["var"] = partition["blocks"]
|
|
||||||
|
|
||||||
if partition["num"] == 1:
|
if partition["num"] == 1:
|
||||||
if "features" in partition and "expand" in partition["features"]:
|
if "features" in partition and "expand" in partition["features"]:
|
||||||
@ -178,7 +178,7 @@ def WriteLayoutFunction(sfile, func_name, image_type, config):
|
|||||||
partition["label"]))
|
partition["label"]))
|
||||||
|
|
||||||
# Increment the CURR counter ready for the next partition.
|
# Increment the CURR counter ready for the next partition.
|
||||||
sfile.write("CURR=$(( $CURR + %s ))\n" % partition["blocks"])
|
sfile.write("CURR=$(( $CURR + %s ))\n" % partition["var"])
|
||||||
|
|
||||||
# Set default priorities on kernel partitions
|
# Set default priorities on kernel partitions
|
||||||
sfile.write("$GPT add -i 2 -S 0 -T 15 -P 15 $1\n")
|
sfile.write("$GPT add -i 2 -S 0 -T 15 -P 15 $1\n")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user