Skip to content

Commit

Permalink
binman: Use the Makefile for u_boot_no_ucode_ptr
Browse files Browse the repository at this point in the history
Remove this file from git and instead build it using the Makefile.

Signed-off-by: Simon Glass <[email protected]>
  • Loading branch information
sjg20 committed Oct 15, 2019
1 parent f514d8f commit bccd91d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tools/binman/elf_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def BuildElfTestFiles(target_dir):
del os.environ['MAKEFLAGS']
tools.Run('make', '-C', target_dir, '-f',
os.path.join(testdir, 'Makefile'), 'SRC=%s/' % testdir,
'bss_data', 'u_boot_ucode_ptr')
'bss_data', 'u_boot_ucode_ptr', 'u_boot_no_ucode_ptr')


class TestElf(unittest.TestCase):
Expand Down
10 changes: 5 additions & 5 deletions tools/binman/ftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def _SetupSplElf(cls, src_fname='bss_data'):
Filename of ELF file to use as SPL
"""
# TODO([email protected]): Drop this when all Elf files use ElfTestFile()
if src_fname in ['bss_data', 'u_boot_ucode_ptr']:
if src_fname in ['bss_data', 'u_boot_ucode_ptr', 'u_boot_no_ucode_ptr']:
fname = cls.ElfTestFile(src_fname)
else:
fname = cls.TestFile(src_fname)
Expand Down Expand Up @@ -1091,8 +1091,8 @@ def testMicrocodeWithoutPtrInElf(self):
"""Test that a U-Boot binary without the microcode symbol is detected"""
# ELF file without a '_dt_ucode_base_size' symbol
try:
with open(self.TestFile('u_boot_no_ucode_ptr'), 'rb') as fd:
TestFunctional._MakeInputFile('u-boot', fd.read())
TestFunctional._MakeInputFile('u-boot',
tools.ReadFile(self.ElfTestFile('u_boot_no_ucode_ptr')))

with self.assertRaises(ValueError) as e:
self._RunPackUbootSingleMicrocode()
Expand All @@ -1114,8 +1114,8 @@ def testMicrocodeNotInImage(self):

def testWithoutMicrocode(self):
"""Test that we can cope with an image without microcode (e.g. qemu)"""
with open(self.TestFile('u_boot_no_ucode_ptr'), 'rb') as fd:
TestFunctional._MakeInputFile('u-boot', fd.read())
TestFunctional._MakeInputFile('u-boot',
tools.ReadFile(self.ElfTestFile('u_boot_no_ucode_ptr')))
data, dtb, _, _ = self._DoReadFileDtb('044_x86_optional_ucode.dts', True)

# Now check the device tree has no microcode
Expand Down
Binary file removed tools/binman/test/u_boot_no_ucode_ptr
Binary file not shown.

0 comments on commit bccd91d

Please sign in to comment.