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

Unified Diff: src/platform/installer/chromeos-postinst

Issue 1520028: New Full AU Format w/ support for kernel partition. (Closed)
Patch Set: fixes for review Created 10 years, 8 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/platform/memento_softwareupdate/Makefile » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/installer/chromeos-postinst
diff --git a/src/platform/installer/chromeos-postinst b/src/platform/installer/chromeos-postinst
index 05e4f51684ec7904a05953e889f33624e514d961..b6e409e1af6f19c99c9871c08780909ef7446c66 100755
--- a/src/platform/installer/chromeos-postinst
+++ b/src/platform/installer/chromeos-postinst
@@ -5,26 +5,18 @@
# found in the LICENSE file.
# This script is called after an AutoUpdate or USB install. The first argument
-# is the partition where the new rootfs is installed. The autoupdate invocation
-# will provide a second argument, specifying the partition for the new kernel.
+# is the partition where the new rootfs is installed or empty. If non-empty
+# the rootfs should be updated w/ the new bootloader config. If empty, the
+# rootfs is mounted-read only and should not be updated.
# Update /boot/extlinux.conf.
INSTALL_ROOT=`dirname "$0"`
INSTALL_DEV="$1"
-KINSTALL_DEV="$2"
-
-# Set default label to chromeos-hd.
-sed -i 's/^DEFAULT .*/DEFAULT chromeos-hd/' "$INSTALL_ROOT"/boot/extlinux.conf
-sed -i "{ s:HDROOT:$INSTALL_DEV: }" "$INSTALL_ROOT"/boot/extlinux.conf
-
-# NOTE: The stateful partition will not be mounted when this is called at
-# USB-key install time. It will be mounted following an upgrade. ChromeOS
-# hardware expects the kernel to be in a partition of its own. Legacy systems
-# will use syslinux to boot from the kernel image found in the rootfs.
-# TODO: The ChromeOS kernel partition will contain a signature header, a config
-# file, and the kernel image as a single blob. We'll need to revisit this to
-# ensure that gets installed properly.
-if [ -n "$KINSTALL_DEV" ]; then
- dd if=${INSTALL_ROOT}/boot/vmlinuz of=${KINSTALL_DEV}
+# Only update extlinux.conf if $1 is non-empty
+if [ -n "$INSTALL_DEV" ]; then
+ # Set default label to chromeos-hd.
+ sed -i 's/^DEFAULT .*/DEFAULT chromeos-hd/' "$INSTALL_ROOT"/boot/extlinux.conf
+ sed -i "{ s:HDROOT:$INSTALL_DEV: }" "$INSTALL_ROOT"/boot/extlinux.conf
fi
+
« no previous file with comments | « no previous file | src/platform/memento_softwareupdate/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698