mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 14:41:31 +02:00
fix(*): drop FACTORY images
we don't need factory image functionality. Drop it to simplify our scripts and prepare for our "production" feature and flags.
This commit is contained in:
parent
098b91013d
commit
195d052495
49
build_image
49
build_image
@ -42,15 +42,10 @@ base - Pristine Chromium OS image. As similar to Chrome OS as possible.
|
|||||||
dev - Developer image. Like base but with additional developer packages.
|
dev - Developer image. Like base but with additional developer packages.
|
||||||
test - Like dev, but with additional test specific packages and can be easily
|
test - Like dev, but with additional test specific packages and can be easily
|
||||||
used for automated testing using scripts like run_remote_tests, etc.
|
used for automated testing using scripts like run_remote_tests, etc.
|
||||||
factory_test - Like test but with extra packages and modifications used to
|
|
||||||
test images in a factory setting. Cannot be built along with a test image.
|
|
||||||
factory_install - Install shim for bootstrapping the factory test process.
|
|
||||||
Cannot be built along with any other image.
|
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
build_image --board=<board> dev test - builds developer and test images.
|
build_image --board=<board> dev test - builds developer and test images.
|
||||||
build_image --board=<board> factory_install - builds a factory install shim.
|
|
||||||
...
|
...
|
||||||
"
|
"
|
||||||
show_help_if_requested "$@"
|
show_help_if_requested "$@"
|
||||||
@ -110,44 +105,9 @@ for overlay in $(cros_list_overlays --board "$BOARD"); do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# TODO: <prebuild hook>
|
|
||||||
|
|
||||||
BASE_PACKAGE="coreos-base/coreos"
|
BASE_PACKAGE="coreos-base/coreos"
|
||||||
# Tweak flags, configure extra USE flags, and set base packages for the factory
|
|
||||||
# install shim.
|
|
||||||
if should_build_image ${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}; then
|
|
||||||
# TODO: Build a separated ebuild for the install shim to reduce size.
|
|
||||||
INSTALL_MASK="${FACTORY_SHIM_INSTALL_MASK}"
|
|
||||||
|
|
||||||
# Add the cros_factory_install boot arg.
|
PRISTINE_IMAGE_NAME=${CHROMEOS_BASE_IMAGE_NAME}
|
||||||
FLAGS_boot_args="${FLAGS_boot_args} cros_factory_install"
|
|
||||||
|
|
||||||
BASE_PACKAGE="coreos-base/chromeos-installshim"
|
|
||||||
|
|
||||||
export USE="${USE} initramfs vfat tpm i2cdev"
|
|
||||||
|
|
||||||
# On ARM, fbconsole is required to fix a display driver bug.
|
|
||||||
if [ "${ARCH}" = "arm" ] ; then
|
|
||||||
export USE="${USE} fbconsole"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if should_build_image ${CHROMEOS_FACTORY_TEST_IMAGE_NAME}; then
|
|
||||||
# Disable module restrictions on factory test image to allow for
|
|
||||||
# external third party drivers in /usr/local.
|
|
||||||
FLAGS_boot_args="${FLAGS_boot_args} lsm.module_locking=0"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# TODO: </prebuild hook>
|
|
||||||
|
|
||||||
# If we are creating a developer image, also create a pristine image with a
|
|
||||||
# different name.
|
|
||||||
PRISTINE_IMAGE_NAME=
|
|
||||||
if should_build_image ${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}; then
|
|
||||||
PRISTINE_IMAGE_NAME=${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}
|
|
||||||
else
|
|
||||||
PRISTINE_IMAGE_NAME=${CHROMEOS_BASE_IMAGE_NAME}
|
|
||||||
fi
|
|
||||||
|
|
||||||
DEVKEYSDIR="/usr/share/vboot/devkeys"
|
DEVKEYSDIR="/usr/share/vboot/devkeys"
|
||||||
|
|
||||||
@ -193,7 +153,7 @@ fi
|
|||||||
|
|
||||||
# Create a developer image if an image that is based on it is requested.
|
# Create a developer image if an image that is based on it is requested.
|
||||||
if should_build_image ${CHROMEOS_DEVELOPER_IMAGE_NAME} \
|
if should_build_image ${CHROMEOS_DEVELOPER_IMAGE_NAME} \
|
||||||
${CHROMEOS_TEST_IMAGE_NAME} ${CHROMEOS_FACTORY_TEST_IMAGE_NAME}; then
|
${CHROMEOS_TEST_IMAGE_NAME}; then
|
||||||
copy_image ${CHROMEOS_BASE_IMAGE_NAME} ${CHROMEOS_DEVELOPER_IMAGE_NAME}
|
copy_image ${CHROMEOS_BASE_IMAGE_NAME} ${CHROMEOS_DEVELOPER_IMAGE_NAME}
|
||||||
install_dev_packages ${CHROMEOS_DEVELOPER_IMAGE_NAME}
|
install_dev_packages ${CHROMEOS_DEVELOPER_IMAGE_NAME}
|
||||||
fi
|
fi
|
||||||
@ -203,11 +163,6 @@ if should_build_image ${CHROMEOS_TEST_IMAGE_NAME}; then
|
|||||||
copy_image ${CHROMEOS_DEVELOPER_IMAGE_NAME} ${CHROMEOS_TEST_IMAGE_NAME}
|
copy_image ${CHROMEOS_DEVELOPER_IMAGE_NAME} ${CHROMEOS_TEST_IMAGE_NAME}
|
||||||
mod_image_for_test ${CHROMEOS_TEST_IMAGE_NAME}
|
mod_image_for_test ${CHROMEOS_TEST_IMAGE_NAME}
|
||||||
fi
|
fi
|
||||||
if should_build_image ${CHROMEOS_FACTORY_TEST_IMAGE_NAME}; then
|
|
||||||
copy_image ${CHROMEOS_DEVELOPER_IMAGE_NAME} \
|
|
||||||
${CHROMEOS_FACTORY_TEST_IMAGE_NAME}
|
|
||||||
mod_image_for_test ${CHROMEOS_FACTORY_TEST_IMAGE_NAME}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Generating AU generator zip file to run outside chroot
|
# Generating AU generator zip file to run outside chroot
|
||||||
generate_au_zip || echo "Failed generating AU zip file - ignoring Error..."
|
generate_au_zip || echo "Failed generating AU zip file - ignoring Error..."
|
||||||
|
@ -45,13 +45,6 @@ get_images_to_build() {
|
|||||||
\'test\' )
|
\'test\' )
|
||||||
IMAGES_TO_BUILD="${IMAGES_TO_BUILD} ${CHROMEOS_TEST_IMAGE_NAME}"
|
IMAGES_TO_BUILD="${IMAGES_TO_BUILD} ${CHROMEOS_TEST_IMAGE_NAME}"
|
||||||
;;
|
;;
|
||||||
\'factory_test\' )
|
|
||||||
IMAGES_TO_BUILD="${IMAGES_TO_BUILD} ${CHROMEOS_FACTORY_TEST_IMAGE_NAME}"
|
|
||||||
;;
|
|
||||||
\'factory_install\' )
|
|
||||||
IMAGES_TO_BUILD="${IMAGES_TO_BUILD} \
|
|
||||||
${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}"
|
|
||||||
;;
|
|
||||||
* )
|
* )
|
||||||
die "${image_to_build} is not an image specification."
|
die "${image_to_build} is not an image specification."
|
||||||
;;
|
;;
|
||||||
@ -69,25 +62,6 @@ get_images_to_build() {
|
|||||||
# Look at flags to determine which image types we should build.
|
# Look at flags to determine which image types we should build.
|
||||||
parse_build_image_args() {
|
parse_build_image_args() {
|
||||||
get_images_to_build ${FLAGS_ARGV}
|
get_images_to_build ${FLAGS_ARGV}
|
||||||
if should_build_image ${CHROMEOS_TEST_IMAGE_NAME}; then
|
|
||||||
if should_build_image "${CHROMEOS_FACTORY_TEST_IMAGE_NAME}"; then
|
|
||||||
die_notrace "Cannot build both the test and factory_test images."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if should_build_image ${CHROMEOS_BASE_IMAGE_NAME} \
|
|
||||||
${CHROMEOS_DEVELOPER_IMAGE_NAME} ${CHROMEOS_TEST_IMAGE_NAME} \
|
|
||||||
${CHROMEOS_FACTORY_TEST_IMAGE_NAME} &&
|
|
||||||
should_build_image ${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}; then
|
|
||||||
die_notrace \
|
|
||||||
"Can't build ${CHROMEOS_FACTORY_INSTALL_SHIM_NAME} with any other" \
|
|
||||||
"image."
|
|
||||||
fi
|
|
||||||
if should_build_image ${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}; then
|
|
||||||
# For factory, force rootfs verification and bootcache off
|
|
||||||
FLAGS_enable_rootfs_verification=${FLAGS_FALSE}
|
|
||||||
FLAGS_enable_bootcache=${FLAGS_FALSE}
|
|
||||||
FLAGS_bootcache_use_board_default=${FLAGS_FALSE}
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check_blacklist() {
|
check_blacklist() {
|
||||||
|
49
common.sh
49
common.sh
@ -400,16 +400,12 @@ CHROMEOS_IMAGE_NAME="chromiumos_image.bin"
|
|||||||
CHROMEOS_DEVELOPER_IMAGE_NAME="chromiumos_image.bin"
|
CHROMEOS_DEVELOPER_IMAGE_NAME="chromiumos_image.bin"
|
||||||
CHROMEOS_RECOVERY_IMAGE_NAME="recovery_image.bin"
|
CHROMEOS_RECOVERY_IMAGE_NAME="recovery_image.bin"
|
||||||
CHROMEOS_TEST_IMAGE_NAME="chromiumos_test_image.bin"
|
CHROMEOS_TEST_IMAGE_NAME="chromiumos_test_image.bin"
|
||||||
CHROMEOS_FACTORY_TEST_IMAGE_NAME="chromiumos_factory_image.bin"
|
|
||||||
CHROMEOS_FACTORY_INSTALL_SHIM_NAME="factory_install_shim.bin"
|
|
||||||
|
|
||||||
COREOS_BASE_IMAGE_NAME=${CHROMEOS_BASE_IMAGE_NAME}
|
COREOS_BASE_IMAGE_NAME=${CHROMEOS_BASE_IMAGE_NAME}
|
||||||
COREOS_IMAGE_NAME=${CHROMEOS_IMAGE_NAME}
|
COREOS_IMAGE_NAME=${CHROMEOS_IMAGE_NAME}
|
||||||
COREOS_DEVELOPER_IMAGE_NAME=${CHROMEOS_DEVELOPER_IMAGE_NAME}
|
COREOS_DEVELOPER_IMAGE_NAME=${CHROMEOS_DEVELOPER_IMAGE_NAME}
|
||||||
COREOS_RECOVERY_IMAGE_NAME=${CHROMEOS_RECOVERY_IMAGE_NAME}
|
COREOS_RECOVERY_IMAGE_NAME=${CHROMEOS_RECOVERY_IMAGE_NAME}
|
||||||
COREOS_TEST_IMAGE_NAME=${CHROMEOS_TEST_IMAGE_NAME}
|
COREOS_TEST_IMAGE_NAME=${CHROMEOS_TEST_IMAGE_NAME}
|
||||||
COREOS_FACTORY_TEST_IMAGE_NAME=${CHROMEOS_FACTORY_TEST_IMAGE_NAME}
|
|
||||||
COREOS_FACTORY_INSTALL_SHIM_NAME=${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}
|
|
||||||
|
|
||||||
# Install make for portage ebuilds. Used by build_image and gmergefs.
|
# Install make for portage ebuilds. Used by build_image and gmergefs.
|
||||||
# TODO: Is /usr/local/autotest-chrome still used by anyone?
|
# TODO: Is /usr/local/autotest-chrome still used by anyone?
|
||||||
@ -453,51 +449,6 @@ DEFAULT_INSTALL_MASK="
|
|||||||
test_*.ko
|
test_*.ko
|
||||||
"
|
"
|
||||||
|
|
||||||
# Mask for factory test image (build_image --factory)
|
|
||||||
FACTORY_TEST_INSTALL_MASK="
|
|
||||||
${COMMON_INSTALL_MASK}
|
|
||||||
*/.svn
|
|
||||||
*/CVS
|
|
||||||
/usr/local/autotest/[^c]*
|
|
||||||
/usr/local/autotest/conmux
|
|
||||||
/usr/local/autotest/client/deps/chrome_test
|
|
||||||
/usr/local/autotest/client/deps/piglit
|
|
||||||
/usr/local/autotest/client/deps/pyauto_dep
|
|
||||||
/usr/local/autotest/client/deps/realtimecomm_*
|
|
||||||
/usr/local/autotest/client/site_tests/graphics_WebGLConformance
|
|
||||||
/usr/local/autotest/client/site_tests/platform_ToolchainOptions
|
|
||||||
/usr/local/autotest/client/site_tests/realtimecomm_GTalk*
|
|
||||||
/usr/local/autotest/client/tests
|
|
||||||
/usr/local/factory/bundle
|
|
||||||
"
|
|
||||||
|
|
||||||
# Mask for factory install shim (build_image factory_install)
|
|
||||||
FACTORY_SHIM_INSTALL_MASK="
|
|
||||||
${DEFAULT_INSTALL_MASK}
|
|
||||||
/opt/[^g]*
|
|
||||||
/opt/google/chrome
|
|
||||||
/opt/google/o3d
|
|
||||||
/opt/google/talkplugin
|
|
||||||
/usr/lib/dri
|
|
||||||
/usr/lib/python2.6/test
|
|
||||||
/usr/lib64/dri
|
|
||||||
/usr/local/autotest-pkgs
|
|
||||||
/usr/share/X11
|
|
||||||
/usr/share/chewing
|
|
||||||
/usr/share/chromeos-assets
|
|
||||||
/usr/share/fonts
|
|
||||||
/usr/share/ibus-pinyin
|
|
||||||
/usr/share/libhangul
|
|
||||||
/usr/share/locale
|
|
||||||
/usr/share/m17n
|
|
||||||
/usr/share/mime
|
|
||||||
/usr/share/oem
|
|
||||||
/usr/share/pyzy
|
|
||||||
/usr/share/sounds
|
|
||||||
/usr/share/tts
|
|
||||||
/usr/share/zoneinfo
|
|
||||||
"
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user