From 604f7c2a55f458c51df9161c018c8482a733cf49 Mon Sep 17 00:00:00 2001 From: Martin Sehnoutka Date: Thu, 4 Jun 2020 09:36:48 +0200 Subject: [PATCH] osbuild: introduce bootloader struct into qemu assembler osbuild takes a "bootloader" object as an option to the qemu assembler: https://github.com/osbuild/osbuild/blob/3f14ace5c1ac876555aab6e05aa6f0f8dbbe278b/assemblers/org.osbuild.qemu#L43 we don't use it because for x86_64 with enabled legacy support it defaults to the right value: https://github.com/osbuild/osbuild/blob/3f14ace5c1ac876555aab6e05aa6f0f8dbbe278b/assemblers/org.osbuild.qemu#L482 but in order to gain support for ppc64le we need to introduce this. Example usage can be found in samples directory: https://github.com/osbuild/osbuild/blob/3f14ace5c1ac876555aab6e05aa6f0f8dbbe278b/samples/f30-ppc64le.json#L819 This change itself does not alter osbuild-composer output. --- internal/osbuild/qemu_assembler.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/osbuild/qemu_assembler.go b/internal/osbuild/qemu_assembler.go index c245c1431..95b9807b5 100644 --- a/internal/osbuild/qemu_assembler.go +++ b/internal/osbuild/qemu_assembler.go @@ -9,6 +9,7 @@ import "github.com/google/uuid" // containing the indicated partitions. Finally, the image is converted into // the target format and stored with the given filename. type QEMUAssemblerOptions struct { + Bootloader *QEMUBootloader `json:"bootloader,omitempty"` Format string `json:"format"` Filename string `json:"filename"` Size uint64 `json:"size"` @@ -33,6 +34,11 @@ type QEMUFilesystem struct { Mountpoint string `json:"mountpoint"` } +type QEMUBootloader struct { + Type string `json:"type"` + Platform string `json:"platform"` +} + func (QEMUAssemblerOptions) isAssemblerOptions() {} // NewQEMUAssembler creates a new QEMU Assembler object.