xeon phi: fix vfs deps to not build megaraid
authorSimon Gerber <simon.gerber@inf.ethz.ch>
Tue, 18 Aug 2015 17:23:21 +0000 (19:23 +0200)
committerSimon Gerber <simon.gerber@inf.ethz.ch>
Tue, 18 Aug 2015 17:23:21 +0000 (19:23 +0200)
Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

hake/RuleDefs.hs
lib/vfs/Hakefile
usr/drivers/cpuboot/Hakefile
usr/fish/Hakefile
usr/kaluga/Hakefile
usr/spawnd/Hakefile
usr/startd/Hakefile

index 851e35e..ff59d5c 100644 (file)
@@ -1107,7 +1107,7 @@ data LibDepTree = LibDep String | LibDeps [LibDepTree] deriving (Show,Eq)
 -- defined each own dependencies locally, but that does not seem to be an
 -- easy thing to do currently
 libposixcompat_deps   = LibDeps [ LibDep "posixcompat",
-                                  libvfs_deps_all, LibDep "term_server" ]
+                                  (libvfs_deps_all "vfs"), LibDep "term_server" ]
 liblwip_deps          = LibDeps $ [ LibDep x | x <- deps ]
     where deps = ["lwip" ,"contmng" ,"net_if_raw" ,"timer" ,"hashtable"]
 libnetQmng_deps       = LibDeps $ [ LibDep x | x <- deps ]
@@ -1120,20 +1120,21 @@ libopenbsdcompat_deps = LibDeps [ libposixcompat_deps, LibDep "crypto",
 
 -- we need to make vfs more modular to make this actually useful
 data VFSModules = VFS_RamFS | VFS_NFS | VFS_BlockdevFS | VFS_FAT
-vfsdeps :: [VFSModules] -> [LibDepTree]
-vfsdeps []                  = [LibDep "vfs"]
-vfsdeps (VFS_RamFS:xs)      = [] ++ vfsdeps xs
-vfsdeps (VFS_NFS:xs)        = [libnfs_deps] ++ vfsdeps xs
-vfsdeps (VFS_BlockdevFS:xs) = [LibDep "ahci", LibDep "megaraid"] ++ vfsdeps xs
-vfsdeps (VFS_FAT:xs)        = [] ++ vfsdeps xs
-
-libvfs_deps_all        = LibDeps $ vfsdeps [VFS_NFS, VFS_RamFS, VFS_BlockdevFS,
-                                            VFS_FAT]
-libvfs_deps_nonfs      = LibDeps $ vfsdeps [VFS_RamFS, VFS_BlockdevFS, VFS_FAT]
-libvfs_deps_nfs        = LibDeps $ vfsdeps [VFS_NFS]
-libvfs_deps_ramfs      = LibDeps $ vfsdeps [VFS_RamFS]
-libvfs_deps_blockdevfs = LibDeps $ vfsdeps [VFS_BlockdevFS]
-libvfs_deps_fat        = LibDeps $ vfsdeps [VFS_FAT, VFS_BlockdevFS]
+vfsdeps :: [VFSModules] -> String -> [LibDepTree]
+vfsdeps [] t                  = [LibDep t]
+vfsdeps (VFS_RamFS:xs) t      = [] ++ vfsdeps xs t
+vfsdeps (VFS_NFS:xs) t        = [libnfs_deps] ++ vfsdeps xs t
+vfsdeps (VFS_BlockdevFS:xs) t = [LibDep "ahci", LibDep "megaraid"] ++ vfsdeps xs t
+vfsdeps (VFS_FAT:xs) t        = [] ++ vfsdeps xs t
+
+libvfs_deps_all t        = LibDeps $ (vfsdeps [VFS_NFS, VFS_RamFS, VFS_BlockdevFS,
+                                               VFS_FAT] t)
+libvfs_deps_noblockdev t = LibDeps $ (vfsdeps [VFS_NFS, VFS_RamFS] t)
+libvfs_deps_nonfs t      = LibDeps $ (vfsdeps [VFS_RamFS, VFS_BlockdevFS, VFS_FAT] t)
+libvfs_deps_nfs t        = LibDeps $ (vfsdeps [VFS_NFS] t)
+libvfs_deps_ramfs t      = LibDeps $ (vfsdeps [VFS_RamFS] t)
+libvfs_deps_blockdevfs t = LibDeps $ (vfsdeps [VFS_BlockdevFS] t)
+libvfs_deps_fat t        = LibDeps $ (vfsdeps [VFS_FAT, VFS_BlockdevFS] t)
 
 -- flatten the dependency tree
 flat :: [LibDepTree] -> [LibDepTree]
@@ -1143,9 +1144,10 @@ flat ((LibDeps t):xs) = flat t ++ flat xs
 
 str2dep :: String -> LibDepTree
 str2dep  str
-    | str == "vfs"           = libvfs_deps_all
-    | str == "vfs_ramfsonly" = LibDeps $ [ LibDep "vfs_ramfs" ]
-    | str == "vfs_nonfs"     = libvfs_deps_nonfs
+    | str == "vfs"           = libvfs_deps_all str
+    | str == "vfs_ramfs"     = libvfs_deps_ramfs str
+    | str == "vfs_nonfs"     = libvfs_deps_nonfs str
+    | str == "vfs_noblockdev"= libvfs_deps_noblockdev str
     | str == "posixcompat"   = libposixcompat_deps
     | str == "lwip"          = liblwip_deps
     | str == "netQmng"       = libnetQmng_deps
index 7239869..7b7eef1 100644 (file)
                                           ],
                   flounderDefs = [ "monitor" ]
                 },
+ build library { target = "vfs_noblockdev",
+                  cFiles = [ "vfs.c", "vfs_path.c", "fopen.c", "mmap.c",
+                             "vfs_nfs.c", "vfs_ramfs.c", "cache.c",
+                             "vfs_cache.c", "fdtab.c", "vfs_fd.c"
+                           ],
+                  flounderBindings = [ "trivfs", "bcache" ],
+                  flounderExtraBindings = [ ("trivfs", ["rpcclient"]),
+                                            ("bcache", ["rpcclient"])
+                                          ],
+                  addCFlags = [ "-DDISABLE_BLOCKDEV" ],
+                  flounderDefs = [ "monitor" ]
+                },
   build library { target = "vfs_ramfs",
                   cFiles = [ "vfs.c", "vfs_path.c", "fopen.c", "vfs_ramfs.c",
                              "cache.c", "vfs_cache.c", "fdtab.c", "vfs_fd.c"
index 2b656c8..9a40580 100644 (file)
@@ -28,7 +28,7 @@ in [
         architectures = ["x86_32", "x86_64"]
     },
     build template {
-        addLibraries = libDeps ["vfs", "spawndomain", "elf", "octopus", "bench"],
+        addLibraries = libDeps ["vfs_noblockdev", "spawndomain", "elf", "octopus", "bench"],
         cFiles = ["common.c", "main.c", "x86boot.c"],
         assemblyFiles = ["init_ap_x86_64.S", "init_ap_x86_32.S"],
         architectures = ["k1om"]
index d680d38..835312d 100644 (file)
                       architectures = [ "x86_64", "x86_32" ]
                     },
   build application { target = "fish",
+                      cFiles = [ "fish_common.c", "fish_x86.c", "font.c" ],
+                      addLibraries = libDeps ["trace", "skb", "pci", "vfs_noblockdev", "acpi_client", "lwip", "octopus" ],
+                      flounderExtraBindings = [("acpi", ["rpcclient"]), ("octopus", ["rpcclient"])],
+                      flounderBindings = [ "pixels", "acpi" ],
+                      architectures = [ "k1om" ]
+                    },
+  build application { target = "fish",
                       cFiles = [ "fish_common.c", "fish_arm.c", "font.c" ],
                       flounderExtraBindings = [("octopus", ["rpcclient"])],
                       addLibraries = libDeps ["trace", "skb", "vfs_ramfs", "lwip", "octopus" ],
index aceca23..2bfa576 100644 (file)
                                                "spawndomain", "elf", "mm",
                                                "trace" ],
                       architectures = [ "x86_64", "x86_32" ] },
+  build application { target = "kaluga",
+                      cFiles = (find withSuffices [".c"]),
+                      flounderDefs = [ "monitor" ],
+                      flounderBindings = [ "octopus" ],
+                      flounderExtraDefs = [ ("monitor_blocking",["rpcclient"]) ],
+                      flounderTHCStubs = [ "octopus" ],
+                      addLibraries = libDeps [ "skb", "octopus", "vfs_noblockdev",
+                                               "spawndomain", "elf", "mm",
+                                               "trace" ],
+                      architectures = [ "k1om" ] },
  build application { target = "kaluga",
                       cFiles = (find withSuffices [".c"]),
                       flounderDefs = [ "monitor" ],
index 68a9ded..96e79f2 100644 (file)
   build application { target = "spawnd",
                       cFiles = [ "main.c", "service.c", "ps.c" ],
                       addLibraries = libDeps [ "spawndomain", "elf", "trace", "skb",
+                                               "dist", "vfs_noblockdev", "lwip" ],
+                      flounderDefs = [ "monitor", "monitor_blocking" ],
+                      flounderExtraDefs = [ ("monitor_blocking",["rpcclient"]) ],
+                      flounderBindings = [ "spawn" ],
+                      architectures = [ "k1om" ]
+                    },
+  build application { target = "spawnd",
+                      cFiles = [ "main.c", "service.c", "ps.c" ],
+                      addLibraries = libDeps [ "spawndomain", "elf", "trace", "skb",
                                        "dist", "vfs_ramfs", "lwip" ],
                       flounderDefs = [ "monitor", "monitor_blocking" ],
                       flounderExtraDefs = [ ("monitor_blocking",["rpcclient"]) ],
index d3ba6f2..4e4777a 100644 (file)
                       architectures = [ "x86_64", "x86_32" ]
                    },
  build application { target = "startd",
+                      cFiles = [ "main.c", "spawn.c" ],
+                      addLibraries = libDeps [ "spawndomain", "elf", "trace",
+                                       "dist", "vfs_noblockdev" ],
+                      architectures = [ "k1om" ]
+                   },
+ build application { target = "startd",
                      cFiles = [ "main.c", "spawn.c" ],
                      addLibraries = libDeps [ "spawndomain", "elf", "trace",
                                        "dist", "vfs_ramfs" ],