This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM62X: Build the rootfs with x11 feature using yocto

Part Number: PROCESSOR-SDK-AM62X

Hello, greeting at first.

Could someone please help me with this problem about failed building the rootfs image with x11 feature by yocto. The board i develop on is AM6254-EVM.

Here is the situation, I reference the official development document through this link https://software-dl.ti.com/processor-sdk-linux-rt/esd/AM62X/08_03_00_19/exports/docs/linux/Overview_Building_the_SDK.html

And firstly, I can successfully build the rootfs image with the configiure file named "processor-sdk-08.04.01.04-config.txt", then i try to add the meta-java layer to support java based on that, and it succeeded as well, but when i was going to run a graphic java package, it prompted below information:

root@am62xx-evm:~# ls
JTattooDemo.jar log.txt 
root@am62xx-evm:~# java -jar JTattooDemo.jar 
Exception in thread "main" java.awt.AWTError: Toolkit not found: sun.awt.X11.XToolkit
at java.awt.Toolkit$2.run(Unknown Source)
at java.awt.Toolkit$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Unknown Source)
at javax.swing.UIManager.getSystemLookAndFeelClassName(Unknown Source) 
at com.jtattoo.demo.app.GUIProperties.<clinit>(GUIProperties.java:23)
at com.jtattoo.demo.app.JTattooDemo.<clinit>(JTattooDemo.java:25)

It probably means this distro don't support x11 server, I guess, and could you please help me confirm this. the jdk package i built is openjdk-8, the java version see below:

root@am62xx-evm:~# java -version
openjdk version "1.8.0_272-internal"
OpenJDK Runtime Environment (build 1.8.0_272-internal-ga)
OpenJDK 64-Bit Server VM (build 25.272-bga, mixed mode)

Assumed that i was right, I try to build the distro that support x11 according to the guide described in the URL mentioned before , it says :

X11 Build instructions

X11 has been validated as a build option, on top of Processor SDK 4.1 release. In order to build with X11 instead of Wayland, please use the configuration processor-sdk-04.01.00.06-x11-config.txt for oe-layer-setup. One of the key differences between this configuration file and the processor-sdk-04.01.00.06 config file is the branch from meta-processor-sdk. For X11 build, morty-x11-experimental branch is used, where the DISTRO_CONFIG is set to X11 instead of wayland.

Then i try to build the image using this configure file (processor-sdk-04.01.00.06-x11-config.txt), and i encountered the biggest problem :

jenkins@a4b0aa5c0cec:~/build/qiaoli/ti/build$ MACHINE=am62xx-evm bitbake tisdk-default-image

ERROR: No valid toolchain in PATH
ERROR: Unable to parse /home/jenkins/build/qiaoli/ti/sources/bitbake/lib/bb/data_smart.py
Traceback (most recent call last):
File "/home/jenkins/build/qiaoli/ti/sources/bitbake/lib/bb/data_smart.py", line 400, in DataSmart.expandWithRefs(s="${@bool(d.getVar('TOOLCHAIN_SYSPATH', d, 1)) and (os.path.exists(d.getVar('TOOLCHAIN_SYSPATH', d, 1)) and os.path.dirname(d.getVar('TOOLCHAIN_SYSPATH', d, 1)) or bb.fatal('No valid toolchain in PATH')) or ''}", varname='TOOLCHAIN_PATH[:=]'):
except Exception as exc:
> raise ExpansionError(varname, s, exc) from exc

bb.data_smart.ExpansionError: Failure expanding variable TOOLCHAIN_PATH[:=], expression was ${@bool(d.getVar('TOOLCHAIN_SYSPATH', d, 1)) and (os.path.exists(d.getVar('TOOLCHAIN_SYSPATH', d, 1)) and os.path.dirname(d.getVar('TOOLCHAIN_SYSPATH', d, 1)) or bb.fatal('No valid toolchain in PATH')) or ''} which triggered exception BBHandledException:

I also have tried to add the corresponding variables to building environment in many ways but that didn't work.

Could you help me figure out what causes this, And the most important thing is I want to successfully run the graphic java programs on  linux rootfs with x11 severs installed.(As i googled, graphic java package seems can't run on the wayland environment so far, is that true?)

So i  sincerely hope someone can help me solve this problems. Look forward to your reply as soon as possible.

Best reagrds.