diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2015-10-31 12:27:11 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2015-10-31 12:27:11 +0100 |
commit | ccd4d0bb0f603e3e7ccbdc476c963c7b24e687e4 (patch) | |
tree | cd68f1f4920c3e60f28c74e4c353fed6b90adf6d | |
parent | 19e767bab6527685afae5f521b9437ae69c1d51f (diff) | |
download | biruda-ccd4d0bb0f603e3e7ccbdc476c963c7b24e687e4.tar.gz biruda-ccd4d0bb0f603e3e7ccbdc476c963c7b24e687e4.tar.bz2 |
added ubuntu bootstrapping
-rwxr-xr-x | examples/build_gold_image/build_ubuntu1510.sh | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/examples/build_gold_image/build_ubuntu1510.sh b/examples/build_gold_image/build_ubuntu1510.sh new file mode 100755 index 0000000..1339f0f --- /dev/null +++ b/examples/build_gold_image/build_ubuntu1510.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Ubuntu 15.10 + +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=ubuntu1510-${ARCH} + +rm -rf $CHROOT_DIR + +mkdir $CHROOT_DIR + +debootstrap --verbose --arch=${PACKAGE_ARCH} --variant=minbase wily $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 <<EOF +export PATH=\$PATH:/usr/sbin:/usr/bin:/sbin:/bin +export PS1='[ubuntu1510:\u@\h \W]\$ ' +EOF + +# development stuff + +${ARCH_SWITCH} chroot ${CHROOT_DIR} apt-get -y install make gcc g++ build-essentials debhelper |