Hexagon SDK support for Dragonboard 820c

Sure @vj-kumar
The wiki page given for Hexagon-SDK install & run procedures → https://github.com/96boards/documentation/wiki/Dragonboard-Hexagon-DSP
has these specific library paths:

$ export ADSP_LIBRARY_PATH=/home/linaro/dsp
$ export LD_LIBRARY_PATH=/home/linaro/apps

But putting all lib files in one location & doing ldconfig will serve the purpose…

ldconfig is used to cache information about the libraries found in
specific search paths, namely all the ones listed in /etc/ld.so.conf and
/etc/ld.so.conf.d/* .

I think that if the ldconfig command is important then the “one
location” does need to be selected from something in the search path
(/usr/local/lib being the obvious one).

Files specific to the application being installed like:
libmatrix_multi.so & libmatrix_multi_skel.so
have to be copied into /usr/local/lib or paths which ldconfig can search for…
Thus, ldconfig alone will identify all needed lib files… hope this update in Wiki page would be helpful…

I have a basic question about Wiki for setting up Hexagon DSP on DragonBoard 820c.

git clone -b integration-linux-qcomlt working/qualcomm/kernel.git - Qualcomm Landing Team kernel

$ ~/dev/skales/mkbootimg --kernel ~/dev/kernel/arch/arm64/boot/Image
–ramdisk ~/dev/initrd.img-4.14.0-qcomlt-arm64
–output ~/dev/boot.img
–dt ~dev/dt.img
–pagesize 4096
–base 0x80000000
–cmdline “${CMDLINE}”;

On Wiki, latest kernel source code is acquired by branch “integration-linux-qcomlt”.
However mkbootimg uses initrd.img for kernel 4.14.0.
Is it correct?

We haven’t seen serial code by "getserial " in spite of being followed procedure of the Wiki.

Best Regards,


I was able to follow the wiki and get get the matrix and calculator examples running on an 820, however I am not sure how to take the next step and get some debug information out of the DSP, specifically some sort of printf ability. I have seen the FARF code, however I have no idea how I would access any messages sent from this.


@danielt @Loic
I could run the matrix multi example succesfully, from the instructions in the wiki page.
Instead of manually loading the adsprpcd daemon for every boot, I wrote a systemd service to do the task.

But now when I try to stop this service (shutdown, reboot or systemctl stop adsp.service) the board freezes ,

[ 1345.830132] arm-smmu 1600000.arm,smmu-lpass_q6: Unhandled context fault: fsr=0x402, iova=0xffffe000, fsynr=0x3, cb=0
[ 1345.831097] qcom_adsp_pil adsp-pil: fatal error received: :Excep :0:Exception detected:frpck_0_0
[ 1345.839804] remoteproc remoteproc0: crash detected in adsp-pil: type fatal error
[ 1345.848864] remoteproc remoteproc0: handling crash #1 in adsp-pil
[ 1345.856313] remoteproc remoteproc0: recovering adsp-pil
.B - 2173216 - usb: init start
B - 2175016 - usb: PLL lock success , 0x2
B - 2622634 - usb: HIGH , 0x900e
B - 2702605 - usb: HIGH , 0x900e
B - 2803926 - usb: ENUM success

Any clue to solve this issue?

Thanks in advance!


Let me ask one question due to confusing.
Is r1036.1 necessary for FastRPC on Dragonboard820c?

Head part on the wiki explains that

For db410c, you need the apq8016 modem firmware files r1036.1 to get FastRPC support. These files are released through the Qualcomm Developer Network. You’ll need to replace the files /lib/firmware/modem.* in your stock rootfs with the r1036.1 ones.
For db820c, the public archive linux-board-support-package-r01700.1.zip contains the needed adsp firwmares.

On the other hand, tail part on the wiki explains that

For db820c, modem firmware files r1036.1 are installed in /lib/firmware on the DragonBoard.

Does it mean that db820c needs r01700.1 and r1036.1?


No that means 820c already has firmware compatible with fastRPC. Just in case you can compare or copy files from board package [1] proprietary-linux with/to /lib/firmware on your target.

[1] https://releases.linaro.org/96boards/dragonboard820c/qualcomm/firmware/linux-board-support-package-r01700.1.zip

Hi, Loic

I understand that

  • adsp firmware and modem firmware on r01700.1.zip should be used.
  • “For db820c, modem firmware files r01700.1 are installed in /lib/firmware on the DragonBoard.” is correct.

Thank you so much for advice.

yes, you are correct

1 Like

I was trying to follow instructions on wiki page to set up hexagon DSP on DB820c. I noticed that latest kernel integration branch is based on 5.7 and the initrd.img is 4.14. I have kernel downloaded before from branch /release/qcomlt-4.14.

Is it possible to modify or patch a 4.14 kernel under release branch to support hexagon DSP? Does the kernel have to be in integration branch? If it is possible what changes I have to make to support DSP?

Many thanks.

I applied a few patches on 4.14.69 kernel. When I try to build the kernel I got following error message:

CC drivers/misc/fastrpc.o
drivers/misc/fastrpc.c:471:12: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.attach = fastrpc_dma_buf_attach,


drivers/misc/fastrpc.c:471:12: note: (near initialisation for ‘fastrpc_dma_buf_ops.attach’)
cc1: some warnings being treated as errors
scripts/Makefile.build:328: recipe for target ‘drivers/misc/fastrpc.o’ failed

Is this a problem with fastrpc.c or is it related to something else?

Many thanks

Hi @anon91830841 @thierryE

I have downloaded the matrix_multi test application and performed some computations on DSP.
When calculating in dsp, the application crashes and the board goes into RAM dump mode for few numbers(patterns) like 40,63,76,92,110,115,120,125,128,132.

And for numbers like 126,127,129,130,131 etc…, the computation fails but the board doesn’t crash. The frequency of crash occurs repeatedly once a crash is faced.

Can anyone test on this or only the issue I’m facing ??
Thanks for any update on this.

Hi all,

Looking for the same. I am also facing the matrix_multi application crash for few numbers.
Can anyone give some pointers to solve this issue ?.


Hi all,

I tried to test calculator application. The get serial command returned the following error.
$ ./linaro/dev/getserial
Could not retrieve serial num
So I tested the calculator application without doing “Sign calculator dsp library” step.
When calculating in DSP, the application fails and shows the following error messsage.

$ ./linaro/apps/calculator 0 10
- starting calculator test
src/rpcmem_android.c:134:stat Failed on /dev/ion - allocate 40 bytes from ION heap
- creating sequence of numbers from 0 to 9
- compute sum on the DSP
Error: compute on DSP failed
usage: ./linaro/apps/calculator <1/0 run locally>

Can anyone help to solve this issue.


You have successful enabled the Hexagon DSP on dragonboard820C in Linux, is it? If yes, are you able to share your boot image and rootfs image?

On the wiki page https://github.com/96boards/documentation/wiki/Dragonboard-Hexagon-DSP

It suggested following:

Compiling the kernel

$ export ARCH=arm64
$ export CROSS_COMPILE=~/dev/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
$ cd ~/dev/kernel
$ make defconfig

Then use your favorite kernel configuration habit to enable a few more options:

CONFIG_QCOM_FASTRPC=y (Device Drivers -> Misc devices)

For db820c you must enable the Qualcomm Asynchronous Packet Router

CONFIG_QCOM_APR=y (Device Drivers -> SOC (System On Chip) specific Drivers -> Qualcomm SoC drivers)

Then built it:

$ make

May i ask where exactly the CONFIG_QCOM_FASTRPC and CONFIG_QCOM_APR options are? I modified them in defconfig and then make defconfig again. it didnt seem right.

Many thanks.

If you launch the kernel config tool (make menuconfig) then you should be able to find out what these do using the online help.

Thank you denielt, That is indeed very helpful.

Hi @Keeler,

Have you backported integration branch FASTRPC changes on 4.14 or are you using mainline?

I have 4.14 kernel with me.