Fix bug where we may modify FLAGS_factory_install after we source base_image_util.sh

This also simplifies the factory_install logic to all be in the same place :).

BUG=chromium-os:22371
TEST=Ran trybot with this CL + tegra2 build that used make_netboot.sh that uses
the factory install which failed on the buildbot previously.

Change-Id: Id0847b85c061cf230d0e6cc5bb40de2eba0992b9
Reviewed-on: https://gerrit.chromium.org/gerrit/10986
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
This commit is contained in:
Chris Sosa 2011-11-01 12:54:01 -07:00 committed by Gerrit
parent 40bb0c3152
commit 4299eb9d52
2 changed files with 18 additions and 21 deletions

View File

@ -118,7 +118,9 @@ OVERLAY_CHROMEOS_DIR="${SRC_ROOT}/third_party/chromiumos-overlay/chromeos"
parse_build_image_args parse_build_image_args
# Tweak flags for factory install. # Tweak flags, configure extra USE flags, and add packages for the factory
# install shim.
EXTRA_PACKAGES=""
if [ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} ]; then if [ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} ]; then
# TODO: Build a separated ebuild for the install shim to reduce size. # TODO: Build a separated ebuild for the install shim to reduce size.
INSTALL_MASK="${INSTALL_MASK} ${FACTORY_INSTALL_MASK}" INSTALL_MASK="${INSTALL_MASK} ${FACTORY_INSTALL_MASK}"
@ -132,6 +134,21 @@ if [ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} ]; then
# Add the cros_factory_install boot arg. # Add the cros_factory_install boot arg.
FLAGS_boot_args="${FLAGS_boot_args} cros_factory_install" FLAGS_boot_args="${FLAGS_boot_args} cros_factory_install"
# Factory install needs to have the factory installer added.
EXTRA_PACKAGES="${EXTRA_PACKAGES} chromeos-base/chromeos-factoryinstall"
# On x86, we boot the factory install shim from an SD card using
# initramfs for our root. On ARM, we boot the factory install shim
# over the network, so we don't require initramfs, but we do require
# fbconsole to fix a display driver bug.
if [ "${ARCH}" = "x86" ] ; then
export USE="${USE} initramfs"
fi
# CONFIG_BLK_DEV_RAM is disabled by default.
# But tftp install needs it to mount rootfs in ram
if [ "${ARCH}" = "arm" ] ; then
export USE="${USE} fbconsole blkdevram"
fi
fi fi
if [ $((FLAGS_rootfs_size + FLAGS_rootfs_hash_pad)) -gt \ if [ $((FLAGS_rootfs_size + FLAGS_rootfs_hash_pad)) -gt \

View File

@ -8,26 +8,6 @@
# not used outside this file. # not used outside this file.
# Configure extra USE flags and packages for factory install shim
# images.
EXTRA_PACKAGES=""
if [ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} ] ; then
# Factory install needs to have the factory installer added.
EXTRA_PACKAGES="${EXTRA_PACKAGES} chromeos-base/chromeos-factoryinstall"
# On x86, we boot the factory install shim from an SD card using
# initramfs for our root. On ARM, we boot the factory install shim
# over the network, so we don't require initramfs, but we do require
# fbconsole to fix a display driver bug.
if [ "${ARCH}" = "x86" ] ; then
export USE="${USE} initramfs"
fi
# CONFIG_BLK_DEV_RAM is disabled by default.
# But tftp install needs it to mount rootfs in ram
if [ "${ARCH}" = "arm" ] ; then
export USE="${USE} fbconsole blkdevram"
fi
fi
ROOT_LOOP_DEV= ROOT_LOOP_DEV=
STATEFUL_LOOP_DEV= STATEFUL_LOOP_DEV=