Add ARM cross-compiler to chroot.

This adds the ARM cross-compiler toolchain to the build chroot environment,
so we can start trying to compile things for ARM.

There's also a minor change to make_local_repo.sh and make_chroot.sh to
allow a second repository source. This is needed only for bootstrapping this
change (and others like it), and not required for normal use.

Review URL: http://codereview.chromium.org/507005
This commit is contained in:
Bill Richardson 2009-12-15 09:08:10 -08:00
parent f82415dd5e
commit a809f10fc6
2 changed files with 19 additions and 7 deletions

View File

@ -27,6 +27,8 @@ DEFAULT_PKGLIST="$SRC_ROOT/package_repo/package-list-dev.txt"
# See http://code.google.com/p/shflags/wiki/Documentation10x # See http://code.google.com/p/shflags/wiki/Documentation10x
DEFINE_string suite "$DEFAULT_DEV_SUITE" "Repository suite to base image on." DEFINE_string suite "$DEFAULT_DEV_SUITE" "Repository suite to base image on."
DEFINE_string mirror "$DEFAULT_DEV_MIRROR" "Local repository mirror to use." DEFINE_string mirror "$DEFAULT_DEV_MIRROR" "Local repository mirror to use."
DEFINE_string mirror2 "" "Additional repository mirror to use (URL only)."
DEFINE_string suite2 "" "Repository suite for additional mirror."
DEFINE_string chroot "$DEFAULT_CHROOT_DIR" \ DEFINE_string chroot "$DEFAULT_CHROOT_DIR" \
"Destination dir for the chroot environment." "Destination dir for the chroot environment."
DEFINE_string pkglist "$DEFAULT_PKGLIST" \ DEFINE_string pkglist "$DEFAULT_PKGLIST" \
@ -133,6 +135,12 @@ bash_chroot "echo $USER ALL=NOPASSWD: ALL >> /etc/sudoers"
MIRROR_INSIDE="${FLAGS_mirror/$GCLIENT_ROOT/$CHROOT_TRUNK_DIR}" MIRROR_INSIDE="${FLAGS_mirror/$GCLIENT_ROOT/$CHROOT_TRUNK_DIR}"
bash_chroot "echo deb $MIRROR_INSIDE $FLAGS_suite \ bash_chroot "echo deb $MIRROR_INSIDE $FLAGS_suite \
main restricted multiverse universe > /etc/apt/sources.list" main restricted multiverse universe > /etc/apt/sources.list"
# Additional repo? Note: Not mounted inside - must use URL
if [ -n "$FLAGS_mirror2" ]; then
bash_chroot "echo deb $FLAGS_mirror2 $FLAGS_suite2 \
main restricted multiverse universe >> /etc/apt/sources.list"
fi
# TODO: enable sources when needed. Currently, kernel source is checked in # TODO: enable sources when needed. Currently, kernel source is checked in
# and all other sources are pulled via DEPS files. # and all other sources are pulled via DEPS files.
#bash_chroot "echo deb-src $MIRROR_INSIDE $FLAGS_suite \ #bash_chroot "echo deb-src $MIRROR_INSIDE $FLAGS_suite \

View File

@ -19,6 +19,7 @@ DEFAULT_IMG_PKGLIST="$SRC_ROOT/package_repo/repo_list_image.txt"
# Command line options # Command line options
DEFINE_string suite "$DEFAULT_EXT_SUITE" "Ubuntu suite to pull packages from." DEFINE_string suite "$DEFAULT_EXT_SUITE" "Ubuntu suite to pull packages from."
DEFINE_string mirror "$DEFAULT_EXT_MIRROR" "Ubuntu repository mirror to use." DEFINE_string mirror "$DEFAULT_EXT_MIRROR" "Ubuntu repository mirror to use."
DEFINE_string mirror2 "" "Optional Chromium repository mirror to use."
DEFINE_string dest "$DEFAULT_DEST" "Destination directory for repository." DEFINE_string dest "$DEFAULT_DEST" "Destination directory for repository."
DEFINE_string devlist "$DEFAULT_DEV_PKGLIST" \ DEFINE_string devlist "$DEFAULT_DEV_PKGLIST" \
"File listing packages to use for development." "File listing packages to use for development."
@ -162,20 +163,23 @@ function update_suite {
# Add packages to the suite # Add packages to the suite
echo "Downloading packages..." echo "Downloading packages..."
for DEB in `grep -v '^#' < $PKGLIST | awk '{print $1}'` grep -v '^#' < $PKGLIST | while read DEB DEB_VER DEB_PRIO DEB_SECTION DEB_PATH
do do
[ -z "$DEB" ] && continue
echo "Adding $DEB..." echo "Adding $DEB..."
DEB_PRIO=`cat $PKGLIST | grep '^'$DEB' ' | awk '{print $3}'` DEB_FILE=$DEB_CACHE_DIR/${DEB_PATH##*/}
DEB_SECTION=`cat $PKGLIST | grep '^'$DEB' ' | awk '{print $4}'`
DEB_PATH=`cat $PKGLIST | grep '^'$DEB' ' | awk '{print $5}'`
DEB_FILE="$DEB_CACHE_DIR/"`basename $DEB_PATH`
# Download the package if necessary # Download the package if necessary
if [ ! -e "$CHROOT/$DEB_FILE" ] if [ ! -s "$CHROOT/$DEB_FILE" ]
then then
if [ -n "FLAGS_mirror2" ]; then
in_chroot wget --no-verbose "$FLAGS_mirror/${DEB_PATH}" -O "$DEB_FILE" || \
in_chroot wget --no-verbose "$FLAGS_mirror2/${DEB_PATH}" -O "$DEB_FILE"
else
in_chroot wget --no-verbose "$FLAGS_mirror/${DEB_PATH}" -O "$DEB_FILE" in_chroot wget --no-verbose "$FLAGS_mirror/${DEB_PATH}" -O "$DEB_FILE"
fi fi
fi
# Copy the file into the target suite with the correct priority # Copy the file into the target suite with the correct priority
in_chroot reprepro -b "$REPO_SUBDIR" -P "$DEB_PRIO" -S "$DEB_SECTION" \ in_chroot reprepro -b "$REPO_SUBDIR" -P "$DEB_PRIO" -S "$DEB_SECTION" \