aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-02-17 00:54:34 +0900
committerOphestra <cat@gensokyo.uk>2026-02-17 00:54:34 +0900
commit16966043c707d2b8d939089fc9bf6b2f1acfdd7e (patch)
tree431042d65ed66e5647488a1e5837211561eda866 /internal
parenta3515a6ef5f26d2a3a863c727457ad5078b13576 (diff)
internal/rosa: dtc artifact
Required by qemu. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
-rw-r--r--internal/rosa/all.go2
-rw-r--r--internal/rosa/dtc.go34
2 files changed, 36 insertions, 0 deletions
diff --git a/internal/rosa/all.go b/internal/rosa/all.go
index 4d8e3d74..94fba474 100644
--- a/internal/rosa/all.go
+++ b/internal/rosa/all.go
@@ -21,6 +21,7 @@ const (
CMake
Coreutils
Curl
+ DTC
Diffutils
Findutils
Flex
@@ -130,6 +131,7 @@ func ResolveName(name string) (p PArtifact, ok bool) {
"cmake": CMake,
"coreutils": Coreutils,
"curl": Curl,
+ "dtc": DTC,
"diffutils": Diffutils,
"findutils": Findutils,
"flex": Flex,
diff --git a/internal/rosa/dtc.go b/internal/rosa/dtc.go
new file mode 100644
index 00000000..7dff7d22
--- /dev/null
+++ b/internal/rosa/dtc.go
@@ -0,0 +1,34 @@
+package rosa
+
+import "hakurei.app/internal/pkg"
+
+func (t Toolchain) newDTC() pkg.Artifact {
+ const (
+ version = "1.7.2"
+ checksum = "vUoiRynPyYRexTpS6USweT5p4SVHvvVJs8uqFkkVD-YnFjwf6v3elQ0-Etrh00Dt"
+ )
+ return t.NewViaMeson("dtc", version, t.NewPatchedSource(
+ "dtc", version, pkg.NewHTTPGetTar(
+ nil, "https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/"+
+ "dtc-v"+version+".tar.gz",
+ mustDecode(checksum),
+ pkg.TarGzip,
+ ), false,
+ ), &MesonAttr{
+ // works around buggy test:
+ // fdtdump-runtest.sh /usr/src/dtc/tests/fdtdump.dts
+ Writable: true,
+
+ Configure: [][2]string{
+ {"Dyaml", "disabled"},
+ {"Dstatic-build", "true"},
+ },
+ },
+ t.Load(Flex),
+ t.Load(Bison),
+ t.Load(M4),
+ t.Load(Coreutils),
+ t.Load(Diffutils),
+ )
+}
+func init() { artifactsF[DTC] = Toolchain.newDTC }