Skip to content

Commit

Permalink
pkg/build: make linux implement binary signer
Browse files Browse the repository at this point in the history
We were almost there...

Update #1271
  • Loading branch information
dvyukov committed Nov 25, 2019
1 parent 598ca6c commit 371caf7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/build/linux.go
Expand Up @@ -26,6 +26,8 @@ import (

type linux struct{}

var _ signer = linux{}

func (linux linux) build(params *Params) error {
if err := linux.buildKernel(params); err != nil {
return err
Expand All @@ -36,6 +38,10 @@ func (linux linux) build(params *Params) error {
return nil
}

func (linux linux) sign(params *Params) (string, error) {
return elfBinarySignature(filepath.Join(params.OutputDir, "obj", "vmlinux"))
}

func (linux) buildKernel(params *Params) error {
configFile := filepath.Join(params.KernelDir, ".config")
if err := osutil.WriteFile(configFile, params.Config); err != nil {
Expand Down
2 changes: 2 additions & 0 deletions pkg/vcs/linux.go
Expand Up @@ -21,6 +21,8 @@ type linux struct {
*git
}

var _ Bisecter = new(linux)

func newLinux(dir string) *linux {
ignoreCC := map[string]bool{
"stable@vger.kernel.org": true,
Expand Down

0 comments on commit 371caf7

Please sign in to comment.