RISCV: add this architecture to cbfstool

Change-Id: I6d972e595f12585cda08e1a6d2b94b4bf4f212f5
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: http://review.coreboot.org/7067
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Ronald G. Minnich
2014-10-16 10:55:39 +00:00
parent a9db82fbaf
commit 833bf20f92
4 changed files with 47 additions and 0 deletions

View File

@ -611,6 +611,7 @@ elf_headers(const struct buffer *pinput,
// The tool may work in architecture-independent way.
if (arch != CBFS_ARCHITECTURE_UNKNOWN &&
!((ehdr->e_machine == EM_ARM) && (arch == CBFS_ARCHITECTURE_ARM)) &&
!((ehdr->e_machine == EM_RISCV) && (arch == CBFS_ARCHITECTURE_RISCV)) &&
!((ehdr->e_machine == EM_386) && (arch == CBFS_ARCHITECTURE_X86))) {
ERROR("The stage file has the wrong architecture\n");
return -1;