Merge branch 'master' into tmas
authorMoritz Hoffmann <moritz.hoffmann@hpe.com>
Wed, 20 Jul 2016 15:58:08 +0000 (08:58 -0700)
committerMoritz Hoffmann <moritz.hoffmann@hpe.com>
Wed, 20 Jul 2016 15:58:08 +0000 (08:58 -0700)
1  2 
devices/Hakefile
hake/ARMv8.hs
hake/RuleDefs.hs
include/barrelfish_kpi/platform.h
kernel/Hakefile
platforms/Hakefile
tools/arm_molly/Hakefile
tools/molly/Hakefile
usr/acpi/acpi.c
usr/skb/Hakefile

Simple merge
diff --cc hake/ARMv8.hs
Simple merge
@@@ -860,12 -925,33 +925,35 @@@ compileNativeC prog cfiles cflags ldfla
              Out "tools" ("/bin" </> prog),
              Str "$(CFLAGS)",
              Str "$(LDFLAGS)" ]
 +          ++ concat [ [ Str "-I", NoDep SrcTree "src" i ] | i <- includes ]
 +          ++ concat [ [ Str "-I", NoDep BuildTree a i ] | (a,i) <- gen_includes ]
            ++ [ (Str flag) | flag <- cflags ]
+           ++ [ (In SrcTree "src" dep) | dep <- cfiles ]
+           -- source file needs to be left of ldflags for modern-ish GCC
            ++ [ (Str flag) | flag <- ldflags ]
-           ++ [ (In SrcTree "src" dep) | dep <- cfiles ])
+           ++ [ In BuildTree "tools" ("/lib" </> ("lib" ++ l ++ ".a")) |
+                l <- localLibs ])
+ --
+ -- Compile a static library for the host architecture
+ --
+ compileNativeLib :: String -> [String] -> [String] -> HRule
+ compileNativeLib name cfiles cflags =
+     Rules (
+         [ Rule ([ Str nativeCCompiler,
+                   Str "-c", In SrcTree "src" s,
+                   Str "-o", Out "tools" (objectFilePath nativeOptions s),
+                   Str "$(CFLAGS)",
+                   Str "$(LDFLAGS)" ]
+                 ++ [ (Str flag) | flag <- cflags ])
+             | s <- cfiles ] ++
+         [ Rule ([ Str nativeArchiver,
+                   Str "rcs",
+                   Out "tools" ("/lib" </> ("lib" ++ name ++ ".a")) ] ++
+                 [ In BuildTree "tools" o | o <- objs ]) ]
+         )
+     where
+         objs = [ objectFilePath nativeOptions s | s <- cfiles ]
  --
  -- Build a Technical Note
  --
@@@ -30,8 -30,8 +30,9 @@@ enum pi_platform 
      // armv7 platforms
      PI_PLATFORM_OMAP44XX,
      PI_PLATFORM_VEXPRESS,
+     PI_PLATFORM_ZYNQ7,
      // armv8 platforms
 +    PI_PLATFORM_TMAS,
  };
  
  /// Struct that can be used to request/parse platform information
diff --cc kernel/Hakefile
@@@ -1,6 -1,6 +1,6 @@@
  --------------------------------------------------------------------------
- -- Copyright (c) 2007-2015, ETH Zurich.
+ -- Copyright (c) 2007-2016, ETH Zurich.
 --- Copyright (c) 2015, Hewlett Packard Enterprise Development LP.
 +-- Copyright (c) 2015-2016, Hewlett Packard Enterprise Development LP.
  -- All rights reserved.
  --
  -- This file is distributed under the terms in the attached LICENSE file.
@@@ -325,10 -339,10 +339,10 @@@ let bin_rcce_lu = [ "/sbin/" ++ f | f <
                         "ramfsd",
                         "spawnd",
                         "startd",
-                        "corectrl",
+                        -- "corectrl",
                         "skb",
                         "memtest",
 -                       "serial",
 +                       "serial_gem5",
                         "fish",
                         "angler"
                         ] ]
      -- Rules to build assorted boot images
      --
  
 +    -- Build a boot image for the ARM FVP
 +    Rule ([ In BuildTree "tools" "/bin/mkmb_fvp",
 +            In SrcTree "tools" "/hake/fvp.cfg",
 +            Str "0x100000000", -- 4GiB of RAM
 +            In BuildTree "armv8" "/sbin/fvp_shim",
 +            In BuildTree "root" "/",
 +            Out "root" "/armv8_fvp_image"
 +          ] ++ [ (Dep BuildTree "armv8" m) | m <- modules_fvp ]),
 +
 +    -- Emit the debug addresses for the FVP
 +    Rule ([ In BuildTree "tools" "/bin/mkmb_fvp",
 +            In SrcTree "tools" "/hake/fvp.cfg",
 +            Str "0x100000000", -- 4GiB of RAM
 +            In BuildTree "armv8" "/sbin/fvp_shim",
 +            In BuildTree "root" "/",
 +            Out "root" "/armv8_fvp_debug",
 +            Str "-d"
 +          ] ++ [ (Dep BuildTree "armv8" m) | m <- modules_fvp ]),
 +    
      -- Build the default PandaBoard boot image
-     Rule ([ In SrcTree "tools" "/tools/arm_molly/build_molly_image.sh",
-             Str "--srcdir",   NoDep SrcTree "root" "/.",
-             Str "--builddir", NoDep BuildTree "root" "/.",
-             Str "--arch armv7-a",
-             Str "--menu",     In BuildTree "root" "/platforms/arm/menu.lst.pandaboard",
-             Str "--baseaddr", Str "0x82001000",
-             Str "--image",    Out "root" "/pandaboard_image",
-             Str "--gcc",      Str Config.arm_cc,
-             Str "--objcopy",  Str Config.arm_objcopy,
-             Dep BuildTree "tools" "/bin/arm_molly"
-           ] ++ [ (Dep BuildTree "armv7" m) | m <- pandaModules ]),
+     armv7Image "armv7_pandaboard" "omap44xx" "0x80000000" pandaModules,
  
      -- Build the A15 simulation image (VersatileExpress EMM board)
-     Rule ([ In SrcTree "tools" "/tools/arm_molly/build_molly_image.sh",
-             Str "--srcdir",   NoDep SrcTree "root" "/.",
-             Str "--builddir", NoDep BuildTree "root" "/.",
-             Str "--arch armv7-a",
-             Str "--menu",     In BuildTree "root"
-                                  "/platforms/arm/menu.lst.arm_a15ve",
-             Str "--baseaddr", Str "0x80100000",
-             Str "--image",    Out "root" "/arm_a15ve_image",
-             Str "--gcc",      Str Config.arm_cc,
-             Str "--objcopy",  Str Config.arm_objcopy,
-             Dep BuildTree "tools" "/bin/arm_molly"
-           ] ++ [ (Dep BuildTree "armv7" m) | m <- vExpressEMMModules_A15 ]),
+     armv7Image "armv7_a15ve" "ve" "0x80000000" vExpressEMMModules_A15,
  
      -- Build the A9 simulation image (VersatileExpress EMM board)
-     Rule ([ In SrcTree "tools" "/tools/arm_molly/build_molly_image.sh",
-             Str "--srcdir",   NoDep SrcTree "root" "/.",
-             Str "--builddir", NoDep BuildTree "root" "/.",
-             Str "--arch armv7-a",
-             Str "--menu",     In BuildTree "root"
-                                  "/platforms/arm/menu.lst.arm_a9ve",
-             Str "--baseaddr", Str "0x80100000",
-             Str "--image",    Out "root" "/arm_a9ve_image",
-             Str "--gcc",      Str Config.arm_cc,
-             Str "--objcopy",  Str Config.arm_objcopy,
-             Dep BuildTree "tools" "/bin/arm_molly"
-           ] ++ [ (Dep BuildTree "armv7" m) | m <- vExpressEMMModules_A9 ]),
+     armv7Image "armv7_a9ve" "ve" "0x80000000" vExpressEMMModules_A9,
+     -- Build the Zynq7000 image
+     armv7Image "armv7_zynq7" "zynq7" "0x00000000" zynq7Modules,
  
      -- Build the ARMv8 GEM5 simulation image
      Rule ([ In SrcTree "tools" "/tools/arm_molly/build_molly_image.sh",
  --
  ----------------------------------------------------------------------
  
- [ compileNativeC "arm_molly"
-                  [ "build_multiboot.c" ]
-                  [ "-std=gnu99", "-g" ]
-                  []
-                  []
-                  [ ("armv7", "include") ] ]
+ [
+     compileNativeC "arm_molly"
+         ["build_multiboot.c"]
+         ["-std=gnu99", "-g", "-Iarmv7/include/"]
+         [] []
+ ]
++
@@@ -10,4 -10,4 +10,5 @@@
  --
  ----------------------------------------------------------------------
  
- [ compileNativeC "molly" ["build_multiboot.c"] ["-std=gnu99", "-g"] [] [] [] ]
+ [ compileNativeC "molly" ["build_multiboot.c"] ["-std=gnu99", "-g"] [] [] ]
++
diff --cc usr/acpi/acpi.c
Simple merge
Simple merge