In my current project, I want to use a headless linux setup to post GPS co-ordinates to an API that I’m yet to build. I’ve been following the documentation at 96boards GitHub repository and I’ve got my Dragonboard 410c booting linux.
From what I’ve gleaned in the release notes, per the Using the onboard GPS documentation, I should be able to install the necessary packages, turn on the DSP and access the GPS information.
However, all attempts at turning on the DSP has returned an error. Here is some additional info:
linaro@linaro-alip:~$ uname -a
Linux linaro-alip 4.9.39-linaro-lt-qcom #1 SMP PREEMPT Wed Aug 2 14:44:02 UTC 2017 aarch64 GNU/Linux
linaro@linaro-alip:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.2 (stretch)
Release: 9.2
Codename: stretch
root@linaro-alip:~# apt-get install gnss-gpsd gpsd gpsd-clients
Reading package lists... Done
Building dependency tree
Reading state information... Done
gpsd is already the newest version (3.16-4).
gpsd-clients is already the newest version (3.16-4).
gnss-gpsd is already the newest version (0.0+0+df3b976-6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@linaro-alip:~# systemctl start qdsp-start.service
Job for qdsp-start.service failed because the control process exited with error code.
See "systemctl status qdsp-start.service" and "journalctl -xe" for details.
root@linaro-alip:~# journalctl -xe
Oct 15 21:41:31 linaro-alip qdsp-start[2289]: Found Hexagon at /sys/class/remoteproc/remoteproc0
Oct 15 21:41:31 linaro-alip qdsp-start[2289]: sh: echo: I/O error
Oct 15 21:41:31 linaro-alip systemd[1]: Failed to start Start the Hexagon QDSP.
-- Subject: Unit qdsp-start.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit qdsp-start.service has failed.
--
-- The result is failed.
Oct 15 21:41:31 linaro-alip systemd[1]: qdsp-start.service: Failed with result 'exit-code'.
I’ve also looked at the information here: GPS Software - #84 by ndec. Based on the git commit logs, I can see that my qdsp-start
script already has the necessary workaround so I’m not sure if I should be modifying my file manually.
root@linaro-alip:/usr/sbin# cat qdsp-start
#!/bin/sh
# check if we have a qDSP available on the platform
# new implementation of remoteproc use /sys/class/remoteproc
# instead of debugfs
for f in $(ls -d /sys/class/remoteproc/* 2> /dev/null); do
device=$(readlink -f "$f"/device)
name=$(basename "$device")
if [ "${name%.hexagon}" != "$name" ] ; then
echo "Found Hexagon at $f"
echo start > "$f"/state
exit
fi
done
for f in $(ls /sys/kernel/debug/remoteproc/*/name 2> /dev/null); do
name=$(cat "$f")
if [ "${name%.hexagon}" != "$name" ] ; then
f=$(dirname "$f")
echo "Found Hexagon at $f"
echo start > "$f"/state
exit
fi
done
# no found, then move on..
exit
Lastly per working/qualcomm/pkg/qdsp-config.git - [no description], it looks like th QCOM firmware has been fixed so now the DSP should be starting on boot. However, I’m not sure if this patch has made it into the release I’m using.
Any pointers on moving further will be greatly appreciated.