aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Leach <mike.leach@linaro.org>2018-05-03 16:23:44 +0100
committerMike Leach <mike.leach@linaro.org>2018-05-04 16:32:13 +0100
commit864d52537d441447a25e282459e1ae2557e7bd5f (patch)
tree12d3abd3a20652a9cd5fd59af684077955efbd0a
parent4688ff310a0ebdffc94eb54445ac6b88dbb5d5cc (diff)
opencsd: Doc & version updates for v0.8.4v0.8.4
Update README and version info with latest version. update build document to reflect new build processes. Signed-off-by: Mike Leach <mike.leach@linaro.org>
-rw-r--r--README.md3
-rw-r--r--decoder/docs/build_libs.md89
-rw-r--r--decoder/include/ocsd_if_version.h4
3 files changed, 76 insertions, 20 deletions
diff --git a/README.md b/README.md
index 96fd7cf31726..f6474bc2177f 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@ Releases will appear on the master branch in the git repository with an appropri
CoreSight Trace Component Support.
----------------------------------
-_Current Version 0.8.3_
+_Current Version 0.8.4_
### Current support:
@@ -117,6 +117,7 @@ Version and Modification Information
- _Version 0.8.1_: Minor updates: Use install tool to copy headers. Changes to HOWTO for perf usage.
- _Version 0.8.2_: Bugfix: C++ init errors fixed for CLANG build process.
- _Version 0.8.3_: Bugfix: ETMv4 decoder issues fixed.
+- _Version 0.8.4_: build: makefile updates and improvements to get build process compatible with Debian packaging.
Licence Information
diff --git a/decoder/docs/build_libs.md b/decoder/docs/build_libs.md
index b7c8536ca5f0..dc7d85da9401 100644
--- a/decoder/docs/build_libs.md
+++ b/decoder/docs/build_libs.md
@@ -6,47 +6,102 @@ Building and using the Library {#build_lib}
Platform Support
----------------
-The current makefiles and build projects support building the library on Linux and Windows,
-x86 or x64 hosts.
-
-Support is expected for ARM linux and baremetal, AArch32 and AArch64 platforms.
+The current makefiles and build projects support building the library on:
+ - Linux and Windows, x86 or x64 hosts.
+ - ARM linux - AArch32 and AArch64
+ - ARM aarch32 and aarch64 libs, x-compiled on x86/64 hosts.
+In addition to building the library from the project, the library may be installed into the standard
+`/usr/lib/` area in Linux, and will soon be available as a package from Linux Distros.
Building the Library
--------------------
-The library and test programs are built from the library `./build/<platform>` directory.
+The library and test programs are built from the library `./build/<platform>` directory, where
+<platform> is either 'linux' or 'win-vs2015'
See [`./docs/test_progs.md`](@ref test_progs) for further information on use of the test
programs.
-### Linux x86/x64 ###
+### Linux x86/x64/ARM ###
+
+Libraries are built into a <tgt_dir>. This is used as the final output directory for the
+libraries in `decoder/lib/<tgt_dir>`, and also as a sub-directory of the build process for
+intermediate files - `decoder/build/linux/ref_trace_decode_lib/<tgt_dir>`.
+
+For a standard build, go to the `./build/linux/` and run `make` in that directory.
+
+This will set <tgt_dir> to `builddir` for all build variants of the library. Using this only one variant of the library can be built at any one time.
+
+For development, alternatively use `make -f makefile.dev`
+
+This will set <tgt_dir> to `linux<bit-variant>/<dbg|rel>` and therefore build libraries into the
+`decoder/lib/linux<bit-variant>/<dbg|rel>` directories, allowing multiple variants of the library
+to be present during development.
-Go to the `./build/linux/` and run `make` in that directory.
+e.g.
-Options to pass to the makefile are:-
-- `LINUX64=1` : build the 64 bit version of the library
+`./lib/linux64/rel` will contain the linux 64 bit release libraries.
+
+`./lib/linux-arm64/dbg` will contain the linux aarch 64 debug libraries for ARM.
+
+Options to pass to both makefiles are:-
- `DEBUG=1` : build the debug version of the library.
-Libraries are delivered to the `./lib/linux<bitsize>/<dbg\rel>` directories.
-e.g. `./lib/linux64/rel` will contain the linux 64 bit release libraries.
+Options to pass to makefile.dev are:-
+- ARCH=<arch> : sets the bit variant in the delivery directories. Set if cross compilation for ARCH
+ other than host. Otherwise ARCH is auto-detected.
+ <arch> can be x86, x86_64, arm, arm64, aarch64, aarch32
+
+For cross compilation, set the environment variable `CROSS_COMPILE` to the name path/prefix for the
+compiler to use. The following would set the environment to cross-compile for ARM
+
+ export PATH=$PATH:~/work/gcc-x-aarch64-6.2/bin
+ export ARCH=arm64
+ export CROSS_COMPILE=aarch64-linux-gnu-
+
+The makefile will scan the `ocsd_if_version.h` to get the library version numbers and use these
+in the form Major.minor.patch when naming the output .so files.
-The following libraries are built:-
-- `libcstraced.so` : shared library containing the main C++ based decoder library
-- `libcstraced_c_api.so` : shared library containing the C-API wrapper library. Dependent on `libcstraced.so`
+Main C++ library names:
+- `libcstraced.so.M.m.p` : shared library containing the main C++ based decoder library
+- `libcstrace.so.M` : symbolic link name to library - major version only.
+- `libcstrace.so` : symbolic link name to library - no version.
+
+C API wrapper library names:
+- `libcstraced_c_api.so.M.m.p` : shared library containing the C-API wrapper library. Dependent on `libcstraced.so.M`
+- `libcstraced_c_api.so.M` : symbolic link name to library - major version only.
+- `libcstraced_c_api.so` : symbolic link name to library - no version.
+
+Static versions of the libraries:
- `libcstraced.a` : static library containing the main C++ based decoder library.
- `libcstraced_c_api.a` : static library containing the C-API wrapper library.
-Test programs are delivered to the `./tests/bin/linux<bitsize>/<dgb\rel>` directories.
+Test programs are delivered to the `./tests/bin/<tgt_dir>` directories.
The test programs are built to used the .so versions of the libraries.
- `trc_pkt_lister` - dependent on `libcstraced.so`.
- `simple_pkt_print_c_api` - dependent on `libcstraced_c_api.so` & hence `libcstraced.so`.
The test program build for `trc_pkt_lister` also builds an auxiliary library used by this program for test purposes only.
-This is the `libsnapshot_parser.a` library, delivered to the `./tests/lib/linux<bitsize>/<dgb\rel>` directories.
+This is the `libsnapshot_parser.a` library, delivered to the `./tests/lib/<tgt_dir>` directories.
+
+__Installing on Linux__
+
+The libraries can be installed on linux using the `make install` command. This will usually require root privileges. Installation will be the version in the `./lib/<tgt_dir>` directory, according to options chosen.
+
+e.g. ` make -f makefile.dev DEBUG=1 install`
+
+will install from `./lib/linux64/dbg`
+
+The libraries `libopencsd` and `libopencsd_c_api` are installed to `/usr/lib`.
+
+Sufficient header files to build using the C-API library will be installed to `/usr/include/opencsd`.
+
+The installation can be removed using `make clean_install`. No additional options are necessary.
+
-### Windows ###
+### Windows (x86/x64) ###
Use the `.\build\win\ref_trace_decode_lib\ref_trace_decode_lib.sln` file to load a solution
which contains all library and test build projects.
diff --git a/decoder/include/ocsd_if_version.h b/decoder/include/ocsd_if_version.h
index b37ca071f189..dfebc0f5def4 100644
--- a/decoder/include/ocsd_if_version.h
+++ b/decoder/include/ocsd_if_version.h
@@ -44,7 +44,7 @@
@{*/
#define OCSD_VER_MAJOR 0x0 /**< Library Major Version */
#define OCSD_VER_MINOR 0x8 /**< Library Minor Version */
-#define OCSD_VER_PATCH 0x3 /**< Library Patch Version */
+#define OCSD_VER_PATCH 0x4 /**< Library Patch Version */
/** Library version number - MMMMnnpp format.
MMMM = major version,
@@ -53,7 +53,7 @@
*/
#define OCSD_VER_NUM (((uint32_t)OCSD_VER_MAJOR << 16) | ((uint32_t)OCSD_VER_MINOR << 8) | ((uint32_t)OCSD_VER_PATCH))
-#define OCSD_VER_STRING "0.8.3" /**< Library Version string */
+#define OCSD_VER_STRING "0.8.4" /**< Library Version string */
#define OCSD_LIB_NAME "OpenCSD Library" /**< Library name string */
#define OCSD_LIB_SHORT_NAME "OCSD" /**< Library Short name string */
/** @}*/