diff --git a/common.sh b/common.sh index 63d9bc30ca..fc9ccf6d90 100644 --- a/common.sh +++ b/common.sh @@ -644,52 +644,6 @@ function reinterpret_path_for_chroot() { fi } -# Find a firmware component using one of a set of prefixes, or an override if -# one is given. -# The first argument is a list of path prefixes which are prepended to the -# component name, relative to the current board's build directory. -# The second argument is the name of the component to look for. -# The third argument is an optional override. If it's a non-empty string, that -# value is returned instead of searching. This makes it a little easier to -# accept overrides in calling scripts. -# The return value is the override if one is set, the first path at which a -# component is found, or the last path searched if none is found. Later checks -# in the calling scripts can identify that the file doesn't exist and handle -# the error appropriately. -function find_fw_component() { - local prefixes=$1 - local component=$2 - local override=$3 - if [ ! -z "${override}" ]; then - echo "${override}" - exit 0 - fi - local path="" - for prefix in ${prefixes}; do - path="/build/${BOARD_VARIANT}/${prefix}/${component}" - if [ -e "${path}" ]; then - break - fi - done - echo "${path}" -} - -# A wrapper for find_fw_component which provides a set of prefixes which make -# sense for u-boot. -function find_u_boot_component () { - local component=$1 - local override=$2 - find_fw_component "firmware u-boot" "${component}" "${override}" -} - -# A wrapper for find_fw_component which provides a set of prefixes which make -# sense for coreboot. -function find_coreboot_component () { - local component=$1 - local override=$2 - find_fw_component "firmware coreboot" "${component}" "${override}" -} - function emerge_custom_kernel() { local install_root="$1" local root=${FLAGS_build_root}/${FLAGS_board} diff --git a/make_netboot.sh b/make_netboot.sh index 2a0cbf6d2f..94133a22b5 100755 --- a/make_netboot.sh +++ b/make_netboot.sh @@ -77,12 +77,12 @@ mkdir -p netboot # env modification is available. # TODO(nsanders): ARM generic doesn't build chromeos-u-boot package. # When ARM generic goes away, delete the test. -if [ -r "${SYSROOT}/u-boot/legacy_image.bin" ]; then +if [ -r "${SYSROOT}/firmware/legacy_image.bin" ]; then echo "Copying netboot firmware legacy_image.bin" - cp "${SYSROOT}/u-boot/legacy_image.bin" "netboot" + cp "${SYSROOT}/firmware/legacy_image.bin" "netboot" cp "${GCLIENT_ROOT}/chroot/usr/bin/update_firmware_vars.py" "netboot" else - echo "Skipping legacy fw: ${SYSROOT}/u-boot/legacy_image.bin not present?" + echo "Skipping legacy fw: ${SYSROOT}/firmware/legacy_image.bin not present?" fi # Prepare to mount rootfs.