Print friendly error message if the libc tarball is missing.

Advises the user to try running setup_board.

BUG=chromium-os:18934
TEST=Ran with missing tarball and checked message.

Change-Id: Ice444139188756932734f5f89ef22de4cd12ab41
Reviewed-on: http://gerrit.chromium.org/gerrit/6709
Tested-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
This commit is contained in:
Raymes Khoury 2011-09-07 14:32:59 -07:00 committed by David James
parent d1679ab864
commit d37eb67163

View File

@ -157,6 +157,11 @@ create_base_image() {
LIBC_TAR="glibc-${LIBC_VERSION}.tbz2"
LIBC_PATH="${PKGDIR}/cross-${CHOST}/${LIBC_TAR}"
if ! [[ -e ${LIBC_PATH} ]]; then
die "${LIBC_PATH} does not exist. Try running ./setup_board --board=\
${BOARD} to update the version of libc installed on that board."
fi
sudo tar jxvpf "${LIBC_PATH}" -C "${ROOT_FS_DIR}" ./usr/${CHOST} \
--strip-components=3 --exclude=usr/include --exclude=sys-include \
--exclude=*.a --exclude=*.o