Re: libfdt error when cross compiling u-boot on OSX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, Jun 21, 2019 at 05:32:34PM +0200, Support BSFrance wrote:
> Hello,
> When cross-compiling u-boot on OS X i am stuck on an error with libfdt (from BINMAN)
> 
> BINMAN  u-boot-sunxi-with-spl.bin
> Traceback (most recent call last):
>   File "./tools/binman/binman", line 32, in <module>
>     import control
>   File "/Volumes/HD1/F1C200S/HQ_F1C200s100s/u-boot/tools/binman/control.py", line 16, in <module>
>     import fdt
>   File "/Volumes/HD1/F1C200S/HQ_F1C200s100s/u-boot/tools/binman/../dtoc/fdt.py", line 13, in <module>
>     import libfdt
>   File "scripts/dtc/pylibfdt/libfdt.py", line 28, in <module>
>     _libfdt = swig_import_helper()
>   File "scripts/dtc/pylibfdt/libfdt.py", line 24, in swig_import_helper
>     _mod = imp.load_module('_libfdt', fp, pathname, description)
> ImportError: dlopen(scripts/dtc/pylibfdt/_libfdt.so, 2): no suitable image found.  Did find:
> 	scripts/dtc/pylibfdt/_libfdt.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
> 
> 
> I presume the .so library is a version compiled for Linux and thus
> not recognized by OS X, i also presume BINMAN is responsible for
> integration the .dtb into u-boot binary (and maybe compile .dts to
> .dtb?)

binman is something specific to u-boot I think, but I don't think it's
really relevant here.  It looks like the Python library we're building
isn't the right library type.

I was going to suggest just disabling the python library entirely, but
it looks like u-boot's binman tool is actually written in python and
trying to use it.

I don't really know enough about either the Python setuptools or how
shared libraries work on OSX to know what to do here.  I've CCed Simon
Glass, who wrote most of the Python library to see if he has any
ideas.

> i used another BINMAN folder from another u-boot but but got similar
> error, the only difference seems to be that there is no .so library
> in this version so the error stops at import.
>  
> 
> BINMAN  u-boot-sunxi-with-spl.bin
> Traceback (most recent call last):
>   File "./tools/binman/binman", line 31, in <module>
>     import control
>   File "/Volumes/HD1/F1C200S/HQ_F1C200s100s/u-boot/tools/binman/control.py", line 15, in <module>
>     import fdt
>   File "/Volumes/HD1/F1C200S/HQ_F1C200s100s/u-boot/tools/binman/../dtoc/fdt.py", line 13, in <module>
>     import libfdt
> ImportError: No module named libfdt
> 
> Does anyone knows how if i can somehow fix the problem by building https://github.com/dgibson/dtc on OS X (or by another way).
> 
> Thanks,
> Hoel
> 
> 
> 
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux