Build Ubuntu For i.MX8 Series Platform The Guide is how to use Ubuntu filesystem with i.MX8 series platform.At present, I had try it on i.MX8QXP with 4.14.98 kernel with ubuntu16.04. The Document will be continuously updated with enable VPU, ubuntu18.04. The desktop we can chose Gnome or weston. Because driver support issue, gc7000 series gpu not support render Gnome destop but it can render weston destop. Update 2019/7/31: Ubuntu-i.MX8-weston.pdf Feature: weston + ubuntu18.04 + 4.14.98 kernel VPU (enable with gplay or gst-play) GPU (could render desktop and run GPU demo under root privileges on Weston Desktop) I also try ubuntu with gnome desktop, ubuntu18.04 can not run gnome, need use ubuntu19.04. But Gnome Desktop just render by CPU. ------------------------------------------------------------------------------------- Update 2020/3/6: Ubuntu-i.MX8M.pdf Just a simple guide for IMX8M series, will be continuously updated. i.MX 8 Family | i.MX 8QuadMax (8QM) | 8QuadPlus Re: Build Ubuntu For i.MX8 Series Platform I believe the Google Coral Dev Board 4GB and ASUS Tinker Edge T both use the NXP i.MX 8M processor. Hence, would the Ubuntu i.MX 8M PDF at the top of this chain be applicable? Has this instruction been updated at all? And has anyone done it/be interested in helping out? If possible, I'd be thinking go to the latest LTS of Ubuntu. Re: Build Ubuntu For i.MX8 Series Platform Hi all, I am following the guide for imx8mq guide for ubuntu 20.04, I came across an error for building weson-imx, the error is as follows. libweston/compositor-drm.c: In function ‘hdr10_metadata_set_metadata’: libweston/compositor-drm.c:7250:29: error: storage size of ‘hdr_metadata’ isn’t known struct hdr_static_metadata hdr_metadata; This query is already posted on this thread by @prashanthkumar, but there was no solution posted for it. So how can I solve this problem Re: Build Ubuntu For i.MX8 Series Platform Hii PrashanthKumar Could you please provide me the steps for solving the below problem which you also encountered while running sudo -E weston --tty=1 [13:03:01.810] warning: XDG_RUNTIME_DIR "/run/user/1000" is not configured correctly. Unix access mode must be 0700 (current mode is 755), and must be owned by the user (current owner is UID 1000). Refer to your distribution on how to get it, or http://www.freedesktop.org/wiki/Specifications/basedir-spec on how to implement it. [13:03:01.817] Starting with no config file. [13:03:01.821] Output repaint window is 16 ms maximum. [13:03:01.822] Loading module '/usr/lib/libweston-5/drm-backend.so' [13:03:01.830] Failed to load module: /usr/lib/libweston-5/drm-backend.so: undefined symbol: gbm_surface_get_in_fence_fd [13:03:01.830] fatal: failed to create compositor backend regards, Abhijeet Re: Build Ubuntu For i.MX8 Series Platform Refere to the yocto's weston.ini file. Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar, I want weston auto load on device startup, where can I add weston --tty=1? Re: Build Ubuntu For i.MX8 Series Platform you can refernce the yocto script to build xwayland. But I am not sure if you use LXQT could use GPU, The best way, you should build LXQT source code with our gpu driver instead of apt-get LXQT directly. Re: Build Ubuntu For i.MX8 Series Platform how to enable xwayland in lxqt.I can install gnome-wayland only.In lxqt desktopNo xwayland related configuration options. Re: Build Ubuntu For i.MX8 Series Platform Hi, our GPU is support wayland only. You should try build the desktop with source code and enable xwayland. Re: Build Ubuntu For i.MX8 Series Platform In Ubuntu-i.MX8M.pdf ,I did not build weston in step 7 and I apt-get install lxqt.Use lxqt as the display desktop.I get follow results: I have successfully loaded the gpu driver,But why no application uses gpu.When I do not use ubuntu filesyste,I get follow results: have 26 apps uses gpu. Please help me answer,thanks,have a nice day! Re: Build Ubuntu For i.MX8 Series Platform It guide is support use GPU when running Ubuntu file system Re: Build Ubuntu For i.MX8 Series Platform Hi,Gnar Fang Whether the GPU cannot be enabled as long as the Ubuntu file system is used? Re: Build Ubuntu For i.MX8 Series Platform HI : yes, It' yocto-wayland desktop. If you want other desktop , you can try apt-get to install . 江亚强 软件工程师 Shenzhen Huameishi Technology Co., Ltd 深圳市华美视科技有限公司 深圳市南山区科苑路6号科技园工业大厦605 Tel:0755-26037882-616 Mail:
[email protected] Re: Build Ubuntu For i.MX8 Series Platform Hi prashanth: How do you get this desktop? After I run "sudo -E weston --tty = 1", the displayed desktop is just the same as the yocto-wayland desktop. Does your system have apt-get install some software? Tks~ Re: Build Ubuntu For i.MX8 Series Platform Hi , I am not sure why cause it. you can check if there are /usr/lib/aarch64-xx libGLES, libEGL。if so, delete them. Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar Fang, My apologies for the late reply. Yes, i did use the arguments as per the documents to build Weston/Wayland. Regarding the rUNTIME_DIR whatever the ownership/permission i change the warning message continues to exist. Thanks Re: Build Ubuntu For i.MX8 Series Platform Hi, The issue is look like below. 1.warning: XDG_RUNTIME_DIR "/run/user/1001" is not configured correctly. Unix access mode must be 0700 (current mode is 700), and must be owned by the user (current owner is UID 1001). 2.[17:00:10.627] EGL error state: EGL_BAD_ALLOC (0x3003) [17:00:10.627] EGL error state: EGL_SUCCESS (0x3000) [17:00:10.627] failed to initialize egl You can try it. $ sudo su $ XDG_RUNTIME_DIR =/run/user/1001 $ weston --tty=1 It is sure that need to enable HW acceleration during weston compilatio. which the config parameter in build weston? same as my guide? Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar Fang, If i run weston --use-pixman then there is no issue with the display. This means HW acceleration is not working. This is due to the OpenGL ES driver issue or we need to enable HW acceleration during weston compilatio? Thanks Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar Fang, Thanks for the doc. Yes, i verified and added galcore module to auto load on startup. But unfortunately i am still not getting the desktop with the following error: sudo -E weston --tty=1 Date: 2019-04-11 UTC [17:00:10.607] weston 5.0.0 https://wayland.freedesktop.org Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/ Build: 5.0.0-33-gfb563901 MGS-4627 [#ccc] weston will turn off when panel-psotion=none and use gplay (2019-03-14 11:30:30 +0800) [17:00:10.607] Command line: weston --tty=1 [17:00:10.607] OS: Linux, 4.19.35-1.1.0+g0f9917c56d59, #1 SMP PREEMPT Wed Oct 30 13:54:51 UTC 2019, aarch64 [17:00:10.608] warning: XDG_RUNTIME_DIR "/run/user/1001" is not configured correctly. Unix access mode must be 0700 (current mode is 700), and must be owned by the user (current owner is UID 1001). Refer to your distribution on how to get it, or http://www.freedesktop.org/wiki/Specifications/basedir-spec on how to implement it. [17:00:10.608] Starting with no config file. [17:00:10.608] Output repaint window is 16 ms maximum. [17:00:10.608] Loading module '/usr/lib/libweston-5/drm-backend.so' [17:00:10.612] initializing drm backend [17:00:10.614] using /dev/dri/card0 [17:00:10.614] DRM: supports universal planes [17:00:10.614] DRM: supports atomic modesetting [17:00:10.614] DRM: supports picture aspect ratio [17:00:10.614] Loading module '/usr/lib/libweston-5/gl-renderer.so' [17:00:10.626] EGL client extensions: EGL_EXT_client_extensions EGL_EXT_platform_base EGL_KHR_platform_wayland EGL_EXT_platform_wayland EGL_KHR_platform_gbm [17:00:10.627] warning: neither EGL_EXT_swap_buffers_with_damage or EGL_KHR_swap_buffers_with_damage is supported. Performance could be affected. [17:00:10.627] EGL_KHR_surfaceless_context available [17:00:10.627] failed to create context [17:00:10.627] EGL error state: EGL_BAD_ALLOC (0x3003) [17:00:10.627] EGL error state: EGL_SUCCESS (0x3000) [17:00:10.627] failed to initialize egl Segmentation fault Re: Build Ubuntu For i.MX8 Series Platform Hi, I had update the DOC for enable weston. See if there is gpu driver . root@ubuntu:~# ls /dev/galcore /dev/galcor Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar Fang, Thanks looking forward to it, kindly let me know once done. I will also update if i make any progress. Re: Build Ubuntu For i.MX8 Series Platform Hi, I will write the guide for 8MM about this week. Re: Build Ubuntu For i.MX8 Series Platform Hi Prashanth, I am getting a similar error could you please share how you got the "drm need to run on background" error. Thanks Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar Fang, Currently I am using IM8MM DDR4 EVK.Thanks Re: Build Ubuntu For i.MX8 Series Platform Which platform are you used? Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar Fang, While running the Weston tty im getting error either "No such device or directory" or "Fatal : DRM should run in background". Could you please share some guidance in this. Thanks Regards, Raajesh K Re: Build Ubuntu For i.MX8 Series Platform Hi downey: I don't know which platform you are using. I use imx8md/q , it doesn't support "g2d", so just add "--disable-imxg2d" when config weston-imx with fix the issue. 江亚强 软件工程师 Shenzhen Huameishi Technology Co., Ltd Mail:
[email protected] Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar, could you please check this issue about the header file ,It seems about dpu,But I can't find the dpu lib under my yocto project. Thanks a lot. Best Regards. downey. Re: Build Ubuntu For i.MX8 Series Platform Hi jiang yaqiang: could you please tell me where do you find the imx-dpu-g2d-1.7.0 directory,I can't find this lib ,So I get an error when I compile weston-imx. I put this issue above , But no one replied about this. Thanks a lot. downey Re: Build Ubuntu For i.MX8 Series Platform HI Gnar Fang: Following your doc, I can success to run the ubuntu18.04 on imx8mq, but I face a problem: the system could not load firmware: imx-sdma 30bd0000.sdma: external firmware not found, using ROM firmware I have comfirm the firwmware is in /lib/firmware/ . Do you have the same problem ? or where should I check ? Thanks. Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar Fang: I've found the libdrm/ under aarch64-poky-linux/, and copied it to corresponding directory which you guide in the document. But , I got another error when I compiled weston-imx : ``` ... In file included from libweston/g2d-renderer.c:44:0: libweston/g2d-renderer.h:30:10: fatal error: g2dExt.h: No such file or directory #include ^~~~~~~~~~ compilation terminated. Makefile:5107: recipe for target 'libweston/g2d_renderer_la-g2d-renderer.lo' failed ``` There seems to be some system libraries(libweston) that are missing, or some packages that I haven't installed but that library depends on that package. I tried again to build from scratch to avoid an operational error problem, but the problem was the same on both occasions. Regards. Downey. Re: Build Ubuntu For i.MX8 Series Platform Hi,Prashanth I have not received new requirement, so there is not any update. BR Gnar Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar, Thanks for your reply. Is there any updated Documents for building Ubuntu 18.04 on i.MX8 platform. Best Regards, Prashanth Kumar K Re: Build Ubuntu For i.MX8 Series Platform Hi,prashanth You install weston, so it show weston GUI. I think you want to get Gnome GUI, but I enable it just with CPU sotfware render (just apt-get install gnome-core). Gnome GUI with GPU render meet some mistakes. BR Gnar Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar, We are able to get GUI with Weston, but this GUI look is not like desktop Ubuntu GUI. Whether you are getting same GUI? The terminal showing following output, # lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic Regards, Prashanth Kumar K Re: Build Ubuntu For i.MX8 Series Platform Hi, 1. libdrm is under buildxwayland/tmp/work/aarch64-poky-linux. 2. The issue may be caused by your rootfs lost libdrm, copy libdrm to your rootfs. If you have any other question could tell me. These day have too many other case, may reply late. BR Gnar Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar Fang: Thanks for your reply,Looking forward to your updates. BTW,Please check the second question above(compile weston-imx errors ) Regards downey Re: Build Ubuntu For i.MX8 Series Platform Hi, I also found 8mq yocto have not libdrm. I will check it next week. I think the drm is a necessary component for Linux display. BR Gnar Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar Fang: I'm trying to port the ubuntu 18.04 to my i.mx8mq-evk,I read your document and followed,But I get two errors: 1. Step 9,part 2: I can't find the targets "libdrm/2.4.91.imx-r0/image/*" and "imx-dpu-g2d-1.7.0/imx-dpu-g2d/1.7.0-r0/image/*" ,I'm sure that these two target don't exist in my yocto project. I assume that the i.mx8mq-evk does not have dpu,but for libdrm,I'm not sure,So please give me a signal. btw, I compile with instructions: DISTRO=fsl-imx-wayland MACHINE=imx8mqevk source fsl-setup-release.sh -b build bitbake fsl-image-qt5-validation-imx 2.Regardless the error 1 above,I'm trying to continue with the document,but when I compile weston-imx,some errors occured: steps below: git clone https://source.codeaurora.org/external/imx/weston-imx.git cd weston-imx git checkout fb563901657b296c7c7c86d26602a622429e334f ./autogen.sh --prefix=/usr --disable-silent-rules --disable-dependency-tracking ......... make This is error message: make[1]: Entering directory '/root/weston/weston-imx' /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./libweston -I./libweston -I./clients -I./tests -I./shared -I./protocol -DLIBWESTON_MODULEDIR='"/usr/lib/libweston-5"' -DLIBEXECDIR='"/usr/libexec"' -DBINDIR='"/usr/bin"' -DIN_WESTON -Wall -Wextra -Wno-unused-parameter -Wno-shift-negative-value -Wno-missing-field-initializers -g -fvisibility=hidden -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare -DLINUX -DEGL_API_FB -DWL_EGL_PLATFORM -I/usr/include/pixman-1 -DLINUX -DEGL_API_FB -DWL_EGL_PLATFORM -I/usr/include/libdrm -g -O2 -c -o libweston/libweston_5_la-pixel-formats.lo `test -f 'libweston/pixel-formats.c' || echo './'`libweston/pixel-formats.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./libweston -I./libweston -I./clients -I./tests -I./shared -I./protocol -DLIBWESTON_MODULEDIR=\"/usr/lib/libweston-5\" -DLIBEXECDIR=\"/usr/libexec\" -DBINDIR=\"/usr/bin\" -DIN_WESTON -Wall -Wextra -Wno-unused-parameter -Wno-shift-negative-value -Wno-missing-field-initializers -g -fvisibility=hidden -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare -DLINUX -DEGL_API_FB -DWL_EGL_PLATFORM -I/usr/include/pixman-1 -DLINUX -DEGL_API_FB -DWL_EGL_PLATFORM -I/usr/include/libdrm -g -O2 -c libweston/pixel-formats.c -fPIC -DPIC -o libweston/.libs/libweston_5_la-pixel-formats.o libweston/pixel-formats.c:268:13: error: 'DRM_FORMAT_P010' undeclared here (not in a function); did you mean 'DRM_FORMAT_NV12'? .format = DRM_FORMAT_P010, ^~~~~~~~~~~~~~~ DRM_FORMAT_NV12 Makefile:5527: recipe for target 'libweston/libweston_5_la-pixel-formats.lo' failed Could you please send me some signals to solve these two issues? Regard downey Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar, Is there any update regarding above issue for Ubuntu 18.04 using Weston file system nxf47724 ? Thanks in advance. Regards, Prashanth Kumar K Re: Build Ubuntu For i.MX8 Series Platform Hi, I am deleted the rootfs form my PC, if you want,create ticket to me. BR Gnar Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar, Can you please provide your built ubuntu-rootfs.tar.gz file system for testing in iMX8QM custom board. Thanks in advance. BestRegards, Prashanth Kumar K Re: Build Ubuntu For i.MX8 Series Platform Thank you Gnar, deleting those libraries worked for me. Several programs downloaded from "apt-get" (like firefox, chromium and others) try to use X11. We see that you disable xwayland during the weston compilation. What are the reasons for this? Do you think that having xwayland may solve the issue? Do you have any idea of how to get xwayland? Thank you a lot for your help. Best regards, Lorenzo Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar, I used section "10.build weston" steps to build Weston in ubuntu-rootfs in qemu enviroment. Also copying full ubuntu-rootfs to board using below steps mentioned in provided user guide. 12. replace filesystem $ mkdir mountpoint $ umount /dev/sdb2 $ mkfs.ext4 /dev/sdb2 $ mount /dev/sdb2 /home/gnar/mountpoint $ cp -a /home/gnar/rootfs/ubuntu-rootfs /* /home/gnar/mountpoint/ umount /home/gnar/mountpoint sync But still facing same issue. ubuntu@ubuntu:~$ export XDG_RUNTIME_DIR=/run/user/1000 ubuntu@ubuntu:~$ sudo -E weston --tty=1 [sudo] password for iwave: Date: 2019-10-20 UTC [12:05:59.961] weston 5.0.0 https://wayland.freedesktop.org Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/ Build: 5.0.0-33-gfb563901 MGS-4627 [#ccc] weston will turn off when panel-psotion=none and use gplay (2019-03-14 11:30:30 +0800) [12:05:59.961] Command line: weston --tty=1 [12:05:59.961] OS: Linux, 4.14.98-imx_4.14.98_2.0.0_ga+g5d6cbea, #1 SMP PREEMPT Mon Oct 14 08:11:41 UTC 2019, aarch64 [12:05:59.961] warning: XDG_RUNTIME_DIR "/run/user/1000" is not configured correctly. Unix access mode must be 0700 (current mode is 700), and must be owned by the user (current owner is UID 1000). Refer to your distribution on how to get it, or http://www.freedesktop.org/wiki/Specifications/basedir-spec on how to implement it. [12:05:59.961] Starting with no config file. [12:05:59.962] Output repaint window is 16 ms maximum. [12:05:59.962] Loading module '/usr/lib/libweston-5/drm-backend.so' [12:05:59.964] Failed to load module: /usr/lib/libweston-5/drm-backend.so: undefined symbol: gbm_surface_get_in_fence_fd [12:05:59.964] fatal: failed to create compositor backend ubuntu@ubuntu:~$ Can you please suggest how to resolve "drm-backend.so" loading issue? Also kindly provide path to copy "weston" related libraries from yocto build to ubuntu-rootfs. Regards, Prashanth Kumar K Re: Build Ubuntu For i.MX8 Series Platform Hi, According my setp, start simulate ARM64 enviroment on host and build weston. Then copy whole filesystem, not only copy weston lib. BR Gnar Re: Build Ubuntu For i.MX8 Series Platform Hi, This is a script to start up arm64-linux simulate environment. You build weston in the enviroment? I had not meet the issue. Check if there are /usr/lib/aarch64-xx libGLES, libEGL。if so, delete them. BR, Gnar Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar, I am facing some problem about Weston. While loading below commands, export XDG_RUNTIME_DIR=/run/user/1000 sudo -E weston --tty=1 I am getting following errors. ubuntu@ubuntu:~$ export XDG_RUNTIME_DIR=/run/user/1000 ubuntu@ubuntu:~$ sudo -E weston --tty=1 [sudo] password for iwave: Date: 2019-10-20 UTC [12:05:59.961] weston 5.0.0 https://wayland.freedesktop.org Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/ Build: 5.0.0-33-gfb563901 MGS-4627 [#ccc] weston will turn off when panel-psotion=none and use gplay (2019-03-14 11:30:30 +0800) [12:05:59.961] Command line: weston --tty=1 [12:05:59.961] OS: Linux, 4.14.98-imx_4.14.98_2.0.0_ga+g5d6cbea, #1 SMP PREEMPT Mon Oct 14 08:11:41 UTC 2019, aarch64 [12:05:59.961] warning: XDG_RUNTIME_DIR "/run/user/1000" is not configured correctly. Unix access mode must be 0700 (current mode is 700), and must be owned by the user (current owner is UID 1000). Refer to your distribution on how to get it, or http://www.freedesktop.org/wiki/Specifications/basedir-spec on how to implement it. [12:05:59.961] Starting with no config file. [12:05:59.962] Output repaint window is 16 ms maximum. [12:05:59.962] Loading module '/usr/lib/libweston-5/drm-backend.so' [12:05:59.964] Failed to load module: /usr/lib/libweston-5/drm-backend.so: undefined symbol: gbm_surface_get_in_fence_fd [12:05:59.964] fatal: failed to create compositor backend ubuntu@ubuntu:~$ ubuntu@ubuntu:~$ How to copy "weston" libraries from yocto build to ubuntu-rootfs? Thank you. Regards, Prashanth Kumar K Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar, Thank you for sharing this procedure. I would like to ask you: what is the purpose of the commands "sudo mount -t proc /proc ${2}proc" and the others? It bring us some problems on the host machines. I also faced a problem about weston. I followed your procedure, but when i try to execute weston i get this: sudo -E weston --tty=1 [sudo] password for user: Date: 2019-10-18 UTC [08:42:03.809] weston 5.0.0 https://wayland.freedesktop.org Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/ Build: 5.0.0-33-gfb563901 MGS-4627 [#ccc] weston will turn off when panel-psotion=none and use gplay (2019-03-14 11:30:30 +0800) [08:42:03.816] Command line: weston --tty=1 [08:42:03.816] OS: Linux, 4.14.98-imx_4.14.98_2.0.0_ga+g64ad07d, #1 SMP PREEMPT Tue Aug 13 13:06:25 UTC 2019, aarch64 [08:42:03.816] warning: XDG_RUNTIME_DIR "/run/user/1000" is not configured correctly. Unix access mode must be 0700 (current mode is 700), and must be owned by the user (current owner is UID 1000). Refer to your distribution on how to get it, or http://www.freedesktop.org/wiki/Specifications/basedir-spec on how to implement it. [08:42:03.826] Starting with no config file. [08:42:03.839] Output repaint window is 16 ms maximum. [08:42:03.845] Loading module '/usr/lib/libweston-5/drm-backend.so' [08:42:03.952] initializing drm backend [08:42:03.955] using /dev/dri/card0 [08:42:03.955] DRM: supports universal planes [08:42:03.955] DRM: supports atomic modesetting [08:42:03.955] DRM: does not support picture aspect ratio [08:42:03.960] Loading module '/usr/lib/libweston-5/gl-renderer.so' [08:42:04.302] EGL client extensions: EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_wayland EGL_EXT_platform_x11 EGL_MESA_platform_gbm EGL_MESA_platform_surfaceless [08:42:04.304] failed to initialize display [08:42:04.304] EGL error state: EGL_NOT_INITIALIZED (0x3001) [08:42:04.304] failed to initialize egl [08:42:04.341] fatal: failed to create compositor backend Have you ever seen a similar error message? Thank you. Regards, Lorenzo Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar, During below make command execution I am getting following header file declaration error message for weston-imx. From where we can get header files for weston? #cd ~/weston #git clone https://source.codeaurora.org/external/imx/weston-imx.git #cd weston-imx #git checkout fb563901657b296c7c7c86d26602a622429e334f #./autogen.sh --prefix=/usr --disable-silent-rules --disable-dependency-tracking --enable-setuid-install --disable-rdp-compositor --enable-clients --enable-simple-clients --enable-demo-clients-install --disable-colord --enable-egl --enable-simple-egl-clients --enable-fbdev-compositor --disable-headless-compositor --enable-drm-compositor --enable-weston-launch --disable-lcms --disable-libunwind --with-pam--disable-vaapi-recorder --enable-wayland-compositor --without-webp --disable-x11-compositor --enable-xwayland --enable-imxg2d --enable-imxgpu --enable-drm-compositor --enable-opengl #make libweston/compositor-drm.c: In function ‘drm_fb_addfb’: libweston/compositor-drm.c:962:23: error: ‘DRM_FORMAT_MOD_AMPHION_TILED’ undeclared (first use in this function); did you mean ‘DRM_FORMAT_MOD_VIVANTE_TILED’? if (fb->modifier == DRM_FORMAT_MOD_AMPHION_TILED) { DRM_FORMAT_MOD_VIVANTE_TILED libweston/compositor-drm.c:962:23: note: each undeclared identifier is reported only once for each function it appears in libweston/compositor-drm.c: In function ‘drm_clip_overlay_coordinate’: libweston/compositor-drm.c:1518:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (state->dest_x + state->dest_w > output->base.current_mode->width){ ^ libweston/compositor-drm.c:1526:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (state->dest_y + state->dest_h > output->base.current_mode->height){ ^ libweston/compositor-drm.c: In function ‘drm_get_gbm_alignment’: libweston/compositor-drm.c:2184:9: error: ‘DRM_FORMAT_MOD_VIVANTE_SUPER_TILED_FC’ undeclared (first use in this function); did you mean ‘DRM_FORMAT_MOD_VIVANTE_SUPER_TILED’? case DRM_FORMAT_MOD_VIVANTE_SUPER_TILED_FC: DRM_FORMAT_MOD_VIVANTE_SUPER_TILED libweston/compositor-drm.c: In function ‘drm_output_apply_state_atomic’: libweston/compositor-drm.c:2600:4: warning: implicit declaration of function ‘gbm_surface_set_sync_post’; did you mean ‘gbm_surface_destroy’? [-Wimplicit-function-declaration] gbm_surface_set_sync_post(output->gbm_surface, 0); gbm_surface_destroy libweston/compositor-drm.c:2601:18: warning: implicit declaration of function ‘gbm_surface_get_in_fence_fd’; did you mean ‘wl_surface_send_enter’? [-Wimplicit-function-declaration] in_fence_fd = gbm_surface_get_in_fence_fd(output->gbm_surface); wl_surface_send_enter libweston/compositor-drm.c: In function ‘drm_query_dmabuf_modifiers’: libweston/compositor-drm.c:3291:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (p->formats[i].format != format) libweston/compositor-drm.c: In function ‘drm_import_dmabuf’: libweston/compositor-drm.c:3342:37: error: ‘DRM_FORMAT_P010’ undeclared (first use in this function); did you mean ‘DRM_FORMAT_R16’? && dmabuf->attributes.format == DRM_FORMAT_P010) DRM_FORMAT_R16 libweston/compositor-drm.c: In function ‘drm_output_propose_state’: libweston/compositor-drm.c:3752:38: error: ‘DRM_FORMAT_P010’ undeclared (first use in this function); did you mean ‘DRM_FORMAT_R16’? || dmabuf->attributes.format == DRM_FORMAT_P010 DRM_FORMAT_R16 libweston/compositor-drm.c: In function ‘hdr10_metadata_set_metadata’: libweston/compositor-drm.c:7250:29: error: storage size of ‘hdr_metadata’ isn’t known struct hdr_static_metadata hdr_metadata; Best Regards, Prashanth Kumar K Re: Build Ubuntu For i.MX8 Series Platform Hi Build weston in qemu enviroment. BR Gnar Re: Build Ubuntu For i.MX8 Series Platform Hi, I am also porting Ubuntu 18.04 to iMX8 Quad Max custom board with 4.14.98 BSP by referring https://community.nxp.com/servlet/JiveServlet/download/343939-3-454211/Ubuntu-i.MX8-weston.pdf Document. Till section 9. copy imx-gpu-viv in mentioned document able to understand properly. But after section 10.build weston, its not saying that where need to build weston, wayland, gstreamer and gst-plugins? How to link/add above features with "ubuntu-rootfs" ? Best Regards, Prashanth Kumar K Re: Build Ubuntu For i.MX8 Series Platform Yes, may GPU dirver not fit. Re: Build Ubuntu For i.MX8 Series Platform Hi nxf47724 : The GPU can't render gnome because of limitations in the OpenGL library or is there another reason? Re: Build Ubuntu For i.MX8 Series Platform Hi, A easy way is download linux-imx for linux-imx - i.MX Linux kernel , Then use command "$ make defconfig, $ make" to build Image . Use the Image replace your current Image. BR Gnar Re: Build Ubuntu For i.MX8 Series Platform thanks for your answer.Can you tell me how to compile the kernel separetely? I use fellowing methods make it : bitbake -c compile -f -v linux-imx bitbake linux-imx -c compile_kernelmodules -f -v bitbake -c deploy -f -v linux-imx result: Compare with before: galcore used numbers different.and no have qca6174 driver.and a lot of drivers have been added。 how to resolve it? Re: Build Ubuntu For i.MX8 Series Platform Hi, gao Because in default, GPU driver galcore is compiled as .ko file, so need compile the kernel separately to make galcore in kernel. BR Gnar Re: Build Ubuntu For i.MX8 Series Platform First of all, thank you very much for your proposal。But i have a question that I hope you can help me with this。In Ubuntu-imx8.pdf setp 2 Compile the kernel separately to replace yocto kernel,Specifically which is kernel to replace yocto kernel? thanks! Re: Build Ubuntu For i.MX8 Series Platform Hi,Anrit 1. imx-dpu-2d path in yocto is /buildxwayland/tmp/work/aarch64-mx8mm-poky-linux/imx-gpu-g2d ,8MM have not DPU. 2. back to first command: ./autogen.sh --prefix=/usr --disable-silent-rules --disable-dependency-tracking --enable-setuid-install --disable-rdp-compositor --enable-clients --enable-simple- clients --enable-demo-clients-install --disable-colord --enable-egl --enable- simple-egl-clients --enable-fbdev-compositor --disable-headless-compositor -- enable-drm-compositor --enable-weston-launch --disable-lcms --disable-libunwind --with-pam --disable-vaapi-recorder --enable-wayland-compositor --without-webp --disable-x11-compositor --disable-xwayland The error log is : 1)configure: WARNING: you should use --build, --host, --target 2)checking build system type... Invalid configuration `clients': machine `clients' not recognized Are you build in qemu enviroment ? I had not meet the error in my step and not set any enviroment variables. Try google how build weston, according to the log you need add the arguments about --build, --host, --target. The second command, try disable xwayland at first. The xwayland is not necessary. BR Gnar Re: Build Ubuntu For i.MX8 Series Platform Hello Gnar, Thank you for your reply. I think I am now very close to building ubuntu after following your document. I now have these remaining items. 1. I do not see anything called imx-dpu-2d in my yocto build folder. So I am not able to run this step in your document: sudo cp -Pra imx-dpu-g2d-1.7.0/imx-dpu-g2d/1.7.0-r0/image/* ubuntu18.04/ My DISTRO is fsl-imx-xwayland and MACHINE is imx8mmevk 2.. I tried the new autogen step as you mentioned in your last post for weston-imx but it still does not build. I now get different errors during autogen step. Here is my log: ......................... root@UB160401:~/weston/weston-imx# ./autogen.sh --prefix=/usr --disable-silent-rules --disable-dependency-tracking --enable-setuid-install --disable-rdp-compositor --enable-clients --enable-simple-clients --enable-demo-clients-install --disable-colord --enable-egl --enable-simple-egl-clients --enable-fbdev-compositor --disable-headless-compositor --enable-drm-compositor --enable-weston-launch --disable-lcms --disable-libunwind --with-pam --disable-vaapi-recorder --enable-wayland-compositor --without-webp --disable-x11-compositor --enable-xwayland --enable-imxg2d --enable-imxgpu --enable-drm-compositor --enable-opengl.... .................. ................. checking for OPENGL... yes checking for GL_RENDERER... yes checking for XKBCOMMON_COMPOSE... yes checking for XWAYLAND... no configure: error: Package requirements (xcb xcb-xfixes xcb-composite xcb-shape xcursor cairo-xcb) were not met: No package 'xcb-xfixes' found No package 'xcb-composite' found No package 'xcb-shape' found No package 'xcursor' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables XWAYLAND_CFLAGS and XWAYLAND_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. Any suggestions? Thank you so much. Amrit Re: Build Ubuntu For i.MX8 Series Platform Hello Gnar and Kyle, I am glad to see that more than one person is working on this project. First of all thank you Gnar for creating the documents and outlining the essential steps. Kyle, I also went through and located all folder that need to be copied from yocto build folders to ~/rootfs/ubuntu-rootfs (or ~/rootfs/ubuntu18.04). Here are the the source folder names in each case: cd ~/imx-yocto-bsp/build/tmp/work/aarch64-mx8mm-poky-linux sudo cp -Pra libdrm/2.4.91.imx-r0/image/* ~/rootfs/ubuntu-rootfs sudo cp -Pra imx-gpu-viv/1_6.2.4.p4.0-aarch64-r0/image/* ~/rootfs/ubuntu-rootfs sudo cp -Pra ~/imx-yocto-bsp/build/tmp/work/aarch64-mx8mm-poky-linux/imx-gpu-g2d/6.2.4.p4.0-r0/image/* ~/rootfs/ubuntu-rootfs cd ~/imx-yocto-bsp/build/tmp/work sudo cp -r all-poky-linux/firmware-imx/1_8.1-r0/image/* ~/rootfs/ubuntu-rootfs In my case rootfs folder is ~/rootfs/ubuntu-rootfs. Gnar, I am able to run ubuntu18.04 in basic form with Gnome or xfce4 but still in the process of trying to put all the components in my rootfs. I noticed a weird error in step 3) for weston-imx. Here is the error log, when I run autogen for weston-imx: root@UB160401:~/weston/weston-imx# ./autogen.sh --prefix=/usr --disable-silent-rules --disable-dependency-tracking --enable-setuid-install --disable-rdp-compositor --enable-clients --enable-simple- clients --enable-demo-clients-install --disable-colord --enable-egl --enable- simple-egl-clients --enable-fbdev-compositor --disable-headless-compositor -- enable-drm-compositor --enable-weston-launch --disable-lcms --disable-libunwind --with-pam --disable-vaapi-recorder --enable-wayland-compositor --without-webp --disable-x11-compositor --disable-xwayland autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. libtoolize: copying file 'build-aux/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:35: installing 'build-aux/compile' configure.ac:43: installing 'build-aux/missing' Makefile.am: installing 'build-aux/depcomp' autoreconf: Leaving directory `.' configure: WARNING: you should use --build, --host, --target configure: WARNING: you should use --build, --host, --target configure: WARNING: you should use --build, --host, --target configure: WARNING: you should use --build, --host, --target configure: WARNING: you should use --build, --host, --target configure: WARNING: you should use --build, --host, --target configure: WARNING: you should use --build, --host, --target configure: WARNING: you should use --build, --host, --target configure: WARNING: you should use --build, --host, --target configure: WARNING: you should use --build, --host, --target configure: WARNING: you should use --build, --host, --target configure: WARNING: you should use --build, --host, --target configure: WARNING: unrecognized options: --enable-simple-, --enable- checking for clients-gcc... no checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking whether sys/types.h defines makedev... no checking sys/mkdev.h usability... no checking sys/mkdev.h presence... no checking for sys/mkdev.h... no checking sys/sysmacros.h usability... yes checking sys/sysmacros.h presence... yes checking for sys/sysmacros.h... yes checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking whether make supports nested variables... yes checking dependency style of gcc... none checking whether make supports nested variables... (cached) yes checking for clients-gcc... gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking whether gcc understands -c and -o together... (cached) yes checking for a sed that does not truncate output... /bin/sed checking build system type... Invalid configuration `clients': machine `clients' not recognized configure: error: /bin/bash build-aux/config.sub clients failed Any clue what I may be missing? BTW: I am using imx8m mini evk - yocto, but that should not make difference as far as these steps are concerned. Thank you both. Amrit Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar, I think i've gotten a bit confused on what specifically to copy. From your awesome manual (Ubuntu-imx8-weston.pdf) there are several commands here: 2) copy libdrm, wayland, vpu-firmware from yocto $sudo cp -Pra libdrm/2.4.91.imx-r0/image/* ubuntu18.04/ $sudo cp -Pra imx-gpu-viv/1_6.2.4.p4.0-aarch64-r0/image/* ubuntu18.04/ $sudo cp -Pra imx-dpu-g2d-1.7.0/imx-dpu-g2d/1.7.0-ro/image/* ubuntu 18.04/ $sudo cp -r all-poky-linux/firmware-imx/1_8.1-r0/image/* ubuntu18.04/ What would help me is to understand the actual folder paths for each of them. My assumption is that you are copying from the Yocto build... could you give me the full paths to /libdrm/2.4.91.imx-ro/image/, /imx-gpu-viv/1_6.2.4.p4.0-aarch64-ro/image/, /imx-dpu-g2d-1.7.0/imx-dpu-g2d/1.7.0-ro/image/* and all-poky-linux/firmware-imx/1_8.1-r0/image/* 2nd, when you point out the destination folder of 'ubuntu18.04/' do i assume that /ubuntu18.04/ is the base of the ubuntu rootfs? thanks kylef Re: Build Ubuntu For i.MX8 Series Platform Hi, Kyle I am not test webcam but other one test it ok. I am not sure he do other config for it. If you webcam is usb camera, may should enable UVC driver in kernel. About VPU firmware, are you copy it under /lib/firmware ? You also can copy unit_test file form yocto, use v4l2 to open camera. BR Gnar Re: Build Ubuntu For i.MX8 Series Platform Hi Gnar, i was curious whether you have tested a webcam with ubuntu and seen if it works? i'm struggling to get a simple logitech webcam to work. It looks like i'm getting a dmesg alert that "VPU_firmware_download Failed"... so i assume the VPU firmware is messed up. maybe i copied in the wrong file at some point... k Re: Build Ubuntu For i.MX8 Series Platform Hi, Amrit 1.which folder (cd ~/????) The command run Host PC side. To build a ubuntu rootfs, decompression rootfs first such as tar -xvf ubuntu-base-18.04.2-base-arm64.tar.gz -C ubuntu-rootfs, in my case modify ubuntu-rootfs to ubuntu 18.04, May cause you misunderstand and I will uniform naming. This command purpose is copy libraries related GPU to ubuntu-rootfs. 2.Compile the kernel separately Because the GPU dirver be builded as galcore.ko by yocto default. So compile the kernel separately to make Image include gpu dirver. In kernel source code(I download form linux-imx - i.MX Linux kernel , not use the yocto code), after command $ make menuconfig, you can see the .config CONFIG_MXC_GPU_VIV=y. BR Gnar Re: Build Ubuntu For i.MX8 Series Platform Hello Gnar, Thank you for posting this detailed document. I was trying to follow it for nxp imx8m-mini evk. I have been able to build yocto for this board and that seems to work fine but now want to try ubuntu with weston on this evk. I have these questions for you in your Ubuntu-i.MX8-weston.pdf document. In section 9 you write: 2)copy libdrm,wayland vpu-firmware from yocto $sudo cp -Pra libdrm/2.4.91.imx-r0/image/* ubuntu18.04/ $sudo cp -Pra imx-gpu-viv/1_6.2.4.p4.0-aarch64-r0/image/* ubuntu18.04/ $sudo cp -Pra imx-dpu-g2d-1.7.0/imx-dpu-g2d/1.7.0-r0/image/* ubuntu18.04/ $sudo cp -r all-poky-linux/firmware-imx/1_8.1-r0/image/* ubuntu18.04/ Could you tell me from which folder (cd ~/????) you are running these commands? Also this folder ubuntu 18.04 does not exist anywhere, where does it get used later? I do not see any other reference to "ubuntu 18.04" folder in this document. Is imx-dpu-g2d a typo, should it be imx-gpu-g2d ? Also you say: 2.Compile the kernel separately to replace yocto kernel Do you mean bitbake linux-imx after I have built yocto? Currently in the yocto build I do see that a kernel Image that has been built. Thanks, Amrit Re: Build Ubuntu For i.MX8 Series Platform <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Hello, Is your issue resolved? I also encountered the same problem. My solution was to compile the module but not load it during kernel configuration. Then load it manually after the system is up. However, this will cause some error logs about dependency issues. Although it can be solved, I think this method is not very good. Do you have a better idea?