question about Adding u-boot-fw-utils for i.MX to yocto project

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

question about Adding u-boot-fw-utils for i.MX to yocto project

Jump to solution
1,310 Views
wang12zhe
Contributor III

HW: IMX8QXP
Yocto Version L5.15.32_2.0.0

I'm trying to update uboot env in kernel so I need fw_printenv and fw_settnv

from https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Adding-u-boot-fw-utils-for-i-MX-to-yocto...
I find I can add u-boot-fw-utils for i.MX to get fw_printenv and fw_settnv

After modify the *.inc and *.bb file and run command bitbake u-boot-imx-fw-utils,get the below error message:

Sstate summary: Wanted 8 Local 3 Mirrors 0 Missed 5 Current 247 (37% match, 98% complete)
NOTE: Executing Tasks
ERROR: u-boot-imx-fw-utils-2022.04-r0 do_compile: oe_runmake failed
ERROR: u-boot-imx-fw-utils-2022.04-r0 do_compile: ExecutionError('/home/wzg/8TB/Yocto/L5.15.32_2.0.0/build-xwayland/tmp/work/imx8qxpmek-poky-linux/u-boot-imx-fw-utils/2022.04-r0/temp/run.do_compile.1188802', 1, None, None)
ERROR: Logfile of failure stored in: /home/wzg/8TB/Yocto/L5.15.32_2.0.0/build-xwayland/tmp/work/imx8qxpmek-poky-linux/u-boot-imx-fw-utils/2022.04-r0/temp/log.do_compile.1188802
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4 imx8qxp_mek_defconfig
| HOSTCC scripts/basic/fixdep
| /bin/sh: 1: cc: not found
| make[1]: *** [scripts/Makefile.host:95: scripts/basic/fixdep] Error 127
| make: *** [Makefile:492: scripts_basic] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/wzg/8TB/Yocto/L5.15.32_2.0.0/sources/meta-imx/meta-bsp/recipes-bsp/u-boot/u-boot-imx-fw-utils_2022.04.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 995 tasks of which 989 didn't need to be rerun and 1 failed.

Summary: 1 task failed:

how to fix this issie?

0 Kudos
1 Solution
1,229 Views
JudyJeo
Contributor III

I follow your instruction. 

It works.

 

cat conf/local.conf
 

DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"

# Switch to Debian packaging and include package-management in the image
PACKAGE_CLASSES = "package_deb"
EXTRA_IMAGE_FEATURES += "package-management"

IMAGE_INSTALL += " u-boot-fw-utils "


bitbake u-boot-fw-utils


Loading cache: 100% |                                                                                                                  | ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |#################################################################################################################| Time: 0:00:53
Parsing of 3187 .bb files complete (0 cached, 3187 parsed). 4737 targets, 297 skipped, 5 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "2.0.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-20.04"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "imx8qxpmek"
DISTRO               = "fsl-imx-xwayland"
DISTRO_VERSION       = "5.15-kirkstone"
TUNE_FEATURES        = "aarch64 armv8a crc crypto"
TARGET_FPU           = ""
meta
meta-poky            = "HEAD:27de52e402ae000dfa502d52908cd6e6aef923ec"
meta-oe
meta-multimedia
meta-python          = "HEAD:5357c7a40eaf8d1bcf7ff58edbba8e9527e40c7d"
meta-freescale       = "HEAD:2fb1ce365338126aad365012ebb913b3e4a9f1be"
meta-freescale-3rdparty = "HEAD:de0eb1408150d77f9cce97c559f9a5a3c71e5d6c"


meta-qt6             = "HEAD:b2894aad5c1aaa85f2f5c7b94391b7c51c39e555"
meta-virtualization  = "HEAD:973c8d0964c6f40338857efe5b8009b2f647d485"

NOTE: Fetching uninative binary shim http://downloads.yoctoproject.org/releases/uninative/3.6/x86_64-nativesdk-libc-3.6.tar.xz;sha256sum=9bfc4c970495b3716b2f9e52c4df9f968c02463a9a95000f6657fbc3fde1f098 (will check PREMIRRORS first)
Initialising tasks: 100% |##############################################################################################################| Time: 0:00:01
Sstate summary: Wanted 187 Local 0 Mirrors 0 Missed 187 Current 0 (0% match, 0% complete)
NOTE: Executing Tasks
WARNING: libcap-ng-native-0.8.2-r0 do_fetch: Failed to fetch URL https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-0.8.2.tar.gz, attempting MIRRORS if available
NOTE: Tasks Summary: Attempted 788 tasks of which 0 didn't need to be rerun and all succeeded.


ls    tmp/work/armv8a-poky-linux/libubootenv/0.3.2-r0/image/usr/bin/
fw_printenv  fw_setenv


 file      tmp/work/armv8a-poky-linux/libubootenv/0.3.2-r0/image/usr/bin/{fw_printenv,fw_setenv}
tmp/work/armv8a-poky-linux/libubootenv/0.3.2-r0/image/usr/bin/fw_printenv: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=e7625227ed1fd849da8cf1ebe0fdb388dc1b5ee1, for GNU/Linux 3.14.0, with debug_info, not stripped
tmp/work/armv8a-poky-linux/libubootenv/0.3.2-r0/image/usr/bin/fw_setenv:   ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=862b9793a7f7f14a5cd9a4f593691783c280bd14, for GNU/Linux 3.14.0, with debug_info, not stripped

 

 

 

View solution in original post

0 Kudos
6 Replies
1,139 Views
JudyJeo
Contributor III

It is insmod provided solution, not me. 

Please mark the reply of insmod as solution. 

 

0 Kudos
1,230 Views
JudyJeo
Contributor III

I follow your instruction. 

It works.

 

cat conf/local.conf
 

DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"

# Switch to Debian packaging and include package-management in the image
PACKAGE_CLASSES = "package_deb"
EXTRA_IMAGE_FEATURES += "package-management"

IMAGE_INSTALL += " u-boot-fw-utils "


bitbake u-boot-fw-utils


Loading cache: 100% |                                                                                                                  | ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |#################################################################################################################| Time: 0:00:53
Parsing of 3187 .bb files complete (0 cached, 3187 parsed). 4737 targets, 297 skipped, 5 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "2.0.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-20.04"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "imx8qxpmek"
DISTRO               = "fsl-imx-xwayland"
DISTRO_VERSION       = "5.15-kirkstone"
TUNE_FEATURES        = "aarch64 armv8a crc crypto"
TARGET_FPU           = ""
meta
meta-poky            = "HEAD:27de52e402ae000dfa502d52908cd6e6aef923ec"
meta-oe
meta-multimedia
meta-python          = "HEAD:5357c7a40eaf8d1bcf7ff58edbba8e9527e40c7d"
meta-freescale       = "HEAD:2fb1ce365338126aad365012ebb913b3e4a9f1be"
meta-freescale-3rdparty = "HEAD:de0eb1408150d77f9cce97c559f9a5a3c71e5d6c"


meta-qt6             = "HEAD:b2894aad5c1aaa85f2f5c7b94391b7c51c39e555"
meta-virtualization  = "HEAD:973c8d0964c6f40338857efe5b8009b2f647d485"

NOTE: Fetching uninative binary shim http://downloads.yoctoproject.org/releases/uninative/3.6/x86_64-nativesdk-libc-3.6.tar.xz;sha256sum=9bfc4c970495b3716b2f9e52c4df9f968c02463a9a95000f6657fbc3fde1f098 (will check PREMIRRORS first)
Initialising tasks: 100% |##############################################################################################################| Time: 0:00:01
Sstate summary: Wanted 187 Local 0 Mirrors 0 Missed 187 Current 0 (0% match, 0% complete)
NOTE: Executing Tasks
WARNING: libcap-ng-native-0.8.2-r0 do_fetch: Failed to fetch URL https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-0.8.2.tar.gz, attempting MIRRORS if available
NOTE: Tasks Summary: Attempted 788 tasks of which 0 didn't need to be rerun and all succeeded.


ls    tmp/work/armv8a-poky-linux/libubootenv/0.3.2-r0/image/usr/bin/
fw_printenv  fw_setenv


 file      tmp/work/armv8a-poky-linux/libubootenv/0.3.2-r0/image/usr/bin/{fw_printenv,fw_setenv}
tmp/work/armv8a-poky-linux/libubootenv/0.3.2-r0/image/usr/bin/fw_printenv: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=e7625227ed1fd849da8cf1ebe0fdb388dc1b5ee1, for GNU/Linux 3.14.0, with debug_info, not stripped
tmp/work/armv8a-poky-linux/libubootenv/0.3.2-r0/image/usr/bin/fw_setenv:   ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=862b9793a7f7f14a5cd9a4f593691783c280bd14, for GNU/Linux 3.14.0, with debug_info, not stripped

 

 

 

0 Kudos
1,248 Views
wang12zhe
Contributor III
maybe,but I test L5.15.32_2.0.0, I think it's not work
0 Kudos
1,273 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

These variables are invalid as the yocto can't find gcc.

EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" STRIP=true V=1'

 

0 Kudos
1,241 Views
wang12zhe
Contributor III

But how to correct these variables ?

0 Kudos
1,235 Views
wang12zhe
Contributor III
0 Kudos