Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Unified Diff: src/platform/installer/chromeos-common.sh

Issue 2133006: fix for issue 2610 (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: use stateful parition image size for the partition itself Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/scripts/build_gpt.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/installer/chromeos-common.sh
diff --git a/src/platform/installer/chromeos-common.sh b/src/platform/installer/chromeos-common.sh
index 5283145a87bacdffe340226a4060567a97e3eeda..f66158d097c8a73ede98ed6a48f0090e4e310faf 100644
--- a/src/platform/installer/chromeos-common.sh
+++ b/src/platform/installer/chromeos-common.sh
@@ -130,6 +130,7 @@ install_gpt() {
local pmbrcode=$5
local esp_img=$6
local force_full="${7:-}"
+ local recovery="${8:-}"
# The gpt tool requires a fixed-size target to work on, so we may have to
# create a file of the appropriate size. Let's figure out what that size is
@@ -252,13 +253,24 @@ install_gpt() {
NUM_ESP_SECTORS=$(roundup $(numsectors $esp_img))
NUM_RESERVED_SECTORS=1
+ # For recovery image, use max sizes and create both A & B images
+ if [ ${FLAGS_recovery} -eq $FLAGS_TRUE ]; then
+ NUM_KERN_SECTORS=$max_kern_sectors
+ num_kern_a_sectors=$NUM_KERN_SECTORS
+ num_kern_b_sectors=$NUM_KERN_SECTORS
+
+ NUM_ROOTFS_SECTORS=$max_rootfs_sectors
+ num_rootfs_a_sectors=$NUM_ROOTFS_SECTORS
+ num_rootfs_b_sectors=$NUM_ROOTFS_SECTORS
+ fi
+
START_KERN_A=$start_useful
START_ROOTFS_A=$(($START_KERN_A + $NUM_KERN_SECTORS))
START_STATEFUL=$(($START_ROOTFS_A + $NUM_ROOTFS_SECTORS))
START_OEM=$(($START_STATEFUL + $NUM_STATEFUL_SECTORS))
START_ESP=$(($START_OEM + $NUM_OEM_SECTORS))
START_KERN_B=$(($START_ESP + $NUM_ESP_SECTORS))
- START_ROOTFS_B=$((START_KERN_B + $num_kern_b_sectors))
+ START_ROOTFS_B=$(($START_KERN_B + $num_kern_b_sectors))
START_RESERVED=$(($START_ROOTFS_B + $num_rootfs_b_sectors))
# For minimal install, we're not worried about the secondary GPT header
« no previous file with comments | « no previous file | src/scripts/build_gpt.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698