index 130205b3edb40643c22a2b056892fceb13fb4b1c..7f38f908e4514b96ab12d563a4757b3965b5e863 100644 (file)
/*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2019 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
/*
* ======== package.bld ========
*/
-
var Build = xdc.useModule('xdc.bld.BuildEnvironment');
var Pkg = xdc.useModule('xdc.bld.PackageContents');
-Pkg.attrs.exportSrc = true;
-
-Pkg.otherFiles = ["package.bld", "Rpmsg.h", "virtio_ring.h", "_MessageQCopy.h",
- "_VirtQueue.h", "MessageQCopy.h", "NameMap.h"];
-
-var SRCS = ["MessageQCopy.c", "NameMap.c"];
-
-/* remove this output directory during a clean */
-Pkg.generatedFiles.$add("lib/");
+var objList = [ "RPMessage.c", "NameMap.c" ];
var myCopts = "";
+/* Always build package libraries during the product build. This is
+ * needed because there is a compile time binding to VirtQueue, which
+ * has different implementations depending on the device. If this
+ * package were to be included in the IPC product library, it would
+ * require multiple product libraries (e.g. with a different VirtQueue
+ * implementation for each device).
+ *
+ * However, this package does participate in the custom build flow.
+ */
for (var i = 0; i < Build.targets.length; i++) {
var targ = Build.targets[i];
var name = Pkg.name;
- if (targ.$name.match(/^ti\.targets\.*/)) {
- myCopts = "--gcc"; /* Rpmsg.h requires gcc-isms */
- } else {
- myCopts = "";
- }
+ myCopts = "";
- /* Build for all profiles */
for (var profile in targ.profiles) {
- /* Build a platform-specific library */
+ /* build a platform-specific library */
if (targ.isa == "674") {
Pkg.addLibrary("lib/" + profile + "/" + name + "_omapl138", targ, {
profile: profile,
copts: myCopts,
- defs: "-DOMAPL138"
- }).addObjects(SRCS);
- } else if (targ.isa == "66") {
+ defs: "-DOMAPL138 -DRPMSG_NS_2_0"
+ }).addObjects(objList);
+ }
+ else if (targ.isa == "66") {
Pkg.addLibrary("lib/" + profile + "/" + name + "_tci6638", targ, {
profile: profile,
copts: myCopts,
- defs: "-DTCI6638"
- }).addObjects(SRCS);
+ defs: "-DTCI6638 -DRPMSG_NS_2_0"
+ }).addObjects(objList);
- Pkg.addLibrary("lib/" + profile + "/" + name + "_tci6614", targ, {
+ Pkg.addLibrary("lib/" + profile + "/" + name + "_vayu", targ, {
profile: profile,
copts: myCopts,
- defs: "-DTCI6614"
- }).addObjects(SRCS);
- } else if (targ.isa == "v7M") {
+ defs: "-DVAYU -DDSP -DRPMSG_NS_2_0"
+ }).addObjects(objList);
+ }
+ else if (targ.isa.match(/^v7M4?$/)) {
Pkg.addLibrary("lib/" + profile + "/" + name + "_omap5_smp", targ, {
profile: profile,
copts: myCopts,
- defs: "-DOMAP5 -DSMP"
- }).addObjects(SRCS);
+ defs: "-DOMAP5 -DSMP -DRPMSG_NS_2_0"
+ }).addObjects(objList);
- Pkg.addLibrary("lib/" + profile + "/" + name + "_omap5", targ, {
+ Pkg.addLibrary("lib/" + profile + "/" + name + "_vayu_smp", targ, {
profile: profile,
copts: myCopts,
- defs: "-DOMAP5 -DDM3_ONLY"
- }).addObjects(SRCS);
- } else if (targ.isa == "64T") {
+ defs: "-DVAYU -DSMP -DRPMSG_NS_2_0"
+ }).addObjects(objList);
+ }
+ else if (targ.isa == "64T") {
Pkg.addLibrary("lib/" + profile + "/" + name + "_omap5", targ, {
profile: profile,
copts: myCopts,
- defs: "-DOMAP5 -DDSP"
- }).addObjects(SRCS);
- } else {
+ defs: "-DOMAP5 -DDSP -DRPMSG_NS_2_0"
+ }).addObjects(objList);
+ }
+ else if (targ.isa == "v7R") {
+ Pkg.addLibrary("lib/" + profile + "/" + name + "_am65xx", targ, {
+ profile: profile,
+ copts: myCopts,
+ defs: "-DAM65XX -DRPMSG_NS_2_0",
+ }).addObjects(objList);
+ }
+ else {
+ /* target not suppoted */
continue;
}
}
}
+
+Pkg.otherFiles = [
+ "package.bld",
+ "Rpmsg.h",
+ "virtio_ring.h",
+ "_RPMessage.h",
+ "_VirtQueue.h",
+ "RPMessage.h",
+ "NameMap.h"
+];
+
+/* include source files in the release package */
+Pkg.attrs.exportSrc = true;
+
+Pkg.generatedFiles.$add("lib/");