This is an automated email from the git hooks/post-receive script.
bernie.ogden pushed a commit to branch bernie/fs in repository toolchain/abe.
commit 8178823d8d1865020dd9bc51334f90a5696c6058 Author: Bernard Ogden bernie.ogden@linaro.org Date: Wed Jul 29 12:00:24 2015 +0200
wip: filesystem script
Change-Id: If013a3507396c219ff8a023bad8a68651391c468 --- config/bench/fs/makefs.sh | 101 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+)
diff --git a/config/bench/fs/makefs.sh b/config/bench/fs/makefs.sh new file mode 100755 index 0000000..5f81632 --- /dev/null +++ b/config/bench/fs/makefs.sh @@ -0,0 +1,101 @@ +#!/bin/bash +set -e +set -u +set -o pipefail + +#All of these variables MUST be defined and non-empty +export stamp=20150607T041354Z +export suite=jessie +export variant=minbase +export include=openssh-server,wget,make,cpufrequtils +export label=target +export hash="`git rev-parse HEAD`" +if test $? -ne 0; then + echo "Could not determine local rev" &>2 + exit 1 +fi + +export nosudo=${1:-} + +function derivevars { + echo ${arch:?Must give arch} > /dev/null + echo ${label:?Must give label} > /dev/null + extras="${include}${extras:+,${extras}}" + outdir="${label}-${arch}-${stamp}-${hash}" + tarball="${outdir}.tar.gz" + if test -e "${outdir}"; then + echo "${outdir} already exists" &>2 + exit 1 + fi + if test -e "${tarball}"; then + echo "${tarball} already exists" &>2 + exit 1 + fi + if test x"${arch}" = "xx86-64"; then + foreign= + else + foreign="--foreign --arch=${arch}" + fi +} + +function gentar { + /usr/sbin/debootstrap --make-tarball="${tarball}" \ + ${variant:+--variant="${variant}"} \ + --include="${extras}" \ + "${suite}" "${outdir}" \ + http://snapshot.debian.org/archive/debian/%24%7Bstamp%7D +} + +function genrootfs { + if test x"${nosudo}" != x; then return 0; fi + + #This command sets a mirror just in case we need to get anything + #from the net - but, IIUC, it should not be used. + sudo /usr/sbin/debootstrap --unpack-tarball="$1" \ + ${variant:+--variant="${variant}"} \ + --include="${extras}" \ + --keep-debootstrap-dir \ + "${suite}" "${outdir}" \ + ${foreign:-} \ + http://snapshot.debian.org/archive/debian/%24%7Bstamp%7D +} + + +( #armhf - full target + arch=armhf + variant= + derivevars + gentar + genrootfs +) + +( #armhf - minimal target + arch=x86_64 + derivevars + gentar + genrootfs +) + +( #aarch64 - full target + arch=aarch64 + variant= + derivevars + gentar + genrootfs +) + +( #aarch64 - minimal target + arch=aarch64 + derivevars + gentar + genrootfs +) + +( #kvm host - many of the extras are abe dependencies, it will not configure witho [...] + arch=x86_64 + label=host + extras=autogen,binutils,bison,dejagnu,flex,gawk,gcc,gcc-multilib,g++-multilib,gi [...] + derivevars + gentar + genrootfs +)