]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/osal/package.bld
PDK-6487: emac: test app updates
[processor-sdk/pdk.git] / packages / ti / osal / package.bld
1 /******************************************************************************
2  * FILE PURPOSE: Build description for the osal Driver
3  ******************************************************************************
4  * FILE NAME: package.bld
5  *
6  * DESCRIPTION:
7  *  This file contains the build specification and description for the osal driver
8  *
9  *  The file takes the following parameters from the command line through the
10  *  XDCARGS variable.
11  *      XDCARGS[0] = osal Driver Install Type
12  *      Valid Values are "TAR" or "SETUP"
13  *      DEFAULT is "SETUP"
14  *
15  *  Example for a valid command:
16  *      xdc XDCARGS="SETUP" release
17  *
18  * Copyright (C) 2014-2019, Texas Instruments, Inc.
19  *****************************************************************************/
21 /* List of all subdirectories that combine to make the osal Socket Driver Package. */
22 var subDirectories = [ "src", "docs", "arch", "soc", "test"];
24 var osalDriverInstallType;
26 /* Determine if we need to create the InstallJammer Application or not?
27  * osal LLD Deliverables be either of the following formats:
28  *  - TAR Ball Package
29  *  - Setup Executable
30  * DEFAULT is a SETUP Executable. */
32 if ((arguments[0] != "TAR") && (arguments[0] != "SETUP"))
33     osalDriverInstallType = "TAR";
34 else
35     osalDriverInstallType = arguments[0];
37 /* Irrespective of the InstallType we always create a TAR Ball Package as a part
38  * of the RTSC Build. Here we determine the name of the TAR Ball Package
39  *  Format is as follows:
40  *      osal_<version> */
41 var osalRTSCFileName = "osal" + "_" +
42                       osalDriverReleaseVersion[0] + "_" +  osalDriverReleaseVersion[1] + "_" +
43                       osalDriverReleaseVersion[2]  + "_" + osalDriverReleaseVersion[3];
45 var package_type = java.lang.System.getenv("PDK_PACKAGE_TYPE");
47 /******************************************************************
48  ************************ Release Banner **************************
49  ******************************************************************/
51 print ("************* osal Socket Driver Build Information *************");
52 print ("osal Socket Driver Install      : " + osalDriverInstallType);
53 print ("osal Socket Driver LLD Version  : " + osalDriverReleaseVersion);
54 print ("C66 Tools Directory             : " + c66ToolsBaseDir);
55 print ("C67 Tools Directory             : " + c674ToolsBaseDir);
56 print ("M4  Tools Directory             : " + m4ToolsBaseDir);
57 print ("A15 Tools Directory             : " + a15ToolsBaseDir);
58 print ("A9 Tools Directory              : " + a9ToolsBaseDir);
59 print ("A8 Tools Directory              : " + a8ToolsBaseDir);
60 print ("RTSC File Name                  : " + osalRTSCFileName);
61 print ("osal Socket Driver LLD Path     : " + osalDriverPath);
62 if (pOpts == 1)
63 {
64     print ("CC LE opts                      : " + C66LE.ccOpts.prefix);
65     print ("CC BE opts                      : " + C66BE.ccOpts.prefix);
66     print ("M4 LE opts                      : " + M4LE.ccOpts.prefix);
67     print ("A15 basic opts                  : " + A15LE.ccOpts.prefix);
68     print ("A9 basic opts                   : " + A9LE.ccOpts.prefix);
69     print ("A8 basic opts                   : " + A8LE.ccOpts.prefix);
70 }
71 print ("****************************************************************");
73 /* Create the release package for the osal LLD */
74 Pkg.defaultRelease = Pkg.addRelease (osalRTSCFileName, {prefix: "./packages/"});
76 /* Moving forward we need to set the Archiver of the package to be ZIP. This is currently
77  * not supported in the XDC tools being used. Currenly builds need to be done with the
78  * following options:-
79  *   xdc MK_FIXLISTOPTS=-t release
80  * ZIP is a better option as it works natively with INSTALL Jammer and we can remove the
81  * uncompression into a temporary directory. XDC Tools with xdc-rXX support the ZIP archiver. */
82 //Pkg.attrs = {archiver : "zip"};
84 if (package_type != "package_type_makefile")
85 {
86     /* Cycle through all the sub-directories and build all the files */
87     for (var i = 0; i < subDirectories.length; i++)
88     {
89         /* Load the capsule in the sub directory. */
90         var caps = xdc.loadCapsule (subDirectories[i]+"/Module.xs");
92         print ("Building directory " + subDirectories[i]);
94         /* Build the capsule. */
95         caps.modBuild();
97         /* Package the module.xs files for building via package */
98         Pkg.otherFiles[Pkg.otherFiles.length++] = subDirectories[i]+"/Module.xs";
99     }
101     /* Package the remaining files */
102     Pkg.otherFiles[Pkg.otherFiles.length++] = "config.bld";
103     Pkg.otherFiles[Pkg.otherFiles.length++] = "config_mk.bld";
104     Pkg.otherFiles[Pkg.otherFiles.length++] = "package.bld";
105     Pkg.otherFiles[Pkg.otherFiles.length++] = "package.xdc";
106     Pkg.otherFiles[Pkg.otherFiles.length++] = "package.xs";
107     Pkg.otherFiles[Pkg.otherFiles.length++] = "Settings.xdc";
108     Pkg.otherFiles[Pkg.otherFiles.length++] = "Settings.xdc.xdt";
109     Pkg.otherFiles[Pkg.otherFiles.length++] = "SemaphoreP.h";
110     Pkg.otherFiles[Pkg.otherFiles.length++] = "MuxIntcP.h";
111     Pkg.otherFiles[Pkg.otherFiles.length++] = "CacheP.h";
112     Pkg.otherFiles[Pkg.otherFiles.length++] = "HwiP.h";
113     Pkg.otherFiles[Pkg.otherFiles.length++] = "SwiP.h";
114     Pkg.otherFiles[Pkg.otherFiles.length++] = "osal.h";
115     Pkg.otherFiles[Pkg.otherFiles.length++] = "osalver.h";
116     Pkg.otherFiles[Pkg.otherFiles.length++] = "osalver.h.xdt";
117     Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/Doxyfile";
118     Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/doxyfile.xdt";
119     Pkg.otherFiles[Pkg.otherFiles.length++] = "build/buildlib.xs";
120     Pkg.otherFiles[Pkg.otherFiles.length++] = "makefile";
121     Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile_nonos_indp.mk";
122     Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile_nonos.mk";
123     Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile_tirtos_indp.mk";
124     Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile_tirtos.mk";
125     Pkg.otherFiles[Pkg.otherFiles.length++] = "src/src_common_nonos.mk";
126     Pkg.otherFiles[Pkg.otherFiles.length++] = "src/src_common_tirtos.mk";
127     Pkg.otherFiles[Pkg.otherFiles.length++] = "osal_component.mk";
128     Pkg.otherFiles[Pkg.otherFiles.length++] = "./lib";
130     /* Generate Users Manual Doxyfile */
131     var tplt = xdc.loadTemplate("./docs/doxyfile.xdt");
132     tplt.genFile("./docs/Doxyfile",osalDriverReleaseVersion);
135 /* Generate Settings.xdc */
136 var tplt = xdc.loadTemplate("./Settings.xdc.xdt");
137 tplt.genFile("./Settings.xdc",osalDriverReleaseVersion);
139 /* Generate paver.h */
140 var tplt = xdc.loadTemplate("./osalver.h.xdt");
141 tplt.genFile("./osalver.h",osalDriverReleaseVersion);