Moved tree and libfdt into a util directory
authorJustin Sobota <jsobota@ti.com>
Tue, 29 Jan 2013 22:38:06 +0000 (17:38 -0500)
committerJustin Sobota <jsobota@ti.com>
Tue, 29 Jan 2013 22:38:06 +0000 (17:38 -0500)
24 files changed:
config.bld
include/rm_treeloc.h
package.bld
src/Module.xs
src/libfdt/Module.xs.test [deleted file]
src/rm.c
src/rm_dtb_util.c
src/rm_nameserver.c
src/rm_policy.c
util/Module.xs [new file with mode: 0644]
util/libfdt/Makefile.libfdt [moved from src/libfdt/Makefile.libfdt with 100% similarity]
util/libfdt/TODO [moved from src/libfdt/TODO with 100% similarity]
util/libfdt/fdt.c [moved from src/libfdt/fdt.c with 98% similarity]
util/libfdt/fdt.h [moved from src/libfdt/fdt.h with 100% similarity]
util/libfdt/fdt_ro.c [moved from src/libfdt/fdt_ro.c with 99% similarity]
util/libfdt/fdt_rw.c [moved from src/libfdt/fdt_rw.c with 99% similarity]
util/libfdt/fdt_strerror.c [moved from src/libfdt/fdt_strerror.c with 97% similarity]
util/libfdt/fdt_sw.c [moved from src/libfdt/fdt_sw.c with 98% similarity]
util/libfdt/fdt_wip.c [moved from src/libfdt/fdt_wip.c with 97% similarity]
util/libfdt/libfdt.h [moved from src/libfdt/libfdt.h with 99% similarity]
util/libfdt/libfdt_env.h [moved from src/libfdt/libfdt_env.h with 100% similarity]
util/libfdt/libfdt_internal.h [moved from src/libfdt/libfdt_internal.h with 98% similarity]
util/libfdt/version.lds [moved from src/libfdt/version.lds with 100% similarity]
util/tree.h [moved from include/tree.h with 100% similarity]

index 5f9ef0e8f92ab195844d5727b7d2e137deed69b1..393e28de84eaa7bb9e07382e896e9c2cfe337145 100644 (file)
@@ -23,7 +23,7 @@ var lldInstallType;
 var lldPartNumber = java.lang.System.getenv("PARTNO");\r
 \r
 /* Include Path */\r
-var lldIncludePath = " -i" + lldPath + "/src" + " -i" + lldPath  + " -i" + lldPath + "/test";\r
+var lldIncludePath = " -i" + lldPath + "/src" + " -i" + lldPath  + " -i" + lldPath + "/test" + " -i" + lldPath + "/util/libfdt";\r
 \r
 /* Configure the RM Release Version Information */\r
 var lldReleaseVersion = [02,00,00,00];\r
index 24e882373b8b2fb9da330b3e978f1f06ab8684fb..080408f20b300db9db04aca75a9d874098c3b21f 100644 (file)
@@ -51,8 +51,8 @@ extern "C" {
 /* RM external includes */
 #include <ti/drv/rm/rm.h>
 
-/* AVL BBST includes */
-#include <ti/drv/rm/include/tree.h>
+/* Tree algorithm includes */
+#include <ti/drv/rm/util/tree.h>
 
 /**********************************************************************
  *************** Tree Node Data Structure Definitions *****************
index a05e6807f08c0779ff3227a1109cb76f19efefb1..751f1cb2415c03b22483a01e03dbe70b7499c4ac 100644 (file)
@@ -19,7 +19,7 @@
  *****************************************************************************/\r
 \r
 /* List of all subdirectories that combine to make the RM Package. */\r
-var subDirectories = [ "src", "docs", "include", "test"];\r
+var subDirectories = [ "src", "docs", "include", "test", "util"];\r
 \r
 /* Determine if we need to create the InstallJammer Application or not? \r
  * RM Deliverables be either of the following formats:\r
@@ -45,14 +45,14 @@ var lldRTSCFileName = "rm" + "_" + lldPartNumber + "_" +
  ******************************************************************/\r
 \r
 print ("*************** RM Build Information ****************");\r
-print ("RM Install           : " + lldInstallType);\r
-print ("RM Version           : " + lldReleaseVersion);\r
-print ("Tools Directory            : " + toolsBaseDir);\r
-print ("RTSC File Name            : " + lldRTSCFileName);\r
-print ("RM Path              : " + lldPath);\r
-print ("Coverity Analysis          : " + (coverityAnalysis == "ON" ? "ON" : "OFF"));\r
-print ("CC LE opts                 : " + C66LE.ccOpts.prefix);\r
-print ("CC BE opts                 : " + C66BE.ccOpts.prefix);\r
+print ("RM Install        : " + lldInstallType);\r
+print ("RM Version        : " + lldReleaseVersion);\r
+print ("Tools Directory   : " + toolsBaseDir);\r
+print ("RTSC File Name   : " + lldRTSCFileName);\r
+print ("RM Path           : " + lldPath);\r
+print ("Coverity Analysis : " + (coverityAnalysis == "ON" ? "ON" : "OFF"));\r
+print ("CC LE opts        : " + C66LE.ccOpts.prefix);\r
+print ("CC BE opts        : " + C66BE.ccOpts.prefix);\r
 print ("***********************************************************");\r
 \r
 /* Create the release package for the RM */\r
index 69271f5c9516f52e6dd17b92e6b55b4b82037e31..b240df90d983746422fdaba7d21bea6edb1b460d 100644 (file)
@@ -20,12 +20,12 @@ var rmFile = [
     "src/rm_transport.c",
     "src/rm_tree.c",
     "src/rm_dtb_util.c",
-    "src/libfdt/fdt.c",
-    "src/libfdt/fdt_ro.c",
-    "src/libfdt/fdt_rw.c",
-    "src/libfdt/fdt_strerror.c",
-    "src/libfdt/fdt_sw.c",
-    "src/libfdt/fdt_wip.c",
+    "util/libfdt/fdt.c",
+    "util/libfdt/fdt_ro.c",
+    "util/libfdt/fdt_rw.c",
+    "util/libfdt/fdt_strerror.c",
+    "util/libfdt/fdt_sw.c",
+    "util/libfdt/fdt_wip.c",
 ];
 
 /**************************************************************************
@@ -49,20 +49,5 @@ function modBuild()
     /* Add all the .c files to the release package. */
     var testFiles = libUtility.listAllFiles (".c", "src", true);
     for (var k = 0 ; k < testFiles.length; k++)
-        Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];
-
-    /* Add all the .h files to the release package. */
-    var testFiles = libUtility.listAllFiles (".h", "src", true);
-    for (var k = 0 ; k < testFiles.length; k++)
-        Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];
-
-    /* Add all the .c files to the release package. */
-    var testFiles = libUtility.listAllFiles (".c", "src/libfdt", true);
-    for (var k = 0 ; k < testFiles.length; k++)
-        Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];
-
-    /* Add all the .h files to the release package. */
-    var testFiles = libUtility.listAllFiles (".h", "src/libfdt", true);
-    for (var k = 0 ; k < testFiles.length; k++)
-        Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];        
+        Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];  
 }
diff --git a/src/libfdt/Module.xs.test b/src/libfdt/Module.xs.test
deleted file mode 100644 (file)
index dcf0826..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/******************************************************************************
- * FILE PURPOSE: LIBFDT specification file.
- ******************************************************************************
- * FILE NAME: module.xs
- *
- * DESCRIPTION: 
- *  This file contains the module specification for the LIBFDT directory.
- *
- * Copyright (C) 2012, Texas Instruments, Inc.
- *****************************************************************************/
-
-/* Load the library utility. */
-var libUtility = xdc.loadCapsule ("../build/buildlib.xs");
-
-var libfdtFile = [
-    "libfdt/fdt.c",
-    "libfdt/fdt_ro.c",
-    "libfdt/fdt_rw.c",
-    "libfdt/fdt_strerror.c",
-    "libfdt/fdt_sw.c",
-    "libfdt/fdt_wip.c",
-];
-
-/**************************************************************************
- * FUNCTION NAME : modBuild
- **************************************************************************
- * DESCRIPTION   :
- *  The function is used to build all the components of the RM library
- **************************************************************************/
-function modBuild() 
-{
-    /* Build the libraries for all the targets specified. */
-    for (var targets=0; targets < Build.targets.length; targets++)
-    {
-        var libOptions = {
-            incs: lldIncludePath, 
-        };
-        
-        libUtility.buildLibrary (libOptions, "ti.drv.rm.libfdt", Build.targets[targets], libfdtFile);
-    }
-
-    /* Add all the .c files to the release package. */
-    var testFiles = libUtility.listAllFiles (".c", "libfdt", true);
-    for (var k = 0 ; k < testFiles.length; k++)
-        Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];
-
-    /* Add all the .h files to the release package. */
-    var testFiles = libUtility.listAllFiles (".h", "libfdt", true);
-    for (var k = 0 ; k < testFiles.length; k++)
-        Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];
-}
index ee73b1f425727bdea6a5082fb13638b3092fa0a8..b03ccddad431f9e93ef57388e5cc2f17cc1ad807 100644 (file)
--- a/src/rm.c
+++ b/src/rm.c
 #include <ti/drv/rm/include/rm_treeloc.h>\r
 \r
 /* RM LIBFDT includes */\r
-#include <ti/drv/rm/src/libfdt/libfdt.h>\r
+#include <ti/drv/rm/util/libfdt/libfdt.h>\r
 \r
-/* AVL BBST includes */\r
-#include <ti/drv/rm/include/tree.h>\r
+/* Tree algorithm includes */\r
+#include <ti/drv/rm/util/tree.h>\r
 \r
 /* RM OSAL layer */\r
 #include <rm_osal.h>\r
index 9bd024ce0507422853e8ee7c32650e017064c753..e08f306600964c5a3d02a08ce75047aa894ec0dd 100644 (file)
@@ -50,8 +50,8 @@
 #include <rm_osal.h>
 
 /* LIBFDT includes */
-#include <ti/drv/rm/src/libfdt/libfdt.h>
-#include <ti/drv/rm/src/libfdt/libfdt_env.h>
+#include <ti/drv/rm/util/libfdt/libfdt.h>
+#include <ti/drv/rm/util/libfdt/libfdt_env.h>
 
 /**********************************************************************
  ********************Common DTB Parsing Functions**********************
index c4a9e1a7270fa6085c56832ec3ba3da55d73d723..589ab6a4a6f4f66c796de8adea8f11a88a1cac20 100644 (file)
@@ -49,8 +49,8 @@
 #include <ti/drv/rm/include/rm_nameserverloc.h>
 #include <ti/drv/rm/include/rm_treeloc.h>
 
-/* AVL BBST includes */
-#include <ti/drv/rm/include/tree.h>
+/* Tree algorithm includes */
+#include <ti/drv/rm/util/tree.h>
 
 /* RM OSAL layer */
 #include <rm_osal.h>
index b49582b6d748debd1e7355ffb7e605c74b127418..b6a5c5e92c6293e9d74880e92010d92ee707b3a2 100644 (file)
 #include <ti/drv/rm/include/rm_dtb_utilloc.h>
 
 /* RM LIBFDT includes */
-#include <ti/drv/rm/src/libfdt/libfdt.h>
+#include <ti/drv/rm/util/libfdt/libfdt.h>
 
-/* AVL BBST includes */
-#include <ti/drv/rm/include/tree.h>
+/* Tree algorithm includes */
+#include <ti/drv/rm/util/tree.h>
 
 /* RM OSAL layer */
 #include <rm_osal.h>
diff --git a/util/Module.xs b/util/Module.xs
new file mode 100644 (file)
index 0000000..885e860
--- /dev/null
@@ -0,0 +1,42 @@
+/******************************************************************************
+ * FILE PURPOSE: RM include files.
+ ******************************************************************************
+ * FILE NAME: module.xs
+ *
+ * DESCRIPTION: 
+ *  This file contains the module specification for RM util directory
+ *
+ * Copyright (C) 2012-2013, Texas Instruments, Inc.
+ *****************************************************************************/
+
+/* Load the library utility. */
+var libUtility = xdc.loadCapsule ("../build/buildlib.xs");
+
+/**************************************************************************
+ * FUNCTION NAME : modBuild
+ **************************************************************************
+ * DESCRIPTION   :
+ *  The function is used to add all the header files in the include 
+ *  directory into the package.
+ **************************************************************************/
+function modBuild() 
+{
+    /* Add tree algorithm files to the release package. */
+    Pkg.otherFiles[Pkg.otherFiles.length++] = "util/tree.h";
+
+    /* Add libfdt library files to the relesae packages */
+    Pkg.otherFiles[Pkg.otherFiles.length++] = "util/libfdt/fdt.c";
+    Pkg.otherFiles[Pkg.otherFiles.length++] = "util/libfdt/fdt.h";
+    Pkg.otherFiles[Pkg.otherFiles.length++] = "util/libfdt/fdt_ro.c";
+    Pkg.otherFiles[Pkg.otherFiles.length++] = "util/libfdt/fdt_rw.c";
+    Pkg.otherFiles[Pkg.otherFiles.length++] = "util/libfdt/fdt_strerror.c";
+    Pkg.otherFiles[Pkg.otherFiles.length++] = "util/libfdt/fdt_sw.c";
+    Pkg.otherFiles[Pkg.otherFiles.length++] = "util/libfdt/fdt_wip.c";
+    Pkg.otherFiles[Pkg.otherFiles.length++] = "util/libfdt/libfdt.h";
+    Pkg.otherFiles[Pkg.otherFiles.length++] = "util/libfdt/libfdt_env.h";
+    Pkg.otherFiles[Pkg.otherFiles.length++] = "util/libfdt/libfdt_internal.h";
+    Pkg.otherFiles[Pkg.otherFiles.length++] = "util/libfdt/Makefile.libfdt";
+    Pkg.otherFiles[Pkg.otherFiles.length++] = "util/libfdt/TODO";
+    Pkg.otherFiles[Pkg.otherFiles.length++] = "util/libfdt/version.lds";
+}
+
similarity index 100%
rename from src/libfdt/TODO
rename to util/libfdt/TODO
similarity index 98%
rename from src/libfdt/fdt.c
rename to util/libfdt/fdt.c
index 6bf65fe48b62a70d22791bdc600b1c2d700528b6..e56833ae9b6ffaee67281dc959b0c263ccc24c15 100644 (file)
@@ -50,8 +50,8 @@
  */
 #include "libfdt_env.h"
 
-#include <ti/drv/rm/src/libfdt/fdt.h>
-#include <ti/drv/rm/src/libfdt/libfdt.h>
+#include <fdt.h>
+#include <libfdt.h>
 
 #include "libfdt_internal.h"
 
similarity index 100%
rename from src/libfdt/fdt.h
rename to util/libfdt/fdt.h
similarity index 99%
rename from src/libfdt/fdt_ro.c
rename to util/libfdt/fdt_ro.c
index 9baf89492621a540196c7036d600e3b1417300eb..02b6d687537fac11e13a835502b1c16c98fb7603 100644 (file)
@@ -50,8 +50,8 @@
  */
 #include "libfdt_env.h"
 
-#include <ti/drv/rm/src/libfdt/fdt.h>
-#include <ti/drv/rm/src/libfdt/libfdt.h>
+#include <fdt.h>
+#include <libfdt.h>
 
 #include "libfdt_internal.h"
 
similarity index 99%
rename from src/libfdt/fdt_rw.c
rename to util/libfdt/fdt_rw.c
index 40d9b5cf111113c8690168f8e5f02fdfdcfb501e..994037bbbda93ea8c71fe9b3208c2fe9d20ca034 100644 (file)
@@ -50,8 +50,8 @@
  */
 #include "libfdt_env.h"
 
-#include <ti/drv/rm/src/libfdt/fdt.h>
-#include <ti/drv/rm/src/libfdt/libfdt.h>
+#include <fdt.h>
+#include <libfdt.h>
 
 #include "libfdt_internal.h"
 
similarity index 97%
rename from src/libfdt/fdt_strerror.c
rename to util/libfdt/fdt_strerror.c
index 67dec2feacdbc21f8f1bc4643bc49bbaeea6ee42..e6c3ceee8c58c56beee386e6ed730e32c4ff646b 100644 (file)
@@ -50,8 +50,8 @@
  */
 #include "libfdt_env.h"
 
-#include <ti/drv/rm/src/libfdt/fdt.h>
-#include <ti/drv/rm/src/libfdt/libfdt.h>
+#include <fdt.h>
+#include <libfdt.h>
 
 #include "libfdt_internal.h"
 
similarity index 98%
rename from src/libfdt/fdt_sw.c
rename to util/libfdt/fdt_sw.c
index aa5236d66406b2423deeb6c22a09ed5a0bcbb741..55ebebf1eb20e8c7f9200881f99ecf03632db9a3 100644 (file)
@@ -50,8 +50,8 @@
  */
 #include "libfdt_env.h"
 
-#include <ti/drv/rm/src/libfdt/fdt.h>
-#include <ti/drv/rm/src/libfdt/libfdt.h>
+#include <fdt.h>
+#include <libfdt.h>
 
 #include "libfdt_internal.h"
 
similarity index 97%
rename from src/libfdt/fdt_wip.c
rename to util/libfdt/fdt_wip.c
index b32829086c239c476a2ba9635f6a023a9d992665..6025fa1fe8feeb046a68605776d0d1ecac1efe9f 100644 (file)
@@ -50,8 +50,8 @@
  */
 #include "libfdt_env.h"
 
-#include <ti/drv/rm/src/libfdt/fdt.h>
-#include <ti/drv/rm/src/libfdt/libfdt.h>
+#include <fdt.h>
+#include <libfdt.h>
 
 #include "libfdt_internal.h"
 
similarity index 99%
rename from src/libfdt/libfdt.h
rename to util/libfdt/libfdt.h
index 3cb3153b9c0757618e6f34b41e7b6e1b68079936..55f3eb3042d68756239b05acf96c2a721982c3a2 100644 (file)
@@ -51,8 +51,8 @@
  *     EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <ti/drv/rm/src/libfdt/libfdt_env.h>
-#include <ti/drv/rm/src/libfdt/fdt.h>
+#include <libfdt_env.h>
+#include <fdt.h>
 
 #define FDT_FIRST_SUPPORTED_VERSION    0x10
 #define FDT_LAST_SUPPORTED_VERSION     0x11
@@ -159,16 +159,16 @@ int fdt_next_node(const void *fdt, int offset, int *depth);
                struct fdt_header *fdth = (struct fdt_header*)fdt; \
                fdth->name = cpu_to_fdt32(val); \
        }
-__fdt_set_hdr(magic)
-__fdt_set_hdr(totalsize)
-__fdt_set_hdr(off_dt_struct)
-__fdt_set_hdr(off_dt_strings)
-__fdt_set_hdr(off_mem_rsvmap)
-__fdt_set_hdr(version)
-__fdt_set_hdr(last_comp_version)
-__fdt_set_hdr(boot_cpuid_phys)
-__fdt_set_hdr(size_dt_strings)
-__fdt_set_hdr(size_dt_struct)
+__fdt_set_hdr(magic);
+__fdt_set_hdr(totalsize);
+__fdt_set_hdr(off_dt_struct);
+__fdt_set_hdr(off_dt_strings);
+__fdt_set_hdr(off_mem_rsvmap);
+__fdt_set_hdr(version);
+__fdt_set_hdr(last_comp_version);
+__fdt_set_hdr(boot_cpuid_phys);
+__fdt_set_hdr(size_dt_strings);
+__fdt_set_hdr(size_dt_struct);
 #undef __fdt_set_hdr
 
 /**
similarity index 98%
rename from src/libfdt/libfdt_internal.h
rename to util/libfdt/libfdt_internal.h
index b27abe145f7b29996c2e8a85c158f137e3c59fe4..381133ba81df7d02c375d7a1462d650136abd6d1 100644 (file)
@@ -50,7 +50,7 @@
  *     OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  *     EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#include <ti/drv/rm/src/libfdt/fdt.h>
+#include <fdt.h>
 
 #define FDT_ALIGN(x, a)                (((x) + (a) - 1) & ~((a) - 1))
 #define FDT_TAGALIGN(x)                (FDT_ALIGN((x), FDT_TAGSIZE))
similarity index 100%
rename from include/tree.h
rename to util/tree.h