buildman: Correct various issues with missing blobs
v5 cover buildman: Correct various issues with missing blobs
This series attempts to tidy up the problem of missing blobs, making U-Boot default to failing the build, but providing ways to configure this so that buildman can still be used for build testing by people who don't have the blobs or don't care about them.
This is based on discussion in [1] as well as some experimentation.
It also moves the buildman docs to rST and tidies up some toolchain settings and documentation.
[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Changes in v5:
- Add a note that -W requires -M
- Update ftest use of -W to avoid confusion
- Update exit-status docs to mention -W also
- Rename flag to --ignore-missing
- Update commit message
- Correct help for -M flag
- Correct --- Warning --- section
- Convert the buildman args to a list
- Add new patch with a separate section about environment variables
- Add new patch to ensure config_fname is inited
- Add new patch to reinstate removal of temp output dir in tests
- Split out config_fname change into a separate patch
- Rename GetGlobalValue to GetGlobalItemValue
- Fix 'items' typo
- Simplify implementation of GetGlobalItemValue()
- Use '[global]' for the doc heading
- Use double tick for arguments
- Drop redundant allow_missing code
- Split out the tests more
- Add new patch with documentation for the command line args
Changes in v4:
- Add a patch to update the arc toolchain
- Add new patch to update the default settings file
- Leave the arc toolchain in there
- Various changes that were unfortunately not recorded
Changes in v3:
- Add new patch to convert documentation to rST
- Add new patch to drop mention of MAKEALL
- Add new patch to drop mention of old architectures
- Add tests docs and a settings-file option
Changes in v2:
- Use a separate rule for running binman
Simon Glass (14):
image: Correct strncpy() warning with image_set_name()
Makefile: Correct the binman rule
doc: Correct the path to the Makefile documentation
binman: Use an exit code when blobs are missing
buildman: Convert documentation to rST
buildman: Drop mention of MAKEALL
buildman: Update the arc toolchain
buildman: Update the default settings file
buildman: Drop mention of old architectures
buildman: Detect binman reporting missing blobs
binman: Add a separate section about environment variables
buildman: Ensure config_fname is inited
buildman: Reinstate removal of temp output dir in tests
binman: Add documentation for the command line args
Tom Rini (2):
global: Do not default to faking missing binaries for buildman
buildman: Add --allow-missing flag to allow missing blobs
.azure-pipelines.yml | 2 +- .gitlab-ci.yml | 6 +- Makefile | 15 +- doc/build/buildman.rst | 1 + doc/build/index.rst | 1 + include/image.h | 8 +- scripts/Kbuild.include | 2 +- tools/binman/binman.rst | 352 +++++++- tools/binman/cmdline.py | 5 +- tools/binman/control.py | 9 +- tools/binman/ftest.py | 19 +- tools/buildman/README | 1349 ------------------------------- tools/buildman/README.rst | 1 + tools/buildman/bsettings.py | 17 +- tools/buildman/builder.py | 5 +- tools/buildman/builderthread.py | 8 +- tools/buildman/buildman.rst | 1328 ++++++++++++++++++++++++++++++ tools/buildman/cmdline.py | 6 + tools/buildman/control.py | 28 +- tools/buildman/func_test.py | 112 ++- 20 files changed, 1893 insertions(+), 1381 deletions(-) create mode 120000 doc/build/buildman.rst delete mode 100644 tools/buildman/README create mode 120000 tools/buildman/README.rst create mode 100644 tools/buildman/buildman.rst
Signature · 1 line
2.38.1.431.g37b22c650d-goog
PATCH v5 1/16 image: Correct strncpy() warning with image_set_name()
gcc 12 seems to warn on strncpy() as a matter of course. Rewrite the code a different way to do the same thing, to avoid the warning.
---
(no changes since v1)
include/image.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
include/image.h +7 -1
@@ -853,7 +853,13 @@ image_set_hdr_b(comp) /* image_set_comp */static inline void image_set_name (struct legacy_img_hdr *hdr,const char *name) { -strncpy (image_get_name (hdr), name,IH_NMLEN ); +/* +* This is equivalent to: strncpy(image_get_name(hdr), name, IH_NMLEN); +* +* Use the tortured code below to avoid a warning with gcc 12. We do not +* want to include a nul terminator if the name is of length IH_NMLEN +*/ +memcpy (image_get_name (hdr), name,strnlen (name,IH_NMLEN )); }int image_check_hcrc (const struct legacy_img_hdr *hdr);
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 01/16] image: Correct strncpy() warning with image_set_name()
Quoted 11 lines · Simon Glass
gcc 12 seems to warn on
strncpy()as a matter of course. Rewrite the code a different way to do the same thing, to avoid the warning.Signed-off-by Simon Glass <[email protected]>---
(no changes since v1)
include/image.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Applied to u-boot-dm.
PATCH v5 2/16 Makefile: Correct the binman rule
In reply to Simon GlassThis currently uses if_changed on a phony target. Use a real file as the target and add FORCE at the end, as required. Drop the 'inputs' phony since it is not needed.
---
(no changes since v2)
Changes in v2:
- Use a separate rule for running binman
Makefile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
Makefile +4 -7
@@ -1108,18 +1108,15 @@ define deprecated endef -PHONY += inputs -inputs: $(INPUTS-y) - -all: .binman_stamp inputs +# Timestamp file to make sure that binman always runs +.binman_stamp: $(INPUTS-y) FORCE ifeq ($(CONFIG_BINMAN),y) $(call if_changed,binman) endif - -# Timestamp file to make sure that binman always runs -.binman_stamp: FORCE @touch $@ +all: .binman_stamp + ifeq ($(CONFIG_DEPRECATED),y) $(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.") endif
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 02/16] Makefile: Correct the binman rule
Quoted 3 lines · On Wednesday 09 November 2022 19:14:40 Simon Glass wrote:
This currently uses
if_changedon a phony target. Use a real file as the target and add FORCE at the end, as required. Drop the 'inputs' phony since it is not needed.
Hello! Just one small note. It is quite surprising that .buildman_stamp target is called also when CONFIG_BINMAN is disabled. Not sure if this is expected but seems it should not cause any issue.
Quoted 41 lines
Signed-off-by Simon Glass <[email protected]>---
(no changes since v2)
Changes in v2:
- Use a separate rule for running binmanMakefile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)Makefile +4
-7@@ -1108,18 +1108,15 @@ define deprecated endef -PHONY += inputs -inputs: $(INPUTS-y) - -all: .binman_stamp inputs +# Timestamp file to make sure that binman always runs +.binman_stamp: $(INPUTS-y) FORCE ifeq ($(CONFIG_BINMAN),y) $(call if_changed,binman) endif - -# Timestamp file to make sure that binman always runs -.binman_stamp: FORCE @touch $@ +all: .binman_stamp + ifeq ($(CONFIG_DEPRECATED),y) $(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.") endifSignature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 02/16] Makefile: Correct the binman rule
Hi Pali,
Quoted 9 lines · Pali Rohár
Quoted 3 lines · On Wednesday 09 November 2022 19:14:40 Simon Glass wrote:
This currently uses
if_changedon a phony target. Use a real file as the target and add FORCE at the end, as required. Drop the 'inputs' phony since it is not needed.Hello! Just one small note. It is quite surprising that .buildman_stamp target is called also when
CONFIG_BINMANis disabled. Not sure if this is expected but seems it should not cause any issue.
I don't think it does. Bit by bit, binman will become the final step for many boards. There is just so much complexity in building firmware images these days.
Regards,
Simon
Re: [PATCH v5 02/16] Makefile: Correct the binman rule
Hi Pali,
Quoted 9 lines · Pali Rohár
Quoted 3 lines · On Wednesday 09 November 2022 19:14:40 Simon Glass wrote:
This currently uses
if_changedon a phony target. Use a real file as the target and add FORCE at the end, as required. Drop the 'inputs' phony since it is not needed.Hello! Just one small note. It is quite surprising that .buildman_stamp target is called also when
CONFIG_BINMANis disabled. Not sure if this is expected but seems it should not cause any issue.
I don't think it does. Bit by bit, binman will become the final step for many boards. There is just so much complexity in building firmware images these days.
Regards,
Simon
Applied to u-boot-dm, thanks!
PATCH v5 3/16 doc: Correct the path to the Makefile documentation
In reply to Simon GlassThis is out-of-date now. Fix it.
---
(no changes since v1)
scripts/Kbuild.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Kbuild.include +1 -1
@@ -229,7 +229,7 @@ objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) # if_changed_dep - as if_changed, but uses fixdep to reveal dependencies # including used config symbols # if_changed_rule - as if_changed but execute rule instead -# See Documentation/kbuild/makefiles.txt for more info +# See doc/develop/makefiles.rst for more info ifneq ($(KBUILD_NOCMDDEP),1) # Check if both arguments are the same including their order. Result is empty
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 03/16] doc: Correct the path to the Makefile documentation
This is out-of-date now. Fix it.
---
(no changes since v1)
scripts/Kbuild.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-dm, thanks!
PATCH v5 4/16 binman: Use an exit code when blobs are missing
In reply to Simon GlassAt present binman returns success when told to handle missing/faked blobs or missing bintools. This is confusing since in fact the resulting image cannot work.
Use exit code 103 to signal this problem, with a -W option to convert it to a warning.
Rename the flag to --ignore-missing since it controls bintools also.
Add documentation about exit codes while we are here.
---
Changes in v5:
- Add a note that -W requires -M
- Update ftest use of -W to avoid confusion
- Update exit-status docs to mention -W also
- Rename flag to --ignore-missing
- Update commit message
- Correct help for -M flag
tools/binman/binman.rst | 22 ++++++++++++++++++++++ tools/binman/cmdline.py | 5 ++++- tools/binman/control.py | 9 ++++++++- tools/binman/ftest.py | 19 +++++++++++++++++-- 4 files changed, 51 insertions(+), 4 deletions(-)
tools/binman/binman.rst +22 -0
@@ -1461,6 +1461,10 @@ space-separated list of directories to search for binary blobs:: odroid-c4/build/board/hardkernel/odroidc4/firmware \ odroid-c4/build/scp_task" binman ... +Note that binman fails with exit code 103 when there are missing blobs. If you +wish binman to continue anyway, you can pass `-W` to binman. + + Code coverage -------------
@@ -1472,6 +1476,24 @@ To enable Python test coverage on Debian-type distributions (e.g. Ubuntu):: $ sudo apt-get install python-coverage python3-coverage python-pytest +Exit status +----------- + +Binman produces the following exit codes: + +0 + Success + +1 + Any sort of failure - see output for more details + +103 + There are missing external blobs or bintools. This is only returned if + -M is passed to binman, otherwise missing blobs return an exit status of 1. + Note, if -W is passed as well as -M, then this is converted into a warning + and will return an exit status of 0 instead. + + Error messages --------------
tools/binman/cmdline.py +4 -1
@@ -114,7 +114,7 @@ controlled by a description in the board device tree.''' build_parser.add_argument('-m', '--map', action='store_true', default=False, help='Output a map file for each image') build_parser.add_argument('-M', '--allow-missing', action='store_true', - default=False, help='Allow external blobs to be missing') + default=False, help='Allow external blobs and bintools to be missing') build_parser.add_argument('-n', '--no-expanded', action='store_true', help="Don't use 'expanded' versions of entries where available; " "normally 'u-boot' becomes 'u-boot-expanded', for example")
@@ -128,6 +128,9 @@ controlled by a description in the board device tree.''' default=False, help='Update the binman node with offset/size info') build_parser.add_argument('--update-fdt-in-elf', type=str, help='Update an ELF file with the output dtb: infile,outfile,begin_sym,end_sym') + build_parser.add_argument( + '-W', '--ignore-missing', action='store_true', default=False, + help='Return success even if there are missing blobs/bintools (requires -M)') subparsers.add_parser( 'bintool-docs', help='Write out bintool documentation (see bintool.rst)')
tools/binman/control.py +8 -1
@@ -741,8 +741,15 @@ def Binman(args): data = state.GetFdtForEtype('u-boot-dtb').GetContents() elf.UpdateFile(*elf_params, data) + # This can only be True if -M is provided, since otherwise binman + # would have raised an error already if invalid: - tout.warning("\nSome images are invalid") + msg = '\nSome images are invalid' + if args.ignore_missing: + tout.warning(msg) + else: + tout.error(msg) + return 103 # Use this to debug the time take to pack the image #state.TimingShow()
tools/binman/ftest.py +17 -2
@@ -340,7 +340,7 @@ class TestFunctional(unittest.TestCase): use_expanded=False, verbosity=None, allow_missing=False, allow_fake_blobs=False, extra_indirs=None, threads=None, test_section_timeout=False, update_fdt_in_elf=None, - force_missing_bintools=''): + force_missing_bintools='', ignore_missing=False): """Run binman with a given test file Args:
@@ -403,6 +403,8 @@ class TestFunctional(unittest.TestCase): args.append('-a%s=%s' % (arg, value)) if allow_missing: args.append('-M') + if ignore_missing: + args.append('-W') if allow_fake_blobs: args.append('--fake-ext-blobs') if force_missing_bintools:
@@ -3725,9 +3727,22 @@ class TestFunctional(unittest.TestCase): def testExtblobMissingOk(self): """Test an image with an missing external blob that is allowed""" with test_util.capture_sys_output() as (stdout, stderr): - self._DoTestFile('158_blob_ext_missing.dts', allow_missing=True) + ret = self._DoTestFile('158_blob_ext_missing.dts', + allow_missing=True) + self.assertEqual(103, ret) err = stderr.getvalue() self.assertRegex(err, "Image 'main-section'.*missing.*: blob-ext") + self.assertIn('Some images are invalid', err) + + def testExtblobMissingOkFlag(self): + """Test an image with an missing external blob allowed with -W""" + with test_util.capture_sys_output() as (stdout, stderr): + ret = self._DoTestFile('158_blob_ext_missing.dts', + allow_missing=True, ignore_missing=True) + self.assertEqual(0, ret) + err = stderr.getvalue() + self.assertRegex(err, "Image 'main-section'.*missing.*: blob-ext") + self.assertIn('Some images are invalid', err) def testExtblobMissingOkSect(self): """Test an image with an missing external blob that is allowed"""
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 04/16] binman: Use an exit code when blobs are missing
At present binman returns success when told to handle missing/faked blobs or missing bintools. This is confusing since in fact the resulting image cannot work.
Use exit code 103 to signal this problem, with a -W option to convert it to a warning.
Rename the flag to --ignore-missing since it controls bintools also.
Add documentation about exit codes while we are here.
---
Changes in v5:
- Add a note that -W requires -M
- Update ftest use of -W to avoid confusion
- Update exit-status docs to mention -W also
- Rename flag to --ignore-missing
- Update commit message
- Correct help for -M flag
tools/binman/binman.rst | 22 ++++++++++++++++++++++ tools/binman/cmdline.py | 5 ++++- tools/binman/control.py | 9 ++++++++- tools/binman/ftest.py | 19 +++++++++++++++++-- 4 files changed, 51 insertions(+), 4 deletions(-)
Applied to u-boot-dm, thanks!
PATCH v5 5/16 buildman: Convert documentation to rST
In reply to Simon GlassConvert the buildman documentation to rST format and include it in the 'build' section.
---
Changes in v5:
- Correct --- Warning --- section
- Convert the buildman args to a list
Changes in v3:
- Add new patch to convert documentation to rST
doc/build/buildman.rst | 1 + doc/build/index.rst | 1 + tools/buildman/README | 1349 --------------------------------- tools/buildman/README.rst | 1 + tools/buildman/buildman.rst | 1406 +++++++++++++++++++++++++++++++++++ tools/buildman/control.py | 4 +- tools/buildman/func_test.py | 4 +- 7 files changed, 1413 insertions(+), 1353 deletions(-) create mode 120000 doc/build/buildman.rst delete mode 100644 tools/buildman/README create mode 120000 tools/buildman/README.rst create mode 100644 tools/buildman/buildman.rst
doc/build/buildman.rst new file +1 -0
@@ -0,0 +1 @@ +../../tools/buildman/buildman.rst
doc/build/index.rst +1 -0
@@ -11,3 +11,4 @@ Build U-Boot clang docker tools + buildman
tools/buildman/README deleted +0 -1349
1,349 lines not on this page · raw message
tools/buildman/README.rst new file +1 -0
@@ -0,0 +1 @@ +buildman.rst
tools/buildman/buildman.rst new file +1406 -0
1,406 lines not on this page · raw message
tools/buildman/control.py +2 -2
@@ -136,8 +136,8 @@ def DoBuildman(options, args, toolchains=None, make_func=None, brds=None, if options.full_help: tools.print_full_help( - os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), 'README') - ) + os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), + 'README.rst')) return 0 gitutil.setup()
tools/buildman/func_test.py +2 -2
@@ -249,7 +249,7 @@ class TestFunctional(unittest.TestCase): def testFullHelp(self): command.test_result = None result = self._RunBuildman('-H') - help_file = os.path.join(self._buildman_dir, 'README') + help_file = os.path.join(self._buildman_dir, 'README.rst') # Remove possible extraneous strings extra = '::::::::::::::\n' + help_file + '\n::::::::::::::\n' gothelp = result.stdout.replace(extra, '')
@@ -260,7 +260,7 @@ class TestFunctional(unittest.TestCase): def testHelp(self): command.test_result = None result = self._RunBuildman('-h') - help_file = os.path.join(self._buildman_dir, 'README') + help_file = os.path.join(self._buildman_dir, 'README.rst') self.assertTrue(len(result.stdout) > 1000) self.assertEqual(0, len(result.stderr)) self.assertEqual(0, result.return_code)
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 05/16] buildman: Convert documentation to rST
Convert the buildman documentation to rST format and include it in the 'build' section.
---
Changes in v5:
- Correct --- Warning --- section
- Convert the buildman args to a list
Changes in v3:
- Add new patch to convert documentation to rST
doc/build/buildman.rst | 1 + doc/build/index.rst | 1 + tools/buildman/README | 1349 --------------------------------- tools/buildman/README.rst | 1 + tools/buildman/buildman.rst | 1406 +++++++++++++++++++++++++++++++++++ tools/buildman/control.py | 4 +- tools/buildman/func_test.py | 4 +- 7 files changed, 1413 insertions(+), 1353 deletions(-) create mode 120000 doc/build/buildman.rst delete mode 100644 tools/buildman/README create mode 120000 tools/buildman/README.rst create mode 100644 tools/buildman/buildman.rst
Applied to u-boot-dm, thanks!
PATCH v5 6/16 buildman: Drop mention of MAKEALL
In reply to Simon GlassThis script was removed about 6 years ago so most people should be aware that it is not needed anymore. Drop mention of it.
---
(no changes since v3)
Changes in v3:
- Add new patch to drop mention of MAKEALL
tools/buildman/buildman.rst | 110 ------------------------------------ 1 file changed, 110 deletions(-)
tools/buildman/buildman.rst +0 -110
@@ -3,8 +3,6 @@ Buildman build tool =================== -(Please read 'How to change from MAKEALL' if you are used to that tool) - Quick-start -----------
@@ -1250,114 +1248,6 @@ latter number depends on the speed of your machine and the efficiency of the U-Boot build. -How to change from MAKEALL --------------------------- - -Buildman includes most of the features of MAKEALL and is generally faster -and easier to use. In particular it builds entire branches: if a particular -commit introduces an error in a particular board, buildman can easily show -you this, even if a later commit fixes that error. - -The reasons to deprecate MAKEALL are: -- We don't want to maintain two build systems -- Buildman is typically faster -- Buildman has a lot more features - -But still, many people will be sad to lose MAKEALL. If you are used to -MAKEALL, here are a few pointers. - -First you need to set up your tool chains - see the 'Setting up' section -for details. Once you have your required toolchain(s) detected then you are -ready to go. - -To build the current source tree, run buildman without a -b flag: - -.. code-block:: bash - - ./tools/buildman/buildman <list of things to build> - -This will build the current source tree for the given boards and display -the results and errors. - -However buildman usually works on entire branches, and for that you must -specify a board flag: - -.. code-block:: bash - - ./tools/buildman/buildman -b <branch_name> <list of things to build> - -followed by (afterwards, or perhaps concurrently in another terminal): - -.. code-block:: bash - - ./tools/buildman/buildman -b <branch_name> -s <list of things to build> - -to see the results of the build. Rather than showing you all the output, -buildman just shows a summary, with red indicating that a commit introduced -an error and green indicating that a commit fixed an error. Use the -e -flag to see the full errors and -l to see which boards caused which errors. - -If you really want to see build results as they happen, use -v when doing a -build (and -e to see the errors/warnings too). - -You don't need to stick around on that branch while buildman is running. It -checks out its own copy of the source code, so you can change branches, -add commits, etc. without affecting the build in progress. - -The <list of things to build> can include board names, architectures or the -like. There are no flags to disambiguate since ambiguities are rare. Using -the examples from MAKEALL: - -Examples:: - - - build all Power Architecture boards: - MAKEALL -a powerpc - MAKEALL --arch powerpc - MAKEALL powerpc - ** buildman -b <branch> powerpc - - build all PowerPC boards manufactured by vendor "esd": - MAKEALL -a powerpc -v esd - ** buildman -b <branch> esd - - build all PowerPC boards manufactured either by "keymile" or "siemens": - MAKEALL -a powerpc -v keymile -v siemens - ** buildman -b <branch> keymile siemens - - build all Freescale boards with MPC83xx CPUs, plus all 4xx boards: - MAKEALL -c mpc83xx -v freescale 4xx - ** buildman -b <branch> mpc83xx freescale 4xx - -Buildman automatically tries to use all the CPUs in your machine. If you -are building a lot of boards it will use one thread for every CPU core -it detects in your machine. This is like MAKEALL's BUILD_NBUILDS option. -You can use the -T flag to change the number of threads. If you are only -building a few boards, buildman will automatically run make with the -j -flag to increase the number of concurrent make tasks. It isn't normally -that helpful to fiddle with this option, but if you use the BUILD_NCPUS -option in MAKEALL then -j is the equivalent in buildman. - -Buildman puts its output in ../<branch_name> by default but you can change -this with the -o option. Buildman normally does out-of-tree builds: use -i -to disable that if you really want to. But be careful that once you have -used -i you pollute buildman's copies of the source tree, and you will need -to remove the build directory (normally ../<branch_name>) to run buildman -in normal mode (without -i). - -Buildman doesn't keep the output result normally, but use the -k option to -do this. - -Please read 'Theory of Operation' a few times as it will make a lot of -things clearer. - -Some options you might like are:: - - -B shows which functions are growing/shrinking in which commit - great - for finding code bloat. - -S shows image sizes for each commit (just an overall summary) - -u shows boards that you haven't built yet - --step 0 will build just the upstream commit and the last commit of your - branch. This is often a quick sanity check that your branch doesn't - break anything. But note this does not check bisectability! - - Using boards.cfg ----------------
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 06/16] buildman: Drop mention of MAKEALL
This script was removed about 6 years ago so most people should be aware that it is not needed anymore. Drop mention of it.
---
(no changes since v3)
Changes in v3:
- Add new patch to drop mention of MAKEALL
tools/buildman/buildman.rst | 110 ------------------------------------ 1 file changed, 110 deletions(-)
Applied to u-boot-dm, thanks!
PATCH v5 7/16 buildman: Update the arc toolchain
In reply to Simon GlassThere is one on kernel.org but it does not build the hsdk_4xd board. Add a link to one which does.
---
(no changes since v4)
Changes in v4:
- Add a patch to update the arc toolchain
tools/buildman/buildman.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
tools/buildman/buildman.rst +4 -1
@@ -195,6 +195,9 @@ Setting up arm: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux aarch64: /opt/linaro/gcc-linaro-aarch64-none-elf-4.8-2013.10_linux + [toolchain-prefix] + arc = /opt/arc/arc_gnu_2021.03_prebuilt_elf32_le_linux_install/bin/arc-elf32- + [toolchain-alias] x86: i386 blackfin: bfin
@@ -1280,7 +1283,7 @@ Thanks to Grant Grundler <[email protected]> for his ideas for improving the build speed by building all commits for a board instead of the other way around. -.. _`Arc Toolchain`: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2016.09-release/arc_gnu_2016.09_prebuilt_uclibc_le_archs_linux_install.tar.gz +.. _`Arc Toolchain`: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2021.03-release/arc_gnu_2021.03_prebuilt_elf32_le_linux_install.tar.gz .. _`Blackfin Toolchain`: http://sourceforge.net/projects/adi-toolchain/files/blackfin-toolchain-elf-gcc-4.5-2014R1_45-RC2.x86_64.tar.bz2 .. _`Nios2 Toolchain`: http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu/sourceryg++-2015.11-27-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2 .. _`SH Toolchain`: http://sourcery.mentor.com/public/gnu_toolchain/sh-linux-gnu/renesas-4.4-200-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 07/16] buildman: Update the arc toolchain
There is one on kernel.org but it does not build the hsdk_4xd board. Add a link to one which does.
---
(no changes since v4)
Changes in v4:
- Add a patch to update the arc toolchain
tools/buildman/buildman.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Applied to u-boot-dm, thanks!
PATCH v5 8/16 buildman: Update the default settings file
In reply to Simon GlassThe settings file omits a few lines which are useful for getting every board building. Add these and update the documentation tool.
---
(no changes since v4)
Changes in v4:
- Add new patch to update the default settings file
tools/buildman/bsettings.py | 3 +++ tools/buildman/buildman.rst | 2 ++ 2 files changed, 5 insertions(+)
tools/buildman/bsettings.py +3 -0
@@ -79,10 +79,13 @@ other = / [toolchain-prefix] # name = path to prefix # e.g. x86 = /opt/gcc-4.6.3-nolibc/x86_64-linux/bin/x86_64-linux- +# arc = /opt/arc/arc_gnu_2021.03_prebuilt_elf32_le_linux_install/bin/arc-elf32- [toolchain-alias] # arch = alias # Indicates which toolchain should be used to build for that arch +riscv = riscv32 +sh = sh4 x86 = i386 blackfin = bfin openrisc = or1k
tools/buildman/buildman.rst +2 -0
@@ -199,6 +199,8 @@ Setting up arc = /opt/arc/arc_gnu_2021.03_prebuilt_elf32_le_linux_install/bin/arc-elf32- [toolchain-alias] + riscv = riscv32 + sh = sh4 x86: i386 blackfin: bfin openrisc: or1k
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 08/16] buildman: Update the default settings file
The settings file omits a few lines which are useful for getting every board building. Add these and update the documentation tool.
---
(no changes since v4)
Changes in v4:
- Add new patch to update the default settings file
tools/buildman/bsettings.py | 3 +++ tools/buildman/buildman.rst | 2 ++ 2 files changed, 5 insertions(+)
Applied to u-boot-dm, thanks!
PATCH v5 9/16 buildman: Drop mention of old architectures
In reply to Simon GlassSupport for some architectures has been removed since buildman was first written. Also all toolchains are now available at kernel.org so we don't need the links, except for arc where the kernel.org toolchain fails to build all boards.
---
(no changes since v4)
Changes in v4:
- Leave the arc toolchain in there
Changes in v3:
- Add new patch to drop mention of old architectures
tools/buildman/bsettings.py | 2 -- tools/buildman/buildman.rst | 18 +----------------- 2 files changed, 1 insertion(+), 19 deletions(-)
tools/buildman/bsettings.py +0 -2
@@ -87,8 +87,6 @@ other = / riscv = riscv32 sh = sh4 x86 = i386 -blackfin = bfin -openrisc = or1k [make-flags] # Special flags to pass to 'make' for certain boards, e.g. to pass a test
tools/buildman/buildman.rst +1 -17
@@ -202,8 +202,6 @@ Setting up riscv = riscv32 sh = sh4 x86: i386 - blackfin: bfin - openrisc: or1k This selects the available toolchain paths. Add the base directory for
@@ -480,21 +478,12 @@ Setting up For those not available from kernel.org, download from the following links: - `Arc Toolchain`_ - - `Blackfin Toolchain`_ - - `Nios2 Toolchain`_ - - `SH Toolchain`_ - - Note openrisc kernel.org toolchain is out of date. Download the latest one - from `OpenRISC Toolchains`_, e.g. `OpenRISC 4.8.1`_. Buildman should now be set up to use your new toolchain. At the time of writing, U-Boot has these architectures: - arc, arm, blackfin, m68k, microblaze, mips, nios2, openrisc - powerpc, sandbox, sh, sparc, x86 - - Of these, only arc is not available at kernel.org. + arc, arm, m68k, microblaze, mips, nios2, powerpc, sandbox, sh, x86, xtensa How to run it
@@ -1286,11 +1275,6 @@ the build speed by building all commits for a board instead of the other way around. .. _`Arc Toolchain`: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2021.03-release/arc_gnu_2021.03_prebuilt_elf32_le_linux_install.tar.gz -.. _`Blackfin Toolchain`: http://sourceforge.net/projects/adi-toolchain/files/blackfin-toolchain-elf-gcc-4.5-2014R1_45-RC2.x86_64.tar.bz2 -.. _`Nios2 Toolchain`: http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu/sourceryg++-2015.11-27-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2 -.. _`SH Toolchain`: http://sourcery.mentor.com/public/gnu_toolchain/sh-linux-gnu/renesas-4.4-200-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2 -.. _`OpenRISC Toolchains`: http://opencores.org/or1k/OpenRISC_GNU_tool_chain#Prebuilt_versions -.. _`OpenRISC 4.8.1`: ftp://ocuser:[email protected]/toolchain/gcc-or1k-elf-4.8.1-x86.tar.bz2 .. sectionauthor:: Simon Glass .. sectionauthor:: Copyright (c) 2013 The Chromium OS Authors.
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 09/16] buildman: Drop mention of old architectures
Support for some architectures has been removed since buildman was first written. Also all toolchains are now available at kernel.org so we don't need the links, except for arc where the kernel.org toolchain fails to build all boards.
---
(no changes since v4)
Changes in v4:
- Leave the arc toolchain in there
Changes in v3:
- Add new patch to drop mention of old architectures
tools/buildman/bsettings.py | 2 -- tools/buildman/buildman.rst | 18 +----------------- 2 files changed, 1 insertion(+), 19 deletions(-)
Applied to u-boot-dm, thanks!
PATCH v5 10/16 buildman: Detect binman reporting missing blobs
In reply to Simon GlassBuildman should consider a build as a success (with warnings) if missing blobs have been dealt with by binman, even though buildman itself returns and error code overall. This is how other warnings are dealt with.
We cannot easily access the 103 exit code, so detect the problem in the output.
With this change, missing blobs result in an exit code of 101, although they still indicate failure.
---
(no changes since v1)
tools/buildman/builderthread.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
tools/buildman/builderthread.py +5 -1
@@ -288,10 +288,14 @@ class BuilderThread(threading.Thread): args.append('cfg') result = self.Make(commit, brd, 'build', cwd, *args, env=env) + if (result.return_code == 2 and + ('Some images are invalid' in result.stderr)): + # This is handled later by the check for output in + # stderr + result.return_code = 0 if adjust_cfg: errs = cfgutil.check_cfg_file(cfg_file, adjust_cfg) if errs: - print('errs', errs) result.stderr += errs result.return_code = 1 result.stderr = result.stderr.replace(src_dir + '/', '')
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 10/16] buildman: Detect binman reporting missing blobs
Buildman should consider a build as a success (with warnings) if missing blobs have been dealt with by binman, even though buildman itself returns and error code overall. This is how other warnings are dealt with.
We cannot easily access the 103 exit code, so detect the problem in the output.
With this change, missing blobs result in an exit code of 101, although they still indicate failure.
---
(no changes since v1)
tools/buildman/builderthread.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Applied to u-boot-dm, thanks!
Re: [PATCH v5 10/16] buildman: Detect binman reporting missing blobs
In reply to Simon GlassQuoted 10 lines · Simon Glass
Buildman should consider a build as a success (with warnings) if missing blobs have been dealt with by binman, even though buildman itself returns and error code overall. This is how other warnings are dealt with.
We cannot easily access the 103 exit code, so detect the problem in the output.
With this change, missing blobs result in an exit code of 101, although they still indicate failure.
So either this or Tom's change of "buildman: Add --allow-missing flag to allow missing blobs" has broken rc3 builds for Allwinner boards on Fedora. Tom's isn't a clean revert and I've not had time to test that but either way the SCP firmware is optional and it works just fine, ATM we don't have the SCP firmware available to Fedora builds.
Maybe that sort of of change to the build is expected but which ever patch it is, and adding "BINMAN_ALLOW_MISSING=1" changes the error but doesn't change the overall failure, I wouldn't expect this sort of breakage so late in the cycle.
Do either of you know which one does the hard breakage here? I thought I'd highlight it now because I don't have time over the next two weeks to fully investigate the regression.
Peter
Quoted 31 lines
Signed-off-by Simon Glass <[email protected]>---
(no changes since v1)
tools/buildman/builderthread.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)tools/buildman/builderthread.py +5
-2@@ -288,10 +288,14 @@ class BuilderThread(threading.Thread): args.append('cfg') result = self.Make(commit, brd, 'build', cwd, *args, env=env) + if (result.return_code == 2 and + ('Some images are invalid' in result.stderr)): + # This is handled later by the check for output in + # stderr + result.return_code = 0 if adjust_cfg: errs = cfgutil.check_cfg_file(cfg_file, adjust_cfg) if errs: - print('errs', errs) result.stderr += errs result.return_code = 1 result.stderr = result.stderr.replace(src_dir + '/', '') --2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 10/16] buildman: Detect binman reporting missing blobs
Quoted 18 lines · Peter Robinson
Quoted 10 lines · Simon Glass
Buildman should consider a build as a success (with warnings) if missing blobs have been dealt with by binman, even though buildman itself returns and error code overall. This is how other warnings are dealt with.
We cannot easily access the 103 exit code, so detect the problem in the output.
With this change, missing blobs result in an exit code of 101, although they still indicate failure.
So either this or Tom's change of "buildman: Add --allow-missing flag to allow missing blobs" has broken rc3 builds for Allwinner boards on Fedora. Tom's isn't a clean revert and I've not had time to test that but either way the SCP firmware is optional and it works just fine, ATM we don't have the SCP firmware available to Fedora builds.
Quoted 8 lines
Maybe that sort of of change to the build is expected but which ever patch it is, and adding "BINMAN_ALLOW_MISSING=1" changes the error but doesn't change the overall failure, I wouldn't expect this sort of breakage so late in the cycle.
Do either of you know which one does the hard breakage here? I thought I'd highlight it now because I don't have time over the next two weeks to fully investigate the regression.
So, is this for 32bit or 64bit? I only have a 64bit allwinner in my lab and it needs (I've been assuming, since I'm also passing in SCP) BL31 as well. And since you're mentioning buildman, I assume Fedora IS using that rather than make to build everything. I'll go and think about this now..
Signature · 1 line
Tom
Re: [PATCH v5 10/16] buildman: Detect binman reporting missing blobs
Quoted 25 lines · Tom Rini
Quoted 23 lines · Peter Robinson
Quoted 10 lines · Simon Glass
Buildman should consider a build as a success (with warnings) if missing blobs have been dealt with by binman, even though buildman itself returns and error code overall. This is how other warnings are dealt with.
We cannot easily access the 103 exit code, so detect the problem in the output.
With this change, missing blobs result in an exit code of 101, although they still indicate failure.
So either this or Tom's change of "buildman: Add --allow-missing flag to allow missing blobs" has broken rc3 builds for Allwinner boards on Fedora. Tom's isn't a clean revert and I've not had time to test that but either way the SCP firmware is optional and it works just fine, ATM we don't have the SCP firmware available to Fedora builds.
Maybe that sort of of change to the build is expected but which ever patch it is, and adding "BINMAN_ALLOW_MISSING=1" changes the error but doesn't change the overall failure, I wouldn't expect this sort of breakage so late in the cycle.
Quoted 5 lines
Quoted 3 lines
Do either of you know which one does the hard breakage here? I thought I'd highlight it now because I don't have time over the next two weeks to fully investigate the regression.
So, is this for 32bit or 64bit? I only have a 64bit allwinner in my lab
64 bit, 32 bit is EOL in Fedora as of F-36.
Quoted 1 line
and it needs (I've been assuming, since I'm also passing in SCP) BL31 as
BL31 isn't the same as SCP, the later is a firmware for the onboard PMIC co-processor where as BL31 is Arm Trusted Firmware.
Quoted 2 lines
well. And since you're mentioning buildman, I assume Fedora IS using that rather than make to build everything. I'll go and think about this
I'm using:
make pine64_plus_defconfig O=builds/pine64_plus/
cp /usr/share/arm-trusted-firmware/sun50i_a64/bl31.bin builds/pine64_plus/ make CROSS_COMPILE="/usr/bin/aarch64-linux-gnu-" O=builds/pine64_plus/
I thought binman was basically default for this now.
I tried for the last line the following, it changed the error output but not the failure:
BINMAN_ALLOW_MISSING=1 make CROSS_COMPILE="/usr/bin/aarch64-linux-gnu-" O=builds/pine64_plus/
Peter
Re: [PATCH v5 10/16] buildman: Detect binman reporting missing blobs
Quoted 30 lines · Peter Robinson
Quoted 29 lines · Tom Rini
Quoted 26 lines · Peter Robinson
Quoted 10 lines · Simon Glass
Buildman should consider a build as a success (with warnings) if missing blobs have been dealt with by binman, even though buildman itself returns and error code overall. This is how other warnings are dealt with.
We cannot easily access the 103 exit code, so detect the problem in the output.
With this change, missing blobs result in an exit code of 101, although they still indicate failure.
So either this or Tom's change of "buildman: Add --allow-missing flag to allow missing blobs" has broken rc3 builds for Allwinner boards on Fedora. Tom's isn't a clean revert and I've not had time to test that but either way the SCP firmware is optional and it works just fine, ATM we don't have the SCP firmware available to Fedora builds.
Maybe that sort of of change to the build is expected but which ever patch it is, and adding "BINMAN_ALLOW_MISSING=1" changes the error but doesn't change the overall failure, I wouldn't expect this sort of breakage so late in the cycle.
Do either of you know which one does the hard breakage here? I thought I'd highlight it now because I don't have time over the next two weeks to fully investigate the regression.
Quoted 8 lines
Quoted 1 line
So, is this for 32bit or 64bit? I only have a 64bit allwinner in my lab
64 bit, 32 bit is EOL in Fedora as of F-36.
Quoted 1 line
and it needs (I've been assuming, since I'm also passing in SCP) BL31 as
BL31 isn't the same as SCP, the later is a firmware for the onboard PMIC co-processor where as BL31 is Arm Trusted Firmware.
Right, yes.
Quoted 7 lines
Quoted 2 lines
well. And since you're mentioning buildman, I assume Fedora IS using that rather than make to build everything. I'll go and think about this
I'm using:
makepine64_plus_defconfigO=builds/pine64_plus/
cp/usr/share/arm-trusted-firmware/sun50i_a64/bl31.binbuilds/pine64_plus/ make CROSS_COMPILE="/usr/bin/aarch64-linux-gnu-" O=builds/pine64_plus/
OK, that's a little different than how I run make, that's why it wasn't caught at least. I do:
export SCP=/home/trini/work/u-boot/external-binaries/pine64_plus/scp.bin export BL31=/home/trini/work/u-boot/external-binaries/pine64_plus/bl31.bin make O=/tmp/pine64_plus pine64_plus_defconfig all -sj$(nproc)
Quoted 1 line
I thought binman was basically default for this now.
We have too many *man tools sometimes. I thought you said buildman, yes, binman assembles the images here, when invoking make. Digging more now, thanks!
Signature · 1 line
Tom
Re: [PATCH v5 10/16] buildman: Detect binman reporting missing blobs
Quoted 51 lines · Tom Rini
Quoted 30 lines · Peter Robinson
Quoted 29 lines · Tom Rini
Quoted 26 lines · Peter Robinson
Quoted 10 lines · Simon Glass
Buildman should consider a build as a success (with warnings) if missing blobs have been dealt with by binman, even though buildman itself returns and error code overall. This is how other warnings are dealt with.
We cannot easily access the 103 exit code, so detect the problem in the output.
With this change, missing blobs result in an exit code of 101, although they still indicate failure.
So either this or Tom's change of "buildman: Add --allow-missing flag to allow missing blobs" has broken rc3 builds for Allwinner boards on Fedora. Tom's isn't a clean revert and I've not had time to test that but either way the SCP firmware is optional and it works just fine, ATM we don't have the SCP firmware available to Fedora builds.
Maybe that sort of of change to the build is expected but which ever patch it is, and adding "BINMAN_ALLOW_MISSING=1" changes the error but doesn't change the overall failure, I wouldn't expect this sort of breakage so late in the cycle.
Do either of you know which one does the hard breakage here? I thought I'd highlight it now because I don't have time over the next two weeks to fully investigate the regression.
Quoted 8 lines
Quoted 1 line
So, is this for 32bit or 64bit? I only have a 64bit allwinner in my lab
64 bit, 32 bit is EOL in Fedora as of F-36.
Quoted 1 line
and it needs (I've been assuming, since I'm also passing in SCP) BL31 as
BL31 isn't the same as SCP, the later is a firmware for the onboard PMIC co-processor where as BL31 is Arm Trusted Firmware.
Right, yes.
Quoted 7 lines
Quoted 2 lines
well. And since you're mentioning buildman, I assume Fedora IS using that rather than make to build everything. I'll go and think about this
I'm using:
makepine64_plus_defconfigO=builds/pine64_plus/
cp/usr/share/arm-trusted-firmware/sun50i_a64/bl31.binbuilds/pine64_plus/ make CROSS_COMPILE="/usr/bin/aarch64-linux-gnu-" O=builds/pine64_plus/
Quoted 5 lines
OK, that's a little different than how I run make, that's why it wasn't caught at least. I do:
export SCP=/home/trini/work/u-boot/external-binaries/pine64_plus/scp.bin export BL31=/home/trini/work/u-boot/external-binaries/pine64_plus/bl31.bin make O=/tmp/pine64_pluspine64_plus_defconfigall -sj$(nproc)
We build ~90 boards so we've historically copied it to each of the board build output directories, could look at setting vars for each of the loops too.
Quoted 5 lines
Quoted 1 line
I thought binman was basically default for this now.
We have too many *man tools sometimes. I thought you said buildman, yes, binman assembles the images here, when invoking make. Digging more now, thanks!
It could easily be me getting confused, trying to balance a lot of plates right now :-/
Peter
Re: [PATCH v5 10/16] buildman: Detect binman reporting missing blobs
Quoted 62 lines · Peter Robinson
Quoted 51 lines · Tom Rini
Quoted 30 lines · Peter Robinson
Quoted 29 lines · Tom Rini
Quoted 26 lines · Peter Robinson
Quoted 10 lines · Simon Glass
Buildman should consider a build as a success (with warnings) if missing blobs have been dealt with by binman, even though buildman itself returns and error code overall. This is how other warnings are dealt with.
We cannot easily access the 103 exit code, so detect the problem in the output.
With this change, missing blobs result in an exit code of 101, although they still indicate failure.
So either this or Tom's change of "buildman: Add --allow-missing flag to allow missing blobs" has broken rc3 builds for Allwinner boards on Fedora. Tom's isn't a clean revert and I've not had time to test that but either way the SCP firmware is optional and it works just fine, ATM we don't have the SCP firmware available to Fedora builds.
Maybe that sort of of change to the build is expected but which ever patch it is, and adding "BINMAN_ALLOW_MISSING=1" changes the error but doesn't change the overall failure, I wouldn't expect this sort of breakage so late in the cycle.
Do either of you know which one does the hard breakage here? I thought I'd highlight it now because I don't have time over the next two weeks to fully investigate the regression.
Quoted 8 lines
Quoted 1 line
So, is this for 32bit or 64bit? I only have a 64bit allwinner in my lab
64 bit, 32 bit is EOL in Fedora as of F-36.
Quoted 1 line
and it needs (I've been assuming, since I'm also passing in SCP) BL31 as
BL31 isn't the same as SCP, the later is a firmware for the onboard PMIC co-processor where as BL31 is Arm Trusted Firmware.
Right, yes.
Quoted 7 lines
Quoted 2 lines
well. And since you're mentioning buildman, I assume Fedora IS using that rather than make to build everything. I'll go and think about this
I'm using:
makepine64_plus_defconfigO=builds/pine64_plus/
cp/usr/share/arm-trusted-firmware/sun50i_a64/bl31.binbuilds/pine64_plus/ make CROSS_COMPILE="/usr/bin/aarch64-linux-gnu-" O=builds/pine64_plus/Quoted 5 lines
OK, that's a little different than how I run make, that's why it wasn't caught at least. I do:
export SCP=/home/trini/work/u-boot/external-binaries/pine64_plus/scp.bin export BL31=/home/trini/work/u-boot/external-binaries/pine64_plus/bl31.bin make O=/tmp/pine64_pluspine64_plus_defconfigall -sj$(nproc)We build ~90 boards so we've historically copied it to each of the board build output directories, could look at setting vars for each of the loops too.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
I thought binman was basically default for this now.
We have too many *man tools sometimes. I thought you said buildman, yes, binman assembles the images here, when invoking make. Digging more now, thanks!
It could easily be me getting confused, trying to balance a lot of plates right now :-/
OK, so yes, you've found a problem here. What I need to throw a CI loop at now is:
Makefile +1 -1
@@ -1334,7 +1334,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ --toolpath $(objtree)/tools \ $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \ build -u -d u-boot.dtb -O . -m \ - $(if $(BINMAN_ALLOW_MISSING),--allow-missing --fake-ext-blobs) \ + $(if $(BINMAN_ALLOW_MISSING),--allow-missing --ignore-missing) \ -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \ -I arch/$(ARCH)/dts -a of-list=$(CONFIG_OF_LIST) \ $(foreach f,$(BINMAN_INDIRS),-I $(f)) \
Which means that this then works:
$ (export CROSS_COMPILE=~/.buildman-toolchains/gcc-11.1.0-nolibc/aarch64-linux/bin/aarch64-linux- ; make pine64_plus_defconfig O=builds/pine64_plus ; cp /home/trini/work/u-boot/external-binaries/pine64_plus/bl31.bin builds/pine64_plus ; BINMAN_ALLOW_MISSING=1 make O=builds/pine64_plus -sj$(nproc); echo $?) make[1]: Entering directory '/home/trini/work/u-boot/u-boot/builds/pine64_plus' GEN Makefile # # configuration written to .config # make[1]: Leaving directory '/home/trini/work/u-boot/u-boot/builds/pine64_plus' Image 'main-section' is missing external blobs and is non-functional: scp
/binman/u-boot-sunxi-with-spl/fit/images/scp/scp:
SCP firmware is required for system suspend, but is otherwise optional. Please read the section on SCP firmware in board/sunxi/README.sunxi64
Some images are invalid
0
$
And restores the old behavior, if you insist that you want binaries to be missing, which in your case you do on allwinner (but not elswhere, right?)
Signature · 1 line
Tom
Re: [PATCH v5 10/16] buildman: Detect binman reporting missing blobs
Quoted 103 lines · Tom Rini
Quoted 62 lines · Peter Robinson
Quoted 51 lines · Tom Rini
Quoted 30 lines · Peter Robinson
Quoted 29 lines · Tom Rini
Quoted 26 lines · Peter Robinson
Quoted 10 lines · Simon Glass
Buildman should consider a build as a success (with warnings) if missing blobs have been dealt with by binman, even though buildman itself returns and error code overall. This is how other warnings are dealt with.
We cannot easily access the 103 exit code, so detect the problem in the output.
With this change, missing blobs result in an exit code of 101, although they still indicate failure.
So either this or Tom's change of "buildman: Add --allow-missing flag to allow missing blobs" has broken rc3 builds for Allwinner boards on Fedora. Tom's isn't a clean revert and I've not had time to test that but either way the SCP firmware is optional and it works just fine, ATM we don't have the SCP firmware available to Fedora builds.
Maybe that sort of of change to the build is expected but which ever patch it is, and adding "BINMAN_ALLOW_MISSING=1" changes the error but doesn't change the overall failure, I wouldn't expect this sort of breakage so late in the cycle.
Do either of you know which one does the hard breakage here? I thought I'd highlight it now because I don't have time over the next two weeks to fully investigate the regression.
Quoted 8 lines
Quoted 1 line
So, is this for 32bit or 64bit? I only have a 64bit allwinner in my lab
64 bit, 32 bit is EOL in Fedora as of F-36.
Quoted 1 line
and it needs (I've been assuming, since I'm also passing in SCP) BL31 as
BL31 isn't the same as SCP, the later is a firmware for the onboard PMIC co-processor where as BL31 is Arm Trusted Firmware.
Right, yes.
Quoted 7 lines
Quoted 2 lines
well. And since you're mentioning buildman, I assume Fedora IS using that rather than make to build everything. I'll go and think about this
I'm using:
makepine64_plus_defconfigO=builds/pine64_plus/
cp/usr/share/arm-trusted-firmware/sun50i_a64/bl31.binbuilds/pine64_plus/ make CROSS_COMPILE="/usr/bin/aarch64-linux-gnu-" O=builds/pine64_plus/Quoted 5 lines
OK, that's a little different than how I run make, that's why it wasn't caught at least. I do:
export SCP=/home/trini/work/u-boot/external-binaries/pine64_plus/scp.bin export BL31=/home/trini/work/u-boot/external-binaries/pine64_plus/bl31.bin make O=/tmp/pine64_pluspine64_plus_defconfigall -sj$(nproc)We build ~90 boards so we've historically copied it to each of the board build output directories, could look at setting vars for each of the loops too.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
I thought binman was basically default for this now.
We have too many *man tools sometimes. I thought you said buildman, yes, binman assembles the images here, when invoking make. Digging more now, thanks!
It could easily be me getting confused, trying to balance a lot of plates right now :-/
OK, so yes, you've found a problem here. What I need to throw a CI loop at now is:
Makefile +1
-1@@ -1334,7 +1334,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ --toolpath $(objtree)/tools \ $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \ build -u -d u-boot.dtb -O . -m \ - $(if $(BINMAN_ALLOW_MISSING),--allow-missing --fake-ext-blobs) \ + $(if $(BINMAN_ALLOW_MISSING),--allow-missing --ignore-missing) \ -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \ -I arch/$(ARCH)/dts -a of-list=$(CONFIG_OF_LIST) \ $(foreach f,$(BINMAN_INDIRS),-I $(f)) \Which means that this then works:
$ (export CROSS_COMPILE=~/.buildman-toolchains/gcc-11.1.0-nolibc/aarch64-linux/bin/aarch64-linux- ; make pine64_plus_defconfig O=builds/pine64_plus ; cp /home/trini/work/u-boot/external-binaries/pine64_plus/bl31.bin builds/pine64_plus ; BINMAN_ALLOW_MISSING=1 make O=builds/pine64_plus -sj$(nproc); echo $?) make[1]: Entering directory '/home/trini/work/u-boot/u-boot/builds/pine64_plus' GEN Makefile # # configuration written to .config # make[1]: Leaving directory '/home/trini/work/u-boot/u-boot/builds/pine64_plus' Image 'main-section' is missing external blobs and is non-functional: scp/binman/u-boot-sunxi-with-spl/fit/images/scp/scp:
SCP firmware is required for system suspend, but is otherwise optional. Please read the section on SCP firmware in board/sunxi/README.sunxi64
Quoted 6 lines
Some images are invalid
0
$And restores the old behavior, if you insist that you want binaries to be missing, which in your case you do on allwinner (but not elswhere, right?)
Yep, I believe that's the case AFAIA.
P
Re: [PATCH v5 10/16] buildman: Detect binman reporting missing blobs
In reply to Tom RiniHi Tom,
Quoted 80 lines · Tom Rini
Quoted 62 lines · Peter Robinson
Quoted 51 lines · Tom Rini
Quoted 30 lines · Peter Robinson
Quoted 29 lines · Tom Rini
Quoted 26 lines · Peter Robinson
Quoted 10 lines · Simon Glass
Buildman should consider a build as a success (with warnings) if missing blobs have been dealt with by binman, even though buildman itself returns and error code overall. This is how other warnings are dealt with.
We cannot easily access the 103 exit code, so detect the problem in the output.
With this change, missing blobs result in an exit code of 101, although they still indicate failure.
So either this or Tom's change of "buildman: Add --allow-missing flag to allow missing blobs" has broken rc3 builds for Allwinner boards on Fedora. Tom's isn't a clean revert and I've not had time to test that but either way the SCP firmware is optional and it works just fine, ATM we don't have the SCP firmware available to Fedora builds.
Maybe that sort of of change to the build is expected but which ever patch it is, and adding "BINMAN_ALLOW_MISSING=1" changes the error but doesn't change the overall failure, I wouldn't expect this sort of breakage so late in the cycle.
Do either of you know which one does the hard breakage here? I thought I'd highlight it now because I don't have time over the next two weeks to fully investigate the regression.
Quoted 8 lines
Quoted 1 line
So, is this for 32bit or 64bit? I only have a 64bit allwinner in my lab
64 bit, 32 bit is EOL in Fedora as of F-36.
Quoted 1 line
and it needs (I've been assuming, since I'm also passing in SCP) BL31 as
BL31 isn't the same as SCP, the later is a firmware for the onboard PMIC co-processor where as BL31 is Arm Trusted Firmware.
Right, yes.
Quoted 7 lines
Quoted 2 lines
well. And since you're mentioning buildman, I assume Fedora IS using that rather than make to build everything. I'll go and think about this
I'm using:
makepine64_plus_defconfigO=builds/pine64_plus/
cp/usr/share/arm-trusted-firmware/sun50i_a64/bl31.binbuilds/pine64_plus/ make CROSS_COMPILE="/usr/bin/aarch64-linux-gnu-" O=builds/pine64_plus/Quoted 5 lines
OK, that's a little different than how I run make, that's why it wasn't caught at least. I do:
export SCP=/home/trini/work/u-boot/external-binaries/pine64_plus/scp.bin export BL31=/home/trini/work/u-boot/external-binaries/pine64_plus/bl31.bin make O=/tmp/pine64_pluspine64_plus_defconfigall -sj$(nproc)We build ~90 boards so we've historically copied it to each of the board build output directories, could look at setting vars for each of the loops too.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
I thought binman was basically default for this now.
We have too many *man tools sometimes. I thought you said buildman, yes, binman assembles the images here, when invoking make. Digging more now, thanks!
It could easily be me getting confused, trying to balance a lot of plates right now :-/
OK, so yes, you've found a problem here. What I need to throw a CI loop at now is:
Makefile +0
-0
Makefile cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ · line 1337
Quoted 5 lines
Makefile +1
-1@@ -1334,7 +1334,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ --toolpath $(objtree)/tools \ $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \ build -u -d u-boot.dtb -O . -m \ - $(if $(BINMAN_ALLOW_MISSING),--allow-missing --fake-ext-blobs) \ + $(if $(BINMAN_ALLOW_MISSING),--allow-missing --ignore-missing) \
I think you need to keep the old flag too, right?
Quoted 22 lines
Makefile +0
-0-I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \ -I arch/$(ARCH)/dts -a of-list=$(CONFIG_OF_LIST) \ $(foreach f,$(BINMAN_INDIRS),-I $(f)) \Which means that this then works:
$ (export CROSS_COMPILE=~/.buildman-toolchains/gcc-11.1.0-nolibc/aarch64-linux/bin/aarch64-linux- ; make pine64_plus_defconfig O=builds/pine64_plus ; cp /home/trini/work/u-boot/external-binaries/pine64_plus/bl31.bin builds/pine64_plus ; BINMAN_ALLOW_MISSING=1 make O=builds/pine64_plus -sj$(nproc); echo $?) make[1]: Entering directory '/home/trini/work/u-boot/u-boot/builds/pine64_plus' GEN Makefile # # configuration written to .config # make[1]: Leaving directory '/home/trini/work/u-boot/u-boot/builds/pine64_plus' Image 'main-section' is missing external blobs and is non-functional: scp/binman/u-boot-sunxi-with-spl/fit/images/scp/scp:
SCP firmware is required for system suspend, but is otherwise optional. Please read the section on SCP firmware in board/sunxi/README.sunxi64Some images are invalid
0
$
Quoted 5 lines
And restores the old behavior, if you insist that you want binaries to be missing, which in your case you do on allwinner (but not elswhere, right?)
--
Tom
Regards,
SImon
Re: [PATCH v5 10/16] buildman: Detect binman reporting missing blobs
Quoted 76 lines · Simon Glass
Hi Tom,
Quoted 73 lines · Tom Rini
Quoted 70 lines · Peter Robinson
Quoted 51 lines · Tom Rini
Quoted 30 lines · Peter Robinson
Quoted 29 lines · Tom Rini
Quoted 26 lines · Peter Robinson
Quoted 10 lines · Simon Glass
Buildman should consider a build as a success (with warnings) if missing blobs have been dealt with by binman, even though buildman itself returns and error code overall. This is how other warnings are dealt with.
We cannot easily access the 103 exit code, so detect the problem in the output.
With this change, missing blobs result in an exit code of 101, although they still indicate failure.
So either this or Tom's change of "buildman: Add --allow-missing flag to allow missing blobs" has broken rc3 builds for Allwinner boards on Fedora. Tom's isn't a clean revert and I've not had time to test that but either way the SCP firmware is optional and it works just fine, ATM we don't have the SCP firmware available to Fedora builds.
Maybe that sort of of change to the build is expected but which ever patch it is, and adding "BINMAN_ALLOW_MISSING=1" changes the error but doesn't change the overall failure, I wouldn't expect this sort of breakage so late in the cycle.
Do either of you know which one does the hard breakage here? I thought I'd highlight it now because I don't have time over the next two weeks to fully investigate the regression.
Quoted 8 lines
Quoted 1 line
So, is this for 32bit or 64bit? I only have a 64bit allwinner in my lab
64 bit, 32 bit is EOL in Fedora as of F-36.
Quoted 1 line
and it needs (I've been assuming, since I'm also passing in SCP) BL31 as
BL31 isn't the same as SCP, the later is a firmware for the onboard PMIC co-processor where as BL31 is Arm Trusted Firmware.
Right, yes.
Quoted 7 lines
Quoted 2 lines
well. And since you're mentioning buildman, I assume Fedora IS using that rather than make to build everything. I'll go and think about this
I'm using:
makepine64_plus_defconfigO=builds/pine64_plus/
cp/usr/share/arm-trusted-firmware/sun50i_a64/bl31.binbuilds/pine64_plus/ make CROSS_COMPILE="/usr/bin/aarch64-linux-gnu-" O=builds/pine64_plus/Quoted 5 lines
OK, that's a little different than how I run make, that's why it wasn't caught at least. I do:
export SCP=/home/trini/work/u-boot/external-binaries/pine64_plus/scp.bin export BL31=/home/trini/work/u-boot/external-binaries/pine64_plus/bl31.bin make O=/tmp/pine64_pluspine64_plus_defconfigall -sj$(nproc)We build ~90 boards so we've historically copied it to each of the board build output directories, could look at setting vars for each of the loops too.
Quoted 5 lines
Quoted 1 line
I thought binman was basically default for this now.
We have too many *man tools sometimes. I thought you said buildman, yes, binman assembles the images here, when invoking make. Digging more now, thanks!
It could easily be me getting confused, trying to balance a lot of plates right now :-/
Quoted 14 lines
Makefile cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ · line 1337
Quoted 12 lines
OK, so yes, you've found a problem here. What I need to throw a CI loop at now is:
Makefile +1
-1@@ -1334,7 +1334,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ --toolpath $(objtree)/tools \ $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \ build -u -d u-boot.dtb -O . -m \ - $(if $(BINMAN_ALLOW_MISSING),--allow-missing --fake-ext-blobs) \ + $(if $(BINMAN_ALLOW_MISSING),--allow-missing --ignore-missing) \I think you need to keep the old flag too, right?
Not in my first pine64_plus only test, but I just threw CI at the world, so pass-or-fireworks in about an hour.
Signature · 1 line
Tom
Re: [PATCH v5 10/16] buildman: Detect binman reporting missing blobs
Hi Tom,
Quoted 93 lines · Tom Rini
Quoted 76 lines · Simon Glass
Hi Tom,
Quoted 73 lines · Tom Rini
Quoted 70 lines · Peter Robinson
Quoted 51 lines · Tom Rini
Quoted 30 lines · Peter Robinson
Quoted 29 lines · Tom Rini
Quoted 26 lines · Peter Robinson
Quoted 10 lines · Simon Glass
Buildman should consider a build as a success (with warnings) if missing blobs have been dealt with by binman, even though buildman itself returns and error code overall. This is how other warnings are dealt with.
We cannot easily access the 103 exit code, so detect the problem in the output.
With this change, missing blobs result in an exit code of 101, although they still indicate failure.
So either this or Tom's change of "buildman: Add --allow-missing flag to allow missing blobs" has broken rc3 builds for Allwinner boards on Fedora. Tom's isn't a clean revert and I've not had time to test that but either way the SCP firmware is optional and it works just fine, ATM we don't have the SCP firmware available to Fedora builds.
Maybe that sort of of change to the build is expected but which ever patch it is, and adding "BINMAN_ALLOW_MISSING=1" changes the error but doesn't change the overall failure, I wouldn't expect this sort of breakage so late in the cycle.
Do either of you know which one does the hard breakage here? I thought I'd highlight it now because I don't have time over the next two weeks to fully investigate the regression.
Quoted 8 lines
Quoted 1 line
So, is this for 32bit or 64bit? I only have a 64bit allwinner in my lab
64 bit, 32 bit is EOL in Fedora as of F-36.
Quoted 1 line
and it needs (I've been assuming, since I'm also passing in SCP) BL31 as
BL31 isn't the same as SCP, the later is a firmware for the onboard PMIC co-processor where as BL31 is Arm Trusted Firmware.
Right, yes.
Quoted 7 lines
Quoted 2 lines
well. And since you're mentioning buildman, I assume Fedora IS using that rather than make to build everything. I'll go and think about this
I'm using:
makepine64_plus_defconfigO=builds/pine64_plus/
cp/usr/share/arm-trusted-firmware/sun50i_a64/bl31.binbuilds/pine64_plus/ make CROSS_COMPILE="/usr/bin/aarch64-linux-gnu-" O=builds/pine64_plus/Quoted 5 lines
OK, that's a little different than how I run make, that's why it wasn't caught at least. I do:
export SCP=/home/trini/work/u-boot/external-binaries/pine64_plus/scp.bin export BL31=/home/trini/work/u-boot/external-binaries/pine64_plus/bl31.bin make O=/tmp/pine64_pluspine64_plus_defconfigall -sj$(nproc)We build ~90 boards so we've historically copied it to each of the board build output directories, could look at setting vars for each of the loops too.
Quoted 5 lines
Quoted 1 line
I thought binman was basically default for this now.
We have too many *man tools sometimes. I thought you said buildman, yes, binman assembles the images here, when invoking make. Digging more now, thanks!
It could easily be me getting confused, trying to balance a lot of plates right now :-/
Quoted 14 lines
Makefile cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ · line 1337
Quoted 12 lines
OK, so yes, you've found a problem here. What I need to throw a CI loop at now is:
Makefile +1
-1@@ -1334,7 +1334,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ --toolpath $(objtree)/tools \ $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \ build -u -d u-boot.dtb -O . -m \ - $(if $(BINMAN_ALLOW_MISSING),--allow-missing --fake-ext-blobs) \ + $(if $(BINMAN_ALLOW_MISSING),--allow-missing --ignore-missing) \I think you need to keep the old flag too, right?
Quoted 2 lines
Not in my first
pine64_plusonly test, but I just threw CI at the world, so pass-or-fireworks in about an hour.
Things that use mkimage to generate stuff will need the faked blobs.
Regards,
Simon
PATCH v5 11/16 binman: Add a separate section about environment variables
In reply to Simon GlassThese are documented in various several sections. Add a new section that mentions them all in one place so it is easier to see what environment variables can be used to control U-Boot's use of binman.
---
Changes in v5:
- Add new patch with a separate section about environment variables
tools/binman/binman.rst | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
tools/binman/binman.rst +30 -0
@@ -1246,6 +1246,8 @@ You can also replace just a selection of entries:: $ binman replace -i image.bin "*u-boot*" -I indir +.. _`BinmanLogging`: + Logging -------
@@ -1416,6 +1418,8 @@ what happens in this stage. final step. +.. _`External tools`: + External tools --------------
@@ -1437,6 +1441,8 @@ a space-separated list of paths to search, e.g.:: BINMAN_TOOLPATHS="/tools/g12a /tools/tegra" binman ... +.. _`External blobs`: + External blobs --------------
@@ -1494,6 +1500,30 @@ Binman produces the following exit codes: and will return an exit status of 0 instead. +U-Boot environment variables for binman +--------------------------------------- + +The U-Boot Makefile supports various environment variables to control binman. +All of these are set within the Makefile and result in passing various +environment variables (or make flags) to binman: + +BINMAN_DEBUG + Enables backtrace debugging by adding a `-D` argument. See + :ref:`BinmanLogging`. + +BINMAN_INDIRS + Sets the search path for input files used by binman by adding one or more + `-I` arguments. See :ref:`External blobs`. + +BINMAN_TOOLPATHS + Sets the search path for external tool used by binman by adding one or more + `--toolpath` arguments. See :ref:`External tools`. + +BINMAN_VERBOSE + Sets the logging verbosity of binman by adding a `-v` argument. See + :ref:`BinmanLogging`. + + Error messages --------------
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 11/16] binman: Add a separate section about environment variables
These are documented in various several sections. Add a new section that mentions them all in one place so it is easier to see what environment variables can be used to control U-Boot's use of binman.
---
Changes in v5:
- Add new patch with a separate section about environment variables
tools/binman/binman.rst | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
Applied to u-boot-dm, thanks!
PATCH v5 12/16 global: Do not default to faking missing binaries for buildman
In reply to Simon GlassFrom: Tom Rini <[email protected]>
While it is possible and documented on how to re-run buildman to replace faked required binary files after the fact, this behavior ends up being more confusing than helpful in practice. Switch to requiring BINMAN_ALLOW_MISSING=1 to be passed on the 'make' line to enable this behavior.
---
(no changes since v1)
Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
@@ -1333,8 +1333,8 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ $(foreach f,$(BINMAN_TOOLPATHS),--toolpath $(f)) \ --toolpath $(objtree)/tools \ $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \ - build -u -d u-boot.dtb -O . -m --allow-missing \ - --fake-ext-blobs \ + build -u -d u-boot.dtb -O . -m \ + $(if $(BINMAN_ALLOW_MISSING),--allow-missing --fake-ext-blobs) \ -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \ -I arch/$(ARCH)/dts -a of-list=$(CONFIG_OF_LIST) \ $(foreach f,$(BINMAN_INDIRS),-I $(f)) \
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 12/16] global: Do not default to faking missing binaries for buildman
From: Tom Rini <[email protected]>
While it is possible and documented on how to re-run buildman to replace faked required binary files after the fact, this behavior ends up being more confusing than helpful in practice. Switch to requiring BINMAN_ALLOW_MISSING=1 to be passed on the 'make' line to enable this behavior.
---
(no changes since v1)
Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to u-boot-dm, thanks!
PATCH v5 13/16 buildman: Ensure config_fname is inited
In reply to Simon GlassInit this variable at the top level since it is a global.
---
Changes in v5:
- Add new patch to ensure config_fname is inited
tools/buildman/bsettings.py | 1 + 1 file changed, 1 insertion(+)
tools/buildman/bsettings.py +1 -0
@@ -5,6 +5,7 @@ import configparser import os import io +config_fname = None def Setup(fname=''): """Set up the buildman settings module by reading config files
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 13/16] buildman: Ensure config_fname is inited
Init this variable at the top level since it is a global.
---
Changes in v5:
- Add new patch to ensure config_fname is inited
tools/buildman/bsettings.py | 1 + 1 file changed, 1 insertion(+)
Applied to u-boot-dm, thanks!
PATCH v5 14/16 buildman: Reinstate removal of temp output dir in tests
In reply to Simon GlassThis was dropped my mistake. Reinstate it.
---
Changes in v5:
- Add new patch to reinstate removal of temp output dir in tests
tools/buildman/func_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/buildman/func_test.py +1 -1
@@ -211,7 +211,7 @@ class TestFunctional(unittest.TestCase): def tearDown(self): shutil.rmtree(self._base_dir) - #shutil.rmtree(self._output_dir) + shutil.rmtree(self._output_dir) def setupToolchains(self): self._toolchains = toolchain.Toolchains()
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 14/16] buildman: Reinstate removal of temp output dir in tests
This was dropped my mistake. Reinstate it.
---
Changes in v5:
- Add new patch to reinstate removal of temp output dir in tests
tools/buildman/func_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-dm, thanks!
PATCH v5 15/16 buildman: Add --allow-missing flag to allow missing blobs
In reply to Simon GlassFrom: Tom Rini <[email protected]>
Add a new flag to buildman so that we will in turn pass BINMAN_ALLOW_MISSING=1 to 'make'. Make use of this flag in CI.
Allow the settings file to control this.
---
Changes in v5:
- Split out config_fname change into a separate patch
- Rename GetGlobalValue to GetGlobalItemValue
- Fix 'items' typo
- Simplify implementation of GetGlobalItemValue()
- Use '[global]' for the doc heading
- Use double tick for arguments
- Drop redundant allow_missing code
- Split out the tests more
Changes in v4:
- Various changes that were unfortunately not recorded
Changes in v3:
- Add tests docs and a settings-file option
.azure-pipelines.yml | 2 +- .gitlab-ci.yml | 6 +- tools/buildman/bsettings.py | 11 ++++ tools/buildman/builder.py | 5 +- tools/buildman/builderthread.py | 2 + tools/buildman/buildman.rst | 43 +++++++++++++ tools/buildman/cmdline.py | 6 ++ tools/buildman/control.py | 24 +++++++- tools/buildman/func_test.py | 106 +++++++++++++++++++++++++++++++- 9 files changed, 197 insertions(+), 8 deletions(-)
.azure-pipelines.yml +1 -1
@@ -553,7 +553,7 @@ stages: cat << "EOF" >> build.sh if [[ "${BUILDMAN}" != "" ]]; then ret=0; - tools/buildman/buildman -o /tmp -P -E -W ${BUILDMAN} ${OVERRIDE} || ret=$?; + tools/buildman/buildman -o /tmp -PEWM ${BUILDMAN} ${OVERRIDE} || ret=$?; if [[ $ret -ne 0 ]]; then tools/buildman/buildman -o /tmp -seP ${BUILDMAN}; exit $ret;
.gitlab-ci.yml +3 -3
@@ -81,7 +81,7 @@ build all 32bit ARM platforms: stage: world build script: - ret=0; - ./tools/buildman/buildman -o /tmp -P -E -W arm -x aarch64 || ret=$?; + ./tools/buildman/buildman -o /tmp -PEWM arm -x aarch64 || ret=$?; if [[ $ret -ne 0 ]]; then ./tools/buildman/buildman -o /tmp -seP; exit $ret;
@@ -93,7 +93,7 @@ build all 64bit ARM platforms: - virtualenv -p /usr/bin/python3 /tmp/venv - . /tmp/venv/bin/activate - ret=0; - ./tools/buildman/buildman -o /tmp -P -E -W aarch64 || ret=$?; + ./tools/buildman/buildman -o /tmp -PEWM aarch64 || ret=$?; if [[ $ret -ne 0 ]]; then ./tools/buildman/buildman -o /tmp -seP; exit $ret;
@@ -113,7 +113,7 @@ build all other platforms: stage: world build script: - ret=0; - ./tools/buildman/buildman -o /tmp -P -E -W -x arm,powerpc || ret=$?; + ./tools/buildman/buildman -o /tmp -PEWM -x arm,powerpc || ret=$?; if [[ $ret -ne 0 ]]; then ./tools/buildman/buildman -o /tmp -seP; exit $ret;
tools/buildman/bsettings.py +11 -0
@@ -47,6 +47,17 @@ def GetItems(section): except: raise +def GetGlobalItemValue(name): + """Get an item from the 'global' section of the config. + + Args: + name: name of item to retrieve + + Returns: + str: Value of item, or None if not present + """ + return settings.get('global', name, fallback=None) + def SetItem(section, tag, value): """Set an item and write it back to the settings file""" global settings
tools/buildman/builder.py +4 -1
@@ -252,7 +252,8 @@ class Builder: mrproper=False, per_board_out_dir=False, config_only=False, squash_config_y=False, warnings_as_errors=False, work_in_output=False, - test_thread_exceptions=False, adjust_cfg=None): + test_thread_exceptions=False, adjust_cfg=None, + allow_missing=False): """Create a new Builder object Args:
@@ -290,6 +291,7 @@ class Builder: ~C to disable C C=val to set the value of C (val must have quotes if C is a string Kconfig + allow_missing: Run build with BINMAN_ALLOW_MISSING=1 """ self.toolchains = toolchains
@@ -327,6 +329,7 @@ class Builder: self.config_filenames = BASE_CONFIG_FILENAMES self.work_in_output = work_in_output self.adjust_cfg = adjust_cfg + self.allow_missing = allow_missing self._ide = False if not self.squash_config_y:
tools/buildman/builderthread.py +2 -0
@@ -253,6 +253,8 @@ class BuilderThread(threading.Thread): args.extend(['-j', str(self.builder.num_jobs)]) if self.builder.warnings_as_errors: args.append('KCFLAGS=-Werror') + if self.builder.allow_missing: + args.append('BINMAN_ALLOW_MISSING=1') config_args = ['%s_defconfig' % brd.target] config_out = '' args.extend(self.builder.toolchains.GetMakeArguments(brd))
tools/buildman/buildman.rst +43 -0
55 lines not on this page · raw message
tools/buildman/cmdline.py +6 -0
@@ -75,6 +75,12 @@ def ParseArgs(): help='List available tool chains (use -v to see probing detail)') parser.add_option('-m', '--mrproper', action='store_true', default=False, help="Run 'make mrproper before reconfiguring") + parser.add_option( + '-M', '--allow-missing', action='store_true', default=False, + help='Tell binman to allow missing blobs and generate fake ones as needed'), + parser.add_option( + '--no-allow-missing', action='store_true', default=False, + help='Disable telling binman to allow missing blobs'), parser.add_option('-n', '--dry-run', action='store_true', dest='dry_run', default=False, help="Do a dry run (describe actions, but do nothing)") parser.add_option('-N', '--no-subdirs', action='store_true', dest='no_subdirs',
tools/buildman/control.py +23 -1
@@ -111,6 +111,23 @@ def ShowToolchainPrefix(brds, toolchains): print(tc.GetEnvArgs(toolchain.VAR_CROSS_COMPILE)) return None +def get_allow_missing(opt_allow, opt_no_allow, num_selected, has_branch): + allow_missing = False + am_setting = bsettings.GetGlobalItemValue('allow-missing') + if am_setting: + if am_setting == 'always': + allow_missing = True + if 'multiple' in am_setting and num_selected > 1: + allow_missing = True + if 'branch' in am_setting and has_branch: + allow_missing = True + + if opt_allow: + allow_missing = True + if opt_no_allow: + allow_missing = False + return allow_missing + def DoBuildman(options, args, toolchains=None, make_func=None, brds=None, clean_dir=False, test_thread_exceptions=False): """The main control code for buildman
@@ -305,6 +322,10 @@ def DoBuildman(options, args, toolchains=None, make_func=None, brds=None, if not gnu_make: sys.exit('GNU Make not found') + allow_missing = get_allow_missing(options.allow_missing, + options.no_allow_missing, len(selected), + options.branch) + # Create a new builder with the selected options. output_dir = options.output_dir if options.branch:
@@ -329,7 +350,8 @@ def DoBuildman(options, args, toolchains=None, make_func=None, brds=None, warnings_as_errors=options.warnings_as_errors, work_in_output=options.work_in_output, test_thread_exceptions=test_thread_exceptions, - adjust_cfg=adjust_cfg) + adjust_cfg=adjust_cfg, + allow_missing=allow_missing) builder.force_config_on_failure = not options.quick if make_func: builder.do_make = make_func
tools/buildman/func_test.py +104 -2
129 lines not on this page · raw message
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 15/16] buildman: Add --allow-missing flag to allow missing blobs
From: Tom Rini <[email protected]>
Add a new flag to buildman so that we will in turn pass BINMAN_ALLOW_MISSING=1 to 'make'. Make use of this flag in CI.
Allow the settings file to control this.
---
Changes in v5:
- Split out config_fname change into a separate patch
- Rename GetGlobalValue to GetGlobalItemValue
- Fix 'items' typo
- Simplify implementation of GetGlobalItemValue()
- Use '[global]' for the doc heading
- Use double tick for arguments
- Drop redundant allow_missing code
- Split out the tests more
Changes in v4:
- Various changes that were unfortunately not recorded
Changes in v3:
- Add tests docs and a settings-file option
.azure-pipelines.yml | 2 +- .gitlab-ci.yml | 6 +- tools/buildman/bsettings.py | 11 ++++ tools/buildman/builder.py | 5 +- tools/buildman/builderthread.py | 2 + tools/buildman/buildman.rst | 43 +++++++++++++ tools/buildman/cmdline.py | 6 ++ tools/buildman/control.py | 24 +++++++- tools/buildman/func_test.py | 106 +++++++++++++++++++++++++++++++- 9 files changed, 197 insertions(+), 8 deletions(-)
Applied to u-boot-dm, thanks!
PATCH v5 16/16 binman: Add documentation for the command line args
In reply to Simon GlassAdd command-line documentation for binman.
---
Changes in v5:
- Add new patch with documentation for the command line args
tools/binman/binman.rst | 300 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 299 insertions(+), 1 deletion(-)
tools/binman/binman.rst +299 -1
@@ -505,7 +505,6 @@ be located anywhere in the image. An image header (typically at the start or end of the image) can be used to point to the FDT map. See fdtmap and image-header entries for more information. - Map files ---------
@@ -1339,6 +1338,305 @@ generated from the source code using: bintools +Binman commands and arguments +============================= + +Usage:: + + binman [-h] [-B BUILD_DIR] [-D] [-H] [--toolpath TOOLPATH] [-T THREADS] + [--test-section-timeout] [-v VERBOSITY] [-V] + {build,bintool-docs,entry-docs,ls,extract,replace,test,tool} ... + +Binman provides the following commands: + +- **build** - build images +- **bintools-docs** - generate documentation about bintools +- **entry-docs** - generate documentation about entry types +- **ls** - list an image +- **extract** - extract files from an image +- **replace** - replace one or more entries in an image +- **test** - run tests +- **tool** - manage bintools + +Options: + +-h, --help + Show help message and exit + +-B BUILD_DIR, --build-dir BUILD_DIR + Directory containing the build output + +-D, --debug + Enabling debugging (provides a full traceback on error) + +-H, --full-help + Display the README file + +--toolpath TOOLPATH + Add a path to the directories containing tools + +-T THREADS, --threads THREADS + Number of threads to use (0=single-thread). Note that -T0 is useful for + debugging since everything runs in one thread. + +-v VERBOSITY, --verbosity VERBOSITY + Control verbosity: 0=silent, 1=warnings, 2=notices, 3=info, 4=detail, + 5=debug + +-V, --version + Show the binman version + +Test options: + +--test-section-timeout + Use a zero timeout for section multi-threading (for testing) + +Commands are described below. + +binman build +------------ + +This builds one or more images using the provided image description. + +Usage:: + + binman build [-h] [-a ENTRY_ARG] [-b BOARD] [-d DT] [--fake-dtb] + [--fake-ext-blobs] [--force-missing-bintools FORCE_MISSING_BINTOOLS] + [-i IMAGE] [-I INDIR] [-m] [-M] [-n] [-O OUTDIR] [-p] [-u] + [--update-fdt-in-elf UPDATE_FDT_IN_ELF] [-W] + +Options: + +-h, --help + Show help message and exit + +-a ENTRY_ARG, --entry-arg ENTRY_ARG + Set argument value `arg=value`. See + `Passing command-line arguments to entries`_. + +-b BOARD, --board BOARD + Board name to build. This can be used instead of `-d`, in which case the + file `u-boot.dtb` is used, within the build directory's board subdirectory. + +-d DT, --dt DT + Configuration file (.dtb) to use. This must have a top-level node called + `binman`. See `Image description format`_. + +-i IMAGE, --image IMAGE + Image filename to build (if not specified, build all) + +-I INDIR, --indir INDIR + Add a path to the list of directories to use for input files. This can be + specified multiple times to add more than one path. + +-m, --map + Output a map file for each image. See `Map files`_. + +-M, --allow-missing + Allow external blobs and bintools to be missing. See `External blobs`_. + +-n, --no-expanded + Don't use 'expanded' versions of entries where available; normally 'u-boot' + becomes 'u-boot-expanded', for example. See `Expanded entries`_. + +-O OUTDIR, --outdir OUTDIR + Path to directory to use for intermediate and output files + +-p, --preserve + Preserve temporary output directory even if option -O is not given + +-u, --update-fdt + Update the binman node with offset/size info. See + `Access to binman entry offsets at run time (fdt)`_. + +--update-fdt-in-elf UPDATE_FDT_IN_ELF + Update an ELF file with the output dtb. The argument is a string consisting + of four parts, separated by commas. See `Updating an ELF file`_. + +-W, --ignore-missing + Return success even if there are missing blobs/bintools (requires -M) + +Options used only for testing: + +--fake-dtb + Use fake device tree contents + +--fake-ext-blobs + Create fake ext blobs with dummy content + +--force-missing-bintools FORCE_MISSING_BINTOOLS + Comma-separated list of bintools to consider missing + +binman bintool-docs +------------------- + +Usage:: + + binman bintool-docs [-h] + +This outputs documentation for the bintools in rST format. See +`Bintool Documentation`_. + +binman entry-docs +----------------- + +Usage:: + + binman entry-docs [-h] + +This outputs documentation for the entry types in rST format. See +`Entry Documentation`_. + +binman ls +--------- + +Usage:: + + binman ls [-h] -i IMAGE [paths ...] + +Positional arguments: + +paths + Paths within file to list (wildcard) + +Pptions: + +-h, --help + show help message and exit + +-i IMAGE, --image IMAGE + Image filename to list + +This lists an image, showing its contents. See `Listing images`_. + +binman extract +-------------- + +Usage:: + + binman extract [-h] [-F FORMAT] -i IMAGE [-f FILENAME] [-O OUTDIR] [-U] + [paths ...] + +Positional arguments: + +Paths + Paths within file to extract (wildcard) + +Options: + +-h, --help + show help message and exit + +-F FORMAT, --format FORMAT + Select an alternative format for extracted data + +-i IMAGE, --image IMAGE + Image filename to extract + +-f FILENAME, --filename FILENAME + Output filename to write to + +-O OUTDIR, --outdir OUTDIR + Path to directory to use for output files + +-U, --uncompressed + Output raw uncompressed data for compressed entries + +This extracts the contents of entries from an image. See +`Extracting files from images`_. + +binman replace +-------------- + +Usage:: + + binman replace [-h] [-C] -i IMAGE [-f FILENAME] [-F] [-I INDIR] [-m] + [paths ...] + +Positional arguments: + +paths + Paths within file to replace (wildcard) + +Options: + +-h, --help + show help message and exit + +-C, --compressed + Input data is already compressed if needed for the entry + +-i IMAGE, --image IMAGE + Image filename to update + +-f FILENAME, --filename FILENAME + Input filename to read from + +-F, --fix-size + Don't allow entries to be resized + +-I INDIR, --indir INDIR + Path to directory to use for input files + +-m, --map + Output a map file for the updated image + +This replaces one or more entries in an existing image. See +`Replacing files in an image`_. + +binman test +----------- + +Usage:: + + binman test [-h] [-P PROCESSES] [-T] [-X] [tests ...] + +Positional arguments: + +tests + Test names to run (omit for all) + +Options: + +-h, --help + show help message and exit + +-P PROCESSES, --processes PROCESSES + set number of processes to use for running tests. This defaults to the + number of CPUs on the machine + +-T, --test-coverage + run tests and check for 100% coverage + +-X, --test-preserve-dirs + Preserve and display test-created input directories; also preserve the + output directory if a single test is run (pass test name at the end of the + command line + +binman tool +----------- + +Usage:: + + binman tool [-h] [-l] [-f] [bintools ...] + +Positional arguments: + +bintools + Bintools to process + +Options: + +-h, --help + show help message and exit + +-l, --list + List all known bintools + +-f, --fetch + Fetch a bintool from a known location. Use `all` to fetch all and `missing` + to fetch any missing tools. + Technical details =================
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Re: [PATCH v5 16/16] binman: Add documentation for the command line args
Add command-line documentation for binman.
---
Changes in v5:
- Add new patch with documentation for the command line args
tools/binman/binman.rst | 300 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 299 insertions(+), 1 deletion(-)
Applied to u-boot-dm, thanks!