One advantage of using a virtual machine is that you can allocate a separate virtual disk file and mount it on the Linux system, and save the /home directory, installed software, SDK, and self-written code separately to this virtual disk file. This way, it will not be mixed with the original Linux system and other software, making it easier to manage and migrate.
(Follow-up: downgrade from Ubuntu-22.04.1 to Ubuntu-18.04.6 to experience this convenience.)
Compilation was performed according to the document compilation process. During the compilation, insufficient disk space occurred, and finally the disk expansion function of VMware was used to solve the problem.
DISTRO=fsl-imx-xwayland MACHINE=myd-jx8mma7 source myir-setup-release.sh -b build-xwayland
bitbake -c populate_sdk myir-image-core
ERROR: OE-core's config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:
Fetcher failure for URL: 'https://www.example.com/'. URL https://www.example.com/ doesn't work.
Please ensure your host's network is configured correctly.
If your ISP or network is blocking the above URL,
try with another domain name, for example by setting:
CONNECTIVITY_CHECK_URIS = "https://www.yoctoproject.org/" You could also set BB_NO_NETWORK = "1" to disable network
access if all required sources are on local disk.
bitbake -c populate_sdk myir-image-core
NOTE: Your conf/bblayers.conf has been automatically updated.
WARNING: Host distribution "ubuntu-22.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Ignore for now
2.2.3. Incompatibility with Windows shared file systems
The downloads directory is unzipped to a data disk (NTFS file system format) under Windows, and then in the Ubuntu system, a symbolic link "downloads" is created in the myd-jx8mma7-yocto/directory to point to the downloads directory under Windows (through the shared directory mechanism of the virtual machine). As a result, the following error is found:
fatal: detected dubious ownership in repository at '/mnt/hgfs/Repo0/Downloads/Yocto-download-5.10/downloads/git2/git.savannah.gnu.org.config.git'
To add an exception for this directory, call:
git config --global --add safe.directory /mnt/hgfs/Repo0/Downloads/Yocto-download-5.10/downloads/git2/git.savannah.gnu.org.config.git
Solution:
Re-extract to the Linux file system.
2.2.4. Incompatible Python versions lead to script errors
ImportError: cannot import name ‘Mapping’ from ‘collections’ (D:Program FilesPythonlibcollections__init__.py)
Cannot import name 'mapping' from 'collections' because Python 3.10 and later versions have adjusted the requests library, and methods Mapping and MutableMapping cannot be called directly in collections.
The solution is to find the __init__.py file that references the collections module and adjust the import from abc:
There are too many files affected to modify them one by one. Install Python-3.9
configure: error: raw selected, but required raw.h header file not available
| NOTE: The following config.log files may provide further information.
| NOTE: /MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-xwayland/tmp/work/x86_64-linux/util-linux-native/2.36.2-r0/build/config.log
| ERROR: configure failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-xwayland/tmp/work/x86_64-linux/util-linux-native/2.36.2-r0/temp/run.do_configure.565950' failed with exit code 1
I don't want to mess with Ubuntu-22.04.1 anymore, so I'll just follow the documentation and proceed step by step.
2.3. Compile Yocto on Ubuntu-22.04.1
After installing Ubuntu-18.04.6, basically everything went smoothly and peacefully. . . .
DISTRO=fsl-imx-xwayland MACHINE=myd-jx8mma7 source myir-setup-release.sh -b build-vdisk1
You can now run 'bitbake <target>'
Common targets are:
core-image-minimal
meta-toolchain
meta-toolchain-sdk
adt-installer
meta-ide-support
After setup, the files in the build directory are as follows:
| Resolving deltas: 100% (2496/2496), done.
| Note: checking out 'e6c1b8dc8a8b00ee74e7268aac8b18d7260ab1ce'.
|
| You are in 'detached HEAD' state. You can look around, make experimental
| changes and commit them, and you can discard any commits you make in this
| state without impacting any branches by performing another checkout.
|
| If you want to create a new branch to retain commits you create, you may
| do so (now or later) by using -b with the checkout command again. Example:
|
| git checkout -b <new-branch-name>
|
| HEAD is now at e6c1b8d Fix the bazel build by dropping a xtensa-specific select entry.
| Submodule 'cpuinfo' (https://github.com/pytorch/cpuinfo) registered for path 'third_party/cpuinfo'
| Submodule 'googletest' (https://github.com/google/googletest) registered for path 'third_party/googletest'
| Cloning into '/mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/build/ruy/third_party/cpuinfo'...
| fatal: unable to access 'https://github.com/pytorch/cpuinfo/': gnutls_handshake() failed: Error in the pull function.
| fatal: clone of 'https://github.com/pytorch/cpuinfo' into submodule path '/mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/build/ruy/third_party/cpuinfo' failed
| Failed to clone 'third_party/cpuinfo'. Retry scheduled
| Cloning into '/mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/build/ruy/third_party/googletest'...
| fatal: unable to access 'https://github.com/google/googletest/': Failed to connect to github.com port 443: Connection refused
| fatal: clone of 'https://github.com/google/googletest' into submodule path '/mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/build/ruy/third_party/googletest' failed
| Failed to clone 'third_party/googletest'. Retry scheduled
| Cloning into '/mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/build/ruy/third_party/cpuinfo'...
| fatal: unable to access 'https://github.com/pytorch/cpuinfo/': Failed to connect to github.com port 443: Connection refused
| fatal: clone of 'https://github.com/pytorch/cpuinfo' into submodule path '/mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/build/ruy/third_party/cpuinfo' failed
| Failed to clone 'third_party/cpuinfo' a second time, aborting
| CMake Error at _deps/ruy-subbuild/ruy-populate-prefix/tmp/ruy-populate-gitclone.cmake:52 (message):
| Failed to update submodules in:
| '/mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/build/ruy'
|
|
| FAILED: ruy-populate-prefix/src/ruy-populate-stamp/ruy-populate-download
| cd /mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/build && /mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/recipe-sysroot-native/usr/bin/cmake -P /mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/build/_deps/ruy-subbuild/ruy-populate-prefix/tmp/ruy-populate-gitclone.cmake && /mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/recipe-sysroot-native/usr/bin/cmake -E touch /mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/build/_deps/ruy-subbuild/ruy-populate-prefix/src/ruy-populate-stamp/ruy-populate-download
| ninja: build stopped: subcommand failed.
|
| CMake Error at /mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/recipe-sysroot-native/usr/share/cmake-3.19/Modules/FetchContent.cmake:989 (message):
| Build step for ruy failed: 1
| Call Stack (most recent call first):
| /mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/recipe-sysroot-native/usr/share/cmake-3.19/Modules/FetchContent.cmake:1118:EVAL:2 (__FetchContent_directPopulate)
| /mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/recipe-sysroot-native/usr/share/cmake-3.19/Modules/FetchContent.cmake:1118 (cmake_language)
| tools/cmake/modules/OverridableFetchContent.cmake:531 (FetchContent_Populate)
| tools/cmake/modules/ruy.cmake:32 (OverridableFetchContent_Populate)
| tools/cmake/modules/Findruy.cmake:16 (include)
| CMakeLists.txt:155 (find_package)
|
|
| -- Configuring incomplete, errors occurred!
| See also "/mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/build/CMakeFiles/CMakeOutput.log".
| See also "/mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/build/CMakeFiles/CMakeError.log".
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/build-vdisk2/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.6.0-r0/temp/run.do_configure.6307' failed with exit code 1
ERROR: Task (/mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/sources/meta-myir/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite_2.6.0.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6430 tasks of which 0 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/mnt/MYD-JX8MMA7/yocto/myd-jx8mma7-yocto/sources/meta-myir/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite_2.6.0.bb:do_configure
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Cause Analysis:
During the build process, git was updated but failed due to network problems.
Solution: (TODO)
It's troublesome to climb over the wall and put up a ladder.
Disable network updates and just use locally downloaded code.