Webos build error raspberry4

Hi,
I have tried to build according to tutorial in bring-up guide.
But, I encountered compile error for qtbase as following.
Can any one help to fix this error?

| ninja: build stopped: subcommand failed.

| WARNING: exit code 1 from a shell command.

| ERROR: Execution of '/home/ssr/build-webos/BUILD/work/x86_64-linux/qtbase-native/6.3.0-r0/temp/run.do_compile.21004' failed with exit code 1

ERROR: Task (virtual:native:/home/ssr/build-webos/meta-qt6/recipes-qt/qt6/qtbase_git.bb:do_compile) failed with exit code '1'

NOTE: Tasks Summary: Attempted 1348 tasks of which 0 didn't need to be rerun and 1 failed.

NOTE: Writing buildhistory

NOTE: Writing buildhistory took: 16 seconds

NOTE: Build completion summary:

NOTE: do_populate_sysroot: 0.0% sstate reuse(0 setscene, 157 scratch)

NOTE: do_package: 0.0% sstate reuse(0 setscene, 4 scratch)

NOTE: do_packagedata: 0.0% sstate reuse(0 setscene, 4 scratch)

Summary: 1 task failed:

virtual:native:/home/ssr/build-webos/meta-qt6/recipes-qt/qt6/qtbase_git.bb:do_compile

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Makefile:42: recipe for target 'webos-image' failed

make: *** [webos-image] Error 1

Thanks

This doesn't show the error, share /home/ssr/build-webos/BUILD/work/x86_64-linux/qtbase-native/6.3.0-r0/temp/log.do_compile.21004

Hi @sosalrito , welcome to the forum.

If you meant Jetson Nano guide, please follow the below guide.

We will update the guide in the near future.

In code examples in the following guide, + means adding the line and - means removing that line. (It is silmilar to git diff)

For now, keyboard and mouse won't work. Please use SSH connection.

  1. git clone https://github.com/webosose/build-webos.git

  2. cd build-webos

  3. sudo scripts/prerequisites.sh

  4. Add the following command to weboslayers.py (in described in the guide)

    ('meta-tegra',               30, 'https://github.com/OE4T/meta-tegra.git', 'branch=dunfell-l4t-r32.6.1', ''), 
    
  5. ./mcf jetson-nano-devkit

  6. Add the followings to build-webos/meta-webosose/meta-webos/conf/layer.conf

    # === build-webos/meta-webosose/meta-webos/conf/layer.conf === ## Add meta-tegra layer information.
    # IMAGE_CLASSES and IMAGE_FSTYPES is used to flash the target device.
    IMAGE_CLASSES += "image_types_tegra"
    IMAGE_FSTYPES = "tegraflash tar.gz.bz2"
    IMAGE_TYPES += "tegraflash"
     
    # The default value for IMAGE_NAME_SUFFIX occurs an error when you build webOS OSE with u-boot.
    # To avoid this error, set IMAGE_NAME_SUFFIX as blank.
    IMAGE_NAME_SUFFIX = ""
     
    # Disable SOTA (Software-Over-the-Air) features.
    # SOTA features are not supported in NVIDIA devices.
    INHERIT_remove = "sota"
    DISTRO_FEATURES_remove = "sota usrmerge"
    DISTRO_FEATURES_NATIVE_remove = "sota"
     
    # Set rootfs for Jetson Nano.
    # mmcblk0p1 is root in Jetson Nano development module for MicroSD card.
    KERNEL_ROOTSPEC = "root=/dev/mmcblk0p1 rw rootwait"
      
    # Fix bash runtime dependency with respect to WEBOS_PREFERRED_PROVIDER_FOR_BASH
    VIRTUAL-RUNTIME_bash ?= "bash"
    RDEPENDS_tegra-nvs-base_append_class-target = " ${VIRTUAL-RUNTIME_bash}"
    RDEPENDS_tegra-nvs-base_remove_class-target = "${@oe.utils.conditional('WEBOS_PREFERRED_PROVIDER_FOR_BASH', 'busybox', 'bash', '', d)}"
    RDEPENDS_tegra-nvphs-base_append_class-target = " ${VIRTUAL-RUNTIME_bash}"
    RDEPENDS_tegra-nvphs-base_remove_class-target = "${@oe.utils.conditional('WEBOS_PREFERRED_PROVIDER_FOR_BASH', 'busybox', 'bash', '', d)}"
    RDEPENDS_tegra-configs-nvstartup_append_class-target = " ${VIRTUAL-RUNTIME_bash}"
    RDEPENDS_tegra-configs-nvstartup_remove_class-target = "${@oe.utils.conditional('WEBOS_PREFERRED_PROVIDER_FOR_BASH', 'busybox', 'bash', '', d)}"
      
    # Disable com.webos.app.volume, com.webos.app.notification, and g-media-pipeline
    # These applications are not guaranteed to work properly on NVIDIA devices.
    VIRTUAL-RUNTIME_com.webos.app.notification = ""
    VIRTUAL-RUNTIME_com.webos.app.volume = ""
    VIRTUAL-RUNTIME_g-media-pipeline = ""
    
  7. Add LICENSE to build-webos/meta-tegra/recipes-bsp/u-boot/u-boot-tegra_2020.04.bb

    # === build-webos/meta-tegra/recipes-bsp/u-boot/u-boot-tegra_2020.04.bb === #
    DEPENDS += "bc-native dtc-native ${SOC_FAMILY}-flashtools-native"
    +LICENSE = "CLOSED"
    SRC_REPO ?= "github.com/OE4T/u-boot-tegra.git;protocol=https"
    SRC_URI = "git://${SRC_REPO};branch=${SRCBRANCH}"
    
  8. Remove PACKAGES =+ "${PN}-extlinux" to build-webos/meta-webosose/meta-tegra/recipes-bsp/u-boot/u-boot-tegra_2020.04.bb

    # === build-webos/meta-webosose/meta-webos/conf/layer.conf === ## Add meta-tegra layer information.
    require u-boot-tegra-bootimg.inc
     
    -PACKAGES =+ "${PN}-extlinux"
    +#PACKAGES =+ "${PN}-extlinux"
    FILES_${PN}-extlinux = "/boot/extlinux /boot/initrd"
    ALLOW_EMPTY_${PN}-extlinux = "1"
    RPROVIDES_${PN}-extlinux += "u-boot-extlinux"
    
  9. In meta-webosose/meta-webos/recipes-qt/qt6/qtbase_git.bbappend

    (build-webos/meta-webosose/meta-webos/recipes-qt/qt6) $ vi qtbase_git.bbappend
     
    # ==== build-webos/meta-webosose/meta-webos/recipes-qt/qt6/qtbase_git.bbappend ==== #
    PACKAGECONFIG[sessionmanager] = "-DFEATURE_sessionmanager=ON,-DFEATURE_sessionmanager=OFF"
    PACKAGECONFIG:remove = "sessionmanager"
     
    PACKAGECONFIG[xlib] = "-DFEATURE_xlib=ON,-DFEATURE_xlib=OFF"
    PACKAGECONFIG:remove = "xlib"
     
    PACKAGECONFIG[eglfs-egldevice] = "-DFEATURE_eglfs_egldevice=ON,-DFEATURE_eglfs_egldevice=OFF"
    -PACKAGECONFIG:remove = "eglfs-egldevice"
     
     
    PACKAGECONFIG[system-sqlite] = "-DFEATURE_system_sqlite=ON,-DFEATURE_system_sqlite=OFF"
    PACKAGECONFIG:append = " system-sqlite"
     
    PACKAGECONFIG[system-pcre2] = "-DFEATURE_system_pcre2=ON,-DFEATU
  1. Create a folder

    (build-webos/meta-tegra) $ mkdir -p recipes-qt/qt6

  2. cherry-pick the following two commits and move files in meta-tegra/external/qt5-layer/recipes-qt/qt5 to meta-tegra/recipes-qt/qt6. And remove the qt5 folder.

        git cherry-pick 47b14268ef9aaccf57604e1665612faa239c2223
        git cherry-pick f30f4cf1e9edc2eb47b76dfa07cd1be8947a98df
      
    
    (build-webos/meta-tegra) $ mv ./external/qt5-layer/recipes-qt/qt5/* ./recipes-qt/qt6
    ```
    

    Result

    (build-webos/meta-tegra) $ tree ./recipes-qt
    ./recipes-qt
    └── qt6
        ├── qtbase
        │   ├── 0001-eglfs-Newer-Nvidia-libdrm-provide-device-instead-dri.patch
        │   └── 0002-eglfs-add-a-default-framebuffer-to-NVIDIA-eglstreams.patch
        └── qtbase_%.bbappend
    

    Remove the qt5 folder

    (build-webos/meta-tegra) $ rm -rf ./external/qt5-layer
    
  3. Add PACKAGECONFIG:append:tegra = " gbm eglfs-egldevice" and DISTRO_FEATURES:remove = "ptest" to meta-tegra/recipes-qt/qt6/qtbase_%.bbappend

  FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
   
  SRC_URI += "file://0001-eglfs-Newer-Nvidia-libdrm-provide-device-instead-dri.patch \
              file://0002-eglfs-add-a-default-framebuffer-to-NVIDIA-eglstreams.patch \
  "
   
  PACKAGECONFIG:append:tegra = " kms"
  +PACKAGECONFIG:append:tegra = " gbm eglfs-egldevice"
  +DISTRO_FEATURES:remove = "ptest"
  1. Create the following files and add DISTRO_FEATURES:remove = "ptest" to each file.
meta-tegra/recipes-qt/qt6/qtdeclarative_%.bbappend
meta-tegra/recipes-qt/qt6/qtgraphicaleffects_%.bbappend
meta-tegra/recipes-qt/qt6/qtshadertools_%.bbappend
meta-tegra/recipes-qt/qt6/qtwayland_%.bbappend

Result

meta-tegra/recipes-qt/qt6/
├── qtbase
│ ├── 0001-eglfs-Newer-Nvidia-libdrm-provide-device-instead-dri.patch
│ └── 0002-eglfs-add-a-default-framebuffer-to-NVIDIA-eglstreams.patch
├── qtbase_%.bbappend
├── qtdeclarative_%.bbappend
├── qtgraphicaleffects_%.bbappend
├── qtshadertools_%.bbappend
└── qtwayland_%.bbappend
  1. (build-webos) $ source ./oe-init-build-env

  2. (build-webos) $ bitbake webos-image

  3. If the build succeeds, BUILD/deploy/images/jetson-nano-devkit/webos-image-jetson-nano-devkit.tegraflash.tar.gz file will be generated. extract the file.

$ mkdir webos-image-jetson-nano-devkit
$ tar -zxvf ./webos-image-jetson-nano-devkit.tegraflash.tar.gz -C ./webos-image-jetson-nano-devkit
  1. run dosdcard.sh. webos-image.sdcard will be generated.
(webos-image-jetson-nano-devkit) $ ./dosdcard.sh
  1. Plug in your microSD card to your computer and write webos-image.sdcard to your microSD card.

Please replace [X] before execute the command. See Flashing the Image to find your own [X].

(webos-image-jetson-nano-devkit) $ sudo dd if=./webos-image.sdcard of=/dev/sd[X] bs=10M && sync
  1. Set up network. Use router (recommended) or serial connection (see Establishing a Serial Connection)

  2. Access to the Jetson Nano device and modify /etc/surface-manager.d/product.env file

# Platform plugin to be used
export WEBOS_COMPOSITOR_PLATFORM="eglfs_webos"
- export QT_QPA_EGLFS_INTEGRATION="eglfs_kms_webos"
+ export QT_QPA_EGLFS_INTEGRATION="eglfs_kms_egldevice"
 
# Disable to set the WEBOS_COMPOSITOR_DISPLAY_CONFIG value. Get the value from configd.                   
- WEBOS_COMPOSITOR_DISPLAY_CONFIG=$(luna-send -n 1 -a com.webos.surfacemanager luna://com.webos.service.config/getConfigs '{"configNames":["com.webos.surfacemanager.displayConfig"]}' | grep -oE "\[\{.*\}\]
+ #WEBOS_COMPOSITOR_DISPLAY_CONFIG=$(luna-send -n 1 -a com.webos.surfacemanager luna://com.webos.service.config/getConfigs '{"configNames":["com.webos.surfacemanager.displayConfig"]}' | grep -oE "\[\{.*\}\]

Then restart surface manager

$ root@jetson-nano-devkit:~# restart surface-manager
restart surface-manager
$ root@jetson-nano-devkit:~# restart bootd
restart bootd