aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/build/linux_nolinux.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2021-01-29 13:02:28 +0100
committerDmitry Vyukov <dvyukov@google.com>2021-01-29 15:48:16 +0100
commitd0407197ba7cea0b5cdeb67012180fb5d87f0e19 (patch)
tree34ecb531a55a96f4ec88a5088d21108e9136542d /pkg/build/linux_nolinux.go
parent7de5d7d8442f187ab8eb59a4df93863f1390398a (diff)
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.
Diffstat (limited to 'pkg/build/linux_nolinux.go')
-rw-r--r--pkg/build/linux_nolinux.go14
1 files changed, 14 insertions, 0 deletions
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")
+}