This repository was archived by the owner on Feb 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ FULL=0 # Default to a minimal install
1919DOWNLOAD=1 # Default to downloading from web
2020SKIP_DEVICE=0 # Skip device preparation
2121INSTALL_BCC=0 # Decide if BCC is to be installed
22+ DEBIAN_URL=http://ftp.us.debian.org/debian/
2223
2324# Default packages
2425PACKAGES=" "
@@ -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; ;;
6870esac
6971done
@@ -238,7 +240,7 @@ ex_files=$(mktemp); echo $EXTRA_FILES > $ex_files
238240
239241sudo $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
242244rm $ex_files
243245
244246# If we only wanted to prepare a rootfs and don't have
Original file line number Diff line number Diff line change @@ -13,9 +13,10 @@ EXTRA_FILES="$(cat $6)"
1313INSTALL_BCC=$7
1414SKIP_DEVICE=$8 # Skip any device-specific stages
1515VARIANT=" --variant=minbase"
16+ REPO_URL=$9
1617
1718time 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
2122umount $OUT_TMP /proc/sys/fs/binfmt_misc || true
Original file line number Diff line number Diff 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)"
You can’t perform that action at this time.
0 commit comments