[Pkg-libvirt-commits] [libguestfs] 06/65: builder: Add script for building Fedora armv7l (32 bit ARM) guests.

Hilko Bengen bengen at moszumanska.debian.org
Tue Apr 21 12:10:42 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 2cb691e46eb36f1a31a43a943d31182ea33b56b5
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Sat Mar 28 23:20:13 2015 +0000

    builder: Add script for building Fedora armv7l (32 bit ARM) guests.
---
 builder/website/Makefile.am      |  1 +
 builder/website/fedora-armv7l.sh | 91 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 92 insertions(+)

diff --git a/builder/website/Makefile.am b/builder/website/Makefile.am
index 3d88817..665f53f 100644
--- a/builder/website/Makefile.am
+++ b/builder/website/Makefile.am
@@ -30,6 +30,7 @@ EXTRA_DIST = \
 	debian.sh \
 	fedora.sh \
 	fedora-aarch64.sh \
+	fedora-armv7l.sh \
 	fedora-ppc64.sh \
 	rhel.sh \
 	scientificlinux.sh \
diff --git a/builder/website/fedora-armv7l.sh b/builder/website/fedora-armv7l.sh
new file mode 100755
index 0000000..ed600ce
--- /dev/null
+++ b/builder/website/fedora-armv7l.sh
@@ -0,0 +1,91 @@
+#!/bin/bash -
+# virt-builder
+# Copyright (C) 2013-2015 Red Hat Inc.
+#
+# This program 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.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+# Build Fedora images for armv7l.
+
+unset CDPATH
+export LANG=C
+set -e
+set -x
+
+if [ $# -ne 1 ]; then
+    echo "$0 VERSION"
+    exit 1
+fi
+
+version=$1
+tree=http://mirror.ox.ac.uk/sites/download.fedora.redhat.com/pub/fedora/linux/releases/21/Server/armhfp/os/
+output=fedora-$version-armv7l
+tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
+
+rm -f $output $output.old $output.xz
+
+# Generate the kickstart to a temporary file.
+ks=$(mktemp)
+cat > $ks <<'EOF'
+install
+text
+reboot
+lang en_US.UTF-8
+keyboard us
+network --bootproto dhcp
+rootpw builder
+firewall --enabled --ssh
+selinux --enforcing
+timezone --utc America/New_York
+bootloader --location=mbr --append="console=tty0 console=ttyAMA0,115200 rd_NO_PLYMOUTH"
+zerombr
+clearpart --all --initlabel
+autopart --type=plain
+
+# Halt the system once configuration has finished.
+poweroff
+
+%packages
+ at core
+%end
+
+%post
+# Rerun dracut for the installed kernel (not the running kernel):
+KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
+dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
+%end
+EOF
+
+# Clean up function.
+cleanup ()
+{
+    rm -f $ks
+    virsh undefine $tmpname ||:
+}
+trap cleanup INT QUIT TERM EXIT ERR
+
+virt-install \
+    --name=$tmpname \
+    --ram=1024 \
+    --cpu=host --vcpus=2 \
+    --os-type=linux --os-variant=fedora21 \
+    --initrd-inject=$ks \
+    --extra-args="ks=file:/`basename $ks` console=tty0 console=ttyAMA0,115200 proxy=$http_proxy" \
+    --disk $(pwd)/$output,size=6 \
+    --serial pty \
+    --location=$tree \
+    --nographics \
+    --noreboot
+
+source $(dirname "$0")/compress.sh $output

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list