aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/mbf/cache.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/mbf/cache.go')
-rw-r--r--cmd/mbf/cache.go22
1 files changed, 3 insertions, 19 deletions
diff --git a/cmd/mbf/cache.go b/cmd/mbf/cache.go
index b683326f..71cef98b 100644
--- a/cmd/mbf/cache.go
+++ b/cmd/mbf/cache.go
@@ -8,7 +8,6 @@ import (
"testing"
"hakurei.app/check"
- "hakurei.app/container"
"hakurei.app/internal/pkg"
"hakurei.app/internal/rosa"
"hakurei.app/message"
@@ -111,24 +110,9 @@ func (cache *cache) open() (err error) {
return
}
- pkg.RegisterArch("riscv64", container.BinfmtEntry{
- Offset: 0,
- Magic: "\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00",
- Mask: "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff",
- Interpreter: pathname.Append(
- "system/bin",
- "qemu-riscv64",
- ),
- })
- pkg.RegisterArch("arm64", container.BinfmtEntry{
- Offset: 0,
- Magic: "\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00",
- Mask: "\xff\xff\xff\xff\xff\xff\xff\xfc\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff",
- Interpreter: pathname.Append(
- "system/bin",
- "qemu-aarch64",
- ),
- })
+ for arch, entry := range rosa.Arches(pathname) {
+ pkg.RegisterArch(arch, entry)
+ }
}
return