Am 05.08.2019 um 17:57 schrieb H. Nikolaus Schaller hns@goldelico.com:
Here are some step-by step instruction how to make an SD card to demonstrate PVR/SGX on Pyra:
# ssh into BeagleBone and become root # insert empty (or to be overwritten) SD card into reader wget -O makesd "http://git.goldelico.com/?p=gta04-makesd.git;a=blob_plain;hb=HEAD;f=makesd" && chmod +x makesd DEV=/dev/sdb ./makesd pyra -r http://download.goldelico.com/letux-debian-rootfs/20190708-stretch-9.9-armhf... -m http://download.goldelico.com/letux-kernel/letux-4.19.4-pvr-lpae/modules.tgz -f1 -k http://download.goldelico.com/letux-kernel/letux-4.19.4-pvr-lpae/uImage -d http://download.goldelico.com/letux-kernel/letux-4.19.4-pvr-lpae/device-tree... mkdir -p /media/letux/rootfs mount /dev/sdb2 /media/letux/rootfs cd /media/letux/rootfs KVERSION=$(cd lib/modules && ls -1) wget -O lib/modules/$KVERSION/kernel/pvrsrvkm.ko https://packages.pyra-handheld.com/images/extra/pvr/4.19.4-letux-lpae-zmatt-... depmod -b . $KVERSION wget -O sgx.tar.xz https://packages.pyra-handheld.com/images/extra/sgx.tar.xz tar xvJf sgx.tar.xz cp -R sgx/pvr/etc sgx/pvr/lib . cp -R sgx/pvr/bin sgx/pvr/include ./usr sed -i.bak "s/modprobe -q pvrsrvkm/modprobe -q -f pvrsrvkm/g" etc/init.d/rc.pvr # ignore small diff in version code ln -sf libgbm.so.1 usr/lib/arm-linux-gnueabihf/libgbm.so.2 # there is (will be) no libgbm.so.2 in Debian mv root/tiler-ctl root/tiler-ctl.off # disable tiler
Because someone asked on the YouTube comments, I did another quick test. It seems to work with tiler-ctl 270 equally well. So there is no crash or something and no need to disable the tiler for making a demo.
A different question is if we expect the 3D image being rotated as well. I.e. gles1test1 triangles pointing left or upwards? Unfortunately I could not find an image on Google how the output of gles1test1 should look like. And there is no source code so we don't know that the programmers have stated in code.
My test shows: SGX screen image is not rotated, only framebuffer text console.
Maybe, after having kmscube working, we can compare with other 3D setups.
# mv usr/bin/Xorg usr/bin/Xorg.off # disable X11 - there is no X11 here! cd $HOME umount /dev/sdb* # extract SD card and insert into Pyra
# boot Pyra # login as root through console or ssh into Pyra (ssh root@192.168.0.202 through USB3 port) yes | apt-get install libdrm-omap1 libgbm1 # needs some active internet connection on Pyra (e.g. ethernet over USB, wwan, wlan) /etc/init.d/rc.pvr start # does not start automatically cat /proc/pvr/* # check that PVR was loaded successfully eglinfo # get some info gles1test1 100 # run demo
This is a setup similar to which I used for making this quick video:
Notes:
- there is some conflict between libEGL and xcb which means if some X11 system is installed by LetuxOS,
running eglinfo and gles1test1 will fail.
this setup disables tiler rotation on the Pyra so that the text console on screen is tilted.
for the 4GB RAM Pyra you must replace
DEV=/dev/sdb ./makesd pyra -r ...
by
DEV=/dev/sdb ./makesd pyra-4gb -r ...
to get the correct U-Boot installed on SD card.
- I tried to build kmscube and could compile it (with a handful of warnings) but gbm fails to load
some "omapdrm" driver.
compare to the 6 years old video from the GTA04 :)
Now since I have a working sample, I can start to replace/rebuild individual components (mainly kernel module variations and user-space setup) and check if it still works equally well or breaks. It is much easier to develop something against a visible and tangible target instead of digging through the fog.
My next goal is to get the SGX driver code into drivers/staging/pvr so that is no longer needed to build it outside the kernel. And to make it more universal, so that the same kernel tree and application binaries can run on OMAP3/4/5. This still will be challenging, but seems to be doable now.
BR and thanks to all who did contribute and help on the Pyra forum to reach this milestone, Nikolaus
http://projects.goldelico.com/p/gta04-kernel/ Letux-kernel mailing list Letux-kernel@openphoenux.org http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel