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

Unified Diff: src/scripts/build_image

Issue 1556022: Factory Installer. (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 | « src/platform/memento_softwareupdate/software_update.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/build_image
diff --git a/src/scripts/build_image b/src/scripts/build_image
index 04b1ad64dd51e188a68ca5959d6d1ac90711c3be..52ac4c13d96285fa3624737f818d7b3b151ff716 100755
--- a/src/scripts/build_image
+++ b/src/scripts/build_image
@@ -41,6 +41,8 @@ DEFINE_string to "" \
"The target image file or device"
DEFINE_boolean withtest $FLAGS_FALSE \
"Include packages required for testing and prepare image for testing"
+DEFINE_string factory_server $FLAGS_FALSE \
+ "Build a factory install image pointing to given server."
# Parse command line.
FLAGS "$@" || exit 1
@@ -297,6 +299,12 @@ if [[ $FLAGS_withdev -eq $FLAGS_TRUE ]] ; then
sudo cp -a "$(which ldd)" "${ROOT_DEV_DIR}/usr/bin"
fi
+if [ -n "$FLAGS_factory_server" ]; then
+ sudo INSTALL_MASK="$INSTALL_MASK" emerge-${BOARD} \
+ --root="$ROOT_DEV_DIR" --root-deps=rdeps \
+ --usepkgonly chromeos-factoryinstall $EMERGE_JOBS
+fi
+
# Install packages required for testing.
if [[ $FLAGS_withtest -eq $FLAGS_TRUE ]] ; then
sudo INSTALL_MASK="$INSTALL_MASK" emerge-${BOARD} \
@@ -324,9 +332,14 @@ if [ $FLAGS_statefuldev -eq $FLAGS_TRUE ] ; then
fi
# Perform any customizations on the root file system that are needed.
-WITH_DEV=""
-if [[ $FLAGS_withdev -eq $FLAGS_TRUE ]]; then
- WITH_DEV="--withdev"
+EXTRA_CUSTOMIZE_ROOTFS_FLAGS=""
+if [ $FLAGS_withdev -eq $FLAGS_TRUE ]; then
+ EXTRA_CUSTOMIZE_ROOTFS_FLAGS="--withdev"
+fi
+if [ -n "$FLAGS_factory_server" ]; then
+# Indentation off b/c of long line
+EXTRA_CUSTOMIZE_ROOTFS_FLAGS="$EXTRA_CUSTOMIZE_ROOTFS_FLAGS"\
+" --factory_server=$FLAGS_factory_server"
fi
# Extract the kernel from the root filesystem for use by the GPT image. Legacy
@@ -363,7 +376,7 @@ EOF
--root="$ROOT_FS_DIR" \
--target="$ARCH" \
--board="$BOARD" \
- $WITH_DEV
+ $EXTRA_CUSTOMIZE_ROOTFS_FLAGS
# Check that the image has been correctly created.
"${SCRIPTS_DIR}/test_image" \
« no previous file with comments | « src/platform/memento_softwareupdate/software_update.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698