mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 01:53:51 +01:00
makefiles/tests: use FLASHFILE for hash comparision instead of ELFFILE
Let's consider firmwares as identical if their flash files are matching. This will have the side effect that hash mismatches for ESP32 due to different .debug sections in the ELFFILE are prevented, as for ESP32 the BINFILE is used.
This commit is contained in:
parent
90b373e1f2
commit
d1317abc02
@ -395,11 +395,6 @@ ifneq (,$(IOTLAB_NODE))
|
||||
PROGRAMMER ?= iotlab
|
||||
# iotlab uses ELFFILE by default for flashing boards.
|
||||
FLASHFILE ?= $(ELFFILE)
|
||||
# RIOT_CI_BUILD disables the build of BINFILE which is required for flashing
|
||||
# on IoT-LAB
|
||||
ifeq (1,$(RIOT_CI_BUILD))
|
||||
BUILD_FILES += $(BINFILE)
|
||||
endif
|
||||
# Disable IOTLAB_NODE if inside Docker to avoid including the
|
||||
# iotlab.single.inc.mk file which is useless there: it's only useful for
|
||||
# flashing and this is done outside of Docker.
|
||||
@ -654,6 +649,7 @@ endif
|
||||
ELFFILE ?= $(BINDIR)/$(APPLICATION).elf
|
||||
HEXFILE ?= $(ELFFILE:.elf=.hex)
|
||||
BINFILE ?= $(ELFFILE:.elf=.bin)
|
||||
HASHFILE ?= $(BINFILE)
|
||||
MAPFILE ?= $(ELFFILE:.elf=.map)
|
||||
|
||||
ifneq (,$(filter suit,$(USEMODULE)))
|
||||
@ -686,13 +682,7 @@ ifeq (,$(FLASHFILE))
|
||||
$(error FLASHFILE is not defined for this board: $(FLASHFILE))
|
||||
endif
|
||||
|
||||
# By default always build ELFFILE, BINFILE and FLASHFILE
|
||||
ifeq ($(RIOT_CI_BUILD),1)
|
||||
# Don't build BINFILE on the CI to save some computation time
|
||||
BUILD_FILES += $(ELFFILE) $(FLASHFILE)
|
||||
else
|
||||
BUILD_FILES += $(ELFFILE) $(BINFILE) $(FLASHFILE)
|
||||
endif
|
||||
BUILD_FILES += $(ELFFILE) $(BINFILE) $(FLASHFILE) $(HASHFILE)
|
||||
|
||||
# variables used to compile and link c++
|
||||
ifneq (,$(filter cpp,$(USEMODULE)))
|
||||
|
||||
@ -31,3 +31,6 @@ endif
|
||||
|
||||
# system objcopy is not able to generate a binfile for MIPS
|
||||
BINFILE =
|
||||
|
||||
# hence, use HEXFILE instead for hashing
|
||||
HASHFILE = $(HEXFILE)
|
||||
|
||||
@ -34,3 +34,6 @@ endif
|
||||
|
||||
# system objcopy is not able to generate a binfile for MIPS
|
||||
BINFILE =
|
||||
|
||||
# hence, use HEXFILE instead for hashing
|
||||
HASHFILE = $(HEXFILE)
|
||||
|
||||
@ -74,7 +74,10 @@ test-with-config/check-config:
|
||||
# this target only makes sense if an ELFFILE is actually created, thus guard by
|
||||
# RIOTNOLINK="".
|
||||
ifeq (,$(RIOTNOLINK))
|
||||
test-input-hash: $(TESTS) $(TESTS_WITH_CONFIG) $(TESTS_AS_ROOT) $(ELFFILE) $(TEST_EXTRA_FILES)
|
||||
ifeq (,$(HASHFILE))
|
||||
$(error HASHFILE is empty for $(BOARD))
|
||||
endif
|
||||
test-input-hash: $(TESTS) $(TESTS_WITH_CONFIG) $(TESTS_AS_ROOT) $(HASHFILE) $(TEST_EXTRA_FILES)
|
||||
sha1sum $^ > $(BINDIR)/test-input-hash.sha1
|
||||
else
|
||||
test-input-hash:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user