From d0407197ba7cea0b5cdeb67012180fb5d87f0e19 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 29 Jan 2021 13:02:28 +0100 Subject: pkg/build: add a new way of building linux images Add a new, simpler procedure: working bootable image is accepted as an input and we only replace the kernel in it. This just looks much saner and the right way to do it (instead of assembling the image from bits and shelling out to mkfs, fdisk, grub, etc). The new way also works inside of containers much better. --- pkg/build/linux_nolinux.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 pkg/build/linux_nolinux.go (limited to 'pkg/build/linux_nolinux.go') diff --git a/pkg/build/linux_nolinux.go b/pkg/build/linux_nolinux.go new file mode 100644 index 000000000..1bffbeaae --- /dev/null +++ b/pkg/build/linux_nolinux.go @@ -0,0 +1,14 @@ +// Copyright 2021 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +// +build !linux + +package build + +import ( + "errors" +) + +func embedLinuxKernel(params *Params, kernelPath string) error { + return errors.New("building linux image is only supported on linux") +} -- cgit mrf-deployment