From: Justin Sobota Date: Tue, 17 Nov 2015 19:49:59 +0000 (-0500) Subject: Updates to enable Yocto parallel build X-Git-Tag: DEV.FAULT_MGMT.01.00.01.03~13 X-Git-Url: https://git.ti.com/gitweb?p=keystone-rtos%2Ffault_mgmt.git;a=commitdiff_plain;h=bd986e98c7eea08a210dd2381ba20a497b9416b0 Updates to enable Yocto parallel build Signed-off-by: Justin Sobota --- diff --git a/build/buildlib.xs b/build/buildlib.xs index 195ba15..d6d3811 100644 --- a/build/buildlib.xs +++ b/build/buildlib.xs @@ -7,7 +7,7 @@ * This file contains common routines that are used by the Fault Management * component. * - * Copyright (C) 2012-2014, Texas Instruments, Inc. + * Copyright (C) 2012-2015, Texas Instruments, Inc. *****************************************************************************/ /************************************************************************** @@ -114,6 +114,8 @@ function createMake(makefile) makefile.writeLine("\n# Output for prebuilt generated libraries"); makefile.writeLine("export LIBDIR ?= ./lib"); + /* use sectti.exe from path */ + makefile.writeLine("export SECTTI ?= sectti"); /* Create INCDIR from XDCPATH */ @@ -463,21 +465,22 @@ function buildLibrary (device, libOptions, libName, target, libFiles) /* Create the Epilogue; which executes after all the builds are completed. * This is used to generate the benchmark information for the built library. * Also add the benchmarking information file to the package. */ - /* - Pkg.makeEpilogue += ".libraries: benchmarking_" + device + "_" + target.suffix + "\n"; - Pkg.makeEpilogue += "benchmarking_" + device + "_" + target.suffix + ":"; - Pkg.makeEpilogue += "\n\t ofd6x -x " + lldFullLibraryPath + ".a" + target.suffix + " > tmp.xml"; - Pkg.makeEpilogue += "\n\t sectti tmp.xml > " + lldFullLibraryPath + ".a" + target.suffix + "_size.txt"; - Pkg.makeEpilogue += "\n\t $(RM) tmp.xml\n\n"; + + /* Put the temp file in object directory since javascript doesn't have a built in tmpname, + * and don't want --jobs=# with # > 1 to result in collisions */ + var libFullName = lldFullLibraryPath + ".a" + target.suffix; + var tempFile = libFullName + ".xml"; + Pkg.makeEpilogue += ".libraries: " + libFullName + "_size.txt\n"; + Pkg.makeEpilogue += libFullName + "_size.txt: " + libFullName + "\n"; + Pkg.makeEpilogue += "\n\t $(C6X_GEN_INSTALL_PATH)/bin/ofd6x -x " + libFullName + " > " + tempFile; + Pkg.makeEpilogue += "\n\t $(SECTTI) " + tempFile + " > " + libFullName + "_size.txt"; + Pkg.makeEpilogue += "\n\t $(RM) " + tempFile + "\n\n"; Pkg.otherFiles[Pkg.otherFiles.length++] = lldFullLibraryPath + ".a" + target.suffix + "_size.txt"; - */ - Pkg.otherFiles[Pkg.otherFiles.length++] = lldFullBuildPath + ".a" + target.suffix + ".mk"; - Pkg.otherFiles[Pkg.otherFiles.length++] = lldFullLibraryPath + ".a" + target.suffix; + Pkg.otherFiles[Pkg.otherFiles.length++] = lldFullLibraryPath + ".a" + target.suffix + ".mk"; /* We need to clean after ourselves; extend the 'clean' target to take care of this. */ - Pkg.makeEpilogue += "clean::\n"; - Pkg.makeEpilogue += "\t$(RM) " + lldFullBuildPath + ".a" + target.suffix + "_size.txt\n"; - Pkg.makeEpilogue += "\t$(RMDIR) " + "$(LIBDIR)/" + device.toString() + " \n\n"; + Pkg.makeEpilogue += "clean::\n\t"; + Pkg.makeEpilogue += "$(RM) " + lldFullLibraryPath + ".a" + target.suffix + "_size.txt\n\n"; return lib; } diff --git a/config.bld b/config.bld index e024c2c..40ca95f 100644 --- a/config.bld +++ b/config.bld @@ -8,11 +8,11 @@ * and is responsible for configuration of the paths for the various tools * required to build Fault Management. * - * Copyright (C) 2012-2014, Texas Instruments, Inc. + * Copyright (C) 2012-2015, Texas Instruments, Inc. *****************************************************************************/ /* Get the Tools Base directory from the Environment Variable. */ -var toolsBaseDir = java.lang.System.getenv("XDCCGROOT"); +var toolsBaseDir = java.lang.System.getenv("C6X_GEN_INSTALL_PATH"); /* Get the base directory for the RM LLD Package */ var fault_mgmtlibPath = new java.io.File(".//").getPath();