diff --git a/build_image b/build_image index d6dddd64f6..f155bf9413 100755 --- a/build_image +++ b/build_image @@ -113,9 +113,9 @@ done # TODO: -# Tweak flags, configure extra USE flags, and add packages for the factory +BASE_PACKAGE="chromeos-base/chromeos" +# Tweak flags, configure extra USE flags, and set base packages for the factory # install shim. -EXTRA_PACKAGES="" 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}" @@ -123,8 +123,8 @@ if should_build_image ${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}; 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" + BASE_PACKAGE="chromeos-base/chromeos-installshim" + # On x86/amd64, 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 diff --git a/build_library/base_image_util.sh b/build_library/base_image_util.sh index 84b31118c7..4f8bc44081 100755 --- a/build_library/base_image_util.sh +++ b/build_library/base_image_util.sh @@ -197,7 +197,7 @@ create_base_image() { # runtime packages for chrome os. This builds up a chrome os image from # binary packages with runtime dependencies only. We use INSTALL_MASK to # trim the image size as much as possible. - emerge_to_image --root="${root_fs_dir}" chromeos ${EXTRA_PACKAGES} + emerge_to_image --root="${root_fs_dir}" ${BASE_PACKAGE} # Set /etc/lsb-release on the image. "${OVERLAY_CHROMEOS_DIR}/scripts/cros_set_lsb_release" \ diff --git a/build_library/build_image_util.sh b/build_library/build_image_util.sh index b0ceece360..cea628fb3c 100755 --- a/build_library/build_image_util.sh +++ b/build_library/build_image_util.sh @@ -94,14 +94,14 @@ parse_build_image_args() { check_blacklist() { info "Verifying that the base image does not contain a blacklisted package." - info "Generating list of packages for chromeos-base/chromeos." + info "Generating list of packages for ${BASE_PACKAGE}." local package_blacklist_file="${BUILD_LIBRARY_DIR}/chromeos_blacklist" if [ ! -e "${package_blacklist_file}" ]; then warn "Missing blacklist file." return fi local blacklisted_packages=$(${SCRIPTS_DIR}/get_package_list \ - --board="${BOARD}" chromeos-base/chromeos \ + --board="${BOARD}" "${BASE_PACKAGE}" \ | grep -x -f "${package_blacklist_file}") if [ -n "${blacklisted_packages}" ]; then die "Blacklisted packages found: ${blacklisted_packages}." diff --git a/build_packages b/build_packages index 6599584536..d8b40f9899 100755 --- a/build_packages +++ b/build_packages @@ -169,8 +169,8 @@ if [[ $# -eq 0 ]]; then PACKAGES+=( chromeos-base/chromeos-dev-init ) fi if [[ "${FLAGS_withfactory}" -eq "${FLAGS_TRUE}" ]]; then + PACKAGES+=( chromeos-base/chromeos-installshim ) PACKAGES+=( chromeos-base/chromeos-factory ) - PACKAGES+=( chromeos-base/chromeos-factoryinstall ) PACKAGES+=( chromeos-base/factorytest-init ) PACKAGES+=( chromeos-base/chromeos-hwid ) fi