From fc024c803875f67d98128e49b83debab9bf981b2 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 25 Sep 2026 22:43:09 +0200 Subject: [PATCH] Fix bug when calling directly recovery Makefile --- common_arm/Makefile.hal | 4 ++-- recovery/Makefile | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/common_arm/Makefile.hal b/common_arm/Makefile.hal index c0a97b486..a29fa7e8b 100644 --- a/common_arm/Makefile.hal +++ b/common_arm/Makefile.hal @@ -16,11 +16,11 @@ # Default platform if no platform specified PLATFORM?=PM3RDV4 -# Standalone Mode info (path depends if make is called at top or from armsrc) +# Standalone Mode info (path depends if make is called at top, from armsrc, or from a sibling dir like recovery/bootrom) # Guard Makefile.hal against implicit rules: (with % to avoid being first goal) %/Makefile.hal: ; -include armsrc/Standalone/Makefile.hal --include Standalone/Makefile.hal +-include ../armsrc/Standalone/Makefile.hal ifndef DEFAULT_STANDALONE $(error Could not find armsrc/Standalone/Makefile.hal) endif diff --git a/recovery/Makefile b/recovery/Makefile index 22425bb1e..d3f23ee19 100644 --- a/recovery/Makefile +++ b/recovery/Makefile @@ -1,3 +1,15 @@ + +# This Makefile might have been called directly, not via the root Makefile, so: +ifeq ($(PLTNAME),) + PLATFORM_FILE ?= ../Makefile.platform + -include $(PLATFORM_FILE) + -include ../.Makefile.options.cache + include ../common_arm/Makefile.hal + ifeq ($(PLATFORM_CHANGED), true) + $(error platform definitions have been changed, please "make clean" at the root of the project) + endif +endif + include ../common_arm/Makefile.common INSTALLFW = recovery.bin