mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 22:16:58 +02:00
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:
parent
f82415dd5e
commit
a809f10fc6
@ -27,6 +27,8 @@ DEFAULT_PKGLIST="$SRC_ROOT/package_repo/package-list-dev.txt"
|
||||
# See http://code.google.com/p/shflags/wiki/Documentation10x
|
||||
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 mirror2 "" "Additional repository mirror to use (URL only)."
|
||||
DEFINE_string suite2 "" "Repository suite for additional mirror."
|
||||
DEFINE_string chroot "$DEFAULT_CHROOT_DIR" \
|
||||
"Destination dir for the chroot environment."
|
||||
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}"
|
||||
bash_chroot "echo deb $MIRROR_INSIDE $FLAGS_suite \
|
||||
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
|
||||
# and all other sources are pulled via DEPS files.
|
||||
#bash_chroot "echo deb-src $MIRROR_INSIDE $FLAGS_suite \
|
||||
|
@ -19,6 +19,7 @@ DEFAULT_IMG_PKGLIST="$SRC_ROOT/package_repo/repo_list_image.txt"
|
||||
# Command line options
|
||||
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 mirror2 "" "Optional Chromium repository mirror to use."
|
||||
DEFINE_string dest "$DEFAULT_DEST" "Destination directory for repository."
|
||||
DEFINE_string devlist "$DEFAULT_DEV_PKGLIST" \
|
||||
"File listing packages to use for development."
|
||||
@ -162,19 +163,22 @@ function update_suite {
|
||||
|
||||
# Add packages to the suite
|
||||
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
|
||||
[ -z "$DEB" ] && continue
|
||||
echo "Adding $DEB..."
|
||||
|
||||
DEB_PRIO=`cat $PKGLIST | grep '^'$DEB' ' | awk '{print $3}'`
|
||||
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`
|
||||
DEB_FILE=$DEB_CACHE_DIR/${DEB_PATH##*/}
|
||||
|
||||
# Download the package if necessary
|
||||
if [ ! -e "$CHROOT/$DEB_FILE" ]
|
||||
if [ ! -s "$CHROOT/$DEB_FILE" ]
|
||||
then
|
||||
in_chroot wget --no-verbose "$FLAGS_mirror/${DEB_PATH}" -O "$DEB_FILE"
|
||||
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"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Copy the file into the target suite with the correct priority
|
||||
|
Loading…
Reference in New Issue
Block a user