[PATCH 1/2] fixup! Add security policy support

Ahmad Fatoum a.fatoum at pengutronix.de
Tue Sep 30 02:35:27 PDT 2025


Makefile: fix spurious find No such file or directory warnings

When building with:

  $ ./MAKEALL -O build-arm -a arm imx_v8_defconfig

we run into a couple of messages:

  Building arm64 imx_v8_defconfig
  Configure: OK
  find: ‘common’: No such file or directory
  find: ‘drivers’: No such file or directory
  find: ‘commands’: No such file or directory
  find: ‘lib’: No such file or directory
  [snip]

This is because the working directory during the run of MAKEALL is the
build directory, which at such an early time may not have these
directories yet.

Fix this by explicitly referencing the build directory while suppressing
the error.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 760ac28e8ff8..5d39261d7b74 100644
--- a/Makefile
+++ b/Makefile
@@ -1085,7 +1085,7 @@ $(sort $(BAREBOX_OBJS)) $(BAREBOX_LDS) $(BAREBOX_PBL_OBJS): $(barebox-dirs) ;
 
 PHONY += $(barebox-dirs)
 $(barebox-dirs): prepare scripts
-	@find $@ -name policy-list | xargs rm -f
+	@find $(objtree)/$@ -name policy-list -exec rm -f {} \; 2>/dev/null || true
 	$(Q)$(MAKE) $(build)=$@
 
 # Store (new) KERNELRELASE string in include/config/kernel.release
-- 
2.47.3




More information about the barebox mailing list