It is possible (albeit unusual) to boot a big-endian system on a
smartphone, and it's generally good to have portable code.
le32toh and htole32 are a glibc extension that is also implemented by
musl-libc, uclibc-ng, and bionic.
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
The tests don't require access to Hexagon hardware, they currently pass,
and running them will provide a better assurance against regressions.
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
This shouldn't be a requirement to compile anything else. Stop requiring
it for building anything, and assume the user just wants to compile the
main project.
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
No breaking changes
New features:
- man page for hexagonrpcd
- support for FASTRPC_IOCTL_INIT_CREATE with fastrpc_shell_X
- apps_mem interface (mostly allocating memory for now)
- logic for hexagonfs root directory
- sscregistrygen tool to generate sensor registry
- Github CI (successful compilation only)
Fixes:
- Disabled verbose logging by default
- Documented the paths relative to the root directory
- Made apps_std_stat relative to ADSP libs directory
- Fixed unsigned/signed comparison in reverse tunnel
- Declared minimum meson version for meson.options
- Added soversion to the library build
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
From the sensor shell repository, sscregistrygen is a tool for
generating the sensor registry from the sensor config. It is useful when
the sensor registry is not included in device firmware. Add
sscregistrygen here since it is more directly used by hexagonrpc rather
than sensh.
Link: 23b7681f3f/tools/sscregistrygen.c
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Without this building fails with:
../git/hexagonrpcd/rpcd.c: In function 'start_reverse_tunnel':
../git/hexagonrpcd/rpcd.c:275:21: error: too many arguments to function 'fastrpc_apps_mem_init'; expected 0, have 1
275 | ifaces[2] = fastrpc_apps_mem_init(fd);
| ^~~~~~~~~~~~~~~~~~~~~ ~~
In file included from ../git/hexagonrpcd/rpcd.c:38:
../git/hexagonrpcd/apps_mem.h:27:27: note: declared here
27 | struct fastrpc_interface *fastrpc_apps_mem_init();
| ^~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
The project uses meson.options rather than meson_options.txt. Document
the minimum meson version that can be used to build the project.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Fix warning / error reported by gcc:
../git/hexagonrpcd/listener.c:115:25: warning: comparison of integer expressions of different signedness: 'uint32_t' {aka 'unsigned int'} and 'int' [-Wsign-compare]
if (inbufs[0].s != 4 * (def->in_nums
^~
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
When loading a new skel file, the DSP may access a testsig.so file. This
calls apps_std_fopen_with_env which is relative to a specified
directory, but also apps_std_stat. Since the same "testsig.so"
path is accessed relative to ADSP_LIBRARY_PATH and to the current
working directory, infer that the current working directory should be
ADSP_LIBRARY_PATH.
The files shouldn't be installed right in /usr/share/qcom except for
testing. Rather, they should be installed in some device-specific
directory to make packaging easier on some distros. Document the paths
relative to the root directory for served files.
The absolute paths shouldn't be installed right in /usr/share/qcom
except for testing. Document the modifiable directory where served files
are retrieved from and the convention of where this directory should be
located.
Link: https://gitlab.com/flamingradian/sensh/-/issues/1
Verbose logging can be useful when something goes wrong, but HexagonRPCD
already works well on some devices. Disable verbose logging by default.
Reported by Adrian on the SDM845 Mainline Matrix channel.
Fixes: 30fa49eb20 ("build: add hexagonrpcd_verbose option")