[U-Boot] [PATCH v2 1/2] buildman: Extract environment as part of each build

Alex Kiernan alex.kiernan at gmail.com
Thu May 31 04:45:05 UTC 2018


On Wed, May 30, 2018 at 8:18 PM Simon Glass <sjg at chromium.org> wrote:
>
> On 30 May 2018 at 04:07, Alex Kiernan <alex.kiernan at gmail.com> wrote:
> > On Tue, May 29, 2018 at 5:24 PM Alex Kiernan <alex.kiernan at gmail.com> wrote:
> >
> >> As we're building the boards, extract the default U-Boot environment to
> >> uboot.env so we can interrogate it later.
> >
> >> Signed-off-by: Alex Kiernan <alex.kiernan at gmail.com>
> >> ---
> >
> >> Changes in v2:
> >> - capture stderr/stdout so when the build fails we don't produce spurious
> >>    output as part of the build
> >
> >>   tools/buildman/builderthread.py | 10 ++++++++++
> >>   1 file changed, 10 insertions(+)
>
> Reviewed-by: Simon Glass <sjg at chromium.org>
>
> >
> >> diff --git a/tools/buildman/builderthread.py
> > b/tools/buildman/builderthread.py
> >> index 0efe80d945..c84ba6acf1 100644
> >> --- a/tools/buildman/builderthread.py
> >> +++ b/tools/buildman/builderthread.py
> >> @@ -351,6 +351,16 @@ class BuilderThread(threading.Thread):
> >>                       lines.append(size_result.stdout.splitlines()[1] + '
> > ' +
> >>                                    rodata_size)
> >
> >> +            # Extract the environment from U-Boot and dump it out
> >> +            cmd = ['%sobjcopy' % self.toolchain.cross, '-O', 'binary',
> >> +                   '-j', '.rodata.default_environment',
> >> +                   'env/built-in.o', 'uboot.env']
> >> +            command.RunPipe([cmd], capture=True,
> >> +                            capture_stderr=True, cwd=result.out_dir,
> >> +                            raise_on_error=False, env=env)
> >> +            ubootenv = os.path.join(result.out_dir, 'uboot.env')
> >> +            self.CopyFiles(result.out_dir, build_dir, '', ['uboot.env'])
> >> +
> >>               # Write out the image sizes file. This is similar to the
> > output
> >>               # of binutil's 'size' utility, but it omits the header line
> > and
> >>               # adds an additional hex value at the end of each line for
> > the
> >
> > This is failing in Travis:
> >
> > https://travis-ci.org/akiernan/u-boot/jobs/385534243#L899
>
>
> For the patman failure, you could try this patch:
>
> http://patchwork.ozlabs.org/patch/914202/
>

Thanks, that fixed half of it, the other was I needed to capture
objcopy during functional tests; I really need to work out why make
tests gives me out of the box failures so I can use it all the time.

-- 
Alex Kiernan


More information about the U-Boot mailing list