debian@BeagleBone-AI64:~$ git clone git://git.ti.com/rpmsg/ti-rpmsg-char.git Cloning into 'ti-rpmsg-char'... remote: Counting objects: 177, done. remote: Compressing objects: 100% (174/174), done. remote: Total 177 (delta 115), reused 0 (delta 0) Receiving objects: 100% (177/177), 76.63 KiB | 2.19 MiB/s, done. Resolving deltas: 100% (115/115), done. debian@BeagleBone-AI64:~$ ls development test_atomic_compare_exchange test_atomic_compare_exchange.c ti ti-rpmsg-char debian@BeagleBone-AI64:~$ cd ti-rpmsg-char/ debian@BeagleBone-AI64:~/ti-rpmsg-char$ ls Makefile.am README TI_RPMsg_Char_0.1.0_manifest.html configure.ac examples include src debian@BeagleBone-AI64:~/ti-rpmsg-char$ ls Makefile.am README TI_RPMsg_Char_0.1.0_manifest.html configure.ac examples include src debian@BeagleBone-AI64:~/ti-rpmsg-char$ cat README TI RPMsg Char Package ====================== 1. Introduction ---------------- This repo contains the source code for a small rpmsg-char utility library and some basic examples and/or tests exercising the API provided by the ti_rpmsg_char library. The library is primarily designed to provide Linux applications an easy means to open and identify rpmsg character devices created by the Linux kernel rpmsg-char driver using the virtio-rpmsg-bus transport back-end. The library currently supports the TI K3 AM65x, AM64x, AM62x, AM62Ax, AM62Px, J721E, J7200, J721S2, J784S4 and J722S SoCs, but can be easily scaled to support other SoCs. 2. Sources ----------- The repo is maintained as a git tree, and so the sources can simply be downloaded using git. git clone git://git.ti.com/rpmsg/ti-rpmsg-char.git The following is the directory structure for this package: - src : Library source code and internal header files - include : Public exported headers for applications usage - examples : Example source code 3. API ------- The library provides only 4 basic API. Please see the documentation in include/ti_rpmsg_char.h for each of the API and function arguments. - rpmsg_char_init() - rpmsg_char_exit() - rpmsg_char_open() - rpmsg_char_close() Applications need only include the ti_rpmsg_char.h. All the remoteproc ids to be used are defined in rproc_id.h, which is already included in ti_rpmsg_char.h. 4. Build --------- 4.1 Infrastructure Tools The package uses the autotools infrastructure for build. The following versions are used: GNU autoconf : 2.69 GNU automake : 1.15.1 GNU libtool : 2.4.6 The following Arm cross-compilers are used to build the library and examples: v8 Compiler : gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu v7 Compiler : gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf 4.2 Build Steps 1. Install the necessary autotools and compilers 2. Add the installed compiler bin path to your PATH variable eg: export PATH=/gcc-arm-9.2-2019.12-aarch64/bin:$PATH 3. Configure the autotools with necessary host and optional prefix to be used to install the build libraries and executables cd autoreconf -i ./configure --host=aarch64-none-linux-gnu --prefix= 4. Build and Install Library make make install 5. Build Examples, the top-level Makefile builds only the library by default make -C examples make -C examples install or cd examples make make install 4.3 Clean Steps 1. Use the desired generic Makefile targets make clean : Erase the files built by make make distclean : clean + Erase the files created by the configure step make uninstall : Erase the installed libraries and executables 2. Cleaning up examples specifically needs separate commands. It is all similar to the commands in #1, but invoked with -C examples, or invoke normally from within the examples folder eg: make -C examples uninstall or cd examples; make uninstall 3. Use git clean to get the repo back to a pristine state git clean -dfx debian@BeagleBone-AI64:~/ti-rpmsg-char$ autoreconf -i libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. libtoolize: copying file 'build-aux/ltmain.sh' libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac, libtoolize: and rerunning libtoolize and aclocal. libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am. configure.ac:23: warning: The macro `AC_PROG_LIBTOOL' is obsolete. configure.ac:23: You should run autoupdate. aclocal.m4:122: AC_PROG_LIBTOOL is expanded from... configure.ac:23: the top level configure.ac:32: warning: The macro `AC_HEADER_STDC' is obsolete. configure.ac:32: You should run autoupdate. ./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from... configure.ac:32: the top level configure.ac:23: installing 'build-aux/compile' configure.ac:23: installing 'build-aux/config.guess' configure.ac:23: installing 'build-aux/config.sub' configure.ac:17: installing 'build-aux/install-sh' configure.ac:17: installing 'build-aux/missing' examples/Makefile.am: installing 'build-aux/depcomp' debian@BeagleBone-AI64:~/ti-rpmsg-char$ ls Makefile.am TI_RPMsg_Char_0.1.0_manifest.html build-aux configure.ac src Makefile.in aclocal.m4 config.h.in examples README autom4te.cache configure include debian@BeagleBone-AI64:~/ti-rpmsg-char$ mkdir kev_target debian@BeagleBone-AI64:~/ti-rpmsg-char$ ./configure --host=aarch64-none-linux-gnu --prefix=kev_target configure: error: expected an absolute directory name for --prefix: kev_target debian@BeagleBone-AI64:~/ti-rpmsg-char$ ./configure --host=aarch64-none-linux-gnu --prefix=~/ti-rpmsg-char/kev_target configure: error: expected an absolute directory name for --prefix: ~/ti-rpmsg-char/kev_target debian@BeagleBone-AI64:~/ti-rpmsg-char$ ~ ~_apt ~debian/ ~mail/ ~node-red/ ~sys/ ~avahi/ ~games/ ~man ~proxy/ ~systemd-network/ ~backup/ ~irc ~messagebus ~root/ ~systemd-timesync/ ~bin/ ~list ~news ~sshd/ ~uucp ~daemon/ ~lp ~nobody ~sync/ ~www-data debian@BeagleBone-AI64:~/ti-rpmsg-char$ pwd /home/debian/ti-rpmsg-char debian@BeagleBone-AI64:~/ti-rpmsg-char$ ./configure --host=aarch64-none-linux-gnu --prefix=/home/debian/ti-rpmsg-char/kev_target checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for aarch64-none-linux-gnu-strip... no checking for strip... strip checking for a race-free mkdir -p... /usr/bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether to enable maintainer-specific portions of Makefiles... no checking build system type... aarch64-unknown-linux-gnu checking host system type... aarch64-none-linux-gnu checking how to print strings... printf checking whether make supports the include directive... yes (GNU style) checking for aarch64-none-linux-gnu-gcc... no checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... no checking for aarch64-none-linux-gnu-dumpbin... no checking for aarch64-none-linux-gnu-link... no checking for dumpbin... no checking for link... link -dump checking the name lister (nm) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking how to convert aarch64-unknown-linux-gnu file names to aarch64-none-linux-gnu format... func_convert_file_noop checking how to convert aarch64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for aarch64-none-linux-gnu-file... no checking for file... file checking for aarch64-none-linux-gnu-objdump... no checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for aarch64-none-linux-gnu-dlltool... no checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for aarch64-none-linux-gnu-ar... no checking for ar... ar checking for archiver @FILE support... @ checking for aarch64-none-linux-gnu-strip... strip checking for aarch64-none-linux-gnu-ranlib... no checking for ranlib... ranlib checking command to parse nm output from gcc object... ok checking for sysroot... no checking for a working dd... /usr/bin/dd checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 checking for aarch64-none-linux-gnu-mt... no checking for mt... mt checking if mt is a manifest tool... no checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for aarch64-none-linux-gnu-gcc... gcc checking whether the compiler supports GNU C... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to enable C11 features... (cached) none needed checking whether gcc understands -c and -o together... (cached) yes checking dependency style of gcc... (cached) gcc3 checking for egrep... (cached) /usr/bin/grep -E checking for fcntl.h... yes checking for stddef.h... yes checking for stdint.h... (cached) yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for sys/ioctl.h... yes checking for unistd.h... (cached) yes checking for _Bool... yes checking for stdbool.h that conforms to C99... yes checking for size_t... yes checking for uint32_t... yes checking for GNU libc compatible malloc... yes checking for memset... yes checking for realpath... yes checking for strerror... yes checking for strtol... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating src/ti_rpmsg_char.pc config.status: creating examples/Makefile config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands ----------------------------------------------------------- Thank you for installing the Linux ti-rpmsg-char package Installation directory prefix: '/home/debian/ti-rpmsg-char/kev_target'. Compilation command: 'gcc -g -O2 ' Now type 'make; sudo make install' to generate the program and install it to your system. sudo usage is optional and depends on the permissions of the prefix folder being used or installation. ------------------------------------------------------------ debian@BeagleBone-AI64:~/ti-rpmsg-char$ make make all-recursive make[1]: Entering directory '/home/debian/ti-rpmsg-char' Making all in src make[2]: Entering directory '/home/debian/ti-rpmsg-char/src' /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT libti_rpmsg_char_la-rpmsg_char.lo -MD -MP -MF .deps/libti_rpmsg_char_la-rpmsg_char.Tpo -c -o libti_rpmsg_char_la-rpmsg_char.lo `test -f 'rpmsg_char.c' || echo './'`rpmsg_char.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT libti_rpmsg_char_la-rpmsg_char.lo -MD -MP -MF .deps/libti_rpmsg_char_la-rpmsg_char.Tpo -c rpmsg_char.c -fPIC -DPIC -o .libs/libti_rpmsg_char_la-rpmsg_char.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT libti_rpmsg_char_la-rpmsg_char.lo -MD -MP -MF .deps/libti_rpmsg_char_la-rpmsg_char.Tpo -c rpmsg_char.c -o libti_rpmsg_char_la-rpmsg_char.o >/dev/null 2>&1 mv -f .deps/libti_rpmsg_char_la-rpmsg_char.Tpo .deps/libti_rpmsg_char_la-rpmsg_char.Plo /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT libti_rpmsg_char_la-soc.lo -MD -MP -MF .deps/libti_rpmsg_char_la-soc.Tpo -c -o libti_rpmsg_char_la-soc.lo `test -f 'soc.c' || echo './'`soc.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT libti_rpmsg_char_la-soc.lo -MD -MP -MF .deps/libti_rpmsg_char_la-soc.Tpo -c soc.c -fPIC -DPIC -o .libs/libti_rpmsg_char_la-soc.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT libti_rpmsg_char_la-soc.lo -MD -MP -MF .deps/libti_rpmsg_char_la-soc.Tpo -c soc.c -o libti_rpmsg_char_la-soc.o >/dev/null 2>&1 mv -f .deps/libti_rpmsg_char_la-soc.Tpo .deps/libti_rpmsg_char_la-soc.Plo /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT libti_rpmsg_char_la-utils.lo -MD -MP -MF .deps/libti_rpmsg_char_la-utils.Tpo -c -o libti_rpmsg_char_la-utils.lo `test -f 'utils.c' || echo './'`utils.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT libti_rpmsg_char_la-utils.lo -MD -MP -MF .deps/libti_rpmsg_char_la-utils.Tpo -c utils.c -fPIC -DPIC -o .libs/libti_rpmsg_char_la-utils.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT libti_rpmsg_char_la-utils.lo -MD -MP -MF .deps/libti_rpmsg_char_la-utils.Tpo -c utils.c -o libti_rpmsg_char_la-utils.o >/dev/null 2>&1 mv -f .deps/libti_rpmsg_char_la-utils.Tpo .deps/libti_rpmsg_char_la-utils.Plo /bin/bash ../libtool --tag=CC --mode=link gcc -I../include -g -O2 -version-number 0:6:7 -no-undefined -o libti_rpmsg_char.la -rpath /home/debian/ti-rpmsg-char/kev_target/lib libti_rpmsg_char_la-rpmsg_char.lo libti_rpmsg_char_la-soc.lo libti_rpmsg_char_la-utils.lo libtool: link: gcc -shared -fPIC -DPIC .libs/libti_rpmsg_char_la-rpmsg_char.o .libs/libti_rpmsg_char_la-soc.o .libs/libti_rpmsg_char_la-utils.o -g -O2 -Wl,-soname -Wl,libti_rpmsg_char.so.0 -o .libs/libti_rpmsg_char.so.0.6.7 libtool: link: (cd ".libs" && rm -f "libti_rpmsg_char.so.0" && ln -s "libti_rpmsg_char.so.0.6.7" "libti_rpmsg_char.so.0") libtool: link: (cd ".libs" && rm -f "libti_rpmsg_char.so" && ln -s "libti_rpmsg_char.so.0.6.7" "libti_rpmsg_char.so") libtool: link: ar cr .libs/libti_rpmsg_char.a libti_rpmsg_char_la-rpmsg_char.o libti_rpmsg_char_la-soc.o libti_rpmsg_char_la-utils.o libtool: link: ranlib .libs/libti_rpmsg_char.a libtool: link: ( cd ".libs" && rm -f "libti_rpmsg_char.la" && ln -s "../libti_rpmsg_char.la" "libti_rpmsg_char.la" ) make[2]: Leaving directory '/home/debian/ti-rpmsg-char/src' make[2]: Entering directory '/home/debian/ti-rpmsg-char' make[2]: Leaving directory '/home/debian/ti-rpmsg-char' make[1]: Leaving directory '/home/debian/ti-rpmsg-char' debian@BeagleBone-AI64:~/ti-rpmsg-char$ make install Making install in src make[1]: Entering directory '/home/debian/ti-rpmsg-char/src' make[2]: Entering directory '/home/debian/ti-rpmsg-char/src' /usr/bin/mkdir -p '/home/debian/ti-rpmsg-char/kev_target/lib' /bin/bash ../libtool --mode=install /usr/bin/install -c libti_rpmsg_char.la '/home/debian/ti-rpmsg-char/kev_target/lib' libtool: install: /usr/bin/install -c .libs/libti_rpmsg_char.so.0.6.7 /home/debian/ti-rpmsg-char/kev_target/lib/libti_rpmsg_char.so.0.6.7 libtool: install: (cd /home/debian/ti-rpmsg-char/kev_target/lib && { ln -s -f libti_rpmsg_char.so.0.6.7 libti_rpmsg_char.so.0 || { rm -f libti_rpmsg_char.so.0 && ln -s libti_rpmsg_char.so.0.6.7 libti_rpmsg_char.so.0; }; }) libtool: install: (cd /home/debian/ti-rpmsg-char/kev_target/lib && { ln -s -f libti_rpmsg_char.so.0.6.7 libti_rpmsg_char.so || { rm -f libti_rpmsg_char.so && ln -s libti_rpmsg_char.so.0.6.7 libti_rpmsg_char.so; }; }) libtool: install: /usr/bin/install -c .libs/libti_rpmsg_char.lai /home/debian/ti-rpmsg-char/kev_target/lib/libti_rpmsg_char.la libtool: install: /usr/bin/install -c .libs/libti_rpmsg_char.a /home/debian/ti-rpmsg-char/kev_target/lib/libti_rpmsg_char.a libtool: install: chmod 644 /home/debian/ti-rpmsg-char/kev_target/lib/libti_rpmsg_char.a libtool: install: ranlib /home/debian/ti-rpmsg-char/kev_target/lib/libti_rpmsg_char.a libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/sbin" ldconfig -n /home/debian/ti-rpmsg-char/kev_target/lib ---------------------------------------------------------------------- Libraries have been installed in: /home/debian/ti-rpmsg-char/kev_target/lib If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the '-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the 'LD_RUN_PATH' environment variable during linking - use the '-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to '/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/mkdir -p '/home/debian/ti-rpmsg-char/kev_target/include' /usr/bin/install -c -m 644 ../include/ti_rpmsg_char.h ../include/rproc_id.h '/home/debian/ti-rpmsg-char/kev_target/include' make[2]: Leaving directory '/home/debian/ti-rpmsg-char/src' make[1]: Leaving directory '/home/debian/ti-rpmsg-char/src' make[1]: Entering directory '/home/debian/ti-rpmsg-char' make[2]: Entering directory '/home/debian/ti-rpmsg-char' make[2]: Nothing to be done for 'install-exec-am'. make[2]: Nothing to be done for 'install-data-am'. make[2]: Leaving directory '/home/debian/ti-rpmsg-char' make[1]: Leaving directory '/home/debian/ti-rpmsg-char' debian@BeagleBone-AI64:~/ti-rpmsg-char$ ls Makefile TI_RPMsg_Char_0.1.0_manifest.html config.h configure kev_target Makefile.am aclocal.m4 config.h.in configure.ac libtool Makefile.in autom4te.cache config.log examples src README build-aux config.status include stamp-h1 debian@BeagleBone-AI64:~/ti-rpmsg-char$ cd kev_target/ debian@BeagleBone-AI64:~/ti-rpmsg-char/kev_target$ ls include lib debian@BeagleBone-AI64:~/ti-rpmsg-char/kev_target$ cd lib/ debian@BeagleBone-AI64:~/ti-rpmsg-char/kev_target/lib$ ls libti_rpmsg_char.a libti_rpmsg_char.so libti_rpmsg_char.so.0.6.7 libti_rpmsg_char.la libti_rpmsg_char.so.0 debian@BeagleBone-AI64:~/ti-rpmsg-char/kev_target/lib$ cd .. debian@BeagleBone-AI64:~/ti-rpmsg-char/kev_target$ ls include lib debian@BeagleBone-AI64:~/ti-rpmsg-char/kev_target$ cd include/ debian@BeagleBone-AI64:~/ti-rpmsg-char/kev_target/include$ ls rproc_id.h ti_rpmsg_char.h