summaryrefslogtreecommitdiff
path: root/morphlib
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-06-11 12:28:40 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2012-06-13 13:49:39 +0100
commit504f5455d0e0e39fffc7047e0adab5de22628ce0 (patch)
tree7779281929f4644789c36b5da5cd18b983043e21 /morphlib
parent5e2034d6be5922a685869ec6665b86aa2f1b7004 (diff)
downloadmorph-504f5455d0e0e39fffc7047e0adab5de22628ce0.tar.gz
SystemBuilder ARM: write kernel as System metadata
This should really be an artifact, but it is assumed that systems only generate one artifact, so this may be difficult.
Diffstat (limited to 'morphlib')
-rw-r--r--morphlib/builder2.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py
index 73abcc78..e072b09b 100644
--- a/morphlib/builder2.py
+++ b/morphlib/builder2.py
@@ -411,6 +411,19 @@ class SystemBuilder(BuilderBase): # pragma: no cover
self._install_boot_files(arch, factory_run_path, mount_point)
if arch in ('x86', 'x86_64', None):
self._install_extlinux(mount_point)
+ if arch in ('arm',):
+ # write the kernel as metadata to the cache
+ # it should probably be a full artifact, but
+ # that would require altering the artifact
+ # resolver
+ lac = self.local_artifact_cache
+ a = self.artifact
+ with lac.put_artifact_metadata(a, 'kernel') as dest:
+ with open(os.path.join(factory_path,
+ 'boot',
+ 'zImage')) as kernel:
+ shutil.copyfileobj(kernel, dest)
+
self._unmount(mount_point)
except BaseException, e:
logging.error('Got error while system image building, '