Closed phantom1299 closed 3 years ago
@phantom1299 , for that kernel you need this branch for the kernel modules:
Here is how i build it, two patches for debian: https://github.com/rcn-ee/ti-sgx-omap5/blob/master/build-ti335x-4.14.x.sh
and use this repo for the blobs:
https://git.ti.com/gitweb?p=graphics/omap5-sgx-ddk-um-linux.git;a=summary
I use this git checkout:
git_repo="git://git.ti.com/graphics/omap5-sgx-ddk-um-linux.git"
git_sha="bbbd5cbb55e4c54d3b02456ae553bea86fd61506"
and then ^ will look for libgbm from here, it clashes with mesa's libgbm..
git_repo="git://git.ti.com/glsdk/libgbm.git"
git_sha="f316cf4b98ca3f4a1ca92a48ddd8aa559894a45c"
Regards,
@RobertCNelson thank you for the quick reply. I think I followed the steps correctly but I'll list them to confirm:
Building the km:
git clone https://github.com/rcn-ee/ti-sgx-omap5.git
cd ti-sgx-omap5/src
export KERNELDIR=/path/to/linux
../build-ti335x-4.14.x.sh
...
CC ti-sgx-omap5/src/src/eurasia_km/eurasiacon/binary2_omap_linux_release/target/kbuild/pvrsrvkm.mod.o
LD [M] ti-sgx-omap5/src/src/eurasia_km/eurasiacon/binary2_omap_linux_release/target/kbuild/pvrsrvkm.ko
The output file is pvrsrvkm.ko
which I will later install with insmod
on my custom board.
Building the um:
git clone https://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git
cd omap5-sgx-ddk-um-linux/
git checkout bbbd5cbb55e4c54d3b02456ae553bea86fd61506
export DISCIMAGE=/path/to/my/target
export TARGET_PRODUCT=ti335x
sudo -E make install
...
cp -ar ./targetfs/lib/*/path/to/my/target/usr/lib
cp -ar ./targetfs/include/*/path/to/my/target/usr/include
cp -ar ./targetfs/bin/* /path/to/my/target/usr/bin
cp -ar ./targetfs/share/* /path/to/my/target/usr/share
I rebuild my target and setup my custom board. In it I run:
# insmod pvrsrvkm.ko
pvrsrvkm: loading out-of-tree module taints kernel.
# lsmod
Module Size Used by Tainted: G
pvrsrvkm 450560 0
Now, If I didn't do any mistakes I just need to install libgbm:
# pvrsrvctl
pvrsrvctl: error while loading shared libraries: libgbm.so.2: cannot open shared object file: No such file or directory
Regards,
Yeap you got it. ;)
PS, here is a reference image you can use for comparison, SGX enabled out of the box..
https://debian.beagleboard.org/images/bone-debian-9.12-imgtec-armhf-2020-04-06-4gb.img.xz
Regards,
I was going to give up on this. Thank god I asked and thank you for helping. I realy appreciate it.
tl;dr: Is it necessary for me to change the kernel version or repository from branch
4.14
to be able to use the sgx530?I'm currently working on a project which uses a custom board which is mostly identical to the Beaglebone Black (same SoC).
I'm building the bootloader (u-boot), the kernel (branch 4.14 in this repo) and the rootfs as initramfs (using buildroot with busybox) separately. I'm using beaglebones dts files inside the kernels source files and compile them into a dtb file.
When my board boots up, it loads the rootfs into ram and does everything there. So I can't add anything to my rootfs at runtime. I have to install the neccesary modules at buildtime.
When I run
ls /sys/devices/platform/ocp/56000000.sgx
the output is as follows:I first tried using the TI Graphics SDK folowing the User Guide but got compilation errors like:
Is it necessary for me to change the kernel version or repository to be able to use the sgx530?