iMX8QXP Ubuntu Installation From Bootable USB

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

iMX8QXP Ubuntu Installation From Bootable USB

1,790 次查看
mlfnd
Contributor I

I am trying to install Ubuntu from a bootable USB drive on my imx8qxp 2G. I downloaded the ISO from here, created a bootable USB drive using rufus (once with GPT and once with MBR), plugged the USB drive into my 3900 dev board, powered on the board and got into uboot console.

 

In uboot console I did the following:

usb start

But for some reason the USB storage was not found. I tried both USB2 and USB3:

=> usb start
starting USB...
USB0: USB EHCI 1.00
USB1: XHCI-imx8 init hccr 0x000000005b130000 and hcor 0x000000005b130080 hc_length 128
Register 2000820 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found

 

So I created a bootable SD card instead, plugged it into the dev board, flipped the boot selector switch to boot from SD card and powered on. But nothing happened. Nothing appeared on serial or on HDMI.

 

So I booted into uboot again and ran mmc list and I saw the SD card in the list. The bootable SD card contains a vmlinuz, and an initrd. The problem though is that this version of uboot does not support booting a vmlinuz image. So I uncompressed the vmlinuz manually using this script and I got a vmlinux. Then I did this:

 

=> fatload mmc 1:1 ${loadaddr} casper/vmlinux
55259528 bytes read in 2349 ms (22.4 MiB/s)
=> fatload mmc 1:1 ${initrd_addr} casper/initrd
136064029 bytes read in 5737 ms (22.6 MiB/s)

=> bootm ${loadaddr} ${initrd_addr}
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=> booti ${loadaddr} ${initrd_addr}
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid

so it seems that uboot does not support booting these formats. So I thought I could boot into GRUB and then boot from there. GRUB exists on the SD card as an efi image, but the problem is that this version of uboot does not support the bootefi command. Which means I'd have to build grub from source and so I did.

 

On the host I did the following:

wget https://ftp.gnu.org/gnu/grub/grub-2.06.tar.gz

tar -xzvf grub-2.06.tar.gz

cd grub-2.06

./configure --target=arm-none-eabi --with-platform=efi

Note: I used arm-none-eabi instead of aarch64 because if I use aarch64 I can't make an arm-uboot image in ../grub-mkstandalone because it would tell me invalid ELF header. So I assumed using arm would still work because it is backwards compatible.

make

cd grub-core

../grub-mkstandalone -d . -o grub.img -O arm-uboot "boot/grub/grub.cfg=grub.cfg"

And then

file grub.img

grub.img: u-boot legacy uImage, , Linux/ARM, (Not compressed), 6320904 bytes, Thu Jan 1 00:00:00 2015, Load Address: 00000000, Entry Point: 00000000, Header CRC: 0X69EF4514, Data CRC: 0X33412843

so I did:

mkimage -A arm -C none -a 0X80280000 -e 0X80280000 -d grub.img uImage

and I got:

file uImage: u-boot legacy uImage, , Linux/ARM, Standalone Program (Not compressed), 6320968 bytes, Tue Jul 16 20:19:39 2024, Load Address: 0X80280000, Entry Point: 0X80280000, Header CRC: 0X9F48D575, Data CRC: 0XE0B031A

 

so I loaded that on the SD card, and then

fatload mmc 1:1 ${loadaddr} casper/uImage

=> bootm ${loadaddr}
## Booting kernel from Legacy Image at 80280000 ...
Image Name:
Image Type: ARM Linux Standalone Program (uncompressed)
Data Size: 6320968 Bytes = 6 MiB
Load Address: 80280000
Entry Point: 80280000
Verifying Checksum ... OK
Loading Standalone Program ... OK
"Synchronous Abort" handler, esr 0x96000047
elr: 0000000080021a4c lr : 0000000080021a0c (reloc)
elr: 00000000ffe79a4c lr : 00000000ffe79a0c
x0 : 0000000054410001 x1 : 0000000000000003
x2 : 0000000000000062 x3 : 00000000ffefb8f0
x4 : 0000000000000000 x5 : 00000000fd6be4a0
x6 : 0000000000000021 x7 : 00000000ffeeddc0
x8 : 00000000fd6c0bc0 x9 : 0000000000000008
x10: 00000000fd6be490 x11: 00000000fd684a60
x12: 0000000000000000 x13: 0000000000000200
x14: 000000000000000e x15: 00000000ffffffff
x16: 0000000000002080 x17: 0000000000000000
x18: 00000000fd675d60 x19: 0000000000000000
x20: 00000000fff09000 x21: 0000000000000014
x22: 00000000fff096c0 x23: 0000000000000000
x24: 00000000ffefbc48 x25: 0000000080280040
x26: 00000000ffe79b78 x27: 0000000000000000
x28: 0000000080280000 x29: 00000000fd669be0

Resetting CPU ...

resetting ...

 

 

note: I found this and followed it at the beginning but the resulting system was unstable so it did not work for me:

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Build-Ubuntu-For-i-MX8-Series-Platform/t...

 

Any ideas how can I proceed?

0 项奖励
回复
12 回复数

1,705 次查看
mlfnd
Contributor I

@Chavira I did bitbake imx-image-desktop and it got to around 70% and then I got this error:

 

 

| g++: fatal error: Killed signal terminated program cc1plus
| compilation terminated.
| make[1]: *** [tools/v8_gypfiles/v8_compiler.target.mk:261: Release/obj.target/v8_compiler/deps/v8/src/compiler/pipeline.o] Error 1
| make[1]: *** Waiting for unfinished jobs....
| rm e0b35592863f3e13678052aff1ba15e770cbeb2d.intermediate 019276bb7190b449a2c79a0f5d00f14e69738440.intermediate b4dc25cc4513100994804e0ed93a42813c3dd47f.intermediate
| make: *** [Makefile:134: node] Error 2
| ERROR: oe_runmake failed
| WARNING: /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/nodejs-native/18.17.1-r0/temp/run.do_compile.3694163:177 exit 1 from 'exit 1'
| WARNING: Backtrace (BB generated script):
| #1: bbfatal_log, /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/nodejs-native/18.17.1-r0/temp/run.do_compile.3694163, line 177
| #2: die, /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/nodejs-native/18.17.1-r0/temp/run.do_compile.3694163, line 161
| #3: oe_runmake, /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/nodejs-native/18.17.1-r0/temp/run.do_compile.3694163, line 156
| #4: do_compile, /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/nodejs-native/18.17.1-r0/temp/run.do_compile.3694163, line 151
| #5: main, /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/nodejs-native/18.17.1-r0/temp/run.do_compile.3694163, line 190
ERROR: Task (virtual:native:/home/mo/desktop/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_18.17.1.bb:do_compile) failed with exit code '1'

0 项奖励
回复

1,676 次查看
Chavira
NXP TechSupport
NXP TechSupport

Hi @mlfnd!

 

Try to limit the cores used in the compilation.

We recommend to using 4GB of ram per core in local.conf.

 

BB_NUMBER_THREADS = "4"
PARALLEL_MAKE = "-j 4"

 

Best Regards!

Chavira

0 项奖励
回复

1,669 次查看
mlfnd
Contributor I

@Chavira I added that into build-desktop/conf/local.conf and now I got this error:

 

ERROR: compiler-rt-native-15.0.7-r0 do_configure: ExecutionError('/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/temp/run.do_configure.246215', 1, None, None)
ERROR: Logfile of failure stored in: /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/temp/log.do_configure.246215
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/home/mo/desktop/sources/poky/meta/recipes-devtools/cmake/cmake-native_3.25.2.bb:do_populate_sysroot', '/home/mo/desktop/sources/poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot', 'virtual:native:/home/mo/desktop/sources/meta-clang/recipes-devtools/clang/clang_git.bb:do_populate_sysroot', 'virtual:native:/home/mo/desktop/sources/poky/meta/recipes-devtools/ninja/ninja_1.11.1.bb:do_populate_sysroot', 'virtual:native:/home/mo/desktop/sources/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', 'virtual:native:/home/mo/desktop/sources/poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_populate_sysroot', 'virtual:native:/home/mo/desktop/sources/poky/meta/recipes-devtools/python/python3_3.11.5.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: ['quilt-native', 'patch-native']
| NOTE: Skipping as already exists in sysroot: ['cmake-native', 'clang-native', 'ninja-native', 'pkgconfig-native', 'python3-native', 're2c-native', 'libtool-native', 'zlib-native', 'util-linux-libuuid-native', 'readline-native', 'openssl-native', 'libffi-native', 'bzip2-native', 'xz-native', 'ncurses-native', 'libtirpc-native', 'gdbm-native', 'libnsl2-native', 'sqlite3-native', 'attr-native', 'zstd-native', 'swig-native', 'binutils-native', 'libxml2-native', 'libedit-native', 'texinfo-dummy-native', 'gettext-minimal-native', 'perl-native', 'libpcre2-native', 'elfutils-native', 'flex-native', 'gnu-config-native', 'make-native', 'curl-native', 'libmicrohttpd-native', 'libarchive-native', 'm4-native', 'gnutls-native', 'libgcrypt-native', 'nettle-native', 'gmp-native', 'libidn2-native', 'libunistring-native', 'p11-kit-native', 'libgpg-error-native', 'libcap-native', 'libtasn1-native']
| DEBUG: sed -e 's:^[^/]*/:/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/:g' /home/mo/desktop/build-desktop/tmp/sysroots-components/x86_64/quilt-native/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native:g' -e 's:FIXME_PSEUDO_SYSROOT:/home/mo/desktop/build-desktop/tmp/sysroots-components/x86_64/pseudo-native:g' -e 's:FIXME_HOSTTOOLS_DIR:/home/mo/desktop/build-desktop/tmp/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/home/mo/desktop/build-desktop/tmp/pkgdata/imx8qxpc0mek:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/temp/fifo.246215:g'
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_configure
| -- The C compiler identification is Clang 15.0.7
| -- The CXX compiler identification is Clang 15.0.7
| -- The ASM compiler identification is Clang with GNU-like command-line
| -- Found assembler: /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/bin/clang
| -- Detecting C compiler ABI info
| -- Detecting C compiler ABI info - done
| -- Check for working C compiler: /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/bin/clang - skipped
| -- Detecting C compile features
| -- Detecting C compile features - done
| -- Detecting CXX compiler ABI info
| -- Detecting CXX compiler ABI info - failed
| -- Check for working CXX compiler: /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/bin/clang++
| -- Check for working CXX compiler: /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/bin/clang++ - broken
| CMake Error at /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/CMakeTestCXXCompiler.cmake:63 (message):
| The C++ compiler
|
| "/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/bin/clang++"
|
| is not able to compile a simple test program.
|
| It fails with the following output:
|
| Change Dir: /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/build/CMakeFiles/CMakeScratch/TryCompile-SnC3SJ
|
| Run Build Command(s):ninja cmTC_5a24e && [1/2] Building CXX object CMakeFiles/cmTC_5a24e.dir/testCXXCompiler.cxx.o
| [2/2] Linking CXX executable cmTC_5a24e
| FAILED: cmTC_5a24e
| : && /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/bin/clang++ -target x86_64-linux -isystem/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/include -O2 -pipe -stdlib=libstdc++ -target x86_64-linux -isystem/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/include -O2 -pipe -stdlib=libstdc++ -L/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/lib -L/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/lib -Wl,-O1 -unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++ -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/mo/desktop/build-desktop/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 -rtlib=libgcc --unwindlib=libgcc -L/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/lib -L/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/lib -Wl,-O1 -unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++ -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/mo/desktop/build-desktop/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 -rtlib=libgcc --unwindlib=libgcc CMakeFiles/cmTC_5a24e.dir/testCXXCompiler.cxx.o -o cmTC_5a24e && :
| /home/mo/desktop/build-desktop/tmp/hosttools/ld: cannot find -lstdc++: No such file or directory
| clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
| ninja: build stopped: subcommand failed.
|
|
|
|
|
| CMake will not be able to correctly generate this project.
| Call Stack (most recent call first):
| CMakeLists.txt:54 (project)
|
|
| -- Configuring incomplete, errors occurred!
| See also "/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/build/CMakeFiles/CMakeOutput.log".
| See also "/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/build/CMakeFiles/CMakeError.log".
| WARNING: /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/temp/run.do_configure.246215:171 exit 1 from 'cmake -G 'Ninja' -DCMAKE_MAKE_PROGRAM=ninja $oecmake_sitefile /home/mo/desktop/build-desktop/tmp/work-shared/llvm-project-source-15.0.7-r0/git/llvm -DCMAKE_INSTALL_PREFIX:PATH=/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr -DCMAKE_INSTALL_BINDIR:PATH=bin -DCMAKE_INSTALL_SBINDIR:PATH=sbin -DCMAKE_INSTALL_LIBEXECDIR:PATH=libexec -DCMAKE_INSTALL_SYSCONFDIR:PATH=/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/etc -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=../com -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/var -DCMAKE_INSTALL_LIBDIR:PATH=lib -DCMAKE_INSTALL_INCLUDEDIR:PATH=include -DCMAKE_INSTALL_DATAROOTDIR:PATH=share -DPYTHON_EXECUTABLE:PATH=/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/bin/python3-native/python3 -DPython_EXECUTABLE:PATH=/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/bin/python3-native/python3 -DPython3_EXECUTABLE:PATH=/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/recipe-sysroot-native/usr/bin/python3-native/python3 -DLIB_SUFFIX= -DCMAKE_INSTALL_SO_NO_EXE=0 -DCMAKE_TOOLCHAIN_FILE=/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/toolchain.cmake -DCMAKE_NO_SYSTEM_FROM_IMPORTED=1 -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF -DCOMPILER_RT_STANDALONE_BUILD=OFF -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON -DCMAKE_C_COMPILER_TARGET=x86_64-linux -DCOMPILER_RT_BUILD_XRAY=OFF -DCOMPILER_RT_BUILD_SANITIZERS=OFF -DCOMPILER_RT_BUILD_MEMPROF=OFF -DCOMPILER_RT_BUILD_LIBFUZZER=OFF -DLLVM_ENABLE_PROJECTS='compiler-rt' -DLLVM_LIBDIR_SUFFIX= -DCOMPILER_RT_BUILD_CRT:BOOL=OFF -DCOMPILER_RT_BUILD_PROFILE=OFF -Wno-dev'
| WARNING: Backtrace (BB generated script):
| #1: cmake_do_configure, /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/temp/run.do_configure.246215, line 171
| #2: do_configure, /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/temp/run.do_configure.246215, line 150
| #3: main, /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/compiler-rt-native/15.0.7-r0/temp/run.do_configure.246215, line 207
ERROR: Task (virtual:native:/home/mo/desktop/sources/meta-clang/recipes-devtools/clang/compiler-rt_git.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6860 tasks of which 5150 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
virtual:native:/home/mo/desktop/sources/meta-clang/recipes-devtools/clang/compiler-rt_git.bb:do_configure
Summary: There were 23 WARNING messages.
Summary: There was 1 ERROR message, returning a non-zero exit code.

0 项奖励
回复

1,551 次查看
Chavira
NXP TechSupport
NXP TechSupport

Hi @mlfnd!

what is your host machine for the build? did you build it in docker? It worked fine to me on Ubuntu-22.04/Deibian-12 host or build in docker environment. You can change PKG_GROUPS_SECURITY: y to n to temporarily disable these security components in configs/sdk.yml, then run "bld apps".

0 项奖励
回复

1,544 次查看
mlfnd
Contributor I

@Chavira 

 

I am building on ubuntu 22.04 without docker. I looked for configs/sdk.yml and it does not exist anywhere. I am using this release tag https://github.com/nxp-imx/meta-nxp-desktop/tree/rel_lf_6.1.55_2.2.0_ldp

 

Even if I try to build the docker image, I get this error:

DISTRO 'imx-desktop-xwayland' not found. Please set a valid DISTRO in your local.conf

 

here is my env.sh file:

#!/bin/bash
# Here are some default settings.
# Make sure DOCKER_WORKDIR is created and owned by current user.

# Docker

DOCKER_IMAGE_TAG="imx-yocto"
DOCKER_WORKDIR="/home/mo/imx-working-dir"

# Yocto

IMX_RELEASE="imx-6.6.3-1.0.0"

YOCTO_DIR="${DOCKER_WORKDIR}/${IMX_RELEASE}-build"

MACHINE="imx8qxpc0mek"
DISTRO="imx-desktop-xwayland"
IMAGES="imx-image-desktop"

REMOTE="https://github.com/nxp-imx/imx-manifest"
BRANCH="imx-linux-nanbield"
MANIFEST=${IMX_RELEASE}".xml"

 

I believe the problem is that imx-desktop-xwayland does not exist in https://github.com/nxp-imx/imx-manifest

 

 

0 项奖励
回复

1,532 次查看
Chavira
NXP TechSupport
NXP TechSupport

Hi @mlfnd!

To generate the ubuntu image you should do the next command:

bitbake imx-image-desktop

 

Please follow the instructions mentioned in Github.

 

Best Regards!

Chavira

0 项奖励
回复

1,491 次查看
mlfnd
Contributor I

@Chavira 

 

Here is what I'm doing step by step. from https://github.com/nxp-imx/meta-nxp-desktop/tree/rel_lf_6.1.55_2.2.0_ldp :

 

1. I got the repo utility and added it to the path:

PATH=${PATH}:~/bin
mkdir desktop
cd desktop
repo init -u https://github.com/nxp-imx/imx-manifest.git -b imx-linux-mickledore -m imx-6.1.55-2.2.0_desktop.xml

And that gave me the output:

Downloading Repo source from https://gerrit.googlesource.com/git-repo

Your identity is: XXX
If you want to change this, please re-run 'repo init' with --config-name

repo has been initialized in /home/mo/desktop

repo sync

And that gave the output:

Fetching: 100% (16/16), done in 51.981s
Checking out: 100% (16/16), done in 0.809s
repo sync has finished successfully.

DISTRO=imx-desktop-xwayland MACHINE=imx8qxpc0mek source imx-setup-desktop.sh -b build-desktop

and that gave the output:

Build directory is build-desktop

Some BSPs depend on libraries and packages which are covered by NXP's
End User License Agreement (EULA). To have the right to use these binaries in
your images, you need to read and accept the following...

LA_OPT_NXP_Software_License v49 September 2023
IMPORTANT. Read the following NXP Software License Agreement ("Agreement")
completely.....

Do you accept the EULA you just read? (y/n) y
EULA has been accepted.

Welcome to Freescale Community BSP

The Yocto Project has extensive documentation about OE including a
reference manual which can be found at:
http://yoctoproject.org/documentation

For more information about OpenEmbedded see their website:
http://www.openembedded.org/

You can now run 'bitbake <target>'

Common targets are:
core-image-minimal
meta-toolchain
meta-toolchain-sdk
adt-installer
meta-ide-support

Your build environment has been configured with:

MACHINE=imx8qxpc0mek
SDKMACHINE=i686
DISTRO=imx-desktop-xwayland
EULA=
BSPDIR=
BUILD_DIR=.
meta-freescale directory found

IMX Desktop setup complete!

You can now build the following Desktop images:

$ bitbake imx-image-desktop

After that, it automatically changes into the following directory.

~/desktop/build-desktop

In which I run:

bitbake imx-image-desktop

which gives the output:

NOTE: Your conf/bblayers.conf has been automatically updated.
Loading cache: 100% | | ETA: --:--:--
Loaded 0 entries from dependency cache.

WARNING: /home/mo/desktop/sources/poky/meta/recipes-core/coreutils/coreutils_9.1.bb: Variable key RDEPENDS:${PN} ( attr) replaces original key RDEPENDS:coreutils ( ${@bb.utils.contains('PACKAGECONFIG', 'single-binary', '', 'coreutils-stdbuf', d)}).
WARNING: /home/mo/desktop/sources/meta-nxp-desktop/recipes-devtools/qemu/qemu-system-native_4.2.1.bb: QA Issue: qemu-system-native: native/nativesdk class is not inherited last, this can result in unexpected behaviour. Classes inherited after native/nativesdk: ptest.bbclass pkgconfig.bbclass [native-last]
WARNING: /home/mo/desktop/sources/meta-nxp-desktop/recipes-devtools/qemu/qemu-native_4.2.1.bb: QA Issue: qemu-native: native/nativesdk class is not inherited last, this can result in unexpected behaviour. Classes inherited after native/nativesdk: ptest.bbclass pkgconfig.bbclass [native-last]
Parsing recipes: 100% |####################################################################################| Time: 0:01:11
Parsing of 3511 .bb files complete (0 cached, 3511 parsed). 5401 targets, 536 skipped, 22 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "2.4.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "ubuntu-22.04"
TARGET_SYS = "aarch64-fsl-linux"
MACHINE = "imx8qxpc0mek"
DISTRO = "imx-desktop-xwayland"
DISTRO_VERSION = "1.0"
TUNE_FEATURES = "aarch64 armv8a crc crypto"
TARGET_FPU = ""
meta
meta-poky = "HEAD:a57506c46d92bf0767060102d2139be06d46f575"
meta-oe
meta-multimedia
meta-python = "HEAD:922f41b39f364e5b6be596b4b51e0fb37ffe1971"
meta-freescale = "HEAD:7327e03c61823268a5a957fe090c4cc5e1735b34"
meta-freescale-3rdparty = "HEAD:bccd93f1ceece608e69799b6fc8f79e8a519f89e"
meta-freescale-distro = "HEAD:7956a0ab407a33c40fdc6eb4fabdcb7dc54fd359"
meta-bsp
meta-sdk
meta-ml
meta-v2x = "HEAD:c842613830da0a5473513cdbc2dce015b0ca9a5d"
meta-nxp-demo-experience = "HEAD:b8c0a9af3e3ca5400b9aff6436fbb654d3108cb4"
meta-arm
meta-arm-toolchain = "HEAD:c6380674f59489b327c5047d803cc35b68642cd4"
meta-chromium = "HEAD:e232c2e21b96dc092d9af8bea4b3a528e7a46dd6"
meta-clang = "HEAD:af4dcba009ba98250315520f3003fde4ee164cce"
meta-gnome
meta-networking
meta-filesystems = "HEAD:922f41b39f364e5b6be596b4b51e0fb37ffe1971"
meta-qt6 = "HEAD:1406d0a85525a71fe5d7892d7f915404290a78ad"
meta-parsec
meta-tpm = "HEAD:d7db0a3bd1a8639df7570483f003ce00cbe274a2"
meta-virtualization = "HEAD:38e6b3e2fe0219c773f4637a09221ca5d15bf6fc"
meta-nxp-desktop = "HEAD:08711af85dba46ff63bdd3f1631e9b0f35b803e3"

NOTE: Fetching uninative binary shim http://downloads.yoctoproject.org/releases/uninative/4.3/x86_64-nativesdk-libc-4.3.tar.xz;sha256sum=... (will check PREMIRRORS first)
Initialising tasks: 100% |#################################################################################| Time: 0:00:03
Sstate summary: Wanted 2715 Local 0 Mirrors 0 Missed 2715 Current 0 (0% match, 0% complete)
NOTE: Executing Tasks

 

Which eventually fails with:

| /home/mo/desktop/build-desktop/tmp/work-shared/llvm-project-source-15.0.7-r0/git/clang/include/clang/AST/ExternalASTSource.h:378:54: warning: ‘this’ pointer is null [-Wnonnull]
| 378 | Ptr = reinterpret_cast<uint64_t>((Source->*Get)(Ptr >> 1));
| | ~~~~~~~~~~~~~~^~~~~~~~~~
| ninja: build stopped: subcommand failed.
| WARNING: /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/clang-native/15.0.7-r0/temp/run.do_compile.253912:162 exit 1 from 'eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '/home/mo/desktop/build-desktop/tmp/work/x86_64-linux/clang-native/15.0.7-r0/build' "$@" -- ${EXTRA_OECMAKE_BUILD}'
| WARNING: Backtrace (BB generated script):
| #1: cmake_runcmake_build, /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/clang-native/15.0.7-r0/temp/run.do_compile.253912, line 162
| #2: cmake_do_compile, /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/clang-native/15.0.7-r0/temp/run.do_compile.253912, line 156
| #3: do_compile, /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/clang-native/15.0.7-r0/temp/run.do_compile.253912, line 151
| #4: main, /home/mo/desktop/build-desktop/tmp/work/x86_64-linux/clang-native/15.0.7-r0/temp/run.do_compile.253912, line 175
ERROR: Task (virtual:native:/home/mo/desktop/sources/meta-clang/recipes-devtools/clang/clang_git.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4988 tasks of which 0 didn't need to be rerun and 2 failed.

Summary: 2 tasks failed:
/home/mo/desktop/sources/meta-nxp-desktop/recipes-graphics/libgpuperfcnt/libgpuperfcnt_6.4.11.p2.2d.bb:do_fetch
virtual:native:/home/mo/desktop/sources/meta-clang/recipes-devtools/clang/clang_git.bb:do_compile
Summary: There were 16 WARNING messages.
Summary: There were 3 ERROR messages, returning a non-zero exit code.

 

Can you please tell me what am I doing wrong?

0 项奖励
回复

1,480 次查看
Chavira
NXP TechSupport
NXP TechSupport

Hi @mlfnd!

Thank you for contacting NXP Support!

 

Apparently you are doing the correct steps.

Do you have the needed packages to compile in yocto?

 

Essential Yocto Project host packages are:

$ sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool file locales libacl1

 

Try it updating your packages too and remember to limit the cores of your host machine.

 

Best Regards!

Chavira

0 项奖励
回复

1,720 次查看
mlfnd
Contributor I

@Chavira 

 

I did bitbake ubuntu-base but I can't see any .wic images under the tmp/deploy.

 

Should I do $ bitbake imx-image-desktop??

0 项奖励
回复

1,749 次查看
mlfnd
Contributor I

Hi @Chavira 

 

It says on the github page:

imx8mpevk - i.MX8MP-EVK
imx8mqevk - i.MX8MQ-EVK
imx8mmevk - i.MX8MM-EVK
imx8mnevk - i.MX8MN-EVK
imx8qmmek - i.MX8QM-MEK
imx8ulpevk - i.MX8ULP-EVK
imx8qxpc0mek - i.MX8QXP-MEK with silicon revision C0 chip

 

my board is imx8qxp MEK 2GiB , but I don't see any indication whether it is c0 or not. which MACHINE should I use?

 

Thanks

0 项奖励
回复

1,723 次查看
Chavira
NXP TechSupport
NXP TechSupport

Hi @mlfnd!

You should use the machine imx8qxpc0mek.

If your board has the C0 version it is compatible.

 

Best Regards!

Chavira

0 项奖励
回复

1,766 次查看
Chavira
NXP TechSupport
NXP TechSupport

Hi @mlfnd!

Thank you for contacting NXP Support!

 

We have Ubuntu for our boards, but you have to compile it under Yocto!

 

Please follow the instructions of our Yocto User Guide.

 

https://github.com/nxp-imx/meta-nxp-desktop/tree/rel_lf_6.1.55_2.2.0_ldp

 

https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf

 

Best Regards!

Chavira

0 项奖励
回复