From b4704b8ba13ae09620f5990646b7316c0cb8134b Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Mon, 15 Jan 2018 13:49:07 +0000 Subject: [PATCH] config: Add 'ucode' to the kernel schema This optional option will allow users to specify a CPU microcode cpio archive to be prepended to the initrd file. Signed-off-by: Rolf Neugebauer --- src/moby/config.go | 4 ++++ src/moby/schema.go | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/moby/config.go b/src/moby/config.go index ac2ef3884..fc1107d5a 100644 --- a/src/moby/config.go +++ b/src/moby/config.go @@ -36,6 +36,7 @@ type KernelConfig struct { Cmdline string `yaml:"cmdline,omitempty" json:"cmdline,omitempty"` Binary string `yaml:"binary,omitempty" json:"binary,omitempty"` Tar *string `yaml:"tar,omitempty" json:"tar,omitempty"` + UCode *string `yaml:"ucode,omitempty" json:"ucode,omitempty"` ref *reference.Spec } @@ -289,6 +290,9 @@ func AppendConfig(m0, m1 Moby) (Moby, error) { if m1.Kernel.Tar != nil { moby.Kernel.Tar = m1.Kernel.Tar } + if m1.Kernel.UCode != nil { + moby.Kernel.UCode = m1.Kernel.UCode + } if m1.Kernel.ref != nil { moby.Kernel.ref = m1.Kernel.ref } diff --git a/src/moby/schema.go b/src/moby/schema.go index 2ca2c3c4f..7c2771214 100644 --- a/src/moby/schema.go +++ b/src/moby/schema.go @@ -13,7 +13,8 @@ var schema = string(` "image": {"type": "string"}, "cmdline": {"type": "string"}, "binary": {"type": "string"}, - "tar": {"type": "string"} + "tar": {"type": "string"}, + "ucode": {"type": "string"} } }, "file": {