BIOS: Fix ti.ipc.transport build script for rpmsg2-based libs
authorAngela Stegmaier <angelabaker@ti.com>
Fri, 26 Apr 2013 22:48:50 +0000 (17:48 -0500)
committerChris Ring <cring@ti.com>
Tue, 30 Apr 2013 21:22:12 +0000 (14:22 -0700)
Also rework ti.ipc.transport build scripts to remove unnecessary
platform-specific lib names.

Also update BIOS-side example to indicate the correct rpmsg version.

packages/ti/ipc/tests/package.bld
packages/ti/ipc/transports/package.bld
packages/ti/ipc/transports/package.xs

index 749f8ca77c7850a2584569f6478133714b2f579f..69b0cf8662e42443d795b51f21e29f8d69549ffd 100644 (file)
@@ -137,15 +137,51 @@ for (var i = 0; i < Build.targets.length; i++) {
             }).addObjects(["dual_transports.c"]);
         }
 
             }).addObjects(["dual_transports.c"]);
         }
 
-        Pkg.addExecutable(name + "/messageq_multi", targ, platform, {
-            cfgScript: "rpmsg_transport",
-            defs: "-D BENCHMARK "
-        }).addObjects(["messageq_multi.c"]);
-
-        Pkg.addExecutable(name + "/messageq_single", targ, platform, {
-            cfgScript: "rpmsg_transport",
-            defs: "-D BENCHMARK "
-        }).addObjects(["messageq_single.c"]);
+        if (targ.isa.match(/^v7M(|4)$/)) {
+            Pkg.addExecutable(name + "/messageq_multi", targ, platform, {
+                cfgScript: "rpmsg_transport",
+                defs: "-D BENCHMARK -DRPMSG_NS_2_0"
+            }).addObjects(["messageq_multi.c"]);
+        } else if (targ.isa == "64T") {
+            Pkg.addExecutable(name + "/messageq_multi", targ, platform, {
+                cfgScript: "rpmsg_transport",
+                defs: "-D BENCHMARK -DRPMSG_NS_2_0"
+            }).addObjects(["messageq_multi.c"]);
+        } else if (targ.isa == "66" &&
+                   platform.match(/^ti\.platform\.vayu/)) {
+            Pkg.addExecutable(name + "/messageq_multi", targ, platform, {
+                cfgScript: "rpmsg_transport",
+                defs: "-D BENCHMARK -DRPMSG_NS_2_0"
+            }).addObjects(["messageq_multi.c"]);
+        } else {
+            Pkg.addExecutable(name + "/messageq_multi", targ, platform, {
+                cfgScript: "rpmsg_transport",
+                defs: "-D BENCHMARK"
+            }).addObjects(["messageq_multi.c"]);
+        }
+
+        if (targ.isa.match(/^v7M(|4)$/)) {
+            Pkg.addExecutable(name + "/messageq_single", targ, platform, {
+                cfgScript: "rpmsg_transport",
+                defs: "-D BENCHMARK -DRPMSG_NS_2_0"
+            }).addObjects(["messageq_single.c"]);
+        } else if (targ.isa == "64T") {
+            Pkg.addExecutable(name + "/messageq_single", targ, platform, {
+                cfgScript: "rpmsg_transport",
+                defs: "-D BENCHMARK -DRPMSG_NS_2_0"
+            }).addObjects(["messageq_single.c"]);
+        } else if (targ.isa == "66" &&
+                   platform.match(/^ti\.platform\.vayu/)) {
+            Pkg.addExecutable(name + "/messageq_single", targ, platform, {
+                cfgScript: "rpmsg_transport",
+                defs: "-D BENCHMARK -DRPMSG_NS_2_0"
+            }).addObjects(["messageq_single.c"]);
+        } else {
+            Pkg.addExecutable(name + "/messageq_single", targ, platform, {
+                cfgScript: "rpmsg_transport",
+                defs: "-D BENCHMARK "
+            }).addObjects(["messageq_single.c"]);
+        }
 
         if (platform.match(/^ti\.platforms\.evmOMAPL138\:DSP/)) {
                 Pkg.addExecutable(name + "/nano_test", targ, platform, {
 
         if (platform.match(/^ti\.platforms\.evmOMAPL138\:DSP/)) {
                 Pkg.addExecutable(name + "/nano_test", targ, platform, {
index 5ef88452cb26d6562b52241f191eb2804769980f..6db7786b069658fab4705dd17cb6943e7910882b 100644 (file)
@@ -64,40 +64,20 @@ for (var i = 0; i < Build.targets.length; i++) {
     /* Build for all profiles */
     for (var profile in targ.profiles) {
 
     /* Build for all profiles */
     for (var profile in targ.profiles) {
 
+        /* For all targets, build a rpmsg-upstream-compatible lib */
         Pkg.addLibrary("lib/" + profile + "/" + Pkg.name, targ, {
             profile: profile,
             copts: myCopts
         }).addObjects(SRCS);
 
         Pkg.addLibrary("lib/" + profile + "/" + Pkg.name, targ, {
             profile: profile,
             copts: myCopts
         }).addObjects(SRCS);
 
-        if (targ.isa.match(/^v7M(|4)$/)) {
-            /* for now, build 'special' lib compatible with OMAP5 HLOS */
-            Pkg.addLibrary("lib/" + profile + "/" + Pkg.name + "_omap5", targ, {
-                profile: profile,
-                copts: myCopts + " -DRPMSG_NS_2_0"
-            }).addObjects(SRCS);
-
-            /* for now, build 'special' lib compatible with VAYU HLOS */
-            Pkg.addLibrary("lib/" + profile + "/" + Pkg.name + "_vayu", targ, {
+        if (targ.isa.match(/^v7M(|4)$/) || targ.isa.match(/^64T$/) ||
+                targ.isa.match(/^66$/)) {
+            /* And for select targets, build a rpmsg2-compatible lib */
+            Pkg.addLibrary("lib/" + profile + "/" + Pkg.name + "_rpmsg2",
+                    targ, {
                 profile: profile,
                 copts: myCopts + " -DRPMSG_NS_2_0"
             }).addObjects(SRCS);
         }
                 profile: profile,
                 copts: myCopts + " -DRPMSG_NS_2_0"
             }).addObjects(SRCS);
         }
-
-        if (targ.isa == "C64T") {
-            /* for now, build 'special' lib compatible with OMAP5 HLOS */
-            Pkg.addLibrary("lib/" + profile + "/" + Pkg.name + "_omap5", targ, {
-                profile: profile,
-                copts: myCopts + " -DRPMSG_NS_2_0"
-            }).addObjects(SRCS);
-        }
-
-        if (targ.isa == "66") {
-            /* for now, build 'special' lib compatible with VAYU HLOS */
-            Pkg.addLibrary("lib/" + profile + "/" + Pkg.name + "_vayu", targ, {
-                profile: profile,
-                copts: myCopts + " -DRPMSG_NS_2_0"
-            }).addObjects(SRCS);
-        }
-
     }
 }
     }
 }
index 9c00a9daa3a576f5959c9a26551f05f4db9f614d..8c87f454dba1c41f9ba85dd982b4d6f7649de331 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (c) 2012, Texas Instruments Incorporated
+ * Copyright (c) 2012-2013, Texas Instruments Incorporated
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -38,6 +38,8 @@
  */
 function getLibs(prog)
 {
  */
 function getLibs(prog)
 {
+    var device = prog.cpu.deviceName;
+    var special = "";   /* used if there is a 'special' lib for a platform */
     var suffix = prog.build.target.findSuffix(this);
     if (suffix == null) {
         /* no matching lib found in this package, return "" */
     var suffix = prog.build.target.findSuffix(this);
     if (suffix == null) {
         /* no matching lib found in this package, return "" */
@@ -46,11 +48,22 @@ function getLibs(prog)
         return ("");
     }
 
         return ("");
     }
 
+    switch (device) {
+        case "OMAP4430":
+        case "OMAP5430":
+        case "Vayu":
+            special = "_rpmsg2";
+            break;
+
+        default:
+            special = "";
+            break;
+    }
+
     /* the location of the libraries are in lib/<profile>/* */
     /* the location of the libraries are in lib/<profile>/* */
-    var name = this.$name + ".a" + suffix;
+    var name = this.$name + special + ".a" + suffix;
     var lib = "lib/" + this.profile + "/" + name;
 
     var lib = "lib/" + this.profile + "/" + name;
 
-
     /*
      * If the requested profile doesn't exist, we return the 'release' library.
      */
     /*
      * If the requested profile doesn't exist, we return the 'release' library.
      */