1 TI RPMsg Char Package
2 ======================
4 1. Introduction
5 ----------------
6 This repo contains the source code for a small rpmsg-char utility library
7 and some basic examples and/or tests exercising the API provided by the
8 ti_rpmsg_char library. The library is primarily designed to provide Linux
9 applications an easy means to open and identify rpmsg character devices
10 created by the Linux kernel rpmsg-char driver using the virtio-rpmsg-bus
11 transport back-end.
13 The library currently supports the TI K3 AM65x, J721E and J7200 SoCs, but
14 can be easily scaled to support other SoCs.
17 2. Sources
18 -----------
19 The repo is maintained as a git tree, and so the sources can simply be
20 downloaded using git.
22 git clone git://git.ti.com/rpmsg/ti-rpmsg-char.git
24 The following is the directory structure for this package:
25 - src : Library source code and internal header files
26 - include : Public exported headers for applications usage
27 - examples : Example source code
30 3. API
31 -------
32 The library provides only 4 basic API. Please see the documentation in
33 include/ti_rpmsg_char.h for each of the API and function arguments.
35 - rpmsg_char_init()
36 - rpmsg_char_exit()
37 - rpmsg_char_open()
38 - rpmsg_char_close()
40 Applications need only include the ti_rpmsg_char.h. All the remoteproc
41 ids to be used are defined in rproc_id.h, which is already included in
42 ti_rpmsg_char.h.
45 4. Build
46 ---------
48 4.1 Infrastructure Tools
49 The package uses the autotools infrastructure for build. The following
50 versions are used:
51 GNU autoconf : 2.69
52 GNU automake : 1.15.1
53 GNU libtool : 2.4.6
55 The following Arm cross-compilers are used to build the library and
56 examples:
57 v8 Compiler : gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu
58 v7 Compiler : gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf
60 4.2 Build Steps
61 1. Install the necessary autotools and compilers
62 2. Add the installed compiler bin path to your PATH variable
63 eg: export PATH=<install_path>/gcc-arm-9.2-2019.12-aarch64/bin:$PATH
64 3. Configure the autotools with necessary host and optional prefix to be
65 used to install the build libraries and executables
66 cd <ti-rpmsg-char-dir>
67 autoreconf -i
68 ./configure --host=aarch64-none-linux-gnu --prefix=<target-dir>
69 4. Build and Install Library
70 make
71 make install
72 5. Build Examples, the top-level Makefile builds only the library by
73 default
74 make -C examples
75 make -C examples install
76 or
77 cd examples
78 make
79 make install
81 4.3 Clean Steps
82 1. Use the desired generic Makefile targets
83 make clean : Erase the files built by make
84 make distclean : clean + Erase the files created by the configure step
85 make uninstall : Erase the installed libraries and executables
86 2. Cleaning up examples specifically needs separate commands. It is all
87 similar to the commands in #1, but invoked with -C examples, or invoke
88 normally from within the examples folder
89 eg: make -C examples uninstall
90 or
91 cd examples; make uninstall
92 3. Use git clean to get the repo back to a pristine state
93 git clean -dfx