I’ve been following the threads earlier in the year about using SGX. As a first step I tried to build kmscube from git.ti.com.I used the August Stretch IoT snapshot as recommended (https://rcn-ee.com/rootfs/bb.org/testing/2019-09-08/stretch-iot/bone-debian-9.10-iot-armhf-2019-09-08-4gb.img.xz)
The only issue I had was that I couldn’t find a package to install the headers in /usr/include/EGL, /usr/include/GLES2 and /usr/include/KHR. To solve this I created a -dev package -dev which is available at https://github.com/HunterEmbedded/sgx-bbb (readme also has full instructions).
Have I missed a package you had already created with these headers?