mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 14:11:07 +02:00
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:
parent
40bb0c3152
commit
4299eb9d52
19
build_image
19
build_image
@ -118,7 +118,9 @@ OVERLAY_CHROMEOS_DIR="${SRC_ROOT}/third_party/chromiumos-overlay/chromeos"
|
||||
|
||||
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
|
||||
# TODO: Build a separated ebuild for the install shim to reduce size.
|
||||
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.
|
||||
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
|
||||
|
||||
if [ $((FLAGS_rootfs_size + FLAGS_rootfs_hash_pad)) -gt \
|
||||
|
@ -8,26 +8,6 @@
|
||||
# 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=
|
||||
STATEFUL_LOOP_DEV=
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user