summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Ogden <bernie.ogden@linaro.org>2015-10-23 16:22:06 +0100
committerBernard Ogden <bernie.ogden@linaro.org>2015-11-13 12:09:15 +0000
commit40914df944287832ea64195ed82debdd8eca0148 (patch)
treeb2c365cac2a289aef34fee0c98778035052a9b5b
parentb32a90145bf4b51e5b24c21010d174023513bad7 (diff)
jessie-arm64-benchmark filesystem
-rwxr-xr-xjessie-arm64-benchmark/Makefile35
-rw-r--r--jessie-arm64-benchmark/README16
-rwxr-xr-xjessie-arm64-benchmark/configure42
-rwxr-xr-xjessie-arm64-benchmark/customization/hooks/21-silence-systemd.chroot9
-rwxr-xr-xjessie-arm64-benchmark/customization/hooks/52-remove_etc_parts.binary6
-rw-r--r--jessie-arm64-benchmark/customization/includes.chroot/etc/default/locale1
-rw-r--r--jessie-arm64-benchmark/customization/includes.chroot/etc/rc.local18
-rw-r--r--jessie-arm64-benchmark/customization/package-lists/linaro-benchmark.list.chroot6
8 files changed, 133 insertions, 0 deletions
diff --git a/jessie-arm64-benchmark/Makefile b/jessie-arm64-benchmark/Makefile
new file mode 100755
index 0000000..0cd36e4
--- /dev/null
+++ b/jessie-arm64-benchmark/Makefile
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# (C) 2012-2015 Fathi Boudra <fathi.boudra@linaro.org>
+
+# Calls all necessary live-build programs in the correct order to complete
+# the bootstrap, chroot, binary, and source stage.
+
+# You need live-build package installed and superuser privileges.
+
+BUILD_NUMBER?=1
+BASEIMG=linaro-jessie-tcwg-benchmark
+IMAGEPREFIX=$(BASEIMG)-`date +%Y%m%d`-$(BUILD_NUMBER)
+LOGFILE=$(IMAGEPREFIX).build-log.txt
+CONFIGFILE=$(IMAGEPREFIX).config.tar.bz2
+LISTFILE=$(IMAGEPREFIX).contents
+PKGSFILE=$(IMAGEPREFIX).packages
+TARGZFILE=$(IMAGEPREFIX).tar.gz
+MD5SUMSFILE=$(IMAGEPREFIX).md5sums.txt
+SHA1SUMSFILE=$(IMAGEPREFIX).sha1sums.txt
+
+all:
+ set -e; sudo lb build 2>&1 | tee $(LOGFILE)
+ if [ -f binary-tar.tar.gz ]; then \
+ tar -jcf $(CONFIGFILE) auto/ config/ configure; \
+ sudo mv binary.contents $(LISTFILE); \
+ sudo mv chroot.packages.live $(PKGSFILE); \
+ sudo mv binary-tar.tar.gz $(TARGZFILE); \
+ md5sum $(LOGFILE) $(CONFIGFILE) $(LISTFILE) $(PKGSFILE) $(TARGZFILE) > $(MD5SUMSFILE); \
+ sha1sum $(LOGFILE) $(CONFIGFILE) $(LISTFILE) $(PKGSFILE) $(TARGZFILE) > $(SHA1SUMSFILE); \
+ fi
+
+clean:
+ sudo lb clean --purge
+ rm -f $(BASEIMG)-*
+ rm -rf config
diff --git a/jessie-arm64-benchmark/README b/jessie-arm64-benchmark/README
new file mode 100644
index 0000000..917e1f3
--- /dev/null
+++ b/jessie-arm64-benchmark/README
@@ -0,0 +1,16 @@
+* To build binary image:
+ * install live-build qemu-user-static
+ * run configure
+ * run make
+
+* Scripts:
+ * configure
+ * Makefile
+
+* Configuration Layout
+
+`-- ./config
+
+* Customization Layout
+
+`-- ./customization
diff --git a/jessie-arm64-benchmark/configure b/jessie-arm64-benchmark/configure
new file mode 100755
index 0000000..4c7fdd6
--- /dev/null
+++ b/jessie-arm64-benchmark/configure
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+# (C) 2012-2015 Fathi Boudra <fathi.boudra@linaro.org>
+
+# Create configuration for live-build.
+
+# You need live-build package installed.
+
+set -e
+
+echo "I: create configuration"
+export LB_BOOTSTRAP_INCLUDE="apt-transport-https gnupg"
+lb config \
+ --apt-indices none \
+ --apt-secure true \
+ --apt-recommends false \
+ --architectures arm64 \
+ --archive-areas 'main' \
+ --binary-filesystem ext4 \
+ --binary-images tar \
+ --bootstrap-qemu-arch arm64 \
+ --bootstrap-qemu-static /usr/bin/qemu-aarch64-static \
+ --cache false \
+ --chroot-filesystem none \
+ --compression gzip \
+ --debootstrap-options "--variant=minbase" \
+ --distribution jessie \
+ --gzip-options '-9 --rsyncable' \
+ --iso-publisher 'Linaro; http://www.linaro.org/; linaro-dev@lists.linaro.org' \
+ --iso-volume 'Linaro Jessie $(date +%Y%m%d-%H:%M)' \
+ --linux-flavours none \
+ --linux-packages none \
+ --mode debian \
+ --security false \
+ --system normal \
+ --updates false \
+ --backports false
+
+echo "I: copy customization"
+test -d customization && cp -rf customization/* config/
+
+echo "I: done"
diff --git a/jessie-arm64-benchmark/customization/hooks/21-silence-systemd.chroot b/jessie-arm64-benchmark/customization/hooks/21-silence-systemd.chroot
new file mode 100755
index 0000000..14849bc
--- /dev/null
+++ b/jessie-arm64-benchmark/customization/hooks/21-silence-systemd.chroot
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Make systemd less spammy
+
+sed -i 's/#LogLevel=info/LogLevel=warning/' \
+ /etc/systemd/system.conf
+
+sed -i 's/#LogTarget=journal-or-kmsg/LogTarget=journal/' \
+ /etc/systemd/system.conf
diff --git a/jessie-arm64-benchmark/customization/hooks/52-remove_etc_parts.binary b/jessie-arm64-benchmark/customization/hooks/52-remove_etc_parts.binary
new file mode 100755
index 0000000..3e34efd
--- /dev/null
+++ b/jessie-arm64-benchmark/customization/hooks/52-remove_etc_parts.binary
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+cd binary
+
+echo "I: rm /etc/resolv.conf"
+rm -f ./etc/resolv.conf
diff --git a/jessie-arm64-benchmark/customization/includes.chroot/etc/default/locale b/jessie-arm64-benchmark/customization/includes.chroot/etc/default/locale
new file mode 100644
index 0000000..f9c983c
--- /dev/null
+++ b/jessie-arm64-benchmark/customization/includes.chroot/etc/default/locale
@@ -0,0 +1 @@
+LANG=C.UTF-8
diff --git a/jessie-arm64-benchmark/customization/includes.chroot/etc/rc.local b/jessie-arm64-benchmark/customization/includes.chroot/etc/rc.local
new file mode 100644
index 0000000..39919ba
--- /dev/null
+++ b/jessie-arm64-benchmark/customization/includes.chroot/etc/rc.local
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+#
+# rc.local
+#
+# This script is executed at the end of each multiuser runlevel.
+# Make sure that the script will "exit 0" on success or any other
+# value on error.
+#
+# In order to enable or disable this script just change the execution
+# bits.
+#
+# By default this script does nothing.
+
+# Generate the SSH keys if non-existent
+test -f /etc/ssh/ssh_host_dsa_key || dpkg-reconfigure openssh-server
+test -f /etc/hostname || echo "tcwg-benchmark-`cat /sys/class/net/eno16777736/address`" > /etc/hostname
+
+exit 0
diff --git a/jessie-arm64-benchmark/customization/package-lists/linaro-benchmark.list.chroot b/jessie-arm64-benchmark/customization/package-lists/linaro-benchmark.list.chroot
new file mode 100644
index 0000000..2f615cf
--- /dev/null
+++ b/jessie-arm64-benchmark/customization/package-lists/linaro-benchmark.list.chroot
@@ -0,0 +1,6 @@
+bash
+make
+openssh-server
+rsync
+tar
+xz-utils