]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/drv/emac/package.bld
Merge pull request #4 in PROCESSOR-SDK/pdk from review_PRSDK-7310 to master
[processor-sdk/pdk.git] / packages / ti / drv / emac / package.bld
1 /******************************************************************************
2  * FILE PURPOSE: Build description for the emac Driver
3  ******************************************************************************
4  * FILE NAME: package.bld
5  *
6  * DESCRIPTION: 
7  *  This file contains the build specification and description for the emac driver
8  *  
9  *  The file takes the following parameters from the command line through the
10  *  XDCARGS variable.
11  *      XDCARGS[0] = 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-2015, Texas Instruments, Inc.
19  *****************************************************************************/
21 /* List of all subdirectories that combine to make the emac Socket Driver Package. */
22 var subDirectories = [ "src", "docs", "test", "example", "soc", "cpsw", "firmware" ];
24 var driverInstallType;
26 /* Determine if we need to create the InstallJammer Application or not? 
27  * emac 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     driverInstallType = "TAR";
34 else
35     driverInstallType = 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  *      emac_<version> */
41 var emacRTSCFileName = "emac" + "_"  + 
42                       driverReleaseVersion[0] + "_" +  driverReleaseVersion[1] + "_" + 
43                       driverReleaseVersion[2]  + "_" + driverReleaseVersion[3];
45 /******************************************************************
46  ************************ Release Banner **************************
47  ******************************************************************/
49 print ("************* emac Socket Driver Build Information *************");
50 print ("emac Socket Driver Install      : " + driverInstallType);
51 print ("emac Socket Driver LLD Version  : " + driverReleaseVersion);
52 print ("C66 Tools Directory             : " + c66ToolsBaseDir);
53 print ("M4 Tools Directory              : " + m4ToolsBaseDir);
54 print ("A15 Tools Directory             : " + a15ToolsBaseDir);
55 print ("RTSC File Name                  : " + emacRTSCFileName);
56 print ("emac Socket Driver LLD Path     : " + driverPath);
57 if (pOpts == 1) 
58 {
59     print ("CC LE opts                      : " + C66LE.ccOpts.prefix);
60     print ("CC BE opts                      : " + C66BE.ccOpts.prefix);
61     print ("M4 LE opts                      : " + M4LE.ccOpts.prefix);
62     print ("A15 basic opts                  : " + A15LE.ccOpts.prefix);
63 }
64 print ("****************************************************************");
66 /* Create the release package for the emac LLD */
67 Pkg.defaultRelease = Pkg.addRelease (emacRTSCFileName, {prefix: "./packages/"});
69 /* Moving forward we need to set the Archiver of the package to be ZIP. This is currently
70  * not supported in the XDC tools being used. Currenly builds need to be done with the 
71  * following options:-
72  *   xdc MK_FIXLISTOPTS=-t release 
73  * ZIP is a better option as it works natively with INSTALL Jammer and we can remove the
74  * uncompression into a temporary directory. XDC Tools with xdc-rXX support the ZIP archiver. */
75 //Pkg.attrs = {archiver : "zip"};
77 /* Cycle through all the sub-directories and build all the files */
78 for (var i = 0; i < subDirectories.length; i++) 
79 {
80     /* Load the capsule in the sub directory. */
81     var caps = xdc.loadCapsule (subDirectories[i]+"/Module.xs");
83     print ("Building directory " + subDirectories[i]);
85     /* Build the capsule. */
86     caps.modBuild();
88     /* Package the module.xs files for building via package */
89     Pkg.otherFiles[Pkg.otherFiles.length++] = subDirectories[i]+"/Module.xs";
90 }
92 /* Package the remaining files */
93 Pkg.otherFiles[Pkg.otherFiles.length++] = "config.bld";
94 Pkg.otherFiles[Pkg.otherFiles.length++] = "config_mk.bld";
95 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.bld";
96 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.xdc";
97 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.xs";
98 Pkg.otherFiles[Pkg.otherFiles.length++] = "Settings.xdc";
99 Pkg.otherFiles[Pkg.otherFiles.length++] = "Settings.xdc.xdt";
100 Pkg.otherFiles[Pkg.otherFiles.length++] = "emac_hwcfg.h";
101 Pkg.otherFiles[Pkg.otherFiles.length++] = "nss_if.h";
102 Pkg.otherFiles[Pkg.otherFiles.length++] = "emac_drv.h";
103 Pkg.otherFiles[Pkg.otherFiles.length++] = "emac_ioctl.h";
104 Pkg.otherFiles[Pkg.otherFiles.length++] = "emacver.h";
105 Pkg.otherFiles[Pkg.otherFiles.length++] = "emacver.h.xdt";
106 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/Doxyfile";
107 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/doxyfile.xdt";
108 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/buildlib.xs";
109 Pkg.otherFiles[Pkg.otherFiles.length++] = "makefile";
110 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile.mk";
111 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile_indp.mk";
112 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile_profile_indp.mk";
113 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile_profile.mk";
114 Pkg.otherFiles[Pkg.otherFiles.length++] = "src/src_files_common.mk";
115 Pkg.otherFiles[Pkg.otherFiles.length++] = "emac_component.mk";
116 Pkg.otherFiles[Pkg.otherFiles.length++] = "./lib";
117 /* Generate Users Manual Doxyfile */
118 var tplt = xdc.loadTemplate("./docs/doxyfile.xdt");
119 tplt.genFile("./docs/Doxyfile",driverReleaseVersion); 
121 /* Generate Settings.xdc */
122 var tplt = xdc.loadTemplate("./Settings.xdc.xdt");
123 tplt.genFile("./Settings.xdc",driverReleaseVersion); 
125 /* Generate paver.h */
126 var tplt = xdc.loadTemplate("./emacver.h.xdt");
127 tplt.genFile("./emacver.h",driverReleaseVersion);      
129