-
Notifications
You must be signed in to change notification settings - Fork 13
Running 3D applications on HSDK
fbset > /etc/fb.modes && SDL_NOMOUSE=1 chocolate-doom
MESA_LOADER_DRIVER_OVERRIDE=imx-drm kmscube --device /dev/dri/card1
X&
DISPLAY=:0 glxgears
mkdir -m 0700 /tmp/weston
export XDG_RUNTIME_DIR=/tmp/weston
export MESA_LOADER_DRIVER_OVERRIDE=imx-drm
export DISPLAY=:0
X &
weston &
weston --backend=fbdev-backend.so --tty=63 &
weston --backend=drm-backend.so --tty=63 &
export MESA_LOADER_DRIVER_OVERRIDE=kms_swrast
weston --backend=drm-backend.so --tty=63 &
or use Pixman SW renderer:
weston --backend=drm-backend.so --tty=63 --use-pixman &
In graphical terminal window execute:
glmark2-es2-wayland
See https://github.com/wayland-project/weston/tree/master/wcap for more details.
To start screen capturing press Windows-R
keys on the keyboard attached to the target:
[00:00:30.617] starting recorder for output screen0, file capture.wcap
To stop press Windows-R
again. This will produce capture.wcap:
[00:00:38.640] stopping recorder, total file size 1M, 113 frames
This will produce file capture.wcap
in folder where Wayland was started.
Now to decode real frames from this blob say wcap-decode --all capture.wcap
and then check wcap-frame-X.png
.
To start recording event trace press MODIFIER-Shift-Space-T
keys (by default MODIFIER
is Win
key, but that's customizable via weston.ini
and [shell] binding-modifier
option) on the keyboard attached to the target:
[00:00:25.559] Opened timeline file 'weston-timeline-1970-01-01_00-00-25.log'
To stop press MODIFIER-Shift-Space-T
again:
[00:00:53.395] Timeline log file closed.
This trace could be visualized with Wesgr
, see https://github.com/ppaalanen/wesgr.
cat /etc/Xorg/xorg.conf
Section "Device"
Identifier "Driver0"
Screen 0
Driver "modesetting"
Option "kmsdev" "/dev/dri/card1"
EndSection
Note kmsdev
must point to the bitstreamer device!
For example on HSDK board /dev/dri/card0
refers to Vivante GPU, so we have to specify /dev/dri/card1
instaead.
It's possible to pass-through host's USB device to Qemu guest.
Note vendorid
and productid
values match lsusb
output for DisplayLink adapter:
# lsusb | grep DisplayLink
Bus 001 Device 010: ID 17e9:411c DisplayLink
Below is an example with x86 client:
qemu-system-i386 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append "root=/dev/vda" -net nic,model=virtio -net user -serial mon:stdio -device usb-ehci,id=usb,bus=pci.0,addr=0x4 --device usb-host,vendorid=0x17e9,productid=0x411c -display none
Linux kernel and rootfs could be build with stock Buildroot this way:
make qemu_x86_defconfig