Build Ubuntu For i.MX8 Series Platform

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Build Ubuntu For i.MX8 Series Platform

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. 

タグ(1)
添付
コメント

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

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

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

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

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

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

Hi Amrit

    1. I am install gnome base ubuntu18.04 meet error on 8QXP but sucessful with ubuntu19.04. At present, gnome not support GPU and use the CPU to render the desktop,

the performance is not very optimistic. so i am try debug GNOME to support GPU but it need some time.

    2. When you build weston-imx meet error.  If you had install gnome or xfce4(BTW: it base on X11, 8 series GPU is only support wayland, but if use CPU to render desktop,

xfce4 is better than gnome because gnome is more complex), please build weston-imx without it because some component of GNOME of xfce4 effect weston-imx build.

if not,try use the 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 --enable-xwayland --enable-imxg2d --enable-imxgpu --enable-drm-compositor --enable-opengl

   3. I had not meet the err, you can reference :cross compiling - What's the difference of "./configure" option "--build", "--host" and "--target"? ...  .

BR

Gnar

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

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

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!

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

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:

pastedImage_1.png

Compare with before:

pastedImage_2.png

galcore used numbers different.and no have qca6174 driver.and a lot of drivers have been added。

how to resolve it?

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

Hi nxf47724‌ : The GPU can't render gnome because of limitations in the OpenGL library or is there another reason?

Yes, may GPU dirver not fit.

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

Hi

Build weston in qemu enviroment.

BR

Gnar

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

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

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

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

Hi,

According my setp, start simulate ARM64 enviroment on host and build weston.

Then copy whole filesystem, not only copy weston lib.

BR

Gnar

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

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

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

Hi, 

I am  deleted the rootfs form my PC, if you want,create ticket to me.

BR

Gnar

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

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

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

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

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 

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

wayland-screenshot-2018-01-28_15-59-17.png

Regards,

Prashanth Kumar K

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

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

Hi,Prashanth

I have not received new requirement, so there is not any update.

BR

Gnar

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 <g2dExt.h>
         ^~~~~~~~~~
         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.

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.

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

Hi Gnar,
   could you please check this issue about the header file <g2dExt.h>,It seems about dpu,But I can't find the dpu lib under my yocto project.

Thanks a lot.

Best Regards.

downey.

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:yaqiang.jiang@huameishi.com

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

Which platform are you used?

Hi Gnar Fang,

       Currently I am using IM8MM DDR4 EVK.Thanks

Hi Prashanth,

               I am getting a similar error could you please share how you got the "drm need to run on background" error. Thanks

Hi, I will write the guide for 8MM about this week. 

Hi Gnar Fang,

            Thanks looking forward to it, kindly let me know once done. I will also update if i make any progress.

Hi, I had update the DOC for enable weston.  See if there is  gpu driver .

root@ubuntu:~# ls /dev/galcore

/dev/galcor

你好,

请问您的问题解决了吗?

我也遇到了相同的问题,我解决的方法是在内核配置的时候只让它编译出模块并不加载。系统起来之后再手动加载。但是这样会有一些依赖问题的错误log打印。虽然能解决,但是我觉得方法不是很好。

您有更好的办法吗?

HI gaobo:

已经解决。关键是下面两个文件,你可以参考一下。

/lib/udev/rules.d/50-firmware.rules

/usr/bin/firmware.sh

cat /lib/udev/rules.d/50-firmware.rules

  1. stub for immediately telling the kernel that userspace firmware loading

  2. failed; necessary to avoid long timeouts with CONFIG_FW_LOADER_USER_HELPER=y

#SUBSYSTEM=="firmware", ACTION=="add", ATTR="-1"

SUBSYSTEM=="firmware", ACTION=="add", RUN+="/bin/sh /usr/bin/firmware.sh"

imx8m@localhost:~$ cat /usr/bin/firmware.sh

#echo 1 > /sys/$DEVPATH/loading

#cat $HOTPLUG_FW_DIR > > /sysfs/$DEVPATH/data

#echo 0 > /sys/$DEVPATH/loading

echo -n 1 > /sys/$DEVPATH/loading

sleep 1

cat /lib/firmware/$FIRMWARE > /sys/$DEVPATH/data

if ; then

  1. echo -n 1 > /sys/$DEVPATH/loading

echo -n 0 > /sys/$DEVPATH/loading

fi

江亚强

软件工程师

Shenzhen Huameishi Technology Co., Ltd

深圳市华美视科技有限公司

深圳市南山区科苑路6号科技园工业大厦605

Tel:0755-26037882-616

Mail:yaqiang.jiang@huameishi.com

Hi jiangyaqiang:

非常感谢您的回复。我按照您的步骤进行操作了,

iqi@imx8mqevk:~$ cat /lib/udev/rules.d/50-firmware.rules
# stub for immediately telling the kernel that userspace firmware loading
# failed; necessary to avoid long timeouts with CONFIG_FW_LOADER_USER_HELPER=y
#SUBSYSTEM=="firmware", ACTION=="add", ATTR{loading}="-1"
SUBSYSTEM=="firmware", ACTION=="add", RUN+="/bin/sh /usr/bin/firmware.sh"

iqi@imx8mqevk:~$ cat /usr/bin/firmware.sh
#!/bin/sh
#echo 1 > /sys/$DEVPATH/loading

#cat $HOTPLUG_FW_DIR > > /sysfs/$DEVPATH/data

#echo 0 > /sys/$DEVPATH/loading

echo -n 1 > /sys/$DEVPATH/loading

sleep 1

cat /lib/firmware/$FIRMWARE > /sys/$DEVPATH/data

if ; then
echo -n 1 > /sys/$DEVPATH/loading

echo -n 0 > /sys/$DEVPATH/loading

fi

还是会出现那个问题

iqi@imx8mqevk:~$ dmesg | grep sdma
[ 0.370062] imx-sdma 30bd0000.sdma: no iram assigned, using external mem
[ 0.372372] imx-sdma 30bd0000.sdma: Falling back to user helper
[ 0.375795] imx-sdma 302c0000.sdma: no iram assigned, using external mem
[ 60.385189] imx-sdma 302c0000.sdma: external firmware not found, using ROM firmware
[ 60.385479] imx-sdma 30bd0000.sdma: external firmware not found, using ROM firmware

请问您是怎么调试的呢?(我不确定是否是我的firmware.sh文件是否配置的有问题,脚本文件中的环境变量是否还需要单独配置)

请帮忙指点一下,感谢!!!

100%が役に立ったと言っています (1/1)
バージョン履歴
最終更新日:
‎07-19-2019 12:09 AM
更新者: