Re: [yocto] binman support in u-boot

2021-07-15 Thread Rebecca Chang Swee Fun
Thanks for the pointer. I realized the dtc was compiled with NO_PYTHON=1 flag. 
Will start work from that path.

Regards,
Rebecca

> -Original Message-
> From: Simon Glass 
> Sent: Saturday, July 10, 2021 1:54 AM
> To: Tom Rini 
> Cc: Chang, Rebecca Swee Fun ;
> yocto@lists.yoctoproject.org
> Subject: Re: [yocto] binman support in u-boot
> 
> Hi,
> 
> On Thu, 8 Jul 2021 at 17:45, Tom Rini  wrote:
> >
> > On Thu, Jul 08, 2021 at 04:10:32AM +, Rebecca Chang Swee Fun
> wrote:
> >
> > > 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_com
> > > | pile.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 }
> >
> > Off-hand, I suspect it might be a little tricky to use binman outside
> > of the U-Boot context directly.  Simon, any thoughts?
> 
> It is being used in a few other environments - gitlab and portage/gentoo.
> 
> Here for example is a dockerfile that builds it. Why does Dockerfile use a 
> capital
> D?
> 
> https://gitlab.com/zephyr-ec/gitlab-ci-runner/-/blob/master/Dockerfile
> 
> This error "binman: cannot import name 'QUIET_NOTFOUND' from 'libfdt'
> (unknown location)"
> 
> actually means that pylibfdt is not found. You need to build dtc with Python
> support. If that is your 'dtc-native' package, then make sure it does the 
> Python
> part also.
> 
> Regards,
> Simon

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#54131): https://lists.yoctoproject.org/g/yocto/message/54131
Mute This Topic: https://lists.yoctoproject.org/mt/84061363/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] binman support in u-boot

2021-07-07 Thread 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
}

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#54072): https://lists.yoctoproject.org/g/yocto/message/54072
Mute This Topic: https://lists.yoctoproject.org/mt/84061363/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-