-
Thanks for this writeup! I think I found a slight error in the part of your script that updates the device tree.
P_HANDLE=$(cat test.dts | grep -zoP "pcie@110000 {[^}]*"} | grep -a phandle | grep -oP "0x[0-9a-f]{2}") sudo sed -i '/pcie@110000 {/,/};/{/msi-parent = <[^>]*>;/{s/msi-parent = <[^>]*>;/msi-parent = <${P_HANDLE}>;/}}' ~/test.dtsShould be changed to...
P_HANDLE=$(cat test.dts | grep -zoP "pcie@110000 {[^}]*"} | grep -a phandle | grep -oP "0x[0-9a-f]{2}") sudo sed -i "/pcie@110000 {/,/};/{/msi-parent = <[^>]*>;/{s/msi-parent = <[^>]*>;/msi-parent = <${P_HANDLE}>;/}}" ~/test.dts... with double-quotes around the sed operation. With single quotes it was inserting the literal string ${P_HANDLE} into the device tree, which was causing a compilation error.
Unfortunately, even after following your instructions, I'm still getting an error when running the Coral example script. "Error in device opening (/dev/apex_0)"
Edited by Christopher Starbird -
I second Christopher's
P_HANDLEnote, and also to make the tests work:echo 'SUBSYSTEM=="apex", MODE="0666"' | sudo tee /etc/udev/rules.d/65-apex.rules sudo udevadm control --reload-rules sudo udevadm triggerThis will allow, all users to read/write from/to the coral TPU device. I assume the
Error in device opening (/dev/apex_0)comes from the way Docker is setup since it means the Coral device was picked up. If you were to test it with root, directly on the host system, you wouldn't see this error.
Please register or sign in to comment