Support non-default debootstrap mirrors

This commit is contained in:
JeremyRand 2018-12-01 16:33:00 +00:00
parent a47c625df8
commit cd7a75bee6
No known key found for this signature in database
GPG Key ID: B3F2D165786D6570
2 changed files with 9 additions and 1 deletions

View File

@ -170,6 +170,8 @@ TO begin with:
`make kernel_inject` Injects a newly built kernel into a previously build PrawnOS.img located in the root of the checkout
You can use the environment variable `PRAWNOS_DEBOOTSTRAP_MIRROR` to use a non-default Debian mirror with debootstrap. For example, to use [Debian's Tor onion service mirror](https://onion.debian.org/) with debootstrap, you can build with `sudo PRAWNOS_DEBOOTSTRAP_MIRROR=http://vwakviie2ienjx6t.onion/debian make image`.
### GPU Support

View File

@ -78,9 +78,15 @@ create_image() {
# create a 2GB image with the Chrome OS partition layout
create_image PrawnOS-Alpha-c201-libre-2GB.img $outdev 50M 40 $outmnt
# use default debootstrap mirror if none is specified
if [ "$PRAWNOS_DEBOOTSTRAP_MIRROR" = "" ]
then
PRAWNOS_DEBOOTSTRAP_MIRROR=http://ftp.us.debian.org/debian
fi
# install Debian on it
export DEBIAN_FRONTEND=noninteractive
qemu-debootstrap --arch armhf stretch --include locales,init --keyring=$build_resources/debian-archive-keyring.gpg $outmnt http://ftp.us.debian.org/debian
qemu-debootstrap --arch armhf stretch --include locales,init --keyring=$build_resources/debian-archive-keyring.gpg $outmnt $PRAWNOS_DEBOOTSTRAP_MIRROR
chroot $outmnt passwd -d root