binman support in u-boot


Rebecca Chang Swee Fun
 

Hi,

 

I was having a bbappend for uboot v2021.04 that calls binman command from u-boot source tree but it doesn’t seems to work with bitbake with an error of unknown location of libfdt.

I have added dependency to dtc-native or did I missed anything? Is there any plan to enable binman support within u-boot-tools recipe?

 

| running build

| running build_py

| package init file '__init__.py' not found (or not a regular file)

| package init file 'etype/__init__.py' not found (or not a regular file)

| package init file '__init__.py' not found (or not a regular file)

| package init file 'etype/__init__.py' not found (or not a regular file)

| running build_scripts

| binman: cannot import name 'QUIET_NOTFOUND' from 'libfdt' (unknown location)

| WARNING: /build/yocto-stable/agilex-gsrd-rootfs/tmp/work/agilex-poky-linux/u-boot-socfpga/1_v2021.04+gitAUTOINC+396ee271f2-r0/temp/run.do_compile.8579:158 exit 1 from './tools/binman/binman build -u -d /build/yocto-stable/agilex-gsrd-rootfs/tmp/work/agilex-poky-linux/u-boot-socfpga/1_v2021.04+gitAUTOINC+396ee271f2-r0/build/${config}/u-boot.dtb -O . -i u-boot'

| WARNING: Backtrace (BB generated script):

|       #1: do_compile, /build/yocto-stable/agilex-gsrd-rootfs/tmp/work/agilex-poky-linux/u-boot-socfpga/1_v2021.04+gitAUTOINC+396ee271f2-r0/temp/run.do_compile.8579, line 158

|       #2: main, /build/yocto-stable/agilex-gsrd-rootfs/tmp/work/agilex-poky-linux/u-boot-socfpga/1_v2021.04+gitAUTOINC+396ee271f2-r0/temp/run.do_compile.8579, line 184

|

| Backtrace (metadata-relative locations):

|       #1: do_compile, autogenerated, line 7

ERROR: Task (/build/yocto-stable/agilex-gsrd-rootfs/../meta-intel-fpga/recipes-bsp/u-boot/u-boot-socfpga_v2021.04.bb:do_compile) failed with exit code '1'

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

 

bbappend:

DEPENDS += "bc-native dtc-native python3-setuptools-native swig-native"

 

# This is require so that tools/binman/setup.py is discoverable during the build

DISTUTILS_SETUP_PATH = "${S}/tools/binman"

distutils3_do_compile() {

        cd ${DISTUTILS_SETUP_PATH}

        NO_FETCH_BUILD=1 \

        STAGING_INCDIR=${STAGING_INCDIR} \

        STAGING_LIBDIR=${STAGING_LIBDIR} \

        ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \

        build --build-base=${B} ${DISTUTILS_BUILD_ARGS} || \

        bbfatal_log "'${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS}' execution failed."

}

 

do_compile_append() {

                cp ${DEPLOY_DIR_IMAGE}/bl31.bin ${B}/${config}/bl31.bin

                cd ${S}

                ./tools/binman/binman build -u -d ${B}/${config}/u-boot.dtb -O . -i u-boot

}

Join {yocto@lists.yoctoproject.org to automatically receive all group messages.