Yocto MACHINE ?= "qemuarm" and angstrom-lxde-image BSP V2.8

Dear,

I’m starting to use Yocto project. I was able to build the angstrom-lxde-image BSP V2.8 using the MACHINE ?= “colibri-imx6ull”, I need to use this version because of legacy project. However, I faced some error when I tried to build the angstrom-lxde-image but with the MACHINE ?= “qemuarm”. I would like to use the qemuarm to speed up some rootfs optimizations test that I’ll do.

Following the output console:

imx6ull@63abc27b8b7a:~/oe-core/build_qemuarm$ bitbake -k angstrom-lxde-image
Loading cache: 100% |################################################################################################################################################| Time: 0:00:01
Loaded 3900 entries from dependency cache.
WARNING: No recipes available for:
  /home/imx6ull/oe-core/build_qemuarm/../layers/meta-freescale/dynamic-layers/browser-layer/recipes-browser/chromium/chromium-wayland_48.0.2548.0.bbappend
  /home/imx6ull/oe-core/build_qemuarm/../layers/meta-freescale/dynamic-layers/browser-layer/recipes-browser/chromium/chromium_52.0.2743.76.bbappend
  /home/imx6ull/oe-core/build_qemuarm/../layers/meta-toradex-tegra/recipes-graphics/wayland/weston_1.%.bbappend
  /home/imx6ull/oe-core/build_qemuarm/../layers/meta-toradex-tegra/jetson-tk1/recipes-graphics/xorg-xserver/xserver-xorg_1.17.2.bbappend
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.36.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-16.04"
TARGET_SYS           = "arm-angstrom-linux-gnueabi"
MACHINE              = "qemuarm"
DISTRO               = "angstrom"
DISTRO_VERSION       = "v2017.12"
TUNE_FEATURES        = "arm armv5 thumb dsp"
TARGET_FPU           = "soft"
meta-angstrom        = "HEAD:4318892e08ea9102d29bdd92af83539bea985e4b"
meta-toradex-nxp     = "HEAD:b3774974bcb4697a8cda6903e943df00f25f95e6"
meta-freescale       = "HEAD:1d40ea34fc2c06af79fc59f6ea54f2e9335d61d6"
meta-freescale-3rdparty = "HEAD:9056f60d81abacc2d8ee0f83ef0f70dfeedc76c7"
meta-toradex-tegra   = "HEAD:16b6bd18785a7cc8d9024a071d3fbc968ff63e83"
meta-jetson-tk1      = "HEAD:b430756e711b6b29381c8467185f475f5a505f96"
meta-toradex-bsp-common = "HEAD:469a620c239f200f374468d15f538fda777ea041"
meta-oe              
meta-filesystems     
meta-gnome           
meta-xfce            
meta-initramfs       
meta-networking      
meta-multimedia      
meta-python          = "HEAD:eae996301d9c097bcbeb8046f08041dc82bb62f8"
meta-lxde            = "HEAD:f436137fcc4ac700dc5c1b5e31e5b3c27568fc3e"
meta-browser         = "HEAD:75640e14e325479c076b6272b646be7a239c18aa"
meta-qt4             = "HEAD:e290738759ef3f39c9e079eaa9b606a62107e5ba"
meta-qt5             = "HEAD:180edd66444db330301f22266cac7d588fd48c6a"
meta-qt5-extra       = "HEAD:c16ba209a93c3e55f5aef07fbb1d584e228765b3"
meta-freescale-distro = "HEAD:51756d1c2058139c8a21f89b86cfd8007b71b7f0"
meta-toradex-demos   = "HEAD:c73893a3377ebb557b0fb41f75b26dff40da4442"
meta                 = "HEAD:3638cb32ba9ba32b4d498fc31ab7fdf82f0d2495"

Initialising tasks: 100% |###########################################################################################################################################| Time: 0:00:20
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: backports-5.4-r0 do_compile: oe_runmake failed
ERROR: backports-5.4-r0 do_compile: Function failed: do_compile (log file is located at /home/imx6ull/oe-core/build_qemuarm/tmp-glibc/work/qemuarm-angstrom-linux-gnueabi/backports/5.4-r0/temp/log.do_compile.4112)
ERROR: Logfile of failure stored in: /home/imx6ull/oe-core/build_qemuarm/tmp-glibc/work/qemuarm-angstrom-linux-gnueabi/backports/5.4-r0/temp/log.do_compile.4112
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 8 KLIB_BUILD=/home/imx6ull/oe-core/build_qemuarm/tmp-glibc/work-shared/qemuarm/kernel-build-artifacts KLIB=/home/imx6ull/oe-core/build_qemuarm/tmp-glibc/work-shared/qemuarm/kernel-source
| make[4]: *** No rule to make target 'modules'.  Stop.
| Makefile.build:13: recipe for target 'modules' failed
| make[3]: *** [modules] Error 2
| Makefile.real:88: recipe for target 'modules' failed
| make[2]: *** [modules] Error 2
| Makefile:40: recipe for target 'modules' failed
| make[1]: *** [modules] Error 2
| Makefile:30: recipe for target 'default' failed
| make: *** [default] Error 2
| ERROR: oe_runmake failed
| WARNING: /home/imx6ull/oe-core/build_qemuarm/tmp-glibc/work/qemuarm-angstrom-linux-gnueabi/backports/5.4-r0/temp/run.do_compile.4112:1 exit 1 from 'exit 1'
| ERROR: Function failed: do_compile (log file is located at /home/imx6ull/oe-core/build_qemuarm/tmp-glibc/work/qemuarm-angstrom-linux-gnueabi/backports/5.4-r0/temp/log.do_compile.4112)
ERROR: Task (/home/imx6ull/oe-core/build_qemuarm/../layers/meta-toradex-bsp-common/recipes-kernel/backports/backports_5.4.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 7508 tasks of which 7507 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory

Summary: 1 task failed:
  /home/imx6ull/oe-core/build_qemuarm/../layers/meta-toradex-bsp-common/recipes-kernel/backports/backports_5.4.bb:do_compile
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

As suggested on this post I removed the ${BACKPORTS_WIFI} from tdx-extra.inc file. This solved my build problem. However, when I start the QEMU emulator, the mouser pointer does not movement and does not accept the click also. I use the QEMU commands below:

qemu-system-arm -device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:02 \
                -netdev tap,id=net0,ifname=tap0,script=no,downscript=no \
                -device virtio-rng-pci \
                -drive file=build_qemuarm/deploy/images/qemuarm/qemuarm_LXDE-Image.rootfs.ext4,if=virtio,format=raw \
                -usb -device usb-mouse -device usb-tablet -device usb-kbd \
                -machine versatilepb  -m 256 -serial mon:vc -serial null \
                -kernel build_qemuarm/deploy/images/qemuarm/zImage \
                -append 'root=/dev/vda rw highres=off  mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 console=ttyAMA0,115200 console=tty ' \
                -dtb build_qemuarm/deploy/images/qemuarm/zImage-versatile-pb.dtb \
                -display default,show-cursor=on \

Thanks for helping!

Hi @CharlesDias ,

Can you please check if using just the parameter -show-cursor as displayed on this question solves your issue?

Best regards,
Daniel Morais

Hi @daniel_m.tx,

This is the new configuration that I’m using.

 qemu-system-arm \
    -device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:02 \
    -netdev tap,id=net0,ifname=tap0,script=no,downscript=no \
    -drive file=build_qemuarm/deploy/images/qemuarm/qemuarm_LXDE-Image.rootfs.ext4,if=virtio,format=raw \
    -show-cursor -usb -device usb-tablet -device virtio-rng-pci -machine versatilepb  -m 256 -serial mon:vc -serial null \
    -kernel build_qemuarm/deploy/images/qemuarm/zImage \
    -append 'root=/dev/vda rw highres=off  mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 console=ttyAMA0,115200 console=tty ' \
    -dtb build_qemuarm/deploy/images/qemuarm/zImage-versatile-pb.dtb

I added the -show-cursor but keep the same problem as before. The mouse cursor is shown in the middle of the screen and when I move my mouse on the host machine, the mouse on the QEMU does not move. You can see the video in this link. I’m build and run from a Virtual Machine with Ubuntu 16.04 LTS.

I did other test. I clone the Poky project from branch rocko. I built the core-image-sato and ran on QEMU with the same parameters used to angstrom-lxde-image. In the core-image-sato the mouse worked.

Thanks for any other sugestions!

Hi @CharlesDias ,

Thanks for the test.

Could you please do another test removing the parameters -usb -device usb-tablet?

Meanwhile, I will build the BSP 2.8 and verify if I can simulate the issue.

Best regards,
Daniel Morais

Hi @daniel_m.tx,

I tested without the -usb -device usb-tablet but the problem is the same.

thanks for your help!

Hi @CharlesDias ,

Thanks for the test.

I will have to simulate the issue on my side and then try to find a solution. I will keep you updated.

Best regards,
Daniel Morais

1 Like

Hi @CharlesDias ,

I was able to simulate the issue on my side but wasn’t able to find a solution yet.

I found this question that might help, can you please try it on your side? Also, the BSP 2.8 is a bit old and we recommend using newer versions for new projects, can you please try BSP 5 or BSP 6 and check if it solves your issue?

Best regards,
Daniel Morais

Hi @daniel_m.tx,

I passed through a USB device to QEMU, but it doesn’t work! I’ll try to test with new BSP version.

Thanks for help!