From 37acf72a18edb1d66f3ab73d291326646233d27c Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 15 Oct 2016 16:57:53 +0200 Subject: more debian/ubuntu versions --- examples/build_gold_image/build_debian7.sh | 48 +++++++++++++++++++++++++++ examples/build_gold_image/build_ubuntu1404.sh | 48 +++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100755 examples/build_gold_image/build_debian7.sh create mode 100755 examples/build_gold_image/build_ubuntu1404.sh diff --git a/examples/build_gold_image/build_debian7.sh b/examples/build_gold_image/build_debian7.sh new file mode 100755 index 0000000..ef34463 --- /dev/null +++ b/examples/build_gold_image/build_debian7.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Debian 7 + +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:${PATH} + +ARCH=$1 + +if test "x$ARCH" = "x"; then + echo "One argument expected (architecture)" 1>&2 + exit 1 +fi + +case $ARCH in + i686) + PACKAGE_ARCH=i386 + ARCH_SWITCH=linux32 + ;; + + x86_64) + PACKAGE_ARCH=amd64 + ARCH_SWITCH= + ;; + + *) + echo "Unsupported architecture '$ARCH'" 1>&2 + exit 1 +esac + +CHROOT_DIR=debian7-${ARCH} + +rm -rf $CHROOT_DIR + +mkdir $CHROOT_DIR + +debootstrap --verbose --arch=${PACKAGE_ARCH} --variant=minbase wheezy $CHROOT_DIR http://ftp.ch.debian.org/debian/ + +${ARCH_SWITCH} chroot ${CHROOT_DIR} apt-key update +${ARCH_SWITCH} chroot ${CHROOT_DIR} apt-get update + +cat >> $CHROOT_DIR/root/.bash_profile <&2 + exit 1 +fi + +case $ARCH in + i686) + PACKAGE_ARCH=i386 + ARCH_SWITCH=linux32 + ;; + + x86_64) + PACKAGE_ARCH=amd64 + ARCH_SWITCH= + ;; + + *) + echo "Unsupported architecture '$ARCH'" 1>&2 + exit 1 +esac + +CHROOT_DIR=ubuntu1404-${ARCH} + +rm -rf $CHROOT_DIR + +mkdir $CHROOT_DIR + +debootstrap --verbose --arch=${PACKAGE_ARCH} --variant=minbase trusty $CHROOT_DIR http://ch.archive.ubuntu.com/ubuntu/ + +${ARCH_SWITCH} chroot ${CHROOT_DIR} apt-key update +${ARCH_SWITCH} chroot ${CHROOT_DIR} apt-get update + +cat >> $CHROOT_DIR/root/.bash_profile <