tkoroknai Posted July 25, 2019 Share Posted July 25, 2019 Hello, I have downloaded the Petalinux-Zybo-Z7-10-2017.4-1.bsp and booted from an SD card in my Zybo-Z7-10 zynq-7010. On this page: https://reference.digilentinc.com/reference/software/petalinux/start It states that the petalinux bsp should include: * gpioutil * pwmdemo * kmsdemo but it does not have the kmsdemo only the other two. I tried to download kmsutil and compile it on the board https://raw.githubusercontent.com/Digilent/kmsdemo/master/kmsutil.c like this: root@Zybo-Z7-10:~# gcc kmsutil.c -lvrc kmsutil.c:1:20: fatal error: libvrc.h: No such file or directory #include <libvrc.h> ^ compilation terminated. but the bsp did not include the libvrc either. What is the simplest way to get this demo working? This is somewhat odd, because the HDMI output works, it outputs a console. And the bsp feature list says:"HDMI output with kernel mode setting (KMS)" Thanks! Link to comment Share on other sites More sharing options...
Ionel Posted August 5, 2019 Share Posted August 5, 2019 There is no code to draw any shape as you observed since it was/is a work in progress. Thus it was excluded by default from `rootfs`. However it was mentioned by mistake in the first link you mentioned. https://reference.digilentinc.com/reference/software/petalinux/start The issue has been corrected. Link to comment Share on other sites More sharing options...
tkoroknai Posted July 25, 2019 Author Share Posted July 25, 2019 I could compile it on the board but it says segmentation fault. root@Zybo-Z7-10:~# gcc kmsutil.c -lvrc kmsutil.c: In function 'main': kmsutil.c:28:17: warning: multi-character character constant [-Wmultichar] if(c == '^C') { ^~~~ kmsutil.c: In function 'printDeviceInfo': kmsutil.c:58:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (*mode_card).fb_id_ptr = (uint64_t) res_fb_buf; ^ kmsutil.c:59:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (*mode_card).crtc_id_ptr = (uint64_t) res_crtc_buf; ^ kmsutil.c:60:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (*mode_card).connector_id_ptr = (uint64_t) res_conn_buf; ^ kmsutil.c:61:35: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (*mode_card).encoder_id_ptr = (uint64_t) res_enc_buf; ^ kmsutil.c:84:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (*connector).modes_ptr = (uint64_t) mode_buffer; ^ kmsutil.c:85:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (*connector).props_ptr = (uint64_t) conn_prop_buf; ^ kmsutil.c:86:36: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (*connector).prop_values_ptr = (uint64_t) conn_propval_buf; ^ kmsutil.c:87:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (*connector).encoders_ptr = (uint64_t) conn_enc_buf; ^ kmsutil.c:106:50: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] struct drm_mode_modeinfo * modePtr = (struct drm_mode_modeinfo *) (*connector).modes_ptr + i; ^ kmsutil.c:119:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] struct drm_mode_modeinfo * modePtr = (struct drm_mode_modeinfo *) (*connector).modes_ptr + devNum; ^ Running it: root@Zybo-Z7-10:~# ./a.out -h ./a.out: option requires an argument -- 'h' Usage: ./a.out [ -d | -s | -h ] [Resolution Mode # to select (if using -s)] This program will use the HDMI output to gather the valid resolution modes from the connected monitor using the '-d' option will print these valid resolution modes to the console Additionally, this program will draw some basic shapes to the connected monitor -h --help Print this usage information -d --device Print information about the supported resolution modes -s --set Set the connected monitor to the resolution mode specific by the flag To get information about supported resolutions, type './a.out -d' To set a resolution, type './a.out -s [n]', where [n] is the listed resolution mode number given by using -d This utility defaults to port /dev/dri/card0 root@Zybo-Z7-10:~# ./a.out -d Segmentation fault root@Zybo-Z7-10:~# ./a.out Segmentation fault root@Zybo-Z7-10:~# I supposed it needs some more stuff to work. Could you point me somewhere? Thanks! Link to comment Share on other sites More sharing options...
Ionel Posted July 29, 2019 Share Posted July 29, 2019 Hello @tkoroknai the `kmsdemo` module is not included by default in rootfs. To have it included we have to rebuild the petalinux image. Steps: 1. Source petalinux environment: https://github.com/Digilent/Petalinux-Zybo-Z7-10#source-the-petalinux-tools 2. Change directory to petalinux project directory(contains project-spec directory) by default: Zybo-Z7-10 3. Issue command: petalinux-config -c rootfs 4. In menuconfig open section apps. 5. Select kmsdemo and press space to mark it for inclusion. 6. Save and exit. 7. Continue with petalinux-build command as you did first time. 8. After deploying the new petalinux image file `/usr/bin/kmsdemo` should exist. Link to comment Share on other sites More sharing options...
tkoroknai Posted July 30, 2019 Author Share Posted July 30, 2019 On 7/29/2019 at 2:08 PM, Ionel said: Hello @tkoroknai the `kmsdemo` module is not included by default in rootfs. To have it included we have to rebuild the petalinux image. Steps: 1. Source petalinux environment: https://github.com/Digilent/Petalinux-Zybo-Z7-10#source-the-petalinux-tools 2. Change directory to petalinux project directory(contains project-spec directory) by default: Zybo-Z7-10 3. Issue command: petalinux-config -c rootfs 4. In menuconfig open section apps. 5. Select kmsdemo and press space to mark it for inclusion. 6. Save and exit. 7. Continue with petalinux-build command as you did first time. 8. After deploying the new petalinux image file `/usr/bin/kmsdemo` should exist. Hi, I did the steps successfully and kmsdemo is under /usr/bin but: root@Zybo-Z7-10:~# kmsdemo -s 1 Segmentation fault root@Zybo-Z7-10:~# kmsdemo -s 2 Segmentation fault root@Zybo-Z7-10:~# kmsdemo -d *********************************************** [Resolution Mode: 0 [ 1920x1080 [ Clock: 148500 Vrefresh: 60 *********************************************** *********************************************** [Resolution Mode: 1 [ 1920x1080 [ Clock: 148352 Vrefresh: 60 *********************************************** and it doesn't draw anything on the connected display to tx hdmi port. What do you think? Link to comment Share on other sites More sharing options...
tkoroknai Posted August 1, 2019 Author Share Posted August 1, 2019 I connected several monitors to the zybo, and it can read the resolution of most. But when I try the kmsdemo -s 0 or any other number segmentation fault and nothing happens. It is odd that when I compile the kmsdemo source from here blinks the connected display for a moment before segmentation fault. While the kmsdemo added in rootfs only prints the resolution and does nothing else. Is there any information what kind of display is supported? Which debugger could I use to figure this out? Thank you! Link to comment Share on other sites More sharing options...
tkoroknai Posted August 1, 2019 Author Share Posted August 1, 2019 I'm looking at the kmsdemo code and I don't see the part where it is supposed to draw shapes on the screen even tho it says: puts(" Additionally, this program will draw some basic shapes to the connected monitor\n\n"); Could you please show me the part that is supposed to draw the shapes? thank you! Link to comment Share on other sites More sharing options...
Question
tkoroknai
Hello,
I have downloaded the
Petalinux-Zybo-Z7-10-2017.4-1.bsp and booted from an SD card in my Zybo-Z7-10 zynq-7010.
On this page:
https://reference.digilentinc.com/reference/software/petalinux/start
It states that the petalinux bsp should include:
* gpioutil
* pwmdemo
* kmsdemo
but it does not have the kmsdemo only the other two.
I tried to download kmsutil and compile it on the board
https://raw.githubusercontent.com/Digilent/kmsdemo/master/kmsutil.c
like this:
root@Zybo-Z7-10:~# gcc kmsutil.c -lvrc
kmsutil.c:1:20: fatal error: libvrc.h: No such file or directory
#include <libvrc.h>
^
compilation terminated.
but the bsp did not include the libvrc either. What is the simplest way to get this demo working?
This is somewhat odd, because the HDMI output works, it outputs a console. And the bsp feature list says:"HDMI output with kernel mode setting (KMS)"
Thanks!
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.