diff --git a/androdeb b/androdeb index 50b1e96..4bfe676 100755 --- a/androdeb +++ b/androdeb @@ -19,6 +19,7 @@ FULL=0 # Default to a minimal install DOWNLOAD=1 # Default to downloading from web SKIP_DEVICE=0 # Skip device preparation INSTALL_BCC=0 # Decide if BCC is to be installed +DEBIAN_URL=http://ftp.us.debian.org/debian/ # Default packages PACKAGES="" @@ -64,6 +65,7 @@ case $key in --build-image) BI=1; BUILD_IMAGEF=$2; SKIP_DEVICE=1; DOWNLOAD=0; shift || true; shift || true; ;; --debug) set -x; shift || true; ;; --distro) DISTRO="$2"; shift || true; shift || true; ;; + --mirror) DEBIAN_URL="$2"; shift || true; shift || true; ;; *) c_error "Unknown option ($1)"; usage; ;; esac done @@ -238,7 +240,7 @@ ex_files=$(mktemp); echo $EXTRA_FILES > $ex_files sudo $spath/buildstrap $ARCH $DISTRO $TDIR $OUT_TMP \ "$(make_csv "$PACKAGES")"\ - $ex_files $INSTALL_BCC $SKIP_DEVICE + $ex_files $INSTALL_BCC $SKIP_DEVICE $DEBIAN_URL rm $ex_files # If we only wanted to prepare a rootfs and don't have diff --git a/buildstrap b/buildstrap index bdbc554..c040b0b 100755 --- a/buildstrap +++ b/buildstrap @@ -13,9 +13,10 @@ EXTRA_FILES="$(cat $6)" INSTALL_BCC=$7 SKIP_DEVICE=$8 # Skip any device-specific stages VARIANT="--variant=minbase" +REPO_URL=$9 time qemu-debootstrap --arch $ARCH --include=$PACKAGES $VARIANT \ - $DISTRO $OUT_TMP http://ftp.us.debian.org/debian/ + $DISTRO $OUT_TMP $REPO_URL # Some reason debootstrap leaves these mounted umount $OUT_TMP/proc/sys/fs/binfmt_misc || true