summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2014-06-25 17:50:28 -0700
committerMarc Jones <marc.jones@se-eng.com>2015-01-13 21:29:38 +0100
commit01f5396bdce2cd69e91c54ef120b11e457ab2694 (patch)
tree8c99353ec68c7ca15eb872072074939b609dd19b /util
parentfa6bd71bddca404e99e4ab119b890020c0fda998 (diff)
cbfstool: Remove arch check for different stages
Remove the arch check for each stage as the arch for different stages can be different based on the SoC. e.g.: Rush has arm32-based romstage whereas arm64-based ramstage BUG=None BRANCH=None TEST=Compiles successfully for nyan, link and rush Original-Change-Id: I561dab5a5d87c6b93b8d667857d5e181ff72e35d Original-Signed-off-by: Furquan Shaikh <furquan@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/205761 Original-Tested-by: Furquan Shaikh <furquan@chromium.org> Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Commit-Queue: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-by: Ronald Minnich <rminnich@chromium.org> (cherry picked from commit 6a6a87b65fcab5a7e8163258c7e8d704fa8d97c3) Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: Ic412d60d8a72dac4f9807cae5d8c89499a157f96 Reviewed-on: http://review.coreboot.org/8179 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/cbfstool/elfheaders.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/util/cbfstool/elfheaders.c b/util/cbfstool/elfheaders.c
index bee44d8ca9..98a06c5b08 100644
--- a/util/cbfstool/elfheaders.c
+++ b/util/cbfstool/elfheaders.c
@@ -608,16 +608,6 @@ elf_headers(const struct buffer *pinput,
/* Copy out the parsed elf header. */
memcpy(ehdr, &pelf.ehdr, sizeof(*ehdr));
- // The tool may work in architecture-independent way.
- if (arch != CBFS_ARCHITECTURE_UNKNOWN &&
- !((ehdr->e_machine == EM_AARCH64) && (arch == CBFS_ARCHITECTURE_AARCH64)) &&
- !((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;
- }
-
*pphdr = calloc(ehdr->e_phnum, sizeof(Elf64_Phdr));
memcpy(*pphdr, pelf.phdr, ehdr->e_phnum * sizeof(Elf64_Phdr));