mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-10-01 09:00:45 +09:00
buildman: Extract environment as part of each build
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@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
bf6226c3c4
commit
0ddc510ea3
@ -351,6 +351,16 @@ class BuilderThread(threading.Thread):
|
|||||||
lines.append(size_result.stdout.splitlines()[1] + ' ' +
|
lines.append(size_result.stdout.splitlines()[1] + ' ' +
|
||||||
rodata_size)
|
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
|
# Write out the image sizes file. This is similar to the output
|
||||||
# of binutil's 'size' utility, but it omits the header line and
|
# 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
|
# adds an additional hex value at the end of each line for the
|
||||||
|
@ -327,6 +327,9 @@ class TestFunctional(unittest.TestCase):
|
|||||||
def _HandleCommandObjdump(self, args):
|
def _HandleCommandObjdump(self, args):
|
||||||
return command.CommandResult(return_code=0)
|
return command.CommandResult(return_code=0)
|
||||||
|
|
||||||
|
def _HandleCommandObjcopy(self, args):
|
||||||
|
return command.CommandResult(return_code=0)
|
||||||
|
|
||||||
def _HandleCommandSize(self, args):
|
def _HandleCommandSize(self, args):
|
||||||
return command.CommandResult(return_code=0)
|
return command.CommandResult(return_code=0)
|
||||||
|
|
||||||
@ -359,6 +362,8 @@ class TestFunctional(unittest.TestCase):
|
|||||||
return self._HandleCommandNm(args)
|
return self._HandleCommandNm(args)
|
||||||
elif cmd.endswith('objdump'):
|
elif cmd.endswith('objdump'):
|
||||||
return self._HandleCommandObjdump(args)
|
return self._HandleCommandObjdump(args)
|
||||||
|
elif cmd.endswith('objcopy'):
|
||||||
|
return self._HandleCommandObjcopy(args)
|
||||||
elif cmd.endswith( 'size'):
|
elif cmd.endswith( 'size'):
|
||||||
return self._HandleCommandSize(args)
|
return self._HandleCommandSize(args)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user