Skip to contentSkip to conversation

tools: binman: main.py: add build-sandbox in sys.path

PATCH In review Philippe Reynes 2 participants 6 messages Jan 27, 2022 – Feb 26, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tools: binman: main.py: add build-sandbox in sys.path

Adds build-sandbox in sys.path to look for libfdt, otherwise py_test can't use binman.

---
 tools/binman/main.py | 1 +
 1 file changed, 1 insertion(+)
tools/binman/main.py +1 -0
index 35944f314a..f62394043d 100755
@@ -40,6 +40,7 @@ from patman import test_util
 # Bring in the libfdt module
 sys.path.insert(2, 'scripts/dtc/pylibfdt')
 sys.path.insert(2, os.path.join(srctree, 'scripts/dtc/pylibfdt'))
+sys.path.insert(2, os.path.join(srctree, 'build-sandbox/scripts/dtc/pylibfdt'))
 sys.path.insert(2, os.path.join(srctree, 'build-sandbox_spl/scripts/dtc/pylibfdt'))
 
 # When running under python-coverage on Ubuntu 16.04, the dist-packages
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 tools: binman: main.py: add /tmp/sandbox sys.path

Adds /tmp/sandbox to sys.path to look for libfdt,
otherwise ci is broken if a py_test uses binman.

---
 tools/binman/main.py | 1 +
 1 file changed, 1 insertion(+)
tools/binman/main.py +1 -0
index f62394043d..7d52482c0c 100755
@@ -42,6 +42,7 @@ sys.path.insert(2, 'scripts/dtc/pylibfdt')
 sys.path.insert(2, os.path.join(srctree, 'scripts/dtc/pylibfdt'))
 sys.path.insert(2, os.path.join(srctree, 'build-sandbox/scripts/dtc/pylibfdt'))
 sys.path.insert(2, os.path.join(srctree, 'build-sandbox_spl/scripts/dtc/pylibfdt'))
+sys.path.insert(2, os.path.join(srctree, '/tmp/sandbox/scripts/dtc/pylibfdt'))
 
 # When running under python-coverage on Ubuntu 16.04, the dist-packages
 # directories are dropped from the python path. Add them in so that we can find
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH 2/2] tools: binman: main.py: add /tmp/sandbox sys.path

Hi Philippe,

Quoted 8 lines · Philippe Reynes

Adds /tmp/sandbox to sys.path to look for libfdt,
otherwise ci is broken if a py_test uses binman.

---
 tools/binman/main.py | 1 +
 1 file changed, 1 insertion(+)

Which test uses /tmp/sandbox to build U-Boot? We might need to use --toolpath for this, or set PYTHONPATH in the caller?

Quoted 14 lines
tools/binman/main.py +1 -1
index f62394043d..7d52482c0c 100755
@@ -42,6 +42,7 @@ sys.path.insert(2, 'scripts/dtc/pylibfdt')
 sys.path.insert(2, os.path.join(srctree, 'scripts/dtc/pylibfdt'))
 sys.path.insert(2, os.path.join(srctree, 'build-sandbox/scripts/dtc/pylibfdt'))
 sys.path.insert(2, os.path.join(srctree, 'build-sandbox_spl/scripts/dtc/pylibfdt'))
+sys.path.insert(2, os.path.join(srctree, '/tmp/sandbox/scripts/dtc/pylibfdt'))
 
 # When running under python-coverage on Ubuntu 16.04, the dist-packages
 # directories are dropped from the python path. Add them in so that we can find
--
Quoted 2 lines

2.17.1

Regards,
Simon

#3 lore raw

Re: [PATCH 2/2] tools: binman: main.py: add /tmp/sandbox sys.path

Hi Simon,

Quoted 7 lines · Simon Glass

Hi Philippe,

Quoted 3 lines · Philippe Reynes

Adds /tmp/sandbox to sys.path to look for libfdt,
otherwise ci is broken if a py_test uses binman.

Quoted 6 lines
Quoted 4 lines
---
  tools/binman/main.py | 1 +
  1 file changed, 1 insertion(+)

Which test uses /tmp/sandbox to build U-Boot? We might need to use --toolpath for this, or set PYTHONPATH in the caller?

I have added a test that use binman in vboot (for global image signature, a header added before the image). This path should be added for the CI, otherwise tests "sandbox test.pyt " and "sandbox with clan test.py" fail.

Quoted 10 lines
Quoted 10 lines
tools/binman/main.py +1 -0
index f62394043d..7d52482c0c 100755
@@ -42,6 +42,7 @@ sys.path.insert(2, 'scripts/dtc/pylibfdt')
  sys.path.insert(2, os.path.join(srctree, 'scripts/dtc/pylibfdt'))
  sys.path.insert(2, os.path.join(srctree, 'build-sandbox/scripts/dtc/pylibfdt'))
  sys.path.insert(2, os.path.join(srctree, 'build-sandbox_spl/scripts/dtc/pylibfdt'))
+sys.path.insert(2, os.path.join(srctree, '/tmp/sandbox/scripts/dtc/pylibfdt'))
 
Quoted 7 lines
Quoted 5 lines
tools/binman/main.py +0 -1
  # When running under python-coverage on Ubuntu 16.04, the dist-packages
  # directories are dropped from the python path. Add them in so that we can find
--

2.17.1

Regards,
Simon

Regards,
Philippe

#4 lore raw

Re: [PATCH 2/2] tools: binman: main.py: add /tmp/sandbox sys.path

Hi Philippe,

Quoted 15 lines · Philippe REYNES

Hi Simon,

Quoted 11 lines · Simon Glass

Hi Philippe,

Quoted 7 lines · Philippe Reynes

Adds /tmp/sandbox to sys.path to look for libfdt,
otherwise ci is broken if a py_test uses binman.

---
  tools/binman/main.py | 1 +
  1 file changed, 1 insertion(+)
Quoted 7 lines
Quoted 2 lines

Which test uses /tmp/sandbox to build U-Boot? We might need to use --toolpath for this, or set PYTHONPATH in the caller?

I have added a test that use binman in vboot (for global image signature, a header added before the image). This path should be added for the CI, otherwise tests "sandbox test.pyt " and "sandbox with clan test.py" fail.

But the tests should run in the board directory provided to pytest.

I will have to look at your test.

Quoted 19 lines
Quoted 12 lines
Quoted 12 lines
tools/binman/main.py +1 -0
index f62394043d..7d52482c0c 100755
@@ -42,6 +42,7 @@ sys.path.insert(2, 'scripts/dtc/pylibfdt')
  sys.path.insert(2, os.path.join(srctree, 'scripts/dtc/pylibfdt'))
  sys.path.insert(2, os.path.join(srctree, 'build-sandbox/scripts/dtc/pylibfdt'))
  sys.path.insert(2, os.path.join(srctree, 'build-sandbox_spl/scripts/dtc/pylibfdt'))
+sys.path.insert(2, os.path.join(srctree, '/tmp/sandbox/scripts/dtc/pylibfdt'))
 
Quoted 7 lines
Quoted 5 lines
tools/binman/main.py +0 -1
  # When running under python-coverage on Ubuntu 16.04, the dist-packages
  # directories are dropped from the python path. Add them in so that we can find
--

2.17.1

Regards,
Simon

Quoted 5 lines

Regards,
Philippe

-- This message and any attachments herein are confidential, intended solely for the addressees and are SoftAtHome’s ownership. Any unauthorized use or dissemination is prohibited. If you are not the intended addressee of this message, please cancel it immediately and inform the sender.

Is this supposed to be sent on the mailing list?

Regards,
Simon

Reviewed-by on v1 1/2
#5 lore raw
In reply to Philippe Reynes

Hi Philippe

Quoted 8 lines · Philippe Reynes

Adds build-sandbox in sys.path to look for libfdt, otherwise py_test can't use binman.

---
 tools/binman/main.py | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines
tools/binman/main.py +1 -1
index 35944f314a..f62394043d 100755
@@ -40,6 +40,7 @@ from patman import test_util
 # Bring in the libfdt module
 sys.path.insert(2, 'scripts/dtc/pylibfdt')
 sys.path.insert(2, os.path.join(srctree, 'scripts/dtc/pylibfdt'))
+sys.path.insert(2, os.path.join(srctree, 'build-sandbox/scripts/dtc/pylibfdt'))
 sys.path.insert(2, os.path.join(srctree, 'build-sandbox_spl/scripts/dtc/pylibfdt'))
 
 # When running under python-coverage on Ubuntu 16.04, the dist-packages
--
Quoted 2 lines

2.17.1

The build-sandbox_spl path should be enough though, shouldn't it? Have you not built that?

Regards,
Simon