mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
include riscv64 in target architectures
Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
parent
18e7eea86f
commit
c1ba0bf160
2
src/cmd/linuxkit/cache/push.go
vendored
2
src/cmd/linuxkit/cache/push.go
vendored
@ -17,7 +17,7 @@ import (
|
||||
// If remoteName is empty, it is the same as name.
|
||||
// If withArchSpecificTags is true, it will push all arch-specific images in the index, each as
|
||||
// their own tag with the same name as the index, but with the architecture appended, e.g.
|
||||
// image:foo will have image:foo-amd64, image:foo-arm64, etc.
|
||||
// image:foo will have image:foo-amd64, image:foo-arm64, image:foo-riscv64, etc.
|
||||
func (p *Provider) Push(name, remoteName string, withArchSpecificTags, override bool) error {
|
||||
var (
|
||||
err error
|
||||
|
@ -60,7 +60,7 @@ type PkglibConfig struct {
|
||||
func NewPkgInfo() pkgInfo {
|
||||
return pkgInfo{
|
||||
Org: "linuxkit",
|
||||
Arches: []string{"amd64", "arm64"},
|
||||
Arches: []string{"amd64", "arm64", "riscv64"},
|
||||
Tag: "{{.Hash}}",
|
||||
GitRepo: "https://github.com/linuxkit/linuxkit",
|
||||
Network: false,
|
||||
|
@ -70,6 +70,8 @@ func init() {
|
||||
defaultArch = "x86_64"
|
||||
case "s390x":
|
||||
defaultArch = "s390x"
|
||||
case "riscv64":
|
||||
defaultArch = "riscv64"
|
||||
}
|
||||
switch {
|
||||
case runtime.GOARCH == "s390x":
|
||||
@ -475,6 +477,8 @@ func buildQemuCmdline(config QemuConfig) (QemuConfig, []string) {
|
||||
goArch = "arm64"
|
||||
case "x86_64":
|
||||
goArch = "amd64"
|
||||
case "riscv64":
|
||||
goArch = "riscv64"
|
||||
default:
|
||||
log.Fatalf("%s is an unsupported architecture.", config.Arch)
|
||||
}
|
||||
|
@ -20,6 +20,8 @@ func GoArch(in string) (string, error) {
|
||||
return "amd64", nil
|
||||
case "aarch64", "arm64":
|
||||
return "arm64", nil
|
||||
case "riscv64":
|
||||
return "riscv64", nil
|
||||
}
|
||||
return "", fmt.Errorf("unknown arch %q", in)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user