We only do this building on architectures we support, so there's no
need for variation.
---
.../plugins/syslinux-disk-systembuilder_plugin.py | 22 +++++++++----------
.../syslinux-disk-builds-rootfs-and-kernel.script | 11 ++++++++-
2 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/morphlib/plugins/syslinux-disk-systembuilder_plugin.py
b/morphlib/plugins/syslinux-disk-systembuilder_plugin.py
index d91256e..7d46d61 100644
--- a/morphlib/plugins/syslinux-disk-systembuilder_plugin.py
+++ b/morphlib/plugins/syslinux-disk-systembuilder_plugin.py
@@ -60,22 +60,20 @@ class SyslinuxDiskBuilder(SystemKindBuilder): # pragma: no cover
self._create_subvolume(factory_path)
self._unpack_strata(factory_path)
self._create_fstab(factory_path)
- if arch in ('x86', 'x86_64'):
- self._create_extlinux_config(factory_path)
+ self._create_extlinux_config(factory_path)
self._create_subvolume_snapshot(
mount_point, 'factory', 'factory-run')
factory_run_path = os.path.join(mount_point, 'factory-run')
self._install_boot_files(arch, factory_run_path, mount_point)
- if arch in ('x86', 'x86_64'):
- self._install_extlinux(mount_point)
- if arch in ('arm',):
- a = self.new_artifact(
-
self.artifact.source.morphology['name']+'-kernel')
- with self.local_artifact_cache.put(a) as dest:
- with open(os.path.join(factory_path,
- 'boot',
- 'zImage')) as kernel:
- shutil.copyfileobj(kernel, dest)
+ self._install_extlinux(mount_point)
+
+ a = self.new_artifact(
+
self.artifact.source.morphology['name']+'-kernel')
+ with self.local_artifact_cache.put(a) as dest:
+ with open(os.path.join(factory_path,
+ 'boot',
+ 'vmlinuz')) as kernel:
+ shutil.copyfileobj(kernel, dest)
self._unmount(mount_point)
except BaseException, e:
diff --git a/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script
b/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script
index 10b563a..b921600 100755
--- a/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script
+++ b/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script
@@ -20,6 +20,13 @@
set -eu
+# We only support x86 systems with syslinux-disk.
+arch=$(uname -m)
+case "$arch" in
+ x86*) ;;
+ *) exit 0 ;;
+esac
+
cache="$DATADIR/cache/artifacts"
kernelrepo="$DATADIR/kernel-repo"
morphsrepo="$DATADIR/morphs-repo"
@@ -29,10 +36,10 @@ cd "$morphsrepo"
git checkout --quiet -b custom master
cat <<EOF >system.morph
{
- "name": "x86_64-system",
+ "name": "system",
"kind": "system",
"system-kind": "syslinux-disk",
- "arch": "x86_64",
+ "arch": "$(arch)",
"disk-size": "1G",
"strata": [
"stratum"
--
1.7.2.5