forked from u-root/u-root
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add conditional compilation to exclude any use of network packages for now. Further, `klauspost/zstd` is used, so to build this cmdlet with tinygo requires to set the build tag `noasm` as well: ``` tinygo build -tags noasm . ``` Signed-off-by: leongross <[email protected]>
- Loading branch information
Showing
3 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2014-2019 the u-root Authors. All rights reserved | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
//go:build linux && tinygo | ||
// +build linux,tinygo | ||
|
||
package libinit | ||
|
||
import ( | ||
"github.com/u-root/u-root/pkg/ulog" | ||
) | ||
|
||
// Stub for notifying the user that network functionality is not supported on linux platforms | ||
func linuxNetInit() { | ||
ulog.KernelLog.Printf("tinygo builds currently do not support network functionality on linux platforms\n") | ||
} | ||
|
||
func init() { | ||
osNetInit = linuxNetInit | ||
} |