From 8e0cd07e03f692d04110e156ace04c8f90e1d06c Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Tue, 18 Dec 2012 22:31:46 +0800 Subject: [PATCH] Build factory install shim by ebuild Now that we have an ebuild for factory install shim, let's move to that instead of base image. BUG=chrome-os-partner:16712 TEST=Test network boot, install shim, RMA shim on Link. Test install shim on Snow. CQ-DEPEND=CL:39952 Change-Id: Ib6a7a598087647b44a4aeca970e293ea72023890 Signed-off-by: Vic Yang Reviewed-on: https://gerrit.chromium.org/gerrit/39955 Reviewed-by: Richard Barnette Reviewed-by: Hung-Te Lin --- build_image | 8 ++++---- build_library/base_image_util.sh | 2 +- build_library/build_image_util.sh | 4 ++-- build_packages | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) 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