summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Ogden <bernie.ogden@linaro.org>2015-11-12 08:45:21 +0000
committerBernard Ogden <bernie.ogden@linaro.org>2015-11-13 12:14:57 +0000
commita8b98a76413b21717113840ca3752ac0cddb4b87 (patch)
tree0e856273bea9fc9fad4e8b3fc1f04f757f931e31
parentdefbbac819597d87746bf183ad12ff0be30a5b41 (diff)
WIP: Initial adds for other archesbenchmarking
Change-Id: Ic953b0e9bf17f2f84c8d2b5dd9ba15a16eb447b0
-rwxr-xr-xjessie-amd64-benchmark/Makefile35
-rw-r--r--jessie-amd64-benchmark/README16
-rwxr-xr-xjessie-amd64-benchmark/configure40
-rwxr-xr-xjessie-amd64-benchmark/customization/hooks/21-silence-systemd.chroot9
-rwxr-xr-xjessie-amd64-benchmark/customization/hooks/52-remove_etc_parts.binary6
-rw-r--r--jessie-amd64-benchmark/customization/includes.chroot/etc/default/locale1
-rw-r--r--jessie-amd64-benchmark/customization/includes.chroot/etc/hostname1
-rwxr-xr-xjessie-amd64-benchmark/customization/includes.chroot/etc/rc.local18
-rw-r--r--jessie-amd64-benchmark/customization/includes.chroot/etc/systemd/system/rc-local.service21
-rw-r--r--jessie-amd64-benchmark/customization/includes.chroot/lib/systemd/system/serial-getty@.service35
-rw-r--r--jessie-amd64-benchmark/customization/package-lists/linaro-benchmark.list.chroot10
-rwxr-xr-xjessie-armhf-benchmark/Makefile35
-rw-r--r--jessie-armhf-benchmark/README16
-rwxr-xr-xjessie-armhf-benchmark/configure42
-rwxr-xr-xjessie-armhf-benchmark/customization/hooks/21-silence-systemd.chroot9
-rwxr-xr-xjessie-armhf-benchmark/customization/hooks/52-remove_etc_parts.binary6
-rw-r--r--jessie-armhf-benchmark/customization/includes.chroot/etc/default/locale1
-rw-r--r--jessie-armhf-benchmark/customization/includes.chroot/etc/hostname1
-rwxr-xr-xjessie-armhf-benchmark/customization/includes.chroot/etc/rc.local18
-rw-r--r--jessie-armhf-benchmark/customization/includes.chroot/etc/systemd/system/rc-local.service21
-rw-r--r--jessie-armhf-benchmark/customization/includes.chroot/lib/systemd/system/serial-getty@.service35
-rw-r--r--jessie-armhf-benchmark/customization/package-lists/linaro-benchmark.list.chroot10
22 files changed, 386 insertions, 0 deletions
diff --git a/jessie-amd64-benchmark/Makefile b/jessie-amd64-benchmark/Makefile
new file mode 100755
index 0000000..0cd36e4
--- /dev/null
+++ b/jessie-amd64-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-amd64-benchmark/README b/jessie-amd64-benchmark/README
new file mode 100644
index 0000000..917e1f3
--- /dev/null
+++ b/jessie-amd64-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-amd64-benchmark/configure b/jessie-amd64-benchmark/configure
new file mode 100755
index 0000000..9e2bacd
--- /dev/null
+++ b/jessie-amd64-benchmark/configure
@@ -0,0 +1,40 @@
+#!/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 amd64 \
+ --archive-areas 'main' \
+ --binary-filesystem ext4 \
+ --binary-images tar \
+ --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-amd64-benchmark/customization/hooks/21-silence-systemd.chroot b/jessie-amd64-benchmark/customization/hooks/21-silence-systemd.chroot
new file mode 100755
index 0000000..14849bc
--- /dev/null
+++ b/jessie-amd64-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-amd64-benchmark/customization/hooks/52-remove_etc_parts.binary b/jessie-amd64-benchmark/customization/hooks/52-remove_etc_parts.binary
new file mode 100755
index 0000000..3e34efd
--- /dev/null
+++ b/jessie-amd64-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-amd64-benchmark/customization/includes.chroot/etc/default/locale b/jessie-amd64-benchmark/customization/includes.chroot/etc/default/locale
new file mode 100644
index 0000000..f9c983c
--- /dev/null
+++ b/jessie-amd64-benchmark/customization/includes.chroot/etc/default/locale
@@ -0,0 +1 @@
+LANG=C.UTF-8
diff --git a/jessie-amd64-benchmark/customization/includes.chroot/etc/hostname b/jessie-amd64-benchmark/customization/includes.chroot/etc/hostname
new file mode 100644
index 0000000..dbedd8c
--- /dev/null
+++ b/jessie-amd64-benchmark/customization/includes.chroot/etc/hostname
@@ -0,0 +1 @@
+tcwg-benchmark
diff --git a/jessie-amd64-benchmark/customization/includes.chroot/etc/rc.local b/jessie-amd64-benchmark/customization/includes.chroot/etc/rc.local
new file mode 100755
index 0000000..39919ba
--- /dev/null
+++ b/jessie-amd64-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-amd64-benchmark/customization/includes.chroot/etc/systemd/system/rc-local.service b/jessie-amd64-benchmark/customization/includes.chroot/etc/systemd/system/rc-local.service
new file mode 100644
index 0000000..4cd18d0
--- /dev/null
+++ b/jessie-amd64-benchmark/customization/includes.chroot/etc/systemd/system/rc-local.service
@@ -0,0 +1,21 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=/etc/rc.local Compatibility
+ConditionPathExists=/etc/rc.local
+
+[Service]
+Type=forking
+ExecStart=/etc/rc.local start
+TimeoutSec=0
+StandardOutput=tty
+RemainAfterExit=yes
+SysVStartPriority=99
+
+[Install]
+WantedBy=multi-user.target
diff --git a/jessie-amd64-benchmark/customization/includes.chroot/lib/systemd/system/serial-getty@.service b/jessie-amd64-benchmark/customization/includes.chroot/lib/systemd/system/serial-getty@.service
new file mode 100644
index 0000000..4ddbadc
--- /dev/null
+++ b/jessie-amd64-benchmark/customization/includes.chroot/lib/systemd/system/serial-getty@.service
@@ -0,0 +1,35 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Serial Getty on %I
+Documentation=man:agetty(8) man:systemd-getty-generator(8)
+Documentation=http://0pointer.de/blog/projects/serial-console.html
+BindsTo=dev-%i.device
+After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
+After=rc-local.service
+
+# If additional gettys are spawned during boot then we should make
+# sure that this is synchronized before getty.target, even though
+# getty.target didn't actually pull it in.
+Before=getty.target
+IgnoreOnIsolate=yes
+
+[Service]
+ExecStart=-/sbin/agetty --autologin root --keep-baud 115200,38400,9600 %I $TERM
+Type=idle
+Restart=always
+UtmpIdentifier=%I
+TTYPath=/dev/%I
+TTYReset=yes
+TTYVHangup=yes
+KillMode=process
+IgnoreSIGPIPE=no
+SendSIGHUP=yes
+
+[Install]
+WantedBy=getty.target
diff --git a/jessie-amd64-benchmark/customization/package-lists/linaro-benchmark.list.chroot b/jessie-amd64-benchmark/customization/package-lists/linaro-benchmark.list.chroot
new file mode 100644
index 0000000..9936fa1
--- /dev/null
+++ b/jessie-amd64-benchmark/customization/package-lists/linaro-benchmark.list.chroot
@@ -0,0 +1,10 @@
+bash
+bc
+inetutils-ping
+iproute2
+make
+net-tools
+openssh-server
+rsync
+tar
+xz-utils
diff --git a/jessie-armhf-benchmark/Makefile b/jessie-armhf-benchmark/Makefile
new file mode 100755
index 0000000..0cd36e4
--- /dev/null
+++ b/jessie-armhf-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-armhf-benchmark/README b/jessie-armhf-benchmark/README
new file mode 100644
index 0000000..917e1f3
--- /dev/null
+++ b/jessie-armhf-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-armhf-benchmark/configure b/jessie-armhf-benchmark/configure
new file mode 100755
index 0000000..de551e9
--- /dev/null
+++ b/jessie-armhf-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 armhf \
+ --archive-areas 'main' \
+ --binary-filesystem ext4 \
+ --binary-images tar \
+ --bootstrap-qemu-arch armhf \
+ --bootstrap-qemu-static /usr/bin/qemu-arm-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-armhf-benchmark/customization/hooks/21-silence-systemd.chroot b/jessie-armhf-benchmark/customization/hooks/21-silence-systemd.chroot
new file mode 100755
index 0000000..14849bc
--- /dev/null
+++ b/jessie-armhf-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-armhf-benchmark/customization/hooks/52-remove_etc_parts.binary b/jessie-armhf-benchmark/customization/hooks/52-remove_etc_parts.binary
new file mode 100755
index 0000000..3e34efd
--- /dev/null
+++ b/jessie-armhf-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-armhf-benchmark/customization/includes.chroot/etc/default/locale b/jessie-armhf-benchmark/customization/includes.chroot/etc/default/locale
new file mode 100644
index 0000000..f9c983c
--- /dev/null
+++ b/jessie-armhf-benchmark/customization/includes.chroot/etc/default/locale
@@ -0,0 +1 @@
+LANG=C.UTF-8
diff --git a/jessie-armhf-benchmark/customization/includes.chroot/etc/hostname b/jessie-armhf-benchmark/customization/includes.chroot/etc/hostname
new file mode 100644
index 0000000..dbedd8c
--- /dev/null
+++ b/jessie-armhf-benchmark/customization/includes.chroot/etc/hostname
@@ -0,0 +1 @@
+tcwg-benchmark
diff --git a/jessie-armhf-benchmark/customization/includes.chroot/etc/rc.local b/jessie-armhf-benchmark/customization/includes.chroot/etc/rc.local
new file mode 100755
index 0000000..39919ba
--- /dev/null
+++ b/jessie-armhf-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-armhf-benchmark/customization/includes.chroot/etc/systemd/system/rc-local.service b/jessie-armhf-benchmark/customization/includes.chroot/etc/systemd/system/rc-local.service
new file mode 100644
index 0000000..4cd18d0
--- /dev/null
+++ b/jessie-armhf-benchmark/customization/includes.chroot/etc/systemd/system/rc-local.service
@@ -0,0 +1,21 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=/etc/rc.local Compatibility
+ConditionPathExists=/etc/rc.local
+
+[Service]
+Type=forking
+ExecStart=/etc/rc.local start
+TimeoutSec=0
+StandardOutput=tty
+RemainAfterExit=yes
+SysVStartPriority=99
+
+[Install]
+WantedBy=multi-user.target
diff --git a/jessie-armhf-benchmark/customization/includes.chroot/lib/systemd/system/serial-getty@.service b/jessie-armhf-benchmark/customization/includes.chroot/lib/systemd/system/serial-getty@.service
new file mode 100644
index 0000000..4ddbadc
--- /dev/null
+++ b/jessie-armhf-benchmark/customization/includes.chroot/lib/systemd/system/serial-getty@.service
@@ -0,0 +1,35 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Serial Getty on %I
+Documentation=man:agetty(8) man:systemd-getty-generator(8)
+Documentation=http://0pointer.de/blog/projects/serial-console.html
+BindsTo=dev-%i.device
+After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
+After=rc-local.service
+
+# If additional gettys are spawned during boot then we should make
+# sure that this is synchronized before getty.target, even though
+# getty.target didn't actually pull it in.
+Before=getty.target
+IgnoreOnIsolate=yes
+
+[Service]
+ExecStart=-/sbin/agetty --autologin root --keep-baud 115200,38400,9600 %I $TERM
+Type=idle
+Restart=always
+UtmpIdentifier=%I
+TTYPath=/dev/%I
+TTYReset=yes
+TTYVHangup=yes
+KillMode=process
+IgnoreSIGPIPE=no
+SendSIGHUP=yes
+
+[Install]
+WantedBy=getty.target
diff --git a/jessie-armhf-benchmark/customization/package-lists/linaro-benchmark.list.chroot b/jessie-armhf-benchmark/customization/package-lists/linaro-benchmark.list.chroot
new file mode 100644
index 0000000..9936fa1
--- /dev/null
+++ b/jessie-armhf-benchmark/customization/package-lists/linaro-benchmark.list.chroot
@@ -0,0 +1,10 @@
+bash
+bc
+inetutils-ping
+iproute2
+make
+net-tools
+openssh-server
+rsync
+tar
+xz-utils