Integrate sockeye with hake
authorDaniel Schwyn <schwyda@student.ethz.ch>
Thu, 1 Jun 2017 14:00:22 +0000 (16:00 +0200)
committerDaniel Schwyn <schwyda@student.ethz.ch>
Tue, 13 Jun 2017 12:22:43 +0000 (14:22 +0200)
Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

hake/RuleDefs.hs
socs/Hakefile [new file with mode: 0644]
socs/omap4460.soc [moved from tools/sockeye/omap4460.soc with 98% similarity]
usr/skb/Hakefile

index 8f2a4ae..6e5e283 100644 (file)
@@ -780,6 +780,18 @@ skateGenSchemas opts schema =
       ]]
 
 
+--
+-- Build SKB facts from Sockeye file
+--
+sockeyeProgLoc = In InstallTree "tools" "/bin/sockeye"
+sockeyeSpecFileLoc d = In SrcTree "src" ("/socs" </> (d ++ ".soc"))
+sockeyeFactFilePath d = "/sockeyefacts" </> (d ++ ".pl")
+
+sockeye :: String -> HRule
+sockeye net = Rule [ sockeyeProgLoc,
+                     sockeyeSpecFileLoc net,
+                     Str "-o", Out "" (sockeyeFactFilePath net)
+                   ]
 
 --
 -- Build a Fugu library
diff --git a/socs/Hakefile b/socs/Hakefile
new file mode 100644 (file)
index 0000000..3303211
--- /dev/null
@@ -0,0 +1,17 @@
+--------------------------------------------------------------------------
+-- Copyright (c) 2017, ETH Zurich.
+-- All rights reserved.
+--
+-- This file is distributed under the terms in the attached LICENSE file.
+-- If you do not find this file, copies can be found by writing to:
+-- ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
+--
+-- Hakefile for devices/
+--
+--------------------------------------------------------------------------
+
+[ sockeye f
+  | f <- [ "omap4460",
+           "overlayFail"
+         ]
+]
similarity index 98%
rename from tools/sockeye/omap4460.soc
rename to socs/omap4460.soc
index 8da44bc..cfdcc96 100644 (file)
@@ -13,7 +13,7 @@
 
 ram is accept [0x80000000/30]
 
-gptimer5 is accept [0x0/12]
+gptimer5 is accept [0x1/12]
 
 l3 is accept [0-0x40000000]
       map [
index d2a3dd1..837a6f8 100644 (file)
@@ -12,6 +12,7 @@
 
 let ramfs_files = find inDir "programs" ".pl" ++
                   find inDir ("programs" </> "platforms") ".pl"
+    sockeyeFiles = [ "omap4460" ]
     ramdisk = "/skb_ramfs.cpio.gz"
     args arch = application {
                         target = "skb",
@@ -37,5 +38,6 @@ in
     Rule ( [ Str "bash",
              In SrcTree "src" "skripts/mkcpio",
              NoDep SrcTree "src" "", Out "root" ramdisk]
-             ++ [ In SrcTree "src" f | f <- ramfs_files ] )
+             ++ [ In SrcTree "src" f | f <- ramfs_files ]
+             ++ [ In BuildTree "" (sockeyeFactFilePath f) | f <- sockeyeFiles ] )
   ]