Browse Source

Added binplace and strip functions to build scripts.

Also added some hierarchy to the "all" target by introducing component
level phony targets that gather binaries together.
Evan Green 8 years ago
parent
commit
2db56eadbe

+ 58 - 0
apps/build.ck

@@ -0,0 +1,58 @@
+/*++
+
+Copyright (c) 2013 Minoca Corp. All Rights Reserved
+
+Module Name:
+
+    Applications
+
+Abstract:
+
+    This directory contains user mode applications and libraries.
+
+Author:
+
+    Evan Green 25-Feb-2013
+
+Environment:
+
+    User
+
+--*/
+
+function build() {
+    test_apps = [
+        "//apps/libc/dynamic/testc:build_testc",
+        "//apps/testapps:testapps",
+    ];
+
+    libc = [
+        "//apps/libc/crypt:libcrypt",
+        "//apps/libc/dynamic/pthread/static:libpthread_nonshared",
+        "//apps/libc/static:libc_nonshared",
+    ];
+
+    mingen_build = [
+        "//apps/mingen:mingen_build"
+    ];
+
+    apps = [
+        "//apps/efiboot:efiboot",
+        "//apps/mingen:mingen",
+        "//apps/mount:mount",
+        "//apps/netcon:netcon",
+        "//apps/profile:profile",
+        "//apps/setup:msetup",
+        "//apps/setup:build_msetup",
+        "//apps/swiss:swiss",
+        "//apps/swiss:build_swiss",
+        "//apps/unmount:umount",
+        "//apps/vmstat:vmstat",
+    ];
+
+    all_apps = test_apps + libc + mingen_build + apps;
+    entries = group("all_apps", all_apps);
+    return entries;
+}
+
+return build();

+ 1 - 1
apps/swiss/build.ck

@@ -209,7 +209,7 @@ function build() {
     };
 
     build_app = {
-        "label": "swiss_build",
+        "label": "build_swiss",
         "output": "swiss",
         "inputs": build_sources + build_libs,
         "sources_config": build_sources_config,

+ 45 - 0
boot/build.ck

@@ -0,0 +1,45 @@
+/*++
+
+Copyright (c) 2012 Minoca Corp. All Rights Reserved
+
+Module Name:
+
+    Boot
+
+Abstract:
+
+    This module implements support for the boot environment, which contains
+    the applications and support code needed to load and launch the
+    operating system kernel. It consists of some assembly bootstrap code,
+    a boot manager, and an OS loader.
+
+Author:
+
+    Evan Green 26-Jul-2012
+
+Environment:
+
+    Boot
+
+--*/
+
+function build() {
+    boot_apps = [
+        "//boot/bootman:bootmefi.efi",
+        "//boot/loader:loadefi"
+    ];
+
+    if (arch == "x86") {
+        boot_apps += [
+            "//boot/bootman:bootman.bin",
+            "//boot/fatboot:fatboot.bin",
+            "//boot/loader:loader",
+            "//boot/mbr:mbr.bin"
+        ];
+    }
+
+    entries = group("boot_apps", boot_apps);
+    return entries;
+}
+
+return build();

+ 4 - 2
boot/loader/build.ck

@@ -132,7 +132,8 @@ function build() {
         "inputs": common_sources + efi_sources + efi_app_libs,
         "sources_config": sources_config,
         "config": efi_link_config,
-        "entry": "BoMain"
+        "entry": "BoMain",
+        "binplace": TRUE
     };
 
     entries = application(efi_app);
@@ -149,7 +150,8 @@ function build() {
             "sources_config": sources_config,
             "config": pcat_link_config,
             "entry": "BoMain",
-            "prefix": "pcat"
+            "prefix": "pcat",
+            "binplace": TRUE
         };
 
         entries += application(pcat_app);

+ 25 - 105
build.ck

@@ -69,6 +69,13 @@ function build() {
         "description": "Objectifying - $IN"
     };
 
+    strip_tool = {
+        "type": "tool",
+        "name": "strip",
+        "command": "$STRIP $STRIP_FLAGS -o $OUT $IN",
+        "description": "Stripping - $OUT",
+    };
+
     build_cc = {
         "type": "tool",
         "name": "build_cc",
@@ -117,6 +124,13 @@ function build() {
         "description": "Objectifying - $IN"
     };
 
+    build_strip = {
+        "type": "tool",
+        "name": "build_strip",
+        "command": "$BUILD_STRIP $STRIP_FLAGS -o $OUT $IN",
+        "description": "Stripping - $OUT",
+    };
+
     build_rcc = {
         "type": "tool",
         "name": "build_rcc",
@@ -134,7 +148,7 @@ function build() {
     cp = {
         "type": "tool",
         "name": "copy",
-        "command": "cp $CPFLAGS $IN $OUT",
+        "command": "$SHELL -c \"cp $CPFLAGS $IN $OUT && [ -z $CHMOD_FLAGS ] || chmod $CHMOD_FLAGS $OUT\"",
         "description": "Copying - $IN -> $OUT"
     };
 
@@ -162,116 +176,22 @@ function build() {
         "depth": 1
     };
 
-    entries = [cc, cxx, ld, ar, as, objcopy,
+    entries = [cc, cxx, ld, ar, as, objcopy, strip_tool,
                build_cc, build_cxx, build_ld, build_ar, build_as, build_rcc,
-               build_objcopy, iasl, cp, stamp,
+               build_objcopy, build_strip, iasl, cp, stamp,
                config_entry, pool1, pool2];
 
     all = [
-        "//lib/crypto/testcryp:",
-        "//apps/mingen:",
-        "//lib/fatlib/fattest:",
-        "//lib/rtl/testrtl:",
-        "//lib/yy/yytest:",
-        "//kernel/mm/testmm:",
-        "//kernel:",
-        "//apps/libc/crypt:",
-        "//apps/libc/static:",
-        "//apps/libc/dynamic:",
-        "//apps/libc/dynamic/testc:",
-        "//apps/libc/dynamic/pthread/static:",
-        "//apps/efiboot:",
-        "//apps/netcon:",
-        "//apps/profile:",
-        "//apps/setup:",
-        "//apps/swiss:",
-        "//apps/unmount:",
-        "//apps/vmstat:",
-        "//apps/testapps:testapps",
-        "//boot/bootman:",
-        "//boot/loader:",
-        "//debug/client:",
-        "//debug/client/testdisa:build_testdisa",
-        "//debug/client/teststab:build_teststab",
-        "//debug/client/tdwarf:build_tdwarf",
-        "//debug/kexts:",
-        "//drivers/acpi:acpi",
-        "//drivers/ata:ata",
-        "//drivers/devrem:devrem",
-        "//drivers/fat:fat",
-        "//drivers/i8042:i8042",
-        "//drivers/net/ethernet/atl1c:atl1c",
-        "//drivers/net/ethernet/dwceth:dwceth",
-        "//drivers/net/ethernet/e100:e100",
-        "//drivers/net/ethernet/rtl81xx:rtl81xx",
-        "//drivers/net/ethernet/smsc91c1:smsc91c1",
-        "//drivers/net/ethernet/smsc95xx:smsc95xx",
-        "//drivers/net/wireless/rtlw81xx:rtlw81xx",
-        "//drivers/null:null",
-        "//drivers/part:part",
-        "//drivers/pci:pci",
-        "//drivers/plat/quark/qrkhostb:qrkhostb",
-        "//drivers/ramdisk",
-        "//drivers/sd/core:sd",
-        "//drivers/special:special",
-        "//drivers/term/ser16550:ser16550",
-        "//drivers/videocon:videocon",
-        "//drivers/usb/ehci:ehci",
-        "//drivers/usb/onering:onering",
-        "//drivers/usb/onering/usbrelay:usbrelay",
-        "//drivers/usb/uhci:uhci",
-        "//drivers/usb/usbcomp:usbcomp",
-        "//drivers/usb/usbcore:usbcore",
-        "//drivers/usb/usbhub:usbhub",
-        "//drivers/usb/usbkbd:usbkbd",
-        "//drivers/usb/usbmass:usbmass",
-        "//tzcomp:tzdata",
-        "//tzcomp:tzdflt"
+        "//lib:test_apps",
+        "//apps:all_apps",
+        "//kernel:kernel",
+        "//boot:boot_apps",
+        "//debug:debug",
+        "//drivers:drivers",
+        "//uefi:platfw",
+        "//tzcomp:tz_files",
     ];
 
-    if (arch == "armv7") {
-        all += [
-            "//uefi/plat/beagbone:bbonefw",
-            "//uefi/plat/beagbone/init:bbonemlo",
-            "//uefi/plat/panda/init:omap4mlo",
-            "//uefi/plat/integcp:integfw",
-            "//uefi/plat/panda:pandafw",
-            "//uefi/plat/panda:pandausb.img",
-            "//uefi/plat/rpi2:rpi2fw",
-            "//uefi/plat/veyron:veyronfw",
-            "//drivers/dma/bcm2709:dmab2709",
-            "//drivers/dma/edma3:edma3",
-            "//drivers/gpio/rockchip/rk32:rk32gpio",
-            "//drivers/gpio/ti/omap4:om4gpio",
-            "//drivers/i8042/pl050:pl050",
-            "//drivers/net/ethernet/am3eth:am3eth",
-            "//drivers/plat/goec:goec",
-            "//drivers/plat/rockchip/rk808:rk808",
-            "//drivers/plat/ti/am3soc:am3soc",
-            "//drivers/plat/ti/tps65217:tps65217",
-            "//drivers/sd/bcm2709:sdbm2709",
-            "//drivers/sd/omap4:sdomap4",
-            "//drivers/sd/rk32xx:sdrk32xx",
-            "//drivers/spb/i2c/am3i2c:am3i2c",
-            "//drivers/spb/i2c/rk3i2c:rk3i2c",
-            "//drivers/spb/spi/rk32spi:rk32spi",
-            "//drivers/usb/am3usb:am3usb",
-            "//drivers/usb/dwhci:dwhci",
-        ];
-
-    } else if (arch == "armv6") {
-        all += [
-            "//uefi/plat/rpi:rpifw"
-        ];
-
-    } else if (arch == "x86") {
-        all += [
-            "//uefi/plat/bios:biosfw",
-            "//boot/fatboot:fatboot.bin",
-            "//boot/mbr:mbr.bin"
-        ];
-    }
-
     entries += group("all", all);
     return entries;
 }

+ 44 - 0
debug/build.ck

@@ -0,0 +1,44 @@
+/*++
+
+Copyright (c) 2012 Minoca Corp. All Rights Reserved
+
+Module Name:
+
+    Debug
+
+Abstract:
+
+    This directory builds the debugger application and supporting extensions.
+
+Author:
+
+    Evan Green 26-Jul-2012
+
+Environment:
+
+    Debug
+
+--*/
+
+function build() {
+    debug_binaries = [
+        "//debug/client:debug",
+        "//debug/client:build_debug",
+        "//debug/client/tdwarf:build_tdwarf",
+        "//debug/client/testdisa:build_testdisa",
+        "//debug/client/teststab:build_teststab",
+        "//debug/kexts:kexts",
+        "//debug/kexts:build_kexts"
+    ];
+
+    if (build_os == "Windows") {
+        debug_binaries += [
+            "//debug/client:build_debugui"
+        ];
+    }
+
+    entries = group("debug", debug_binaries);
+    return entries;
+}
+
+return build();

+ 56 - 0
drivers/build.ck

@@ -0,0 +1,56 @@
+/*++
+
+Copyright (c) 2012 Minoca Corp. All Rights Reserved
+
+Module Name:
+
+    Drivers
+
+Abstract:
+
+    This directory contains kernel-mode drivers that provide hardware
+    support for the kernel and applications.
+
+Author:
+
+    Evan Green 26-Jul-2012
+
+Environment:
+
+    Debug
+
+--*/
+
+function build() {
+    drivers = [
+        "//drivers/acpi:acpi",
+        "//drivers/ata:ata",
+        "//drivers/devrem:devrem",
+        "//drivers/fat:fat",
+        "//drivers/i8042:i8042",
+        "//drivers/net:net_drivers",
+        "//drivers/null:null",
+        "//drivers/part:part",
+        "//drivers/pci:pci",
+        "//drivers/plat:platform_drivers",
+        "//drivers/ramdisk",
+        "//drivers/sd:sd_drivers",
+        "//drivers/special:special",
+        "//drivers/term/ser16550:ser16550",
+        "//drivers/usb:usb_drivers",
+    ];
+
+    if ((arch == "armv7") || (arch == "armv6")) {
+        drivers += [
+            "//drivers/dma:dma_drivers",
+            "//drivers/gpio:gpio_drivers",
+            "//drivers/i8042/pl050:pl050",
+            "//drivers/spb:spb_drivers"
+        ];
+    }
+
+    entries = group("drivers", drivers);
+    return entries;
+}
+
+return build();

+ 36 - 0
drivers/dma/build.ck

@@ -0,0 +1,36 @@
+/*++
+
+Copyright (c) 2016 Minoca Corp. All Rights Reserved
+
+Module Name:
+
+    DMA
+
+Abstract:
+
+    This directory builds system DMA drivers.
+
+Author:
+
+    Evan Green 1-Feb-2016
+
+Environment:
+
+    Kernel
+
+--*/
+
+function build() {
+
+    assert(((arch == "armv7") || (arch == "armv6")), "Unexpected architecture");
+
+    dma_drivers = [
+        "//drivers/dma/bcm2709:dmab2709",
+        "//drivers/dma/edma3:edma3",
+    ];
+
+    entries = group("dma_drivers", dma_drivers);
+    return entries;
+}
+
+return build();

+ 36 - 0
drivers/gpio/build.ck

@@ -0,0 +1,36 @@
+/*++
+
+Copyright (c) 2015 Minoca Corp. All Rights Reserved
+
+Module Name:
+
+    GPIO
+
+Abstract:
+
+    This directory contains drivers related to General Purpose Input/Output.
+
+Author:
+
+    Evan Green 4-Aug-2015
+
+Environment:
+
+    Kernel
+
+--*/
+
+function build() {
+
+    assert(((arch == "armv7") || (arch == "armv6")), "Unexpected architecture");
+
+    gpio_drivers = [
+        "//drivers/gpio/rockchip/rk32:rk32gpio",
+        "//drivers/gpio/ti/omap4:om4gpio",
+    ];
+
+    entries = group("gpio_drivers", gpio_drivers);
+    return entries;
+}
+
+return build();

+ 52 - 0
drivers/net/build.ck

@@ -0,0 +1,52 @@
+/*++
+
+Copyright (c) 2013 Minoca Corp. All Rights Reserved
+
+Module Name:
+
+    Networking
+
+Abstract:
+
+    This directory contains networking-related drivers, including the
+    networking core driver and support for many specific NICs.
+
+Author:
+
+    Evan Green 4-Apr-2013
+
+Environment:
+
+    Kernel
+
+--*/
+
+function build() {
+    ethernet_drivers = [
+        "//drivers/net/ethernet/smsc95xx:smsc95xx",
+    ];
+
+    wireless_drivers = [
+        "//drivers/net/wireless/rtlw81xx:rtlw81xx",
+    ];
+
+    if ((arch == "armv7") || (arch == "armv6")) {
+        ethernet_drivers += [
+            "//drivers/net/ethernet/smsc91c1:smsc91c1",
+        ];
+
+    } else if (arch == "x86") {
+        ethernet_drivers += [
+            "//drivers/net/ethernet/atl1c:atl1c",
+            "//drivers/net/ethernet/dwceth:dwceth",
+            "//drivers/net/ethernet/e100:e100",
+            "//drivers/net/ethernet/rtl81xx:rtl81xx",
+        ];
+    }
+
+    net_drivers = ethernet_drivers + wireless_drivers;
+    entries = group("net_drivers", net_drivers);
+    return entries;
+}
+
+return build();

+ 42 - 0
drivers/plat/build.ck

@@ -0,0 +1,42 @@
+/*++
+
+Copyright (c) 2014 Minoca Corp. All Rights Reserved
+
+Module Name:
+
+    Platform
+
+Abstract:
+
+    This directory builds platform support drivers.
+
+Author:
+
+    Evan Green 4-Dec-2014
+
+Environment:
+
+    Kernel
+
+--*/
+
+function build() {
+    if ((arch == "armv7") || (arch == "armv6")) {
+        platform_drivers = [
+            "//drivers/plat/goec:goec",
+            "//drivers/plat/rockchip/rk808:rk808",
+            "//drivers/plat/ti/am3soc:am3soc",
+            "//drivers/plat/ti/tps65217:tps65217"
+        ];
+
+    } else if (arch == "x86") {
+        platform_drivers = [
+            "//drivers/plat/quark/qrkhostb:qrkhostb"
+        ];
+    }
+
+    entries = group("platform_drivers", platform_drivers);
+    return entries;
+}
+
+return build();

+ 43 - 0
drivers/sd/build.ck

@@ -0,0 +1,43 @@
+/*++
+
+Copyright (c) 2014 Minoca Corp. All Rights Reserved
+
+Module Name:
+
+    SD
+
+Abstract:
+
+    This directory is responsible for building Secure Digital and MultiMedia
+    Card host controller drivers.
+
+Author:
+
+    Evan Green 16-Mar-2014
+
+Environment:
+
+    Kernel
+
+--*/
+
+function build() {
+    if ((arch == "armv7") || (arch == "armv6")) {
+        sd_drivers = [
+            "//drivers/sd/bcm2709:sdbm2709",
+            "//drivers/sd/omap4:sdomap4",
+            "//drivers/sd/rk32xx:sdrk32xx",
+            "//drivers/plat/ti/tps65217:tps65217"
+        ];
+
+    } else if (arch == "x86") {
+        sd_drivers = [
+            "//drivers/sd/core:sd"
+        ];
+    }
+
+    entries = group("sd_drivers", sd_drivers);
+    return entries;
+}
+
+return build();

+ 37 - 0
drivers/spb/build.ck

@@ -0,0 +1,37 @@
+/*++
+
+Copyright (c) 2015 Minoca Corp. All Rights Reserved
+
+Module Name:
+
+    Simple Peripheral Bus
+
+Abstract:
+
+    This directory contains drivers related to Simple Peripheral Busses.
+
+Author:
+
+    Evan Green 14-Aug-2015
+
+Environment:
+
+    Kernel
+
+--*/
+
+function build() {
+
+    assert(((arch == "armv7") || (arch == "armv6")), "Unexpected architecture");
+
+    spb_drivers = [
+        "//drivers/spb/i2c/am3i2c:am3i2c",
+        "//drivers/spb/i2c/rk3i2c:rk3i2c",
+        "//drivers/spb/spi/rk32spi:rk32spi"
+    ];
+
+    entries = group("spb_drivers", spb_drivers);
+    return entries;
+}
+
+return build();

+ 51 - 0
drivers/usb/build.ck

@@ -0,0 +1,51 @@
+/*++
+
+Copyright (c) 2013 Minoca Corp. All Rights Reserved
+
+Module Name:
+
+    USB
+
+Abstract:
+
+    This directory contains Universal Serial Bus (USB) related drivers,
+    including the USB core support library, host controller implementations,
+    generic device class drivers, and specific USB device drivers.
+
+Author:
+
+    Evan Green 13-Jan-2013
+
+Environment:
+
+    Kernel
+
+--*/
+
+function build() {
+    usb_drivers = [
+        "//drivers/usb/ehci:ehci",
+        "//drivers/usb/onering:onering",
+        "//drivers/usb/onering/usbrelay:usbrelay",
+        "//drivers/usb/usbcomp:usbcomp",
+        "//drivers/usb/usbhub:usbhub",
+        "//drivers/usb/usbkbd:usbkbd",
+    ];
+
+    if ((arch == "armv7") || (arch == "armv6")) {
+        usb_drivers = [
+            "//drivers/usb/am3usb:am3usb",
+            "//drivers/usb/dwhci:dwhci"
+        ];
+
+    } else if (arch == "x86") {
+        usb_drivers = [
+            "//drivers/usb/uhci:uhci"
+        ];
+    }
+
+    entries = group("usb_drivers", usb_drivers);
+    return entries;
+}
+
+return build();

+ 114 - 42
env.ck

@@ -32,6 +32,10 @@ arch ?= "x86";
 debug ?= "dbg";
 variant ?= "";
 
+outroot = "^/../..";
+binroot = outroot + "/bin";
+stripped_dir = binroot + "/stripped";
+
 cflags ?= getenv("CFLAGS") ? [getenv("CFLAGS")] : ["-Wall", "-Werror"];
 cppflags ?= getenv("CPPFLAGS") ? [getenv("CPPFLAGS")] : [];
 ldflags ?= getenv("LDFLAGS") ? [getenv("LDFLAGS")] : [];
@@ -51,7 +55,7 @@ global_config = {
     "STRIP": getenv("STRIP"),
     "RCC": getenv("RCC"),
     "IASL", getenv("IASL"),
-    "SHELL": getenv("SHELL")
+    "SHELL": getenv("SHELL"),
 };
 
 build_os = uname_s();
@@ -270,23 +274,103 @@ function group(name, entries) {
 // Create a copy target.
 //
 
-function copy(source, destination, destination_label, flags) {
+function copy(source, destination, destination_label, flags, mode) {
+    config = {};
+    if (flags) {
+        config["CPFLAGS"] = flags;
+    }
+
+    if (mode) {
+        config["config"] = mode;
+    }
+
     entry = {
         "type": "target",
         "tool": "copy",
-        "inputs": source,
-        "output": destination
+        "label": destination_label,
+        "inputs": [source],
+        "output": destination,
+        "config": config
     };
 
-    if (destination_label) {
+    if (!destination_label) {
         entry["label"] = destination;
     }
 
-    if (flags) {
-        entry["config"] = {"CPFLAGS": flags};
+    return [entry];
+}
+
+//
+// Add a stripped version of the target.
+//
+
+function strip(params) {
+    tool_name = "strip";
+    if (get(params, "build")) {
+        tool_name = "build_strip";
     }
 
-    return [entry];
+    params["type"] = "target";
+    params["tool"] = tool_name;
+    return [params];
+}
+
+//
+// Replace the current target with a copied version in the bin directory. Also
+// strip unless told not to.
+//
+
+function binplace(params) {
+    label = get(params, "label");
+    label ?= get(params, "output");
+    source = get(params, "output");
+    source ?= label;
+
+    assert(label && source, "Label or source must be defined");
+
+    //
+    // Set the output since the label is going to be renamed and create the
+    // copy target.
+    //
+
+    params["output"] = source;
+    file_name = basename(source);
+    destination = binroot + "/" + file_name;
+    cpflags = get(params, "cpflags");
+    mode = get(params, "chmod");
+    new_original_label = label + "_orig";
+    original_target = ":" + new_original_label;
+    copied_entry = copy(original_target, destination, label, cpflags, mode)[0];
+
+    //
+    // The original label was given to the copied destination, so tack a _orig
+    // on the source label.
+    //
+
+    params["label"] = new_original_label;
+    entries = [copied_entry, params];
+
+    //
+    // Unless asked not to, create a stripped entry as well.
+    //
+
+    if (!get(params, "nostrip")) {
+        stripped_entry = {
+            "label": label + "_stripped",
+            "inputs": [original_target],
+            "output": stripped_dir + "/" + file_name,
+            "build": get(params, "build"),
+        };
+
+        //
+        // Make the binplaced copy depend on the stripped version.
+        //
+
+        copied_entry["implicit"] = [":" + stripped_entry["label"]];
+        entries += strip(stripped_entry);
+    }
+
+    return entries;
 }
 
 //
@@ -399,7 +483,13 @@ function executable(params) {
         add_config(params, "LDFLAGS", entry_option);
     }
 
-    entries += [params];
+    if (get(params, "binplace")) {
+        entries += binplace(params);
+
+    } else {
+        entries += [params];
+    }
+
     return entries;
 }
 
@@ -419,17 +509,6 @@ function application(params) {
     return executable(params);
 }
 
-//
-// Creates a statically linked executable.
-//
-
-function static_application(params) {
-    params["config"] ?= {};
-    params["config"]["LDFLAGS"] ?= [];
-    params["config"]["LDFLAGS"] += ["-static"];
-    return executable(params);
-}
-
 //
 // Creates a shared library or DLL.
 //
@@ -480,7 +559,13 @@ function static_library(params) {
         params["tool"] = "build_ar";
     }
 
-    entries += [params];
+    if (get(params, "binplace")) {
+        entries += binplace(params);
+
+    } else {
+        entries += [params];
+    }
+
     return entries;
 }
 
@@ -613,7 +698,14 @@ function flattened_binary(params) {
     }
 
     add_config(params, flags, "-O binary");
-    return [params];
+    if (get(params, "binplace")) {
+        entries = binplace(params);
+
+    } else {
+        entries = [params];
+    }
+
+    return entries;
 }
 
 //
@@ -636,26 +728,6 @@ function driver(params) {
     return executable(params);
 }
 
-//
-// Create a file based on running a command unique to that file. This creates
-// a new tool.
-//
-
-function script(params) {
-    tool_name = params["tool"];
-    tool_description = get(params, "script_description");
-    tool_description ?= "Running " + tool_name + " - " + "$OUT";
-    tool = {
-        "type": "tool",
-        "name": tool_name,
-        "command": params["script"],
-        "description": tool_description
-    };
-
-    params["type"] = "target";
-    return [tool, params];
-}
-
 //
 // Define a function for creating a runtime driver .FFS file from an ELF.
 //

+ 37 - 0
lib/build.ck

@@ -0,0 +1,37 @@
+/*++
+
+Copyright (c) 2014 Minoca Corp. All Rights Reserved
+
+Module Name:
+
+    Libraries
+
+Abstract:
+
+    This directory builds common libraries that run in multiple
+    environments.
+
+Author:
+
+    Evan Green 28-Mar-2014
+
+Environment:
+
+    Any
+
+--*/
+
+function build() {
+    test_apps = [
+        "//lib/crypto/testcryp:",
+        "//lib/fatlib/fattest:",
+        "//lib/rtl/testrtl:",
+        "//lib/yy/yytest:",
+        "//kernel/mm/testmm:",
+    ];
+
+    entries = group("test_apps", test_apps);
+    return entries;
+}
+
+return build();

+ 7 - 0
tzcomp/build.ck

@@ -92,6 +92,13 @@ function build() {
     };
 
     entries += [almanac, tz_default_data];
+
+    //
+    // Create a group for the data files.
+    //
+
+    tz_data_files = [":tzdata", ":tzdflt"];
+    entries += group("tz_files", tz_data_files);
     return entries;
 }
 

+ 51 - 0
uefi/build.ck

@@ -0,0 +1,51 @@
+/*++
+
+Copyright (c) 2014 Minoca Corp. All Rights Reserved
+
+Module Name:
+
+    UEFI
+
+Abstract:
+
+    This directory builds UEFI firmware images for several platforms.
+
+Author:
+
+    Evan Green 26-Feb-2014
+
+Environment:
+
+    Firmware
+
+--*/
+
+function build() {
+    if (arch == "armv7") {
+        platfw = [
+            "//uefi/plat/beagbone:bbonefw",
+            "//uefi/plat/beagbone/init:bbonemlo",
+            "//uefi/plat/panda/init:omap4mlo",
+            "//uefi/plat/integcp:integfw",
+            "//uefi/plat/panda:pandafw",
+            "//uefi/plat/panda:pandausb.img",
+            "//uefi/plat/rpi2:rpi2fw",
+            "//uefi/plat/veyron:veyronfw",
+        ];
+
+    } else if (arch == "armv6") {
+        platfw = [
+            "//uefi/plat/rpi:rpifw"
+        ];
+
+    } else if (arch == "x86") {
+        platfw = [
+            "//uefi/plat/bios:biosfw",
+        ];
+    }
+
+    entries = group("platfw", platfw);
+    return entries;
+}
+
+return build();

+ 1 - 1
uefi/plat/integcp/build.ck

@@ -111,7 +111,7 @@ function build() {
     // TODO: Change inputs to //images/integrd.img
     //
 
-    ramdisk = copy(["//uefi/plat/beagbone:bbonefw"], "ramdisk", null, null);
+    ramdisk = copy("//uefi/plat/beagbone:bbonefw", "ramdisk", null, null, null);
     entries += ramdisk;
     ramdisk_o = {
         "type": "target",

+ 1 - 1
uefi/plat/panda/build.ck

@@ -179,7 +179,7 @@ function build() {
     // TODO: Change inputs to //images/pandard.img
     //
 
-    ramdisk = copy(["//uefi/plat/beagbone:bbonefw"], "ramdisk", null, null);
+    ramdisk = copy("//uefi/plat/beagbone:bbonefw", "ramdisk", null, null, null);
     entries += ramdisk;
     ramdisk_o = {
         "type": "target",