[U-Boot] Please pull u-boot-fdt, take 2

Hi Tom,
This incorporates the v2 patch for 'fdt: Build the new python libfdt module' which should fix the problem with the original pull request.
The following changes since commit be62fbf376261ab3a4ed5db3bf54d5df9e216d9f:
Merge branch 'rmobile' of git://git.denx.de/u-boot-sh (2017-05-23 16:22:03 -0400)
are available in the git repository at:
git://git.denx.de/u-boot-fdt.git
for you to fetch changes up to da9c601049eb7c993c7f6e33ae10af7a847a483d:
fdt: Drop fdt_select.py (2017-05-24 18:12:31 -0600)
---------------------------------------------------------------- Simon Glass (20): fdt: Add Python bindings pci: Correct cast for sandbox fdt: Correct cast for sandbox in fdtdec_setup_memory_size() fdt: Use SPDX format for licenses in the libfdt headers fdt: Move header files into lib/libfdt fdt: Allow swig options to be provided by Makefile fdt: Add all source files to the libfdt build fdt: Rename existing python libfdt module fdt: Build the new python libfdt module fdt: Update fdt_test to use 'dt' instead of 'fdt' fdt: dtoc: Add a full set of property tests fdt: Support use of the new python libfdt library fdt: Makefile: Build python libfdt library if needed fdt: Stop building the old python libfdt module fdt: Drop use of the legacy libfdt python module fdt: Drop fdt_fallback library binman: Drop a special case related to fdt_fallback fdt: Merge fdt_normal with its base class binman: Rename fdt variable to dtb fdt: Drop fdt_select.py
Makefile | 16 +- cmd/pci.c | 3 +- include/fdt.h | 112 +- include/libfdt.h | 2138 +------------------------- lib/fdtdec.c | 3 +- lib/libfdt/fdt.h | 67 + lib/libfdt/libfdt.h | 2144 +++++++++++++++++++++++++++ lib/libfdt/libfdt.swig | 113 -- lib/libfdt/pylibfdt/libfdt.i | 389 +++++ lib/libfdt/pylibfdt/setup.py | 123 ++ lib/libfdt/setup.py | 38 - scripts/Makefile.spl | 17 +- tools/Makefile | 48 +- tools/binman/binman.py | 3 + tools/binman/control.py | 12 +- tools/binman/etype/u_boot_dtb_with_ucode.py | 24 +- tools/binman/fdt_test.py | 64 +- tools/binman/func_test.py | 48 +- tools/binman/test/45_prop_test.dts | 23 + tools/dtoc/dtoc.py | 3 +- tools/dtoc/fdt.py | 183 ++- tools/dtoc/fdt_fallback.py | 181 --- tools/dtoc/fdt_normal.py | 225 --- tools/dtoc/fdt_select.py | 36 - 24 files changed, 3054 insertions(+), 2959 deletions(-) create mode 100644 lib/libfdt/fdt.h create mode 100644 lib/libfdt/libfdt.h delete mode 100644 lib/libfdt/libfdt.swig create mode 100644 lib/libfdt/pylibfdt/libfdt.i create mode 100755 lib/libfdt/pylibfdt/setup.py delete mode 100644 lib/libfdt/setup.py create mode 100644 tools/binman/test/45_prop_test.dts delete mode 100644 tools/dtoc/fdt_fallback.py delete mode 100644 tools/dtoc/fdt_normal.py delete mode 100644 tools/dtoc/fdt_select.py
Regards, Simon

On Wed, May 24, 2017 at 06:15:25PM -0600, Simon Glass wrote:
Hi Tom,
This incorporates the v2 patch for 'fdt: Build the new python libfdt module' which should fix the problem with the original pull request.
The following changes since commit be62fbf376261ab3a4ed5db3bf54d5df9e216d9f:
Merge branch 'rmobile' of git://git.denx.de/u-boot-sh (2017-05-23 16:22:03 -0400)
are available in the git repository at:
git://git.denx.de/u-boot-fdt.git
for you to fetch changes up to da9c601049eb7c993c7f6e33ae10af7a847a483d:
fdt: Drop fdt_select.py (2017-05-24 18:12:31 -0600)
NAK. travis-ci blows up quite badly: https://travis-ci.org/trini/u-boot/builds/235861889

Hi Tom,
On 25 May 2017 at 05:19, Tom Rini trini@konsulko.com wrote:
On Wed, May 24, 2017 at 06:15:25PM -0600, Simon Glass wrote:
Hi Tom,
This incorporates the v2 patch for 'fdt: Build the new python libfdt module' which should fix the problem with the original pull request.
The following changes since commit be62fbf376261ab3a4ed5db3bf54d5df9e216d9f:
Merge branch 'rmobile' of git://git.denx.de/u-boot-sh (2017-05-23 16:22:03 -0400)
are available in the git repository at:
git://git.denx.de/u-boot-fdt.git
for you to fetch changes up to da9c601049eb7c993c7f6e33ae10af7a847a483d:
fdt: Drop fdt_select.py (2017-05-24 18:12:31 -0600)
NAK. travis-ci blows up quite badly: https://travis-ci.org/trini/u-boot/builds/235861889
I'm not sure how to repeat this problem. When I try this:
buildman -P boston32r2el
I don't see any errors.
This looks like what the test is running. Any ideas what I am missing?
I wonder if the environment is missing something, or has something extra, with respect to python-dev, etc.?
Regards, Simon

On Thu, May 25, 2017 at 11:27:10AM -0600, Simon Glass wrote:
Hi Tom,
On 25 May 2017 at 05:19, Tom Rini trini@konsulko.com wrote:
On Wed, May 24, 2017 at 06:15:25PM -0600, Simon Glass wrote:
Hi Tom,
This incorporates the v2 patch for 'fdt: Build the new python libfdt module' which should fix the problem with the original pull request.
The following changes since commit be62fbf376261ab3a4ed5db3bf54d5df9e216d9f:
Merge branch 'rmobile' of git://git.denx.de/u-boot-sh (2017-05-23 16:22:03 -0400)
are available in the git repository at:
git://git.denx.de/u-boot-fdt.git
for you to fetch changes up to da9c601049eb7c993c7f6e33ae10af7a847a483d:
fdt: Drop fdt_select.py (2017-05-24 18:12:31 -0600)
NAK. travis-ci blows up quite badly: https://travis-ci.org/trini/u-boot/builds/235861889
I'm not sure how to repeat this problem. When I try this:
Your best bet is likely: https://docs.travis-ci.com/user/common-build-problems/#Troubleshooting-Local...

Hi Tom,
On 25 May 2017 at 11:42, Tom Rini trini@konsulko.com wrote:
On Thu, May 25, 2017 at 11:27:10AM -0600, Simon Glass wrote:
Hi Tom,
On 25 May 2017 at 05:19, Tom Rini trini@konsulko.com wrote:
On Wed, May 24, 2017 at 06:15:25PM -0600, Simon Glass wrote:
Hi Tom,
This incorporates the v2 patch for 'fdt: Build the new python libfdt module' which should fix the problem with the original pull request.
The following changes since commit be62fbf376261ab3a4ed5db3bf54d5df9e216d9f:
Merge branch 'rmobile' of git://git.denx.de/u-boot-sh (2017-05-23 16:22:03 -0400)
are available in the git repository at:
git://git.denx.de/u-boot-fdt.git
for you to fetch changes up to da9c601049eb7c993c7f6e33ae10af7a847a483d:
fdt: Drop fdt_select.py (2017-05-24 18:12:31 -0600)
NAK. travis-ci blows up quite badly: https://travis-ci.org/trini/u-boot/builds/235861889
I'm not sure how to repeat this problem. When I try this:
Your best bet is likely: https://docs.travis-ci.com/user/common-build-problems/#Troubleshooting-Local...
Sadly still no luck. I installed this one:
travisci/ci-garnet:packer-1478744932
It includes python-dev but not swig, so should not be able to build the module. As expected I get this error:
NO_SDL=1 ./tools/buildman/buildman -P sandbox_spl boards.cfg is up to date. Nothing to do. Building current source for 1 boards (1 thread, 8 jobs per thread) sandbox: + sandbox_spl +Traceback (most recent call last): + File "<stdin>", line 1, in <module> +ImportError: No module named libfdt +make[2]: *** [checkdtoc] Error 1 +make[1]: *** [spl/u-boot-spl] Error 2 +make: *** [sub-make] Error 2
If I install swig then all is well. I don't see the same error.
I'm also unsure how you get it to pass with some boards but not others...
There is obviously something odd going on. I also cannot understand why in this one:
https://travis-ci.org/trini/u-boot/jobs/235861899#L769
I see it trying to compile libfdt_wrap.c. That should be handled by setup.py - I just cannot figure out why it would try to compile it itself:
arm: + mx6sabresd_spl +mv: cannot stat lib/libfdt/pylibfdt/libfdt.py: No such file or directory +make[2]: *** [tools/_libfdt.so] Error 1 +make[1]: *** [tools] Error 2 +make: *** [sub-make] Error 2 arm: + ls1021aqds_nor_lpuart +x86_64-linux-gnu-gcc: error: lib/libfdt/pylibfdt/libfdt_wrap.c: No such file or directory +x86_64-linux-gnu-gcc: fatal error: no input files +compilation terminated. +error: command 'x86_64-linux-gnu-gcc' failed with exit status 4 +make[2]: *** [tools/_libfdt.so] Error 1 +make[1]: *** [tools] Error 2 +make: *** [sub-make] Error 2 arm: + mx6slevk +x86_64-linux-gnu-gcc: error: lib/libfdt/pylibfdt/libfdt_wrap.c: No such file or directory +x86_64-linux-gnu-gcc: fatal error: no input files +compilation terminated. +error: command 'x86_64-linux-gnu-gcc' failed with exit status 4 +make[2]: *** [tools/_libfdt.so] Error 1 +make[1]: *** [tools] Error 2 +make: *** [sub-make] Error 2 55 0 3 /58 mx6qsabreauto boards.cfg is up to date. Nothing to do. Summary of current source for 58 boards (2 threads, 1 job per thread) arm: + mx6sabresd_spl ls1021aqds_nor_lpuart mx6slevk +mv: cannot stat lib/libfdt/pylibfdt/libfdt.py: No such file or directory
Are you able to run with V=1 to get the full make output? That might help me narrow it down. Or, if you have a particular docket image, please point me to it. There seems to be some init going on though (e.g. /tmp/dtc).
Regards, Simon

On Thu, May 25, 2017 at 09:15:33PM -0600, Simon Glass wrote:
Hi Tom,
On 25 May 2017 at 11:42, Tom Rini trini@konsulko.com wrote:
On Thu, May 25, 2017 at 11:27:10AM -0600, Simon Glass wrote:
Hi Tom,
On 25 May 2017 at 05:19, Tom Rini trini@konsulko.com wrote:
On Wed, May 24, 2017 at 06:15:25PM -0600, Simon Glass wrote:
Hi Tom,
This incorporates the v2 patch for 'fdt: Build the new python libfdt module' which should fix the problem with the original pull request.
The following changes since commit be62fbf376261ab3a4ed5db3bf54d5df9e216d9f:
Merge branch 'rmobile' of git://git.denx.de/u-boot-sh (2017-05-23 16:22:03 -0400)
are available in the git repository at:
git://git.denx.de/u-boot-fdt.git
for you to fetch changes up to da9c601049eb7c993c7f6e33ae10af7a847a483d:
fdt: Drop fdt_select.py (2017-05-24 18:12:31 -0600)
NAK. travis-ci blows up quite badly: https://travis-ci.org/trini/u-boot/builds/235861889
I'm not sure how to repeat this problem. When I try this:
Your best bet is likely: https://docs.travis-ci.com/user/common-build-problems/#Troubleshooting-Local...
Sadly still no luck. I installed this one:
travisci/ci-garnet:packer-1478744932
It includes python-dev but not swig, so should not be able to build the module. As expected I get this error:
NO_SDL=1 ./tools/buildman/buildman -P sandbox_spl boards.cfg is up to date. Nothing to do. Building current source for 1 boards (1 thread, 8 jobs per thread) sandbox: + sandbox_spl +Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
+ImportError: No module named libfdt +make[2]: *** [checkdtoc] Error 1 +make[1]: *** [spl/u-boot-spl] Error 2 +make: *** [sub-make] Error 2
If I install swig then all is well. I don't see the same error.
I'm also unsure how you get it to pass with some boards but not others...
There is obviously something odd going on. I also cannot understand why in this one:
https://travis-ci.org/trini/u-boot/jobs/235861899#L769
I see it trying to compile libfdt_wrap.c. That should be handled by setup.py - I just cannot figure out why it would try to compile it itself:
arm: + mx6sabresd_spl
+mv: cannot stat lib/libfdt/pylibfdt/libfdt.py: No such file or directory +make[2]: *** [tools/_libfdt.so] Error 1 +make[1]: *** [tools] Error 2 +make: *** [sub-make] Error 2 arm: + ls1021aqds_nor_lpuart +x86_64-linux-gnu-gcc: error: lib/libfdt/pylibfdt/libfdt_wrap.c: No such file or directory +x86_64-linux-gnu-gcc: fatal error: no input files +compilation terminated. +error: command 'x86_64-linux-gnu-gcc' failed with exit status 4 +make[2]: *** [tools/_libfdt.so] Error 1 +make[1]: *** [tools] Error 2 +make: *** [sub-make] Error 2 arm: + mx6slevk +x86_64-linux-gnu-gcc: error: lib/libfdt/pylibfdt/libfdt_wrap.c: No such file or directory +x86_64-linux-gnu-gcc: fatal error: no input files +compilation terminated. +error: command 'x86_64-linux-gnu-gcc' failed with exit status 4 +make[2]: *** [tools/_libfdt.so] Error 1 +make[1]: *** [tools] Error 2 +make: *** [sub-make] Error 2 55 0 3 /58 mx6qsabreauto boards.cfg is up to date. Nothing to do. Summary of current source for 58 boards (2 threads, 1 job per thread) arm: + mx6sabresd_spl ls1021aqds_nor_lpuart mx6slevk +mv: cannot stat lib/libfdt/pylibfdt/libfdt.py: No such file or directory
Are you able to run with V=1 to get the full make output? That might help me narrow it down. Or, if you have a particular docket image, please point me to it. There seems to be some init going on though (e.g. /tmp/dtc).
Anyone can use travis-ci :) In the past I've had some luck debugging these issues (since I didn't want to mess with docker) by hacking up the .travis.yml file to just have a single matrix entry for whatever I was debugging and hack things as needed, including 'cat'ing files.

Hi Tom,
On 26 May 2017 at 06:49, Tom Rini trini@konsulko.com wrote:
On Thu, May 25, 2017 at 09:15:33PM -0600, Simon Glass wrote:
Hi Tom,
On 25 May 2017 at 11:42, Tom Rini trini@konsulko.com wrote:
On Thu, May 25, 2017 at 11:27:10AM -0600, Simon Glass wrote:
Hi Tom,
On 25 May 2017 at 05:19, Tom Rini trini@konsulko.com wrote:
On Wed, May 24, 2017 at 06:15:25PM -0600, Simon Glass wrote:
Hi Tom,
This incorporates the v2 patch for 'fdt: Build the new python libfdt module' which should fix the problem with the original pull request.
The following changes since commit be62fbf376261ab3a4ed5db3bf54d5df9e216d9f:
Merge branch 'rmobile' of git://git.denx.de/u-boot-sh (2017-05-23 16:22:03 -0400)
are available in the git repository at:
git://git.denx.de/u-boot-fdt.git
for you to fetch changes up to da9c601049eb7c993c7f6e33ae10af7a847a483d:
fdt: Drop fdt_select.py (2017-05-24 18:12:31 -0600)
NAK. travis-ci blows up quite badly: https://travis-ci.org/trini/u-boot/builds/235861889
I'm not sure how to repeat this problem. When I try this:
Your best bet is likely: https://docs.travis-ci.com/user/common-build-problems/#Troubleshooting-Local...
Sadly still no luck. I installed this one:
travisci/ci-garnet:packer-1478744932
It includes python-dev but not swig, so should not be able to build the module. As expected I get this error:
NO_SDL=1 ./tools/buildman/buildman -P sandbox_spl boards.cfg is up to date. Nothing to do. Building current source for 1 boards (1 thread, 8 jobs per thread) sandbox: + sandbox_spl +Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
+ImportError: No module named libfdt +make[2]: *** [checkdtoc] Error 1 +make[1]: *** [spl/u-boot-spl] Error 2 +make: *** [sub-make] Error 2
If I install swig then all is well. I don't see the same error.
I'm also unsure how you get it to pass with some boards but not others...
There is obviously something odd going on. I also cannot understand why in this one:
https://travis-ci.org/trini/u-boot/jobs/235861899#L769
I see it trying to compile libfdt_wrap.c. That should be handled by setup.py - I just cannot figure out why it would try to compile it itself:
arm: + mx6sabresd_spl
+mv: cannot stat lib/libfdt/pylibfdt/libfdt.py: No such file or directory +make[2]: *** [tools/_libfdt.so] Error 1 +make[1]: *** [tools] Error 2 +make: *** [sub-make] Error 2 arm: + ls1021aqds_nor_lpuart +x86_64-linux-gnu-gcc: error: lib/libfdt/pylibfdt/libfdt_wrap.c: No such file or directory +x86_64-linux-gnu-gcc: fatal error: no input files +compilation terminated. +error: command 'x86_64-linux-gnu-gcc' failed with exit status 4 +make[2]: *** [tools/_libfdt.so] Error 1 +make[1]: *** [tools] Error 2 +make: *** [sub-make] Error 2 arm: + mx6slevk +x86_64-linux-gnu-gcc: error: lib/libfdt/pylibfdt/libfdt_wrap.c: No such file or directory +x86_64-linux-gnu-gcc: fatal error: no input files +compilation terminated. +error: command 'x86_64-linux-gnu-gcc' failed with exit status 4 +make[2]: *** [tools/_libfdt.so] Error 1 +make[1]: *** [tools] Error 2 +make: *** [sub-make] Error 2 55 0 3 /58 mx6qsabreauto boards.cfg is up to date. Nothing to do. Summary of current source for 58 boards (2 threads, 1 job per thread) arm: + mx6sabresd_spl ls1021aqds_nor_lpuart mx6slevk +mv: cannot stat lib/libfdt/pylibfdt/libfdt.py: No such file or directory
Are you able to run with V=1 to get the full make output? That might help me narrow it down. Or, if you have a particular docket image, please point me to it. There seems to be some init going on though (e.g. /tmp/dtc).
Anyone can use travis-ci :) In the past I've had some luck debugging these issues (since I didn't want to mess with docker) by hacking up the .travis.yml file to just have a single matrix entry for whatever I was debugging and hack things as needed, including 'cat'ing files.
OK I found that with the prerequisites installed I can repeat this with something like:
buildman -P sandbox
(which only builds 3 boards)
The problem is that setup.py is writing to the source directory. It seems to be hard to stop it doing that. I was aware of it but did not imagine the race condition it would create. I've updated the patches and sent v3. I have a passing run on travis-ci [1]. If all looks good I'll pull it in and try a take three early next week.
Most of my testing is with buildman running on a branch. In that case each thread has its own source tree, so the race condition does not occur.
Once again I'm really impressed with your test setup!
Regards, Simon
participants (2)
-
Simon Glass
-
Tom Rini