Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 099709b

Browse files
committed
support mirror config
1 parent c855187 commit 099709b

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

androdeb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ FULL=0 # Default to a minimal install
1919
DOWNLOAD=1 # Default to downloading from web
2020
SKIP_DEVICE=0 # Skip device preparation
2121
INSTALL_BCC=0 # Decide if BCC is to be installed
22+
DEBIAN_URL=http://ftp.us.debian.org/debian/
2223

2324
# Default packages
2425
PACKAGES=""
@@ -64,6 +65,7 @@ case $key in
6465
--build-image) BI=1; BUILD_IMAGEF=$2; SKIP_DEVICE=1; DOWNLOAD=0; shift || true; shift || true; ;;
6566
--debug) set -x; shift || true; ;;
6667
--distro) DISTRO="$2"; shift || true; shift || true; ;;
68+
--mirror) DEBIAN_URL="$2"; shift || true; shift || true; ;;
6769
*) c_error "Unknown option ($1)"; usage; ;;
6870
esac
6971
done
@@ -238,7 +240,7 @@ ex_files=$(mktemp); echo $EXTRA_FILES > $ex_files
238240

239241
sudo $spath/buildstrap $ARCH $DISTRO $TDIR $OUT_TMP \
240242
"$(make_csv "$PACKAGES")"\
241-
$ex_files $INSTALL_BCC $SKIP_DEVICE
243+
$ex_files $INSTALL_BCC $SKIP_DEVICE $DEBIAN_URL
242244
rm $ex_files
243245

244246
# If we only wanted to prepare a rootfs and don't have

buildstrap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ EXTRA_FILES="$(cat $6)"
1313
INSTALL_BCC=$7
1414
SKIP_DEVICE=$8 # Skip any device-specific stages
1515
VARIANT="--variant=minbase"
16+
REPO_URL=$9
1617

1718
time qemu-debootstrap --arch $ARCH --include=$PACKAGES $VARIANT \
18-
$DISTRO $OUT_TMP http://ftp.us.debian.org/debian/
19+
$DISTRO $OUT_TMP $REPO_URL
1920

2021
# Some reason debootstrap leaves these mounted
2122
umount $OUT_TMP/proc/sys/fs/binfmt_misc || true

utils/banners

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ usage() {
3434
c_info ""
3535
c_info " --build-image Build an ext4 .img with the base image and BCC (useful for Qemu)"
3636
c_info ""
37+
c_info " --mirror Specific the mirror for downloading debian images"
38+
c_info ""
3739
c_info " ** Folowing are misc build options **"
3840
c_info " --tempdir Use a specific temporary directory for build operation"
3941
c_info " --arch Specify an ARCH to build for (default arm64)"

0 commit comments

Comments
 (0)