From 57909eb9bc22064a877357aebcb025d5e6660795 Mon Sep 17 00:00:00 2001 From: jbergler Date: Wed, 19 Nov 2014 21:57:24 +0000 Subject: [PATCH] Allow mixed kernel/userspace architecture. This is to allow building an image for a 64bit machine but with 32bit userspace. Probably not a common usecase but ideal if you need to address more higher quantities of memory but cant migrate to a full 64bit userspace due to something like ruby eating twice as much memory. --- bootstrapvz/base/manifest-schema.yml | 2 ++ bootstrapvz/common/tasks/bootstrap.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bootstrapvz/base/manifest-schema.yml b/bootstrapvz/base/manifest-schema.yml index 7110215..a49d2fa 100644 --- a/bootstrapvz/base/manifest-schema.yml +++ b/bootstrapvz/base/manifest-schema.yml @@ -40,6 +40,8 @@ properties: properties: architecture: enum: [i386, amd64] + userspace_architecture: + enum: [i386] bootloader: enum: - pvgrub diff --git a/bootstrapvz/common/tasks/bootstrap.py b/bootstrapvz/common/tasks/bootstrap.py index 5e99248..be9803d 100644 --- a/bootstrapvz/common/tasks/bootstrap.py +++ b/bootstrapvz/common/tasks/bootstrap.py @@ -19,7 +19,8 @@ class AddRequiredCommands(Task): def get_bootstrap_args(info): executable = ['debootstrap'] - options = ['--arch=' + info.manifest.system['architecture']] + arch = info.manifest.system.get('userspace_architecture', info.manifest.system.get('architecture')) + options = ['--arch=' + arch] if len(info.include_packages) > 0: options.append('--include=' + ','.join(info.include_packages)) if len(info.exclude_packages) > 0: